- This topic has 7 replies, 2 voices, and was last updated 21 years, 2 months ago by Scott Anderson.
-
AuthorPosts
-
John ZoetebierMemberWhen I use folders different from the standard web folders, there is a problem when debugging JSP pages.
The folder structure I used is:
JavaSource : standard is “Java Source”
Web Root : standard is “Web Root”The reason I stripped the space is because a space in a folder quite often leads to problems with other tools.
When I put a breakpoint in a JSP page the debugger shows the source.
When you click on PF6 to step over, the debugger shows a window with a servet and message:
Source not found for helloWorld_jsp._jspService(HttpServletRequest, HttpServletResponse) line: 29The problem can be reproduced by using the HelloWorld example from the User Guide. In stead of the standard folders strip the space.
My configuration is:
SuSE Linux 8.2
KDE 3.1.1
Eclipse 2.1.1
Scott AndersonParticipantJohn,
Source not found for helloWorld_jsp._jspService(HttpServletRequest, HttpServletResponse) line: 29
Depending on where your breakpoint is, this may be normal. This can occur when you’re stepping from code you wrote in your JSP to boilerplate code that is generated by the JSP container into the resulting servlet. You don’t have source for the boilerplate code, so none is available in the workspace.
Given that explaination, if you don’t think that’s the case:
What version of MyEclipse are you running? Can you post the additional information that we request in the “Posting Guidelines” announcement in this forum please?When you renamed the source and web root folders, did you do it in the project creation wizard, or after the project was created? If it was after creation, what mechanism did you use to perform the renames? Can you replicate the behavior in a new project with the default JSP page created by our wizard?
I’m trying to get to a very small reproducable test case with only a few steps to create it so that we can try to replicate the behavior internally. It’s not a common issue since I use all manner of names for both of these roots so we’ll need to be very specific to define a reproducable project.
–Scott
MyEclipse Support
John ZoetebierMember>Depending on where your breakpoint is, this may be normal. This can occur when you’re stepping from code you wrote in your JSP to boilerplate code that is generated by the JSP container into the resulting servlet. You don’t >have source for the boilerplate code, so none is available in the workspace.
This is not the case. The error message is shown instantly, the first time I “step over”.
>Given that explaination, if you don’t think that’s the case:
>What version of MyEclipse are you running? Can you post the additional >information that we request in the “Posting Guidelines” announcement in this forum please?Refer to my first posting: all data are there.
>When you renamed the source and web root folders, did you do it in the project creation wizard, or after the project was created? If it was after creation, what mechanism did you use to perform the renames? Can you replicate the behavior in a new project with the default JSP page created by our wizard?
I did not rename the folders. To test I setup the new folder names under “Preferences” with blank stripped from folder name.
Thereafter “New project” and setup “HelloWorld” project from “USer Guide”
Set breakpoint on “out.println” line, go to browser, enter URL.
MyEclipse is going to JSP page, hit PF6. Next you get the error message.>I’m trying to get to a very small reproducable test case with only a few steps to create it so that we can try to replicate the behavior internally. It’s not a common issue since I use all manner of names for both of these roots so we’ll need to be very specific to define a reproducable project.
See before: set folder names in Preferences before setting up HelloWorld project.
John ZoetebierMemberI’m trying to get to a very small reproducable test case with only a few steps to create it so that we can try to replicate the behavior internally. It’s not a common issue since I use all manner of names for both of these roots so we’ll need to be very specific to define a reproducable project.
Further testing reveales that you can rename the standard forlders and debugging is OK.
However changing the standard folders names under Preferences gives the beforementioned problem.BTW: button “Quote selected” is only working on IE.
It is not working on any other browser like Opera, Mozilla or Netscape.
However button “Quote*” is working on all browsers.
Scott AndersonParticipantJohn,
A few more things.
Refer to my first posting: all data are there.
Actually it isn’t. You haven’t told us how many plugins your installation of Eclipse has that begin with org.eclipse.pde.*. Also, you haven’t told us what application server you’re using, what JDK you’re launching Eclipse with or which JDK you’re using to launch your server. We still really need to know all of these items.
See before: set folder names in Preferences before setting up HelloWorld project.
I set the names in preferences, generated a web project, added the default JSP from the wizard, set a breakpoint, and deployed as an exploded WAR on Tomcat 5. Debugging worked as expected.
BTW: button “Quote selected” is only working on IE.
I’ve added this as a defect against the portal in our internal tracking system. Thanks for letting us know about it.
–Scott
MyEclpise Support
John ZoetebierMemberSome more information about my configuration:
Eclipse V2.1.1
MyEclipse V 2.6.2
Operating Systems: SuSE Linux 8.2
Application Server: Tomcat 5
Number of Eclipse plugins starting with org.eclipse.pde.*: 10
JDK to launch Eclipse: Sun j2sdk1.4.2
JDK to launch your server: Sun j2sdk1.4.2I can zip my project and send it to you if you like ?
Scott AndersonParticipantI can zip my project and send it to you if you like ?
Thanks. That’s a good idea. Please send it to support@genuitec.com and also include the URL for this thread so we can remember where it is to post our findings.
–Scott
MyEclipse Support
Scott AndersonParticipantFrom John’s email to support:
I have 3 “hello world” projects to test different settings.
HelloWorld
HelloWorld2
HelloWorld3The problem is in HelloWorld3
To my suprise when both HelloWorld2 and HelloWorld3 are open in Eclipse
the debugger shows helloworld.jsp 2 times.
Debugging seems to work in that case.
When I close HelloWorld2 debugger has problem again with showing source
code.
Next I removed manually HelloWorld2 from Tomcat 5.
Restarted Tomcat.
Now suddenly problem with debugger has gone, source is shown normally
while debugging.
It looks like the projects somehow interfere.Also, your User Guide says that closing a project does remove the project
from the application server.
This does not seem to happen though and may be related to the same problem.The problem you’re experiencing is caused by having the exact source file packaged in multiple projects simultaneously. When the remote JVM reports the breakpoint has been encountered, all the Eclipse debugger gets is the classname. It is then up to the debugger infrastructure to determine the project location of the referenced class. If multiple, open projects contain the same file, the lookup is ambiguous and this is what is causing the problem you’re experiencing. The workaround is to temporarily close all projects that contain redundant files to the ones in the project you’re trying to debug.
Some way to address or disambiguate this issue is currently an open enhancement request. Thanks for hanging in there so we could figure out what you were experiencing.
–Scott
MyEclipse Support -
AuthorPosts