- This topic has 31 replies, 10 voices, and was last updated 16 years ago by
support-joy.
-
AuthorPosts
-
silverboltMemberHello,
I am evaluating MyEclipse’s suitability for developing JSPs in my workplace. We use Oracle’s Application Server 10g. I’m using the OC4J standalone (9.0.4) package at:
http://www.oracle.com/technology/tech/java/oc4j/1012/collateral/OC4J-FAQ-1012.htmlinstalled to “C:\oc4j”, and Java2 SDK 1.4.2_06 (Installed to C:\j2sdk1.4.2_06). I am trying to deploy the HelloWorld project.
I have installed and configured MyEclipse v4.0.3 over Eclipse 3.1 and it all appears to have installed correctly.
How can I debug JSPs through MyEclipse for OC4J Standalone? I have read this topic:
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=5089
But the accepted answer did not work for me. It’s not clear, but I assume the Java debug switch is added to the JDK “Optional Java JVM Arguments” box. MyEclipse has detected J2SDK1.4.2_06 as the JRE. I can start the server successfully, and I can even deploy the application to the server in exploded format (as long as I specify it to be deployed in C:\oc4j\j2ee\home\default-web-app\HelloWorld). I can browse to the site at “http://localhost:8888/HelloWorld/MyJsp.jsp” and my application is displayed correctly. If I change some text and re-deploy, the changes are shown straight away.
However, debugging will not work. I have created a new debugger configuration using the instructions here…
…but OC4J isn’t covered (Odd, since it has been mentioned in several other threads that it does not support native JSP debugging and so would be a prime candidate for such a guide). I have tried to improvise by creating a new debug configuration with the following settings:
Project: HelloWorld
Connection Type: Standard (Socket Attach)
Host: localhost
Port: 40000 (as specified in http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=5089)
“Allow termination of remote VM” – Enabled.If I click to “Debug” I get the following error messag popup:
“Failed to connect to remote VM. Connection refused.”
Can anyone offer a proven working solution to debugging JSPs on OC4J standalone? I’ve seen a number of people say they’ve got it working, but no one has actually been able to provide instructions as to how.
These other threads cover the same problem:
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=1353 (Suggests using a different server altogether. Not an option for me)
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=2006 (Suggests reading the guide on Remote Debugging – except the specified server is not covered)
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=2076 (No solution is offered)
http://www.myeclipseide.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=3202
(Refers to a previously unsuccessful solution)
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-2460.html
(Does not cover debugging)Am I asking for something that is genuinely impossible? Oracle Application Server 10g has been around for years – is there still no way to debug it? How can anyone be expected to properly develop for a platform that has no support for debugging? Especially an Enterprise level platform!? 😕
Thanks in advance for any help you can offer.
Riyad KallaMembersilverbolt,
First let me thank you for posting such a detailed post, I’m sending this off to one of the devs on the app server team to get you a direct answer.
Scott AndersonParticipantAm I asking for something that is genuinely impossible? Oracle Application Server 10g has been around for years – is there still no way to debug it? How can anyone be expected to properly develop for a platform that has no support for debugging? Especially an Enterprise level platform!? 😕
First, rather than dealing with remote debugging, I’d highly recommend that you just use the built-in Oracle connector. It’s labeled Oracle 9i/AS in 4.0.3 but works with 10g as well. Simply set the Oracle AS Home Directory, the admin password, and you should be able to launch the server just fine. Also note that Oracle’s server only understands packaged EAR deployment, so please be sure to only use this form for auto-deployment. With that, you’ll be able to debug Java JSP debugging won’t work with OC4J / Orion because they don’t support JSR-045 which is the source level debugging JSR. Source level JSP debugging is available on Tomcat 5, as well as any server that uses Jasper 2 for JSP compilation such as JBoss 3.2.4/Tomcat5 bundle, and some versions of Jetty and JRun I believe.
silverboltMember@support-scott wrote:
Java JSP debugging won’t work with OC4J / Orion because they don’t support JSR-045 which is the source level debugging JSR. Source level JSP debugging is available on Tomcat 5, as well as any server that uses Jasper 2 for JSP compilation such as JBoss 3.2.4/Tomcat5 bundle, and some versions of Jetty and JRun I believe.
Unfortunately, I am using OC4J and as you stated it does not support the JSR-045 standard. In addition, using an alternative J2EE server (such as Tomcat, JBoss, etc…) is not an option for me, and is only avoiding the problem rather than solving it.
So, just to clarify, debugging OC4J JSP applications IS impossible using MyEclipse?
I’m currently using JDeveloper to debug JSP’s, but the user interface is ghastly so I’d much rather use MyEclipse. But if I really can’t debug JSP’s on OC4J through MyEclipse then I have to stick with JDeveloper.
Riyad KallaMemberUnfortunately, I am using OC4J and as you stated it does not support the JSR-045 standard. In addition, using an alternative J2EE server (such as Tomcat, JBoss, etc…) is not an option for me, and is only avoiding the problem rather than solving it.
It would only be to ease your development work, but we understand if you are trying to keep dev/deploy the same.
So, just to clarify, debugging OC4J JSP applications IS impossible using MyEclipse?
Yes, it’s not going to work properly as we wouldn’t be receiving enough information back from the server to provide useful debugging without support for that spec.
I’m currently using JDeveloper to debug JSP’s, but the user interface is ghastly so I’d much rather use MyEclipse. But if I really can’t debug JSP’s on OC4J through MyEclipse then I have to stick with JDeveloper.
We are sorry for this limitation causing you trouble during work. If your company decides to upgrade to version 10, AFAIKT from Oracle’s site, 10g does infact support JSR-45 in that version. You might try downloading a trial version and testing it?
silverboltMember@support-rkalla wrote:
We are sorry for this limitation causing you trouble during work. If your company decides to upgrade to version 10, AFAIKT from Oracle’s site, 10g does infact support JSR-45 in that version. You might try downloading a trial version and testing it?
Ah – that’s interesting. I think there’s some confusion over what constitues 10g. I am using the OC4J standalone v9.0.4 which, according to Oracle, IS 10g. But there’s also a more recent release of the 10g server – v10.1.2
Having established that v9.0.4 does not support the JSR-045 standard, are you saying that 10.1.2 does? If so, then that’s good news and I could try that ou in future.
Riyad KallaMemberYes according to this page, it does:
http://www.oracle.com/technology/products/jdev/101/collateral/101/1013eanewfeatures.html“JSP debugging (JSR-45): The JSP debugging offered by JDeveloper and OC4J has been updated to comply with the new JSR-45 specification for multiple language debugging.”
silverboltMember@support-rkalla wrote:
Yes according to this page, it does:
http://www.oracle.com/technology/products/jdev/101/collateral/101/1013eanewfeatures.html“JSP debugging (JSR-45): The JSP debugging offered by JDeveloper and OC4J has been updated to comply with the new JSR-45 specification for multiple language debugging.”
OK, thanks rkalla!
I have to make a cheeky request though:
We’re due to try this implementation of the AS in the new year, but obviously I have already installed MyEclipse on my PC and by that time the trial license will have expired. If I contact MyEclipse again next year and refer to this thread, is there any possiblity I could be issued with another temporary license so I can try testing it again? 😳
Riyad KallaMembersilverbolt,
You would need to email subscriptions@genuitec.com with a description of the setup and why you would appreciate an extended trial license.
yyuan98MemberI tried OC4J 10.1.2. I can manually deploy it with “admin.jar” and I can browse the deployed JSP page, but I can not debug JSP page.
There are few issues in the deployment:
1. Myeclpse deployed the ear file to “j2ee\home\application-autodeploy”, the location can NOT be modified for some reason.
2. Did the manual deployment (admin.jar) make the JSP page un-debuggable?
3. Any suggestion or workaround for using myeclipse to debug JSP with OC4J?
Thanks,
Yan
Riyad KallaMember1. Myeclpse deployed the ear file to “j2ee\home\application-autodeploy”, the location can NOT be modified for some reason.
You can use a “Custom Location” deployment to specify the location manually. Using an exploded or packaged deployment effects this location initially.
2. Did the manual deployment (admin.jar) make the JSP page un-debuggable?
As long as you configured Oracle to compile the JSP pages with debugging information (double check docs) and the contents of admin.jar map to contents in a valid project in your workspace and you use the Oracle connector to launch ORacle in debug mode, you should be ok.
yyuan98MemberThe OC4J 10.1.3 is supporting JSP-045. But I have trouble to make it working. Did anyone successfully set up OC4J 10.1.3 for JSP debugging? I would appreciate it someone can provide detailed information on this.
Yan
Riyad KallaMemberYan,
What kind of trouble are you having?
yyuan98MemberI used myeclipse to create the ear file and deploy it with OC4J console. I can access the JSP page, but I can not debug it (i.e. it does not stop at the breakpoint). Detailed steps:
1. Using myeclipse to create “Enterprise Application Project” and create a JSP test page;
2. Start the OracleAS from myeclise;
3. Deploy the code with myeclipse using “package” type to the %ORACLE_HOME%\j2ee\home\application-autodeploy directory;
4. Start the oracle console, selection “Application” and click “deploy” button. Parent application is “default”. Choose the ear file from location %ORACLE_HOME%\j2ee\home\application-autodeploy, using default for deployment plan.
5. I can see the JSP page and changes I have made, but I can not stop at the breakpoint.Thanks in advance for your reply,
Yan
Riyad KallaMemberYan,
Double check your OC4J documentation to see if you need to turn on debugging symbols for the compiled JSP pages. This is true with WebLogic, you have to make an adjustment to the server config before the JSP pages are compiled with debugging symbols so the debugger can break on the the pages. -
AuthorPosts