Larry Isaacs wrote:
When starting the Tomcat server, there is a "ping" thread started that
tries to establish a connection to Tomcat. When that succeeds, the
Servers view transitions that Tomcat server from "starting" to "started"
or "debugging". If "ping" doesn't succeed within the timeout, it
assumes startup failed and it kills the Tomcat process. I don't have
any explanation as to why Run on Server succeeds and Debug doesn't.
I recommend the following to gather more clues. Unzip the Tomcat
binary into a new directory to get a fresh default copy. Create a new
Tomcat runtime and server from that fresh Tomcat. Try Debug on Server
and Run on Server and see what happens. Hopefully this will tell us
if there is something different about your system that is triggering
this behavior, or it's something about changes to the Tomcat
configuration.
Note, selecting "Use Tomcat installation..." is not in any way
required for debugging. How to best configure things for debugging
kind of depends on exactly what you mean by debugging and how badly
you want to avoid restarts.
Cheers,
Larry
Alejandro wrote:
Hi Larry, thanks for your quick response.
I will try to answer your questions:
Does Run -> Run on Server behave the same or different?
Nope, in that case, Tomcat starts with no problem and I can try my
web application with no probs
What OS are you running on?
Windows XP SP3, no firewall, no anti-virus enabled. As I mentioned on
the previous post, before trying Tomcat, I used Glassfish v3 and it
worked great, no problems at all.
Was this Tomcat customized before creating the runtime and server
from it in Eclipse, or did it still have it's default settings?
Fresh install and default settings for Tomcat. Only changed the port
to 80. Only thing I changed (as I saw someone mention it is required
for debugging) is that I let Eclipse take control of the Tomcat
instalation, and checked the "Never publish automatically" checkbox.
Besides that, nothing has changed.
Towards the console output when I try to debug on Tomcat:
1-may-2009 14:54:53 org.apache.tomcat.util.digester.SetPropertiesRule
begin
ADVERTENCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context}
Setting property 'source' to 'org.eclipse.jst.j2ee.server:UCH' did
not find a matching property.
21-may-2009 14:54:53 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
C:SunSDKjdkbin;.;C:WINDOWSSunJavabin;C:WINDOWSsystem32;C:WINDOWS;C:SunSDKjdkjrebin;C:/Sun/SDK/jdk/bin/../jre/bin/client;C:/Sun/SDK/jdk/bin/../jre/bin;C:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:SunSDKjdkbin;C:Archivos
de programaTortoiseSVNbin;C:SunSDKjdkbin
21-may-2009 14:54:53 org.apache.coyote.http11.Http11Protocol init
INFO: Inicializando Coyote HTTP/1.1 en puerto http-80
21-may-2009 14:54:53 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 946 ms
21-may-2009 14:54:53 org.apache.catalina.core.StandardService start
INFO: Arrancando servicio Catalina
21-may-2009 14:54:53 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
edu.wisc.trace.uch.UCH.<init> (Line: 135)
INFO: IP Address =172.22.50.20
I can debug until the timeout expires...then the thread is killed. I
tried to look on the Tomcat/logs for a recent log but the newest is
from yesterday...the previous was the console output.
Thanks in advance...this is puzzling me...
Hi again Larry,
I tried to download the binaries and add a new Tomcat runtime server
config but no luck, I couldn't make it even start...So I unisntalled
everything and started from scratch...and I can debug now! No timeout
expires notification! Which is good, I can run and debug now with no
issues. The only thing...I keep on getting a NullPointer Exception
whenever I click on the Tomcat Server on the Servers view...below you
can find the error log:
eclipse.buildId=M20080911-1700
java.version=1.6.0_10
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=es_ES
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Fri May 22 10:05:28 CEST 2009
Problems occurred when invoking code from plug-in: "org.eclipse.jface".
java.lang.NullPointerException
at
com.sun.enterprise.jst.server.sunappsrv.actions.OpenBrowserAction.accept(OpenBrowserAction.java:66)
at
com.sun.enterprise.jst.server.sunappsrv.actions.AppServerContextAction.selectionChanged(AppServerContextAction.java:229)
at
org.eclipse.ui.actions.SelectionProviderAction.selectionChanged(SelectionProviderAction.java:143)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at
org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2062)
at
org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1638)
at
org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1104)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:392)
at
org.eclipse.wst.server.ui.internal.view.servers.ServerTableViewer$7.run(ServerTableViewer.java:463)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at
org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
As far as I'm concerned this is not affecting Tomcat in any way, it's
just an annoying thing that keeps on popping up a window.
Best regards and many thanks for your advices
Alejandro