- This topic has 9 replies, 3 voices, and was last updated 18 years, 8 months ago by
alladi.
-
AuthorPosts
-
vbonfantiMemberI’m very impressed with MyEclipse so far, but I’m having a problem setting breakpoints in servlets. Details are below. Thanks.
What operating system and version are you running?
Windows XPWhat Eclipse version and build id are you using? (Help > About Eclipse Platform)
Version: 2.1.1
Build id: 200306271545– Was Eclipse freshly installed for MyEclipse?
No, Eclipse was previously installed.– If not, was it upgraded to its current version using the update manager?
No, it was a “fresh” 2.1.1 install.– Are any other external plugins installed?
No– How many plugins in the <eclipse>/plugins directory are like org.eclipse.pde.*
org.eclipse.pde.build_2.1.0
org.eclipse.pde.core_2.1.0
org.eclipse.pde.doc.user_2.1.0
org.eclipse.pde.runtime_2.1.0
org.eclipse.pde.source_2.1.0
org.eclipse.pde.ui_2.1.0
org.eclipse.pde_2.1.0What MyEclipse version are you using? (Help > About Eclipse Platform > Features)
2.6.3What JDK version are you using to run Eclipse? (java -version)
1.3.1_09What JDK version are you using to launch your application server?
1.3.1_06 – the one installed by WebLogic within the “bea” directoryWhat steps did you take that resulted in the issue?
I’m running the Web Development Tutorial except that I’m using a WebLogic 7 connector instead of the Tomcat 5 connector. WebLogic starts fine and I can run the helloWorld.jsp and HelloWorldServlet successfully, but can’t set breakpoints in the servlet (I’m not interested in debugging JSPs at this time).If I launch WebLogic with no breakpoints set in the servlet, then the servlet runs properly. However, if I then set a breakpoint (the checkmark is displayed at the breakpoint marker) and try to run the servlet, the browser just hangs waiting for a response and the breakpoint is never hit. If I stop the browser and remove the breakpoint, the servlet agains runs successfully. I can also modify the servlet and the modifed code runs successfully.
If I set the breakpoint first and then launch WebLogic, the servlet will not run at all even after removing the breakpoint. The browser just hangs waiting for a response. Note in this case the checkmark does not appear at the breakpoint marker.
I have Weblogic configured to launch in Debug mode in the Launch preferences dialog.
What application server are you using?
WebLogic 7.0.2Are there any errors in the Eclipse log? (<workspace>/.metadata/.log)
No.
Scott AndersonParticipantFirst, thank you for posting all the relevant information to your problem on the first try. I truly appreciate it and because you were so thorough I can quickly answer your question.
The problem you’re experiencing is caused by an interaction problem between the JDK you’re using to launch WebLogic and the Eclipse debugger. The quick fix is to launch WebLogic with JDK 1.4.1+. Here are some threads that run down the problem and solution:
https://www.genuitec.com/forums/topic/debug-weblogic-closed/&highlight=weblogic+hangs
https://www.genuitec.com/forums/topic/weblogic-7-0-hanging-up-with-jsp-debugging-closed/&highlight=weblogic+hangs–Scott
MyEclipse Support
vbonfantiMemberI now have Eclipse and WebLogic both running in JDK 1.4.2 and I can now set breakpoints in my servlet. But…I have to compile my project with JDK 1.3 because that’s what it’s being deployed on. So I have the Default JDK in Eclipse set to 1.3.1_09 for Java projects and so far so good. But…we use Ant to create the deployment JARs, and Ant tasks in Eclipse run using the same JDK in which Eclipse is running, which mean my project now won’t compile using the Ant scripts (which run under JDK 1.4.2). Is there any way you know of to tell Ant to use a different JDK (the same way you can tell Eclipse to use a different JDK for Java projects). I know this is more of an Eclipse question, but I’d be grateful for any help. Thanks.
Scott AndersonParticipantI believe the inability to properly set the Ant JDK is this bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37940, which exists in 2.1. The bug report does contain a workaround, however.Another idea: can you start Eclipse with JDK 1.3.1 and use 1.4.2 only for WebLogic and get debugging to function properly? I would imagine that configuration would work properly and remove the problem you’re seeing with Ant also.
–Scott
MyEclipse Support
vbonfantiMemberYes, I found that bug and the workaround, but my problem is that the java.sql.* APIs have changed from 1.3 to 1.4, so I don’t have a class file format problem, I have an API compatibility problem–classes that compile against the 1.3 APIs won’t compile against 1.4 and vice-versa. So I really need to have Ant compiling with JDK 1.3 for this to work. (This article on JavaWorld talks about the exact problem, but I’m not sure I want to jump through the hoops he describes to solve it: http://www.javaworld.com/javaworld/jw-09-2003/jw-0926-overcome.html)
No, when I run Eclipse with JDK 1.3.1 it doesn’t work–I get the same “hanging” behavior. It only works when I run both Eclipse and WebLogic with JDK 1.4.2. It looks like I’m stuck for now switching back and forth between JDK 1.3.1 and 1.4.2 based on what I’m doing. Bummer. If you have any influence with the Eclispe developers, it sure would be nice to be able to specify the JDK for Ant to use.
Scott AndersonParticipantBummer. If you have any influence with the Eclispe developers, it sure would be nice to be able to specify the JDK for Ant to use.
Actually, the bug shows that it’s fixed in 3.0, but that’s not much help.
One other option: It could be only 1.3.1_09 that causes the problem. You might try using 1.3.1_06, which I notice you have installed, to see if it is a problem also. Or, you could just modify your Ant scripts so they don’t recompile, but simply copy the .class files that Eclipse has already compiled with JDK 1.3.1. 🙂
–Scott
MyEclipse Support
vbonfantiMemberI’ll try a 1.3.1 other than 06 and see what happens. Copying the class files isn’t an option because the Ant script deletes the classes directory, does a fresh checkout from CVS, and then recompiles everything before building the JARs.
In any case, I can probably suffer through until Eclipse 3.0 is released. Thanks for your help.
alladiMemberHow to deploy and run servlet in Eclipse
alladiMemberExecuting EJB in MyEclipse
alladiMemberexplain in detail EJB deployment in Myeclipse
Can you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks. -
AuthorPosts