- This topic has 8 replies, 2 voices, and was last updated 17 years ago by Riyad Kalla.
-
AuthorPosts
-
Robert ByrneMemberBackground:
I setup an ME deployment for my web app and deployed a war.
I run an Ant build to deploy / overwrite the the old war.
I set Ant debug=”on” debuglevel=”lines, vars, source”. //can give the whole line if necessary.
Break points work in java.2 issues:
1) Variables do not resolve at runtime. I have tried mouse over, right click -> inspect, and watches, none of which have worked.2) JSP source not found. In my Ant script I unpack a folder containing all the JSP’s into the root directory of the web application. I would guess ME’s looking for the JSP’s where they were deployed by ME but they are not there anymore. ME would have deployed the folder I unpacked.
— What is more disturbing however is, if I were to create new JSP files, would I have to run an ME build each time?Any help would be great.
Thanks,
-Robert
Riyad KallaMemberI setup an ME deployment for my web app and deployed a war.
I run an Ant build to deploy / overwrite the the old war.Why create the deployment from MyEclipse if you need the Ant deployment instead? Or why use Ant if you can use MyEclipse? (Just curious)
1) Variables do not resolve at runtime. I have tried mouse over, right click -> inspect, and watches, none of which have worked.
In the Java code? Which app server are you using? Which version of Java are you using to start it? Are you starting it from inside MyEclipse or from the command line?
2) JSP source not found. In my Ant script I unpack a folder containing all the JSP’s into the root directory of the web application. I would guess ME’s looking for the JSP’s where they were deployed by ME but they are not there anymore. ME would have deployed the folder I unpacked.
— What is more disturbing however is, if I were to create new JSP files, would I have to run an ME build each time?I actually don’t quite understand the question here… so let me explain how the MyEclipse debugger works:
1. When you start your app server from MyEclipse, it hooks the server to the ME debugger.
2. When a breakpoint is hit in your JSP pages (or Java classes), the application server will send back what line in the class file was hit along with a source-mapping back to the actual source line. MyEclipse debugger will take that source map and resolve it to a real location in your source, then break at that point and open the editor if necessary.NOTE: For #2 to work with Web Projects, MyEclipse needs to be working with a Web Project that it can map JSP source lines back to. This means a Web Project with a properly configured Web Root directory, as this is the base dir MyEclipse will use when resolving paths that come back from the app server.
If you are debugging a plain Java project, or some custom laid out project (like a Maven-managed project or the like), MyEclipse isn’t going to be able to resolve those source mapping instructions for you and give you a “source not found” error instead.
Robert ByrneMemberWhy create the deployment from MyEclipse if you need the Ant deployment instead? Or why use Ant if you can use MyEclipse? (Just curious)
I thought I needed ME to be externally deployed for the debugger to work. Are you saying that I don’t?
In the Java code? Which app server are you using? Which version of Java are you using to start it? Are you starting it from inside MyEclipse or from the command line?
Yes, this problem occurs in the java class. I am using Resin 2.0.24 and JDK1.5.0_12. I start the the server in debug mode from the servers view in ME. And like I said, the breaks are working, just no resolve on values.
I actually don’t quite understand the question here
I was trying to say that I received “source not found” when having a break in my jsp file and that I’m afraid the mapping may be off. But it didn’t come out right so let me rephrase.
If I use Ant to copy “project_root/jsp/*” to “project_root/build” will ME be able to map those JSP files once I pack “project_root/build” into a war file and deploy? I could deploy it as an ear if that would make a difference.
And you may ask why I do this but the truth is I have inherited this situation in the form of a CVS project.
Thanks,
-Robert
Riyad KallaMemberI thought I needed ME to be externally deployed for the debugger to work. Are you saying that I don’t?
I don’t understand your question… Section 7 here covers how to work with Web Projects in MyEclipse… all packaging and deployment and debugging is handled for you, you shouldn’t need Ant: http://www.myeclipseide.com/documentation/quickstarts/webprojects/
I am using Resin 2.0.24
Ahhh, Resin 2 doesn’t support the JSR-45 debugging spec, that’s why debugging won’t work with that app sever.
If I use Ant to copy “project_root/jsp/*” to “project_root/build” will ME be able to map those JSP files once I pack “project_root/build” into a war file and deploy? I could deploy it as an ear if that would make a difference.
MyEclipse only maps your deployed project back to the project internally and it’s Web Root directory. If you have /jsp set as your Web Root directory for your web project, and are copying it to /build, no MyEclipse won’t map /build back to /jsp.
I think it would be a good idea if you went through the tutorial I linked you above to get a better idea of how MyEclipse works.
Robert ByrneMemberI’m sorry, I meant Resin-3.0.24. The debugger should work with resin 3 right?
thanks
-Robert
Riyad KallaMemberRobert,
Would you be able to install Resin 3.1 and try your exact same app with it and see if JSP debugging works? The reason I ask is because we had issues with the source-map getting returned by Resin 3.0.x that made JSP debugging not work or flaky. It was supposidly fixed in later releases of 3.0.x, but who knows.If you would try with Resin 3.1 and everything suddenly worked without changing, then atleast we would know it’s a server issue.
Robert ByrneMemberThat’s a good idea. I’ll get back to you on this.
Thanks,
-Robert
Robert ByrneMemberSorry I’m just getting back to you, but wanted to tell you that java debugging is working with Resin 3.1.3.
Thanks for your help,
-Robert
Riyad KallaMemberRobert I’m glad it’s working, thanks for letting us know.
-
AuthorPosts