Debug a servlet

Is my understanding correct you cannot debug a servlet in weblogic8.1 - or am I
suffering from finger trouble?
I have a servlet with breakpoints that are never actioned - even though I know
I executing the code, I can edit, build and change its behaviour - but the breakpoints
are ignored!
If a project contains a runnable object like a xxx.jws file the debugger launches
as expected.
John

You might try connecting to your running server with a standard JPDA debugger like
NetBeans or Eclipse, with a project pointing to your source code. That works
fine for me. I'm assuming by implication that you're trying to use WebLogic Workshop
to do this.
"john" <[email protected]> wrote:
>
Is my understanding correct you cannot debug a servlet in weblogic8.1
- or am I
suffering from finger trouble?
I have a servlet with breakpoints that are never actioned - even though
I know
I executing the code, I can edit, build and change its behaviour - but
the breakpoints
are ignored!
If a project contains a runnable object like a xxx.jws file the debugger
launches
as expected.
John

Similar Messages

  • Casting problems getting a home I/F of an EJB in another app when debuging a servlet

    (Jdeveloper version = 9.0.2.798, OC4J Application Server version = Oracle9iAS (9.0.2.0.0))
    I am trying to debug a multi-tier application using the embedded application server. Servlets and EJBs within that application need to call EJBs contained within a second application (Horus).
    I have set up the embedded application server to run this second application automatically by adding the following entry into its server.xml
    <application auto-start="true" name="Horus" path="M:\Studio\build\production\java\Server\Obfuscate\J2EE_HOME\Horus\Horus.xml"/>
    I then start the embedded application server by debugging my servlet project, 'intermediateServlet'. I know the second application is running correctly in the embedded application server because I can access it from a separate client.
    In the 'intermediateServlet', I want to obtain a reference to a Dispatcher EJB held in the Horus application. This EJB has the following properties
         ejb-name     = com.internal.server.Dispatcher
         home interface     = com.internal.server.DispatcherHome
         bean class     = com.internal.server.DispatcherEJB
         remote interface= com.internal.server.Dispatcher
    The following code is executed during the container's call to my servlet init( context ) method to try and get the appropriate home interface.
    Context context = null;
    Object tempRemoteIF1 = null;
    Object tempRemoteIF2 = null;
    Properties h = null;
    h = new Properties();
    h.put( Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory" );
    h.put( Context.PROVIDER_URL, "ormi://127.0.0.1:23891/Horus");
    h.put( Context.SECURITY_PRINCIPAL, "user0" );
    h.put( Context.SECURITY_CREDENTIALS, "password" );
    context = new InitialContext (h);
    tempRemoteIF1 = context.lookup( "com.internal.server.Dispatcher" );
    tempRemoteIF2 = javax.rmi.PortableRemoteObject.narrow
    tempRemoteIF1,
    Class.forName( "com.internal.server.DispatcherHome" )
    The context.lookup call seems to work fine, returning an object of the class
         DispatcherHome_StatelessSessionHomeWrapper5
    Which I presume is a containter generated class implementing the home interface. To help confirm this,
    the object has a property beanName that has the value "com.internal.server.Dispatcher".
    The problem occurs on the next line, when I check whether I can cast the object to the home interface using ProtableRemoteObject.narrow(). This gives the following exception.
    java.lang.ClassCastException
         java.lang.Object com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
              PortableRemoteObject.java:296
         java.lang.Object javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
              PortableRemoteObject.java:137
         com.internal.server.Dispatcher com.Studio.servlet.intermediateServlet.getDispatcherRef(java.lang.String, java.lang.String, java.lang.String)
              intermediateServlet.java:601
         void com.Studio.servlet.intermediateServlet.init(javax.servlet.ServletConfig)
              intermediateServlet.java:150
         com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.loadServlet(com.evermind.util.ByteString)
              HttpApplication.java:1669
         com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.findServlet(com.evermind.util.ByteString)
              HttpApplication.java:4001
         javax.servlet.RequestDispatcher com.evermind.server.http.HttpApplication.getRequestDispatcher(com.evermind.util.ByteString, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
              HttpApplication.java:2200
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:580
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:243
         void com.evermind.util.ThreadPoolThread.run()
              ThreadPoolThread.java:62
    Interestingly, if I use practically the same code, to obtain the home interface of an EJB that is defined in the application that I am debugging, the cast works perfectly. The returned object looks identical, apart from the name to the DispatcherHome_StatelessSessionHomeWrapper5 mentioned above.
    Could the error possibly be because I need to declare 'Horus' as a parent application of the application I am debugging? If it is how do I do this?
    Many thanks in advance for any help with this one.
    Mark.

    (Jdeveloper version = 9.0.2.798, OC4J Application Server version = Oracle9iAS (9.0.2.0.0))
    I am trying to debug a multi-tier application using the embedded application server. Servlets and EJBs within that application need to call EJBs contained within a second application (Horus).
    I have set up the embedded application server to run this second application automatically by adding the following entry into its server.xml
    <application auto-start="true" name="Horus" path="M:\Studio\build\production\java\Server\Obfuscate\J2EE_HOME\Horus\Horus.xml"/>
    I then start the embedded application server by debugging my servlet project, 'intermediateServlet'. I know the second application is running correctly in the embedded application server because I can access it from a separate client.
    In the 'intermediateServlet', I want to obtain a reference to a Dispatcher EJB held in the Horus application. This EJB has the following properties
         ejb-name     = com.internal.server.Dispatcher
         home interface     = com.internal.server.DispatcherHome
         bean class     = com.internal.server.DispatcherEJB
         remote interface= com.internal.server.Dispatcher
    The following code is executed during the container's call to my servlet init( context ) method to try and get the appropriate home interface.
    Context context = null;
    Object tempRemoteIF1 = null;
    Object tempRemoteIF2 = null;
    Properties h = null;
    h = new Properties();
    h.put( Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory" );
    h.put( Context.PROVIDER_URL, "ormi://127.0.0.1:23891/Horus");
    h.put( Context.SECURITY_PRINCIPAL, "user0" );
    h.put( Context.SECURITY_CREDENTIALS, "password" );
    context = new InitialContext (h);
    tempRemoteIF1 = context.lookup( "com.internal.server.Dispatcher" );
    tempRemoteIF2 = javax.rmi.PortableRemoteObject.narrow
    tempRemoteIF1,
    Class.forName( "com.internal.server.DispatcherHome" )
    The context.lookup call seems to work fine, returning an object of the class
         DispatcherHome_StatelessSessionHomeWrapper5
    Which I presume is a containter generated class implementing the home interface. To help confirm this,
    the object has a property beanName that has the value "com.internal.server.Dispatcher".
    The problem occurs on the next line, when I check whether I can cast the object to the home interface using ProtableRemoteObject.narrow(). This gives the following exception.
    java.lang.ClassCastException
         java.lang.Object com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
              PortableRemoteObject.java:296
         java.lang.Object javax.rmi.PortableRemoteObject.narrow(java.lang.Object, java.lang.Class)
              PortableRemoteObject.java:137
         com.internal.server.Dispatcher com.Studio.servlet.intermediateServlet.getDispatcherRef(java.lang.String, java.lang.String, java.lang.String)
              intermediateServlet.java:601
         void com.Studio.servlet.intermediateServlet.init(javax.servlet.ServletConfig)
              intermediateServlet.java:150
         com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.loadServlet(com.evermind.util.ByteString)
              HttpApplication.java:1669
         com.evermind.server.http.ServletInstanceInfo com.evermind.server.http.HttpApplication.findServlet(com.evermind.util.ByteString)
              HttpApplication.java:4001
         javax.servlet.RequestDispatcher com.evermind.server.http.HttpApplication.getRequestDispatcher(com.evermind.util.ByteString, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse)
              HttpApplication.java:2200
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
              HttpRequestHandler.java:580
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
              HttpRequestHandler.java:243
         void com.evermind.util.ThreadPoolThread.run()
              ThreadPoolThread.java:62
    Interestingly, if I use practically the same code, to obtain the home interface of an EJB that is defined in the application that I am debugging, the cast works perfectly. The returned object looks identical, apart from the name to the DispatcherHome_StatelessSessionHomeWrapper5 mentioned above.
    Could the error possibly be because I need to declare 'Horus' as a parent application of the application I am debugging? If it is how do I do this?
    Many thanks in advance for any help with this one.
    Mark. Try loading the home interface from the same classloader used to load the the returned home object.
    tempRemoteIF2 = javax.rmi.PortableRemoteObject.narrow
    ( tempRemoteIF1,
    tempRemoteIF1.getClass().getClassLoader().loadClass("com.internal.server.DispatcherHome" )
    Dhiraj

  • Debug 2 servlets at the same time please help!!!!

    I am using JDeveloper 3.1 and trying to Debug 2 servlets at the same time. I can debug either servlet individually, but I cannot seem to call Servlet 2 from Servlet1 while debugging. I keep getting Web-to-go cannot find URL. What am I doing wrong.
    Whenever I run a servlet in the debugger, the url shows: http://<myserver>/servlets/servlet regardless of the name of the servlet.
    How do I debug 2 servlets at the same time.

    Hi,
    It depends on how you call the second servlet from the first. You want to make sure to use a relative URL.
    For example, if both of your compiled servlet classes are in JDEV_HOME\myclasses\ServletProject, then make sure to call servlet2 from servlet1 directly. If servlet2 is in JDEV_HOME\myclasses\OtherServlets, then you want to use '..\OtherServlets\servlet2'
    I'm not sure why it resolves the url to servlets\servlet for everything.

  • Problem in debug a servlet

    hello all,
    i am using eclipse 3.2 and tomcat 5.0.28
    i made a servlet class ServletFetchingDataFromDatabase.java in this package ( given below )
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ServletDataBaseConnection\src\servlet
    and corresponding this java file .... its class file situated in this package ( given below )
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\ServletDataBaseConnection\build\classes\servlet
    because of my java file in servlet package , i wrote this file ( given below )
    package servlet;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    public class ServletFetchingDataFromDatabase extends HttpServlet {
    private static final long serialVersionUID = 8572240412874905464L;
         String url = "jdbc:mysql://localhost/mokshadatabase";
         String user = "root";
         String password = "password";
         String jdbcDriver = "com.mysql.jdbc.Driver";
    public void doGet(HttpServletRequest request , HttpServletResponse response) throws ServletException , IOException{
              String query = null;
              response.setContentType("text/html");
              PrintWriter pw = response.getWriter();
              pw.println("<html>");          
              pw.println("<body>");
              pw.println("<form>");
              pw.println("Servlet DataBase Connection<br>");
              pw.println("Patient Master Table <br><br>");
              try{
                  Class.forName(jdbcDriver).newInstance();
                  Connection conn = DriverManager.getConnection(url, user, password);
                  query = "SELECT * FROM mhis_m_patientmaster";
                  PreparedStatement stmt = conn.prepareStatement(query);
                  stmt.executeQuery();
                  ResultSet rs = stmt.getResultSet();
                  pw.println("<table border = 1>");
                  pw.println("<tr>");
                  pw.println("<td>patient_Id</td>");
                  pw.println("<td>patient_Registration_Date</td>");
                  pw.println("<td>patient_Registration_Time</td>");
                  pw.println("<td>patient_First_Name</td>");
                  pw.println("<td>patient_Last_Name</td>");
                  pw.println("</tr>");
                  while(rs.next()){
                              pw.println("<tr>");
                       if("".equalsIgnoreCase(rs.getString(1))){
                            pw.println("<td>Null</td>");
                       }else{
                            pw.println("<td>" + rs.getString(1) + "</td>");
                       if("".equalsIgnoreCase(rs.getString(2))){
                            pw.println("<td>Null</td>");
                       }else{
                            pw.println("<td>" + rs.getString(2) + "</td>");
                       pw.println("</tr>");
                  pw.println("</table>");
             }catch(IllegalAccessException e){
                   pw.println("Error is : " + e.getMessage() + "<br>");
                   pw.println("Error is IllegalAccessException<br>");
              }catch (ClassNotFoundException e) {
                   pw.println("Error is : " + e.getMessage() + "<br>");
                   pw.println("Error is ClassNotFoundException<br>");
              }catch(InstantiationException e){
                   pw.println("Error is : " + e.getMessage() + "<br>");
                   pw.println("Error is InstantiationException<br>");
              }catch(SQLException e){
                   pw.println("Error is : " + e.getMessage() + "<br>");
                   pw.println("Error is SQLException<br>");
              pw.println("</form>");
              pw.println("</body>");          
              pw.println("</html>");
    }and web.xml .. i wrote
    <!--    ServletFetchingDataFromDatabase.java (In side servlet package )    -->
        <servlet>
            <servlet-name>servlet\ServletFetchingDataFromDatabase</servlet-name>
            <servlet-class>servlet.ServletFetchingDataFromDatabase</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>servlet\ServletFetchingDataFromDatabase</servlet-name>
            <url-pattern>/servlet/ServletFetchingDataFromDatabase.do</url-pattern>
        </servlet-mapping>now when i debug it then it gives error like that...
    HTTP Status 404 - /ServletDataBaseConnection/servlet/servlet.ServletFetchingDataFromDatabase.do
    type Status report
    message /ServletDataBaseConnection/servlet/servlet.ServletFetchingDataFromDatabase.do
    description The requested resource (/ServletDataBaseConnection/servlet/servlet.ServletFetchingDataFromDatabase.do) is not available.main thing is that when i check it from web browser
    ( http://localhost:8080/ServletDataBaseConnection/servlet/ServletFetchingDataFromDatabase.do ) then it gives correct out put .. no problem is there..but when i check it by debug using break point ...then it gives this error....
    i thing this problem is related to web.xml ... but if this web.xml is wrong then why this web.xml gives write out put from when i checked it by browser...

    Hi ,
    I really dont understand why you are making such a complicated folder structure for servlet.
    May be i m wrong, but if you are using eclipse everything is straight forward.
    Just create dynamic web project create servlet into src & jsp into webcontent . Everything place in your
    workspace thats all. Just simply call your servlet thats it
    Please Revert Back
    Sachin Kokcha

  • How to use jdb for debugging a servlet?

    I'm using Apache/JServ with jdk 1.4 (via Textpad on win2K SP 3).
    The 'gospel' I'm trying to follow is:
    'Start the server manually and record the password for remote debugging
    (this is displayed on the console).'
    'Start the Java debugger:'
    'jdb -host your_host -password the_password'
    'You should be able to debug your Java classes now using the jdb
    command.'
    My problem is that I can't find the password from Apache.
    I normally start/restart apache as a windows Service.
    If I start it from DOS I get:
    'C:\orant9i\Apache\Apache>apache -k start'
    'Oracle HTTP Server Powered by Apache/1.3.12 (Win32) ApacheJServ/1.1
    mod_ssl/2.6.4 OpenSSL/0.9.5a mod_perl/1.24 running...'
    I've searched the log, conf & property files but can't find any password.
    I've also searched the Apache website for 'jdb' without luck.
    I've printed out (and read!) the 'Using Apache with MS Windows' manual.
    I did a Google:
    --Someone suggested starting Apache using using the -X flag, but I don't
    seem to have this option.
    --Someone else suggested changing jvm12.conf, but I don't have one.
    I have tried the following, just-in-case I don't really need a password,
    but it doesn't tell me a lot, and I would appreciate some help:
    JDB -sourcepath E:\javaPackages org.apache.jserv.JServServletManager
    C:\orant9i\Apache\Apache>JDB org.apache.jserv.JServServletManager
    Initializing jdb ...
    > run
    run org.apache.jserv.JServServletManager
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started:
    Exception occurred: java.lang.ClassNotFoundException (uncaught)"thread=main", java.net.URLClassLoader$1.run(), line=199 bci=72
    main[1] list
    Source file not found: URLClassLoader.java
    main[1]
    Thanks,
    Peter.
    Posted to alt.apache.configuration, comp.lang.java, http://groups.yahoo.com/group/win-apache and
    comp.infosystems.www.servers.misc with no response

    Hello
    You wrote:
    I added the following to jserv.properties:
    wrapper.bin.parameters=-Xdebug
    wrapper.bin.parameters=-Xrunjdwp:transport=dt_socket,address=2930,suspend=n,server=y
    and it ran the servlet okay.Fine so far. This means your debugee VM is started and running. The "suspend=n" means it
    will start running without waiting for a debugger to attach... so you can attach later whenever you
    decide to debug. Note that 'later' could be weeks later, or possibly never.
    Now: Time to attach jdb to the victim/debugee process you started above.
    You wrote:
    But I get the following when I try to start jdb:
    jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=2930 org.apache.jserv.JServServletManager
    gives:
    Cannot specify command line with connector:
    com.sun.jdi.SocketAttach:hostname=localhost,port=2930,
    and
    jdb -attach localhost:2930 org.apache.jserv.JServServletManager
    gives:
    Cannot specify command line with connector: com.sun.jdi.SharedMemoryAttach:name=localhost:2930,The problem here is that you are trying to supply too much information to jdb.
    When you are using the attach connectors, all you need to supply is the
    host name and socket (for the socket connectors), or the name of the shared memory
    area (for the shared memory connector). The connectors you tried above are throwing
    an error because you are trying to supply something extra (the class name).
    When doing an attach, the debugee VM is already launched. The debugger will
    attach to it and inspect the classes loaded.
    If you are still running with the wrapper.bin.parameters you listed above,
    then all you need to connect with jdb is:
      jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=2930 You should get a jdb prompt, and you will be able to inspect the debugee
    VM by entering commands such as threads and classes. Typically
    the next thing would be to set some breakpoints (stop in package.class.method,
    or stop at package.class:line. Then restart the debugee with a resume.

  • 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

  • Enable JSSE Debugging in servlet?

    Hi everyone,
    I read from an article that we can enable the JSSE debugging using the following command
    java -Djavax.net.debug=all MySSLApp
    Is it possible to enable such debugging utility inside the code of a servlet?
    Thanks
    Feng

    Yes, you can enable this in a servlet, no problem. I am assuming that you are using iPlanet 6.X. Then in magnus.conf, you can capture the stdout and stderr to the errors log, and that will contain the "transcript" of your ssl handshakes, etc..... or whatever debugging output you want.
    The config lines to capture stdout and stderr to the errors log are:
    LogStdout on
    LogStderr on
    You can also configure java logging to go to places other than stdout and stderr, but for that you'll have to ask someone else.... :-)

  • How to debug a servlet

    Can anyone point me to a good tool to debug servlet?

    if ur lukin @ Java IDE tool editor/debugger, I recommend Borland JBuilder Enterprise(I tried version 6)...

  • Debugging JSP / Servlets

    Hi All
    For some reason I am not able to debug my JSP / Servlets using
    JDeveloper 9i.
    When I place the breakpoints, the application / project doesnt
    stop near the break points.
    Any suggestions ???
    Sincerely
    Samson

    You have to map your jsp to the jsp engine... see http://download.oracle.com/docs/cd/E11035_01/workshop102/ideuserguide/servers/conTomcat.html

  • 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.

  • Debugging forms servlet

    Hi
    Can someone tell me how to turn on debugging on the middleware for forms 10g?
    In 9i, you added &serverURL=/forms90/l90servlet/debug to the end of the url.

    Added &serverURL=/forms/lservlet/debug and this to works.

  • How to debug with EJB+Servlet+J2ME at the same time?

    I am setting up an environment to compile Sun's Smart Ticket J2ME application. However, it run with application exception in the servlet or EJB. I tried to debug. But if I debug the servlet with Embedded AS in JDeveloper, I cannot debug the EJB since the EJB cannot deployed to the embedded AS. (EJB and Servlet must be co-existed in the same AS, at least using same JNDI)
    So is there any good approach to debug?
    email: [email protected]

    Hi Marvin,
    If the EJB cannot be deployed to the embedded AS, then you should probably use remote debugging to debug the servlet and EJB in the stand-alone AS.
    Look in the Help for topics about remote debugging the OC4J application server. (I'd give you the exact topic title, but I'm at home for the holidays and I don't have the latest JDev on this machine.)
    The Help topic describes it in more details, but the basic steps are as follows:
    1. Launch the AS in debug mode by inserting some debugging options on the command line used to start up the AS.
    If you are using OJVM, then the debugging options are
    -XXdebug,port4000,detached
    If you are using another JVM (for example HotSpot), then the debugging options are
    -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=4000,suspend=n
    2. Set your project for remote debugging by checking the Remote Debugging checkbox on the Debugging - Remote panel of the Project Settings dialog. Also you should select the "Attach to OJVM" radio button if you are using OJVM or the "Attach to JPDA" radio button if you are using another JVM (for example HotSpot).
    3. Click the debug button in JDev and enter the host and port where the AS is running (leave host blank if the AS is on the same machine as J[i]Long postings are being truncated to ~1 kB at this time.

  • Problem with debug servlet Eclipse 3 tomcat 5

    I have configured Eclipse 3 with Tomcat 5.0.28 and tomcatPulginV3
    but, I have problem to debug my servlet
    I have error message
    help me it is urgent
    Failed to connect to remote VM. Connection refused.
    java.net.ConnectException: Connection refused: connect
    java.net.PlainSocketImpl.socketConnect(Native Method)
    java.net.PlainSocketImpl.doConnect(Unknown Source)
    java.net.PlainSocketImpl.connectToAddress(Unknown Source)
    java.net.PlainSocketImpl.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.connect(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    java.net.Socket.<init>(Unknown Source)
    org.eclipse.jdi.internal.connect.SocketTransportImpl.attach(SocketTransportImpl.java:47)
    org.eclipse.jdi.internal.connect.SocketAttachingConnectorImpl.attach(SocketAttachingConnectorImpl.java:103)
    org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:131)
    org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:75)
    org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:569)
    org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:788)
    org.eclipse.debug.internal.ui.DebugUIPlugin$6.run(DebugUIPlugin.java:955)
    org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)Thanks

    Check your packages which you are importing....

  • Debugging servlets

    I'm using JDev 3.0 and I'm trying to debug my servlet. I have 2 problems:
    1) Netscape is supposed to appear with the Servlet Launcher page, but doesn't. I have to run webapprunner.html by hand in order to launch my servlet.
    2) Yesterday I was able to set breakpoints and step through the code, but today I see the popup:
    Cannot debug project with Target JDK 'java version "JDK1.2.2_JDeveloper'" can only debug with Target JDK 'java version "JDK1.1.8_JDeveloper'"
    The project was created to use JDK1.2.2 so I've been able to debug with it before.
    bob

    Hi,
    The servlet launcher problem might be caused by a network router. We try to locate your IP address when we launch Web-to-Go.
    Make sure when you start JDeveloper that you start it in 1.2 mode. The target JDK and the JDK you start JDev in must match for the debugger to work properly.
    Laura

  • Remote Servlet Debugging - can only see static member values

    I'm trying to remotely debug a Servlet-based application running on Tomcat 5 from JDev 10.1.2.1.0 This is a rather large codebase that I've inherited, and its being compiled via Ant.
    I am able to successfully attach to the server 'debugee' process, and breakpoints that I set in JDev are stopped at, but when it comes to viewing variable values in the code, the only values that I can see are those of static variables. Others yield no value when I hold the mouse over then, and if I hilight the variable and choose "Inspect" from the popup menu, I get "?" for the type and the value of the variable.
    I created a brand new project with a simple Servlet accessing a simple class (w/ instance members, local method variables, etc) and I'm able to debug that and see instance and method variable values.
    I can't figure out why this is occurring. Has anyone else seen or experienced this type of behavior before?
    Appreciate any help!
    Thanks

    Liz,
    YOU ARE SUCH A STUD-ette!!!!! That was the problem - I inherited this codebase, which is using Ant for compilation, and it didn't have the 'debug="on"' attribute set on the javac task. I added that and did a clean build and its now debugging like it should be - LIFE IS GOOD!
    Thank You VERY VERY Much! I'm a relative beginner to JPDA, and this was exactly the type of insight that I'm lacking. (and now I'm going to go quietly read the docs on JPDA - I should have at least been able to figure that out... <:-)
    Thanks a million!
    Jim

Maybe you are looking for