For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 12 replies, 3 voices, and was last updated 22 years ago by
Scott Anderson.
-
AuthorPosts
-
Christopher TuckMemberI am having problems debugging a web project with MyEclipse using Tomcat. I am running eclipse 2.1 with Java SDK 1.4.2.
I can deploy the project and start Tomcat successfully using the MyEclipse button wizards. The project then runs as expected. However I am unable to debug the project correctly.
In the eclipse debug perspective I can only 3 threads running under tomcatServer – Finalizer, Reference Handler, and main. Previously using the sysdeo tomcat plugin I could see a thread for each web application deployed. If I add a breakpoint to my servlet then execution halts at that point (which I can tell from the console output) however eclipse debug does not detect this. The play button is still greyed out and the file with the code does not open. The only way to recover from this is to terminate the server and restart it. Is there an additional step I need to complete to get debug working?
A side question. Is there a way to run the Sysdeo tomcat concurrently with a MyEclipse installation (as a work around for the problem above)? Currently it seems that MyEclipse does something with the Tomcat classpath which still affects it even when you start tomcat using the Sysdeo plugin. Uninstalling MyEclipse allows the sysdeo plugin to work correctly, of course you lose all the other cool stuff!
regards,
Chris Tuck
Expert Information ServicesAugust 25, 2003 at 8:28 am #198034
Scott AndersonParticipantChris,
You didn’t provide OS or MyEclipse version information so I’ll have to guess a bit.
In the eclipse debug perspective I can only 3 threads running under tomcatServer – Finalizer, Reference Handler, and main.
We’ve seen this exact behavior only once or twice in user reports. In every case, the cause was environmental and required a reinstallation of the JDK or Eclipse in order to correct it. Since you’ve obviously still got the Sysdeo Tomcat plugin installed, I’d suggest installing a clean installation of Eclipse in parallel and installing MyEclipse on that instance to remove the possibility of interference problems. The Sysdeo plugin does quite a bit with classpaths and classloaders so I’d suspect an interaction problem here. Installing on a fresh Eclipse 2.1.1 installation will ensure that we can eliminate interference as a cause of the issue. Like I said though, in each case it was something “odd” in one of the existing installations that contributed to the problems.
Please let us know what actions you take and how successful they are so that we can refine our knowledge of this particular behavior.
–Scott
MyEclipse SupportAugust 25, 2003 at 7:17 pm #198064
Christopher TuckMemberHi Scott,
@scott wrote:
Chris,
You didn’t provide OS or MyEclipse version information so I’ll have to guess a bit.
Sorry about that. I am running Windows XP Professional Service Pack 1 with MyEclipse 2.5.1 and Eclipse SDK 2.1.
@scott wrote:
Since you’ve obviously still got the Sysdeo Tomcat plugin installed, I’d suggest installing a clean installation of Eclipse in parallel and installing MyEclipse on that instance to remove the possibility of interference problems. The Sysdeo plugin does quite a bit with classpaths and classloaders so I’d suspect an interaction problem here. Installing on a fresh Eclipse 2.1.1 installation will ensure that we can eliminate interference as a cause of the issue.
I was actually unstalling Sysdeo and reinstalling myeclipse in my testing so the behaviour I mentioned was after removing the Sysdeo plugin. As you suggested I installed a clean eclipse with just my eclipse just incase the sysdeo tomcat plugin was leaving anything behind. However I still get the same behaviour.
I am also running a clean install of the Java SDK 1.4.2. I was previously running 1.4.0.2 so that was one of the first things I tried.
Thanks for your help,
Chris Tuck
Expert Information ServicesAugust 25, 2003 at 7:40 pm #198065
Scott AndersonParticipantAs you suggested I installed a clean eclipse with just my eclipse just incase the sysdeo tomcat plugin was leaving anything behind.
Good deal. However the next thing I’d suggest is installing a fresh instance of Tomcat. The Sysdeo plugin modifes the server.xml file to suite its needs and we don’t test against these modifications.
Also, although you provided your Eclipse version, you didn’t include the build id. Can you let me know what that is please? It’s available at Help > About Eclipse Platform.
–Scott
MyEclipse SupportAugust 25, 2003 at 8:04 pm #198066
Christopher TuckMemberHi Scott,
I tried a clean install of tomcat but that gave me the same behaviour. The build id for eclipse is 200303272130.
thanks,
Chris Tuck
Expert Information ServicesAugust 25, 2003 at 8:34 pm #198068
Scott AndersonParticipantI’ve asked for some internal help to aide us in coming up with new ideas on this one. At this point, in summary you have a Windows 2000, freshly installed Eclipse 2.1, MyEclipse 2.5.1, and a clean version of JDK 1.4.2 as the default VM and used to launch Tomcat, correct? By the way, I’d suggest upgrading to MyEclipse 2.6.0 as it has many improvements and fixes. You can do this through the update manager as documented in the FAQ on the topic.
One more question. How may plugins in the <eclipse>/plugins directory begin with org.eclipse.pde.*? Does Tomcat report any startup errors? Can you run and debug just a plain Java application consisting of a simple main method? Also, please check your Eclipse log file at <workspace>/.metadata/.log and see if it contains any exceptions that look “suspicious”.
In the meantime, I dug up these old threads with similar problems. Could you read them just in case they make you think of something in the interim?
https://www.genuitec.com/forums/topic/i-can-t-debug-my-jsps-closed/&highlight=tomcat+threads
https://www.genuitec.com/forums/topic/how-to-visualize-all-tomcat-s-thread/&highlight=tomcat+threads–Scott
MyEclipse SupportAugust 26, 2003 at 1:55 am #198073
Christopher TuckMemberHi Scott,
These are in my plugins directory:
26/08/2003 09:22 AM <DIR> org.eclipse.pde.build_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde.core_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde.doc.user_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde.runtime_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde.source_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde.ui_2.1.0
26/08/2003 09:22 AM <DIR> org.eclipse.pde_2.1.0Tomcat doesn’t display any errors on startup. There are no suspicious exceptions in <workspace>/.metadata/.log.
I have tried a simple java main method and debugging that and found that it doesn’t work either. Same behaviour, it halts at the debug point but eclipse still thinks that the thread is running. If I pause and then play the thread in eclipse it starts off again and completes (presumably the pause is ignored). I tried the same project in a clean install of eclipse and it debugged fine.
So it seems my problem is not tomcat related.
Btw I am running Windows XP Pro SP1, not 2000. Running java -version gives me:
C:\j2sdk1.4.2\bin>java -version
java version “1.4.2”
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)thanks,
Chris Tuck
Expert Information ServicesAugust 26, 2003 at 9:11 am #198085
Scott AndersonParticipantChris,
I have tried a simple java main method and debugging that and found that it doesn’t work either. Same behaviour, it halts at the debug point but eclipse still thinks that the thread is running. If I pause and then play the thread in eclipse it starts off again and completes (presumably the pause is ignored). I tried the same project in a clean install of eclipse and it debugged fine.
Then it would appear that the errant debug behavior is caused by something amiss with your Eclipse installation. I’d suggest you install MyEclipse onto the clean install in which debugging “plain old Java” worked, as this should remedy the problem you’re seeing with Tomcat.
–Scott
MyEclipse SupportAugust 26, 2003 at 6:15 pm #198110
Christopher TuckMember@scott wrote:
Then it would appear that the errant debug behavior is caused by something amiss with your Eclipse installation. I’d suggest you install MyEclipse onto the clean install in which debugging “plain old Java” worked, as this should remedy the problem you’re seeing with Tomcat.
Hi Scott,
the test was done on a clean install of eclipse and myeclipse (versions listed previously). I repeated the process just then to check and got the same behaviour. Any other ideas of what to try?thanks,
Chris Tuck
Expert Information ServicesAugust 26, 2003 at 7:19 pm #198114
Scott AndersonParticipantChris,
Unfortunately, this particular problem has occurred only a couple of times and in each case the solution defied logic. It usually came down to the user “getting out the big hammer” and uninstalling and reinstalling “the world” in order to get things working.
However, short of that I’d suggest at least trying out our recently released 2.6.0 version to see if the update remedies the problem in some way. You can either install it using the Eclipse update manager or by using our double-click installer. Each method is detailed in the FAQ. Please let us know what the result of this is.
–Scott
MyEclipse SupportAugust 27, 2003 at 1:24 am #198120
Christopher TuckMemberHi Scott,
was finally able to resolve by switching to Java SDK 1.4.1_04 (on suggestion of a colleague). Once I did that then debugging worked in Tomcat as expected, either with MyEclipse 2.5.1 or 2.6. So the problem seemed to be caused by previously trying to use Java SDK 1.4.0_02, and then 1.4.2, both which displayed the same behaviour.
regards,
Chris Tuck
Expert Information ServicesAugust 27, 2003 at 8:44 am #198125
support-michaelKeymasterThanks you for your persistence in isolating this problem. We have been trying to isolate the JDK versions where this problem arises with no success in our lab environment. What is interesting is that we have a number of JDK 1.4.2 environments running Tomcat with debug support functioning properly. Your feedback will help us better document this environment problem.
Thanks,
Michael
MyEclipse SupportAugust 27, 2003 at 8:46 am #198126
Scott AndersonParticipantChris,
That makes sense because, as it turns out, there have been mixed reviews of using JDK 1.4.2 with Eclipse 2.1. It works for some and not for others. Another lesson learned: bleeding edge JDK releases are better left for someone else to debug. 🙂
Thanks for hanging in there, working through this, and posting the solution back to the forum so now others can find it with the search facility.
–Scott
MyEclipse Support -
AuthorPosts