facebook

Tomcat/IDE hangs when break point is set [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 15 posts - 1 through 15 (of 23 total)
  • Author
    Posts
  • #196687 Reply

    srau
    Member

    Hi – We are using Tomcat 4.1.24 with Eclipse 2.1 and the EA workbench. I can deploy and start the application. However, when I insert a breakpoint, Tomcat/Eclipse IDE seems to hang and we can never step through the code.

    I see two java processes in the task manager (ide and tomcat) but nothing seems to happen. This is very easy to reproduce in our environment.

    Do you have any suggestions on what we can do ? Is this an IDE bug or a plugin problem ? I have 512mb on my desktop so that should be ample to run our application.

    Thanks
    S Rau

    #196688 Reply

    Scott Anderson
    Participant

    Could it be that you’re just stopped at the breakpoint, but don’t realize it because you’re not looking at the Debug View in the Debug Perspective?

    –Scott
    MyEclipse Support

    #196698 Reply

    srau
    Member

    No 🙂 That’s not the case.

    I did check and make sure that we had not stopped at the breakpoint.

    #196699 Reply

    Scott Anderson
    Participant

    Just thought I’d check. This has actually confused a large number of people. 🙂

    In all honesty, we’ve never seen or heard about anything like you describe. Would you verify that you’re using Eclipse 2.1, not 2.1.1 or an “M” build? When you say the IDE is non-responsive, does that mean every view in every perspective? Also, were are you trying to set the breakpoint in general; what type of code is it? When you deploy, I assume you’re using our deployer and not modifying the Tomcat server.xml file to add a context, correct? Is this reproducable on other machines? What specific JDK version are you using, both to launch Eclipse and to run Tomcat? Have you tried a different one? Can you narrow it down to an exact set of steps to reproduce the problem? Can you think of anything that is the least bit unique about your environment or configuration?

    –Scott
    MyEclipse Support

    #196840 Reply

    mstamp
    Member

    Scott –

    I’m experiencing the same problem (place breakpoint(s) in HelloWorldServlet.java, hit the servlet in the browser, browser hangs, but IDE debugger doesn’t get activated, i.e., can’t step through code). I’m using Eclipse 2.1.0, MyEclipse 2.1.1, Tomcat 5.0.4 (get the same result with Tomcat 5.0.3), Win 2k Pro…

    Thanks,

    Mike Stamp

    #196841 Reply

    Wayne Kidd
    Member

    @mstamp wrote:

    Scott –

    I’m experiencing the same problem (place breakpoint(s) in HelloWorldServlet.java, hit the servlet in the browser, browser hangs, but IDE debugger doesn’t get activated, i.e., can’t step through code). I’m using Eclipse 2.1.0, MyEclipse 2.1.1, Tomcat 5.0.4 (get the same result with Tomcat 5.0.3), Win 2k Pro…

    Thanks,

    Mike Stamp

    It would be interesting to know if the servlet executes properly if there are no breakpoints. If not that servlet, any servlet that you have full source for.and that is running from WEB-INF/classes after having the source in the source folder.

    Wayne

    #196844 Reply

    Scott Anderson
    Participant

    Another thing to remember is that Eclipse may not always take you to the Debug Perspective -> Debug view when a breakpoint is encountered. It’s based on your preference settings. When you think you should be at a breakpoint, manually open the Debug View and check the thread states of all the Tomcat threads. Any of them suspended?

    –Scott
    MyEclipse Support

    #196846 Reply

    mstamp
    Member

    Wayne: The servlet runs and produces output with no problems when no breakpoints are set.

    Scott: I manually switch to the Debug view when I should be at a breakpoint, and all of the threads are “Running”, none suspended.

    FWIW, I’ve noticed that the app server won’t shut down properly if a breakpoint is set (can still see the javaw.exe in Task Mgr and can’t restart the app server).

    Also, I’m seeing all of the same behavior using WebLogic Server 8.1 now, as well as Tomcat.

    Thanks
    mstamp

    #196848 Reply

    Scott Anderson
    Participant

    Interesting. Do you have any problem debugging other, non-server, Java applications? Are any exceptions displayed in the Eclipse log file at <workbench>/.metainf/.log? If there are, please do not post the XML to the forum (the software hates XML). A brief summary or small stacktrace is great, as long as you change all the angle brackets for square ones.

    –Scott
    MyEclipse Support

    #196861 Reply

    mstamp
    Member

    @scott wrote:

    Interesting. Do you have any problem debugging other, non-server, Java applications? Are any exceptions displayed in the Eclipse log file at <workbench>/.metainf/.log? If there are, please do not post the XML to the forum (the software hates XML). A brief summary or small stacktrace is great, as long as you change all the angle brackets for square ones.

    –Scott
    MyEclipse Support

    When I start Eclipse, this message gets logged to .metadata\.log:

    !ENTRY com.genuitec.eclipse.ast.deploy.core 1 1 Jul 16, 2003 10:55:27.313
    !MESSAGE Can’t find resource bundle ‘com.genuitec.eclipse.ast.deploy.core.configuration’. Exception: java.util.MissingResourceException: Can’t find bundle for base name com.genuitec.eclipse.ast.deploy.core.configuration.properties, locale en_US
    !SESSION Jul 16, 2003 11:02:11.519 ———————————————
    java.version=1.4.0_01
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -os win32 -ws win32 -arch x86 -data c:\EclipseWorkspace -install file:C:/Eclipse21/

    mstamp

    #196863 Reply

    Scott Anderson
    Participant

    Actually, that’s a message about an unused resource bundle being unavailable. It’s not really a problem. What about the other quesitons?

    –Scott
    MyEclipse Support

    #196869 Reply

    Wayne Kidd
    Member

    It sure sounds like the ide is finding the class somewhere besides WEB-INF/classes. Is there a version of the same class in common/lib or somewhere else not associated with your java source files. What I am saying here is that the debugger breaks on classes that correspond to what is found in the java sources. If you have un-jarred some class out of the libraries to test, but the library is still in the classpath, the debugger could fail to recognize a match until it is too late. This should produce an error in the tomcat logs “\tomcat4\logs\…”

    Wayne

    #196870 Reply

    I am having the same problem with WebLogic. 7. I saw the following in my log:

    Command-line arguments: -os win32 -ws win32 -arch x86 -install file:C:/eclipse/
    !ENTRY com.genuitec.eclipse.ast.deploy.core 1 1 Jul 16, 2003 13:55:03.46
    !MESSAGE Can’t find resource bundle ‘com.genuitec.eclipse.ast.deploy.core.configuration’. Exception: java.util.MissingResourceException: Can’t find bundle for base name com.genuitec.eclipse.ast.deploy.core.configuration.properties, locale en_US
    !ENTRY XMLBuilderPlugin 4 0 Jul 16, 2003 14:00:59.125
    !MESSAGE Connection refused: connect
    !STACK 0
    java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:350)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:137)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:124)
    at java.net.Socket.<init>(Socket.java:268)
    at java.net.Socket.<init>(Socket.java:95)
    at sun.net.NetworkClient.doConnect(NetworkClient.java:45)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:334)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:520)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:270)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:280)
    at sun.net.www.http.HttpClient.New(HttpClient.java:292)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:417)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:510)
    at java.net.URL.openStream(URL.java:793)
    at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:748)
    at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:708)
    at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:258)
    at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:810)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
    at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)
    at org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1158)
    at com.genuitec.eclipse.j2eedt.core.builder.XMLResourceParser.parse(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.XMLResourceParser.parse(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.XMLValidationChecker.checkFile(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.ā(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.access$0(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator$A.visit(Unknown Source)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:71)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:79)
    at org.eclipse.core.internal.events.ResourceDelta.accept(ResourceDelta.java:52)
    at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.ā(Unknown Source)
    at com.genuitec.eclipse.j2eedt.core.builder.DeploymentDescriptorValidator.build(Unknown Source)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:427)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
    at org.eclipse.core.runtime.Platform.run(Platform.java:413)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:125)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:181)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:191)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:151)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:889)
    at org.eclipse.core.runtime.Platform.run(Platform.java:413)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:165)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:243)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:212)
    at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:884)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1600)
    at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:85)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)

    #196872 Reply

    mstamp
    Member

    @scott wrote:

    Actually, that’s a message about an unused resource bundle being unavailable. It’s not really a problem. What about the other quesitons?

    –Scott
    MyEclipse Support

    Scott,

    I tried debugging a non-server Java app, and got the same result: execution did not stop at my breakpoint. So I uninstalled MyEclipse, then tried to debug the non-server app again, and this time it worked. Once I reinstalled MyEclipse and tried to debug the same app, it failed again.

    mstamp

    #196874 Reply

    Scott Anderson
    Participant

    That’s peculiar. I do notice from the log entry that you’re using 1.4.0_01. These older JDK 1.4 versions had problems with their debugging implementations. Would you mind installing 1.4.1_03 and then try launching and debugging both a “regular” java application and a server application with MyEclipse installed and see if the results are different. Remember, you’ll have to add the new JDK to the workspace and modify it in the launch configuration for the “regular” app and on the [appserver]/JDK page for the server connector.

    –Scott
    MyEclipse Support

Viewing 15 posts - 1 through 15 (of 23 total)
Reply To: Tomcat/IDE hangs when break point is set [Closed]

You must be logged in to post in the forum log in