Remote Debugging Servlet  on JDev 10g

How do we setup JDeveloper 10g for Remote Debugging for Servlet? We have Oracle Application Server 10g with OC4J containier. I know we need to start OC4J in debug mode, but don't know hot to do it. Jdeveloper and OracleAS is new to me.
Thanks in Advance!
Madan

Please refer
Re: Remote debugging with OC4J

Similar Messages

  • Remote debugging of servlets

    Hi there,
    can anybody help me with remote debugging servlets and JSP running inside OC4J with JDeveloper 3.2.3? (JDK Version 1.3.1).
    Any help would be very welcome!
    Thanks in advance!
    Stefan

    Check out the following matrix for what features are supported from JDev 3.2.3 to OC4J. http://technet.oracle.com/products/jdev/htdocs/jdev323oc4j.html
    For remote debugging Servelts check out http://otn.oracle.com/products/jdev/howtos/remotedebugservlet.html
    raghu

  • Could not configure Remote Debugging (JDev - AS 10g)

    I'm trying to make work remote debugging from JDeveloper 10.1.2 on Oracle AS 10g, but I'm stuck. I tried to do every step from JDeveloper help:
    1. Create remote debugging process.
    - Done (I hope)
    2. In the <jdev_install>/lib directory, copy xmlparserv2.jar to <OC4J_HOME>/lib. In the <jdev_install>/jdev/lib directory, copy ojc.jar and jdev-rt.jar to <OC4J_HOME>/home/lib
    - If ORACLE_HOME is C:\Oracle\oracleas, then where is OC4J_HOME ? c:\Oracle\oracleas\j2ee\home ? But it means to create another 'home' directory, right ? But I have already created one OC4J instance called FirstOC4J, where our applications are deployed and it is located in c:\Oracle\oracleas\j2ee\FirstOC4J. Now what ? Which one?
    3. Edit global-web-application.xml, but it is both in c:\Oracle\oracleas\j2ee\FirstOC4J\config and in c:\Oracle\oracleas\j2ee\home\config directory. Which one ?
    4.Start OC4J in debug mode from a command line
    - Why from command line? I always managed our FirstOC4J from Enterprise manager. I tried to put there the parameters from the command
    java -ojvm -XXdebug,port4000,detached,quiet -jar oc4j.jar
    but parameters inserted into OC4J Options or Java Options were rejected (OC4J wouldn't start). A little succes was running OC4J like this
    how to set up for remote debugging?
    But it required our FirstOC4J stopped and it meant our application won't run.
    Please , could somebody make some step-by-step instructions for begginners or at least comment some above points ? Thanks.

    I'm trying to make work remote debugging from JDeveloper 10.1.2 on Oracle AS 10g, but I'm stuck. I tried to do every step from JDeveloper help:
    1. Create remote debugging process.
    - Done (I hope)
    2. In the <jdev_install>/lib directory, copy xmlparserv2.jar to <OC4J_HOME>/lib. In the <jdev_install>/jdev/lib directory, copy ojc.jar and jdev-rt.jar to <OC4J_HOME>/home/lib
    - If ORACLE_HOME is C:\Oracle\oracleas, then where is OC4J_HOME ? c:\Oracle\oracleas\j2ee\home ? But it means to create another 'home' directory, right ? But I have already created one OC4J instance called FirstOC4J, where our applications are deployed and it is located in c:\Oracle\oracleas\j2ee\FirstOC4J. Now what ? Which one?
    3. Edit global-web-application.xml, but it is both in c:\Oracle\oracleas\j2ee\FirstOC4J\config and in c:\Oracle\oracleas\j2ee\home\config directory. Which one ?
    4.Start OC4J in debug mode from a command line
    - Why from command line? I always managed our FirstOC4J from Enterprise manager. I tried to put there the parameters from the command
    java -ojvm -XXdebug,port4000,detached,quiet -jar oc4j.jar
    but parameters inserted into OC4J Options or Java Options were rejected (OC4J wouldn't start). A little succes was running OC4J like this
    how to set up for remote debugging?
    But it required our FirstOC4J stopped and it meant our application won't run.
    Please , could somebody make some step-by-step instructions for begginners or at least comment some above points ? Thanks.

  • How to remote debug JSPs on Tomcat 5.0 from JDev 10.1.2

    I can remote debug Java applications and servlets. But I can not make it stop within any JSP pages while doing remote debug. I have no problem if I debug locally within the built-in OC4J server.
    I set my project properties with remote debugging -> Attaching to JPDA. I start my tomcat using catalina jpda start after setting environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket.
    Please help,
    TIA

    Ashraf, thanks for sharing your experience. I would like to comment on your precedure.
    Jdeveloper 10.1.2
    Tomcat 4.1.31 ( version 5.x.x won't work as it needs jdk 1.5 at least, and jdev is configured to run with 1.4 )I was able to use Jdeveloper 9.0.5 to debug a servlet running in Tomcat 5.5.9 with jdk 1.5.0. I would belive there is no fundamental obstacle for Jdeveloper 10.1.2 to debug Tomcat 5.x.x, thanks to the nature of JPDA.
    a- backup $TOMCAT$\bin\catalina.bat.
    b- edit $TOMCAT$\bin\catalina.bat to include the following:
    set JAVA_OPTS=%JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE
    -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000Another way is to set your environment variable JAVA_OPTS. There is then no need to modify catalina.bat.

  • BUG: Jdev 10g/iAS 10g debug config docs are wrong

    I was setting up my iAS 10g OC4J_Home for remote debugging. According to the docs in Jdev 10g, I have to copy ojc.jar and jdev-rt.jar to <OC4J_HOME>/home/lib. This does not work.
    You must actually copy the files to <OC4J_HOME>/home/applib.
    In my case, this is $ORACLE_HOME/j2ee/home/applib. If you create your own OC4J instance, then you must install these files into the applib directory within that instance.
    Could someone please put out a definitive doc on how to get remote debugging to work between Jdev and iAS 10g? If it exists, please point me to it!
    TIA

    Hi,
    what about the blank characters in the long name. If the long name doesn't have blank characters, would it work then ?
    Frank

  • Remote Debugging (Jdev 10.1.3 to AS 10.1.3)

    Hi,
    I have been trying to do a remote debugging by connecting Jdeveloper (version 10.1.3 production) to AS 10.1.3 mid-tier but the OC4J instance seems to be crashing the moment the jdeveloper makes the connection. However, before the crash, jdeveloper takes about 5minutes to connect to the server.
    The OC4J is managed by opmn and not a standalone process. I am not sure if this makes any difference. Here are the changes that I made in the 10.1.3 server:
    *) Modified opmn.xml to add the below:
    <data id="java-options" value="-server -verbose:gc -Xmx512M -Xms128M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=43503 -XX:MaxPermSize=128M -XX:NewRatio=2 -XX:+PrintGCTimeStamps -XX:+UseTLAB -XX:ParallelGCThreads=2 -Djava.security.policy=$ORACLE_HOME/j2ee/oacore/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
    (also tried removing "-server" option)
    *) Modified orion-web.xml to add the below:
    <init-param>
    <param-name>debug_mode</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>developer_mode</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>encode_to_java</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>emit_debuginfo</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>jspjavacompiler</param-name>
    <param-value>oracle.jdevimpl.jsp.JspOjcCompiler</param-value>
    </init-param>
    *) Modified global-web-application.xml to add the below:
    <orion-web-app
    jsp-cache-directory="./persistence"
    servlet-webdir="/servlet"
    development="true" >
    I see the below message in the jdeveloper debug window when the OC4J instance crashes:
    Debuggee process virtual machine is Java HotSpot(TM) Server VM.
    Debuggee process is application server OC4J.
    To test JSPs or servlets, you must start a browser.
    Debugger disconnected from remote process.
    I do not see any error in application.log file.
    By setting up the remote debugging, I am hoping for a better portlet development experience.
    Any help is appreciated.
    Thanks,
    Pandian.
    Message was edited by:
    apandian

    The doc is kind of vague, but here's the root reference:
    http://download.oracle.com/docs/cd/B25221_04/core.1013/b15976/opmnxml.htm#sthref144
    There's a FAQ document that prescribes how the "restart" algorithm works, see 1.3:
    http://www.oracle.com/technology/products/ias/ohs/htdocs/opmn-1013-faq.pdf
    So to tweak this behaviour, you specify a speciifc <ping> element inside of the opmn.xml for the managed process you are using -- and set the timeout, interval, retry attributes to some combination that gives you a longer pause time.
    http://download.oracle.com/docs/cd/B25221_04/core.1013/b15976/common.htm#CACGAIGH
             <ias-component id="default_group">
                <process-type id="home" module-id="OC4J" status="enabled">
                   <module-data>
                      <category id="start-parameters">
                         <data id="java-options" value="-Xrs -server -XX:MaxPermSize=128M -ms512M -mx1024M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
                      </category>
                      <category id="stop-parameters">
                         <data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false"/>
                      </category>
                   </module-data>
                   <start timeout="600" retry="2"/>
                   <stop timeout="120"/>
                   <restart timeout="720" retry="2"/>
                   <ping timeout="300" />
                   <port id="default-web-site" range="8888" protocol="ajp"/>
                   <port id="rmi" range="12401-12500"/>
                   <port id="rmis" range="12701-12800"/>
                   <port id="jms" range="12601-12700"/>
                   <process-set id="default_group" numprocs="1"/>
                </process-type>
             </ias-component>Now I did just see something that is either a bug, or a doc error. In the doc, it shows the attributes of the <ping> tag to be: timeout, retry, interval. However when you configure opmn.xml with these, it report an error.
    Looking at the $ORACLE_HOME/opmn/conf/opmn.xsd file, it shows that only attributes are timeout and interval. You can't add a retry attribute. I'm not sure if this is a doc bug or an error in the XSD file.
    Anyways, using the timeout parameter, for your DEBUGGING phase (not production!) you should be able to bump that up to a higher value to allow OPMN to wait longer for a response from OC4J before it nukes it.
    -steve-

  • JSP Remote debugging from Jdev to WL 7.0

              I am trying to remote debug my JSP deployed on WL from Jdeveloper 903.
              I have included the parameters to make WL start in a debug mode.
              I have also included ojsp.jar, servlet.jar and ojc.jar in WL classpath.
              So I can start WL in debug mode, I can launch the url to get access to my JSP,
              a break point is included in the code but it doesn't stop at the break point.
              I am using JPDA.
              Do I have to modify something else to be able to remote debug my JSP?
              PS: remote debugging my EJB works fine.
              Thanks for your help
              

              Is there any possibility to change the JSP engine in Weblogic server and customize
              the new JSP
              with additional parameters, so that IDE's can debug JSP code itself?
              "Mike Herrick" <[email protected]> wrote:
              >
              >As far as I know this is behaving correctly.
              >
              >To debug a JSP via JDPA you have to compile your JSPs and put the Servlet
              >classes
              >the JSP compiler spits out in your IDE Classpath. Then you can debug
              >those Servlets
              >-- but you can't set break points in the JSP itself. Not the best.
              >
              >Some IDE Vendors add this on top of JDPA etc.
              >
              >I'm not 100% on this, but think I'm correct.
              >
              >Mike
              >
              >"Magali Richard" <[email protected]> wrote:
              >>
              >>I am trying to remote debug my JSP deployed on WL from Jdeveloper 903.
              >>I have included
              >>the parameters to make WL start in a debug mode. I have also included
              >>ojsp.jar,
              >>servlet.jar and ojc.jar in WL classpath. So I can start WL in debug
              >mode,
              >>I can
              >>launch the url to get access to my JSP, a break point is included in
              >>the code
              >>but it doesn't stop at the break point. I am using JPDA. Do I have to
              >>modify something
              >>else to be able to remote debug my JSP?
              >>
              >>PS: remote debugging my EJB works fine. Thanks for your help
              >>
              >
              

  • Debugging a remote tomcat servlet

    I have the following setup:
    win2000sp2advanced server with an application (Interwoven TeamSite) running a scaled down version of Tomcat 3. This tomcat is serving a war called webdesk.war. Runtime, the war file is unpacked in this location: c:\iw-home\httpd\webapps\webdesk
    Sun Java Studio 8 on a winxpsp2 laptop
    I setup the following java and UML model in JS8:
    UMLProjectWebDesk
    WebDeskSRC
    My objective is to run a remote debugging session on the servlet and to set a breakpoint in the servlet class which I can see listed, using the projects view, in Libraries> webdesk.jar>com.interwoven.teamsite.filesys>FileTemplatesServlet.class
    I configured debugging on the TS servlet with the following switch on servletd.exe (the tomcat start executable called via a perl script to start as a windows service):
    "-Xrunjdwp:transport=dt_socket,server=y,address=8888,suspend=n".
    When I select Run>AttachDebugging, I select JPDA Debugger, SocketAttach, dt_socket, 10.101.2.153 and port 8888 where 10.101.2.153 is the ip address of the server where servletd.exe is running and the servlet resides.
    In the Debugger Console I see "Attaching to 10.101.2.153:8888" and " User program running" so I guess that the debugger is actually attached (I have seen errors before when I did not put any attributes on the server's jvm).
    The problem that I have is more of a lack of understanding in the software. I googled a lot without finding the exact answers before resolving to this forum. I hope I am not asking for something stupid here, but need some guidance.
    It seems that the servlet class FileTemplatesServlet.java has not been downloaded by Java Studio Enterprise 8, so that I cannot put a breakpoint on this class.
    I also tried to put a breakpoint on any other jsp file that is part of my remote application and it seems not to work.
    The question is if someone can establish if I did something terribly wrong in setting up this project? Something simple I oversaw?
    arnout cator
    Technical Support Engineer
    [email protected]

    thanks for the reploy! To be more specific:
    I have the source code for all the libraries that the web application uses here: c:\TS_JSE_debugging\webdesk\WEB-INF\lib
    I want to set a breakpoint in the local java source file C:\TS_JSE_debugging\webdesk\WEB-INF\lib\webdesk\com\interwoven\teamsite\filesys\FileTemplatesServlet.java
    In JSE8 I went into the java project properties window and clicked on the Sources tab. I added the Package Folder C:\TS_JSE_debugging\webdesk\WEB-INF\lib to the Source Package Folder. R:\iw-home\httpd\webapps\webdesk\WEB-INF\jspc was already listed there. I understand that JSE8 decompiled all the class files in the jspc folder into .java files and put them in the jspc folder. That makes me believe that my servlet FileTemplatesServlet.class should be debugged when I set a breakpoint now on a line in my local decompiled source in FileTemplatesServlet.java.
    I did that and then I get a message back in the bottom left pane of the JSE8 UI saying: " Source file for com.interwoven.teamsite.filesys.FileTemplatesServlet not found"
    Question is: I thought I just added the source to the project?
    I am now proceeding into the other 2 replies!
    thanks
    arnout cator

  • How to make Form builder 10g step into libraries *.pll while remote debug

    How to make Form builder 10g step into libraries *.pll while remote debug. It attaches fine and goes through code located in form but skips pll's. In this case I am interested in debuging CUSTOM.pll. How to step into pll's and is it possible at all?

    Is the library in the same directory or within your FORMS_PATH? Note that the runtime setting in the default.env doesn't work for the builder.
    cheers

  • Oracle application server 10g -remote debugging

    We have oracle application server 10g with oc4j. How do we configure App server to start in debug mode so remote debugging from different machine can be done.
    i configured remote debugging options in opmn.xml .in the jdeveloper i attached to JPDA .when i start remote debugging i have given hostname as localhost and portnumber as 5000.
    i am getting this error
    Debugger attempting to connect to remote process at localhost 5000......................
    Debugger unable to connect to remote process.
    I have done already remote debugging using oc4j stadalone app server.but this is the first time i am trying to connect with oracle application server 10g
    opmn.xml
    <ias-component id="OC4J">
    <process-type id="home" module-id="OC4J" status="enabled">
    <module-data>
    <category id="start-parameters">
    <data id="java-options" value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000 -Xdebug -Xnoagent -Djava.compiler=NONE -Xms512m -Xmx1024m -Xss128k "/>
    <data id="oc4j-options" value="-userThreads -properties -out log/out.log -err log/err.log"/>
    </category>
    <category id="stop-parameters">
    <data id="java-options" value="-Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true"/>
    </category>
    <category id="restart-parameters">
    <data id="no-reverseping-failed-ping-limit" value="2"/>
    <data id="reverseping-failed-ping-limit" value="10"/>
    </category>
    </module-data>
    <start timeout="600" retry="2"/>
    <stop timeout="120"/>
    <restart timeout="720" retry="2"/>
    <port id="ajp" range="3301-3400"/>
    <port id="rmi" range="3201-3300"/>
    <port id="jms" range="3701-3800"/>
    <process-set id="default_island" numprocs="1"/>
    </process-type>
    </ias-component>

    Please refer
    Re: Remote debugging with OC4J

  • Step Over not working with Remote Debugging of Servlets with JRUN

    Platform: JRun 4, JDK 1.4.1, JDev 9.0.3
    using JPDA and copied jpda.jar to JDEV_HOME/java1.2/jre/lib/ext and set path to jar in app server path.
    using debug args: java.args=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000
    ok, I'm able to attach JDeveloper to JRun and remotely debug by jumping from breakpoint to breakpoint but stepover causes JDeveloper to continue execution to completion or to next breakpoint. Any idea why step over does not work? The only way to halt execution during remote debugging is by using breakpoints.
    Thanks in advance for any insight to this issue.

    Hi Bob,
    I think OTN ate the other thread. It says there are 4 replies, but it won't display them. Here's my latest reply.
    I just noticed something interesting from your original message. You say you are using JDK 1.4.1 for the app server (that's good) and you are using JDev 903. But you say you have copied jpda.jar to JDEV_HOME\java1.2. That doesn't make sense because JDev 903 didn't have a java1.2 directory; I think JDev 903 has a jdk directory which contains JDK 1.3 (actually 1.3.1_03 or something like that).
    Also, jpda.jar is really old and the directions for using jpda.jar and for putting jpda\bin on the app server path is really old. Those directions were needed for JDK 1.2 because JPDA was released AFTER the JDK 1.2 was released. Starting with JDK 1.3, jpda is built in and you don't need the jdpa.jar or the jpda\bin, etc.
    All this reminds me that in JDK 1.2, HotSpot had bugs where stepping didn't work!!! I'm almost positive that this is what you are experiencing. Here is my advice:
    1. Make absolutely sure that you are using JDK 1.4.1 (or at least JDK 1.3 or later) for running your app server. Make sure that you are not using JDK 1.2 - you may have modified your app server so that it uses JDEV_HOME\java1.2\bin\java.exe[i]Long postings are being truncated to ~1 kB at this time.

  • Remote Debugging in Jdev EA1.

    Hey guys, what happen to remote debugging in Jdev EA1?
    Thanks,
    Tony

    The remote debugging was moved to tools/project properties select run/Debug and then edit.
    Thanks,
    Tony

  • Cannot remote debug from JDev 10.1.3 on AS 10.1.2 running hotspot

    Hi,
    I've set up an embedded OC4J instance in an application server as described in the help topic, "Remote Debugging in OC4J" (with a few changes, such as the fact that I added startup options using the OC4J instance Admin page of EM, rather than at the command line (since the instance is embedded in a full AS). I followed the directions specifically for HotSpot, because that's the JVM the instance was set up to use, and I can't change it (I know OJVM enables lots more features, but that's the situation I'm in).
    I've also configured my project for remote debugging, ensuring the host name and port matches, and trying both "Attach to JDPA" and "Attach to OJVM" (these being the only two options, except for starting a listener, which I don't think will help with a web application).
    When I try to debug, though, I get:
    Debugger unable to connect to remote process.
    Should I be doing something differently?
    Thanks much,
    Avrom

    I had the delete key quit working after accidentally pressing a key sequent that included the delete key. I don't know what keys were involved, but the delete key from that point on did nothing.
    I am running JDeveloper 10.1.3.0.4 on Window XP.
    To resolve the problem, I set the keyboard Accelerators back to 'Default' in JDeveloper.
    I selected... Tools->Preferences->Accelerators
    then click on 'Load preset' then I chose 'Default'
    You may need to select something other than default for your platform, but that did the trick for me.

  • Remote debugging in OC4J using JDeveloper

    I need to remote debug into a stand-alone OC4J using JDeveloper 10.1.3.1.0. The documentation says the following:
    In the <jdev_install>/jdev/lib directory, copy ojc.jar and jdev-remote.jar to <OC4J_HOME>/home/lib.
    I can't find directory "<OC4J_HOME>/home/lib" in the stand-alone OC4J? That is, a "home" directory does not exist in the above location. To where should I copy ojc.jar and jdev-remote.jar ?
    Thanks,
    Travis

    Shay,
    JDeveloper gives an error when deploying my EJB after starting an OC4J for debugging. In contrast, JDeveloper does successfully deploy my EJB if I start OC4J using "D:\jdev10131\jdev\bin\start_oc4j.bat".
    Note that I'm able to start my standalone OC4J successfully after setting the following in a command window:
    1. Start a Microsoft Windows command window.
    2. set JAVA_HOME=D:\jdev10131\jdk
    3. java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar
    Below is the the deployment error that JDeveloper gives when deploying my EJB to the debug OC4J. At the bottom it mentions something about "javac.exe not found". Do you know how to fix this?
    ---- Deployment started. ---- Feb 1, 2007 2:55:04 PM
    Target platform is Standalone OC4J 10g 10.1.3 (Standalone_AppServerConnection).
    Wrote EJB JAR file to D:\jdev10131\jdev\mywork\fusion_sync\deploy\EngineEjb.jar
    Wrote EAR file to D:\jdev10131\jdev\mywork\fusion_sync\deploy\EngineEjb.ear
    Uploading file EngineEjb.ear ...
    Application Deployer for EngineEjb STARTS.
    Copy the archive to D:\jdev10131\j2ee\home\applications\EngineEjb.ear
    Initialize D:\jdev10131\j2ee\home\applications\EngineEjb.ear begins...
    Unpacking EngineEjb.ear
    Done unpacking EngineEjb.ear
    Initialize D:\jdev10131\j2ee\home\applications\EngineEjb.ear ends...
    Starting application : EngineEjb
    Initializing ClassLoader(s)
    Initializing EJB container
    Loading connector(s)
    Starting up resource adapters
    Processing EJB module: EngineEjb.jar
    application : EngineEjb is in failed state
    Operation failed with error:
    javac.exe not found under C:\Program Files\Java\jre1.5.0_10, please use a valid jdk or specify the location of your java compiler in server.xml using the <java-compiler .../> tag
    Deployment failed
    Elapsed time for deployment: 14 seconds
    #### Deployment incomplete. #### Feb 1, 2007 2:55:18 PM
    Thanks,
    Travis

  • Remote Debugging Jdev11 and Tomcat 5.5 ?

    Hi,
    How could i make remote debugging Jdevelopper11 and Tomcat5 ?
    Where could i configure remote Tomcat option ?
    Regards
    Philippe

    Here are some steps with JDev 10g
    http://technology.amis.nl/blog/1984/java-platform-debugger-architecture-jpda-with-tomcat-oc4j-eclipse-intellij-idea-and-jdeveloper
    JDev 11g should be basically the same.

Maybe you are looking for