How to remote debugging EJB in JDeveloper?

Here is the procedure I follow
1. configure weblogic startWebLogic.cmd file according to the instruction and start it
2. create a EJB project contains HelloWorld.java, HelloWorldBean.java, HelloWorldHome.java and Client.java, Bean has one method hello(), just return a String
3. in JDeveloper, configure project properties, set RUN/DEBUG to Remote Debugging as the instruction provided by Oracle
4. Then how should I do next?
select Client.java --> Debug --> attach it to the target weblogic
select HelloWorldxxx.java --> Debug --> attach it to the target weblogic
I tried the above and it attached to weblogic, after that, the program suspend there, nothing happen, no debug message, no outcome...
I have a question, the project have no EJB Descripter, How Client.java test program find EJB interface through JNDI?
Thanks
-- CHENLW --
Client.java
==// Copyright (c) 2000 qingniao
==package com.chemuser.ejb.HelloWorld;
==import javax.ejb.*;
==import javax.naming.*;
==import java.rmi.*;
==import java.util.Properties;
==
==/**
== * A Class class.
== * <P>
== * @author chenlw
== */
==public class Client {
==
== public static void main(String[] args) {
== try {
== Properties props = System.getProperties();
==
== Context ctx = new InitialContext(props);
== HelloWorldEJBHome home = (HelloWorldEJBHome)ctx.lookup("HelloHome");
== HelloWorldEJB hello = home.create();
==
== System.out.println(hello.hello());
==
== hello.remove();
== } catch (Exception ex)
== {
== ex.printStackTrace();
== }
==
== }
==}
==
==
null

Programming EJB with JDeveloper is not as easily as JBuilder4.0.
I am regret that I must give up JDevelopper which I like most.
Hope JDev Team will enhance these functions in the future.
Thanks
CHENLW

Similar Messages

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

  • How can I develop EJBs using JDeveloper?

    Hi all.
    How can I develop EJBs (entity beans) using JDeveloper and deploying them on WebLogic6x
    server?
    Oracle says that JDeveloper enables to build and deploy applications to the WebLogic
    6x, but I can't do that with Entity Beans(CMP).
    I established the connection to the WebLogic and to the DataBase and they work.
    JDeveloper generate ejb-jar.xml and weblogic-ejb-jar.xml but not weblogic-cmp-rdbms-jar.xml.
    How can I build all the necessary xml's files? What I have to do? Exist a pluging
    to integrate JDeveloper with WebLogic?
    Thanks, and I hope your answers.
    Isra

    hello,
    in reports 6i the charts are created using oracle graphics which stores the chart definitions in a separate file (.OGD). there is not XML interface for graphics.
    with reports 9i and the introduction of the BIgraphBean the definition of the chart-properties is also done in XML.
    reports 9i will be available with iAS Release 2.
    regards,
    the oracle reports team

  • How to set debug mode in jdeveloper for SOA Suite

    Hello,
    Is possible to use jdeveloper, soa suite and debug mode? I can debug my web application with oc4j embendded server. But when i want to deploy on oracle application server and debug, doesnt work.
    How can i fix that?
    I saw that tutorials for jdeveloper and weblogic server, but not for oracle server.

    see :
    http://weblogs.asp.net/gsusx/archive/2006/06/01/WS_2D00_Addressing-interoperability-between-Oracle-BPEL-Process-Manager-and-Microsoft-Windows-Communication-Foundation.aspx
    http://dlimiter.wordpress.com/2009/11/16/manipulating-ws-addressing-headers-in-oracle-bpel/
    on how to populate the ws-addressing elements yourself
    basically you need to add the ws-addressing xsd, create a new variable of it, populate the elements and add it to your partnerlink

  • How to use Remote Debugging in JDeveloper 3.1 ?

    I am trying to use the Remote Debugging option with EJBs in JDeveloper 3.1 with Oracle8i 8.1.6.
    I checking all steps the online walkthrough for Remote Debugging EJB in 8i and it didn't work.
    I'm using Oracle8i EJB/CORBA debug option in project properties, but it does not stop in my EJB's break points.
    I tried deploying the EJB again ( with break points) and again it didn't work.
    The error message I got in the trace file is:
    Errors in file D:\Oracle\admin\SCT\udump\sctS000.TRC:
    ORA-29516: Aurora assertion failure: Java thread deadlock detected
    Could someone please tell me how to use it?
    null

    Which platform is the database running on ??
    Other things you should check -
    when debugging the EJB, JDev
    3.1 looks through your IIOP connections to find the one to use.
    Make sure that the IIOP connection that JDev is using for the debugging matches the IIOP connection that the EJB client application is using.
    raghu
    null

  • Remote debugging (jboss deployed) ejb using JDeveloper

    Hi there
    Does anyone know how to remote debug an ejb deployed in JBoss using JDeveloper (or perhaps know of a link?)? All I can find is this from Oracle:
    http://www.oracle.com/technology/products/jdev/howtos/appservers/debug_in_jboss.html
    But the cmd to replace in the $bin\run.bat file to enable remote debugging doesn't exist in my version of JBoss (jboss-4.0.1RC1).
    Can anyone shed some light here?
    Thanks very much in advance...Jon

    In run batch file add
    set JAVA_OPTS= -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%

  • How do I disable remote debugging in JDeveloper??

    I am having a problem disabling the remote debugging feature inside JDeveloper 9i. I currently have a workspace in which I has set up a remotely debuggable project and another "normal" project which contains the client application that accesses my remote application. When I start the remote application, I am able to attach the remote debugger inside JDeveloper and it works just fine. However, when I attempt to debug my local project, it starts with the following JVM parameters :
    java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=1552
    and fails to start since it cannot attach to a remote process. I have double-checked the project settings and the remote debugging checkbox is NOT select for the local project. I have even resorted to restarting JDeveloper, but that failed to resolve the problem.
    Does anybody have any suggestions as to how to fix this problem?

    Hi David,
    Some things concern me about the java command you show in your post:
    1. On Windows, JDeveloper should be starting javaw, not java. In your post, you show a java command. Is it really java or is it javaw?
    2. JDeveloper should be specifying which JVM to use. In your post, you show a java command where there is no JVM specified (there is no -ojvm or -hotspot). Check your project settings - on the Libraries panel, what J2SE (JDK) are you using? on the Runner panel, what Virtual Machine is selected?
    Other than that, the command you show in your post (the command that JDev launches when you try to debug your local project) contains (mostly) the correct command options for local debugging with a JVM which supports JPDA debugging (for example, classic or hotspot).
    Let me explain the command options:
    java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=1552-Xdebug Enables debugging.
    -Xnoagent Disables old debugging agent (also called sun.tools.debug).
    -Djava.compiler=NONE Disables the JIT compiler.
    -Xrunjdwp Loads the JPDA JDWP library.
    :transport=dt_socket Use sockets for communicating with the debugger.
    ,server=y Listen for a debugger to attach.
    ,address=1552 Use port 1552.
    JDev will use the above command options when you do local debugging with a JVM other than OJVM. (Note that -Xnoagent and -Djava.compiler=NONE are not required for HotSpot, but are accepted and ignored.)
    The command that you show is not trying to connect to anything.
    When JDev does remote debugging, it does not start the java process at all.
    I think there is some other reason why your program does not start up. What other messages are displayed in the Log Window? Do you see messages like "Debugger attempting to connect to local process." or "Debugger connected to local process." or "Debugger unable to connect to local process."?
    -Liz

  • How to do debugging in WebLogic from JDeveloper

    Hi All,
    We in our project are just starting to use JDeveloper instead of Visual Cafe with Weblogic as App. Server. However i am facing this problem while debugging an EJB deployed from JDeveloper 9i to Weblogic 6.1.
    On Clicking Debug|Debug <Project-name> brings up a dialog. After leaving the address field blank(Weblogic running on localhost, and as per your documentation, localhost is default) and port as 5000 (transport_dt_socket set as 5000), the following message comes:
    Debugger attempting to connect to remote process at LocalHost 5000.And it doesn't do anything more.
    Awaiting for your reply on this.
    regards,
    Hiamnshu

    Hi,
    The most important thing is that you need to ensure that WebLogic is start the Java command with debugging options. This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode".
    If you have JSP's and servlets you have other steps as well. I have included the generic steps for any application server. We have plans to post a 'How to remote debug JSP's deployed on Weblogic' in the near future. Keep posted.
    1. You need to replace WebLogic's JSP engine with OJSP and you need to
    setup debugging parameters for OJSP. This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
    Here are some tips:
    A. You'll probably need to specify the following jars in some WebLogic config file. The jar files are all located in <jdev_install>/lib/
    xmlparserv2.jar
    ojc.jar
    jdev-rt.jar
    ojsp.jar
    ojsputil.jar
    B. Add these jar files to the VM's classpath
    C. The OJSP class name is oracle.jsp.runtimev2.JspServlet. You will need to specify this class where you configure your JSP engine information.
    D. You need to pass the following debug parameters. Again this is set up in the app server configuration file(s):
    debu[i]Long postings are being truncated to ~1 kB at this time.

  • Remote debugging in JDeveloper

    Hi,
    Can you please provide the steps to do remote Debugging of source from JDeveloper
    Thanks

    are you looking for this?
    http://aboutsoa.wordpress.com/2009/03/10/remote-debugging-in-jdeveloper/
    http://jdeveloperfaq.blogspot.com/2009/12/faq-4-how-to-remote-debug-adf.html
    http://xmlandmore.blogspot.com/2010/12/using-remote-debugging-in-jdeveloper.html

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

  • Debug EJB in JDev from JSP page

    Hi,
    I have read Oracle Note 120139.1 which has helped me debug EJB through JDeveloper. One problem is that it only works with a standard java client, not with a JSP page.
    I have tried setting "debug file as" Oracle8i EJB/CORBA and making the debug class oracle.jdeveloper.debugger.ServletMain with the jsp page as the first parameter (similar to how JDeveloper actually kicks off debugging a JSP), however this fails with the following output:
    Connecting to database service: sess_iiop://localhost:2481:IAS/etc/debugagent
    Attaching Aurora VM agent to JDeveloper: 172.27.1.104, 3539
    Aurora VM agent attached successfully.
    Cannot run: oracle.jdeveloper.debugger.ServletMain.main()
    null
    java.lang.reflect.InvocationTargetException: java.lang.ArrayIndexOutOfBoundsException: 1
    java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
    void oracle.jdeveloper.debugger.CorbaDebugAgent.main(java.lang.String[])
    If I add 4 "dummy" parameters, this error goes away, everything appears to work, except the page does not load in the browser which pops up and the breakpoint is never hit. I suppose this is to be expected as I don't actually know what those 4 extra parameters do as I don't have an API specification for the oracle.jdeveloper.debugger.ServletMain class.
    Is it possible to do this (even in an unofficial "workaround fashion?). I would love to know what the additional parameters for the oracle.jdeveloper.debugger.ServletMain class are so I can try running it that way...
    Cheers
    Nic

    By Clear parameter if you mean to remove a request parameter from HttpServletRequest, then you can't. And also, I think this is not an actual solution to what you are trying to solve.
    Moreover, you should better post questions related to JSP/Servlet in web tier here .

  • How to start debug mode in Web Logic 6.0

    How can startup web Logic 6.0 server in debug mode? I want to remote debugging
    EJB with JB4 EE
    Thanks

    Check the Borland web site for information on how to integrate JBuilder with
    WLS.
    There is more information there.
    Michael Girdley
    BEA Systems
    Learning WebLogic? http://learnweblogic.com
    "Rex Chan" <[email protected]> wrote in message
    news:3af7956a$[email protected]..
    >
    How can startup web Logic 6.0 server in debug mode? I want to remotedebugging
    EJB with JB4 EE
    Thanks

  • Patchset3 (11.1.1.4/wls 10.3.4) Remote debugging JDPA in weblogic cluster

    Hi,
    I am using Patchset3 (JDeveloper 11.1.1.4/ weblogic server 10.3.4). I was wondering how i can remote debug with
    a) weblogic managed server that is part of a weblogic cluster
    b) the cluster itself that contains multiple managed servers.
    Note that i do understand how to remote debug against a weblogic server (e.g. http://jdeveloperfaq.blogspot.com/2009/12/faq-4-how-to-remote-debug-adf.html), but have not been able to find out how i can achieve this against a cluster that has multiple managed servers. Any directions will be appreciated.
    Thanks,

    Hi,
    haven't tried it but here are some suggestions that might be of help:
    1) Each managed server for each cluster node should be setup for remote debugging. This means that each managed server must be started with the -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n* options in the WebLogic start-up script. Also Tunneling must be enabled for each managed server for each cluster node.
    2) Make sure that you specify a different connection port for each managed server. This is indicated by the address* specifier above.
    3) It seems logical to me that you will need to start separate instances of JDeveloper - one for each managed server that you need to attach to.
    Let us know how it turns out,
    Nick

  • Remote Debug in oas 4.0.8.2 using JDeveloper3.1

    Now I can do remote debug using JDeveloper3.1 in Tomcat or WebLogic!
    But I can not do remote debug in Oralce Application Server 4.0.8.2.
    Who knows how to remote debug in OAS, mainly for how to configure OAS to support remote debug, please tell me as quickly as possible!
    I appreciate ... very much!!!!!!
    We are using JDeveloper3.1 and OAS for our business application. So we must know how to remote debug in OAS with JDeveloper3.1.

    In the JAva Environment settings for your OAS Application you should add the remote debugging name-value pairs using
    X_OPTION
    X_OPTION
    runjdwp:transport=dt_socket,server=y,suspend=n,address=4000
    X_OPTION debug
    X_OPTION noagent
    JAVA_COMPILER NONE
    INITIAL_HEAP 32m
    MAX_HEAP 32m
    After adding the configuration start the OAS and try to connect to remote OAS VM for JDeveloper
    raghu

  • How do I debug pl/sql procedures from a bc4j application

    Hi,
    I would like to use jdevelopers pl/sql debugging capabilities to debug some code that is executed by triggers in the database, when inserting records through my bc4j client application.
    I already found the remote debugging feature of jdeveloper, but that requires setting up a separate debugger listener, and it also requires me to put the following statement in the session:
    DBMS_DEBUG_JDWP.CONNECT_TCP ('hostname_or_ip', port_number)
    Where and how can I put this line of pl/sql code to make it execute each time I launch the bc4j application?
    Or is it possible to use one debugger process (the one that's also using the java breakpoints) to debug both pl/sql and java code?
    Greetings,
    Ivo

    I have the same problem.
    I have a PL/SQL function that returns a number. This function receives 2 parameters. I use StoredProcedureCall plus ValueReadQuery.
    Session aSession = SessionManager.getManager().getDefaultSession();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("CIO_UTILS.COUNT_USER_ROLES_IN_MODULE");
    call.addNamedArgument("p_persid");
    call.addNamedArgument("p_module");
    call.addUnamedOutputArgument("rolesnum", Integer.class);
    ValueReadQuery query = new ValueReadQuery();
    //query.bindAllParameters();
    query.setCall(call);
    query.addArgument("p_persid");
    query.addArgument("p_module");
    Vector parameters = new Vector();
    parameters.addElement(persid);
    parameters.addElement(theModule);
    Integer rolesnum = (Integer) aSession.executeQuery(query,parameters);
    aSession.release();
    if(rolesnum.intValue()<=0)return false; else return true;
    However, I receive the following error:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 96:
    PLS-00312: a positional parameter association may not follow a named association
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    Call:BEGIN CIO_UTILS.COUNT_USER_ROLES_IN_MODULE(p_persid=>'SANCRA2791', p_module=>'PSL_MONITORING', ?); END;
         bind => [=> rolesnum]
    If comment the line
    "call.addUnamedOutputArgument("rolesnum", Integer.class);"
    Toplink is trating it as a procedure, and I also receive an error from PL/SQL.
    There should have to be a way of make it to receive the resoult somehow, but I do not know what.
    Thanks in advance.

Maybe you are looking for

  • TS1559 I just want my phone to work

    I am having trouble getting my music to turn off - it is battery draining on my I phone 5- I turn it off and next time I look at my phone it is playing again- next, I cannot get my msn email to stay logged in - makes me crazy- I don't want to use icl

  • Odbc rdb driver v3.1.0.3 not able to download

    hi, I've been trying to download the odbc driver rdb v3.1.0.3 from the oracle site - it downloads the zip file but can't open it with winzip - gets an "old archive file try downloading again" - any one have any ideas? or where I can download from ano

  • Deposit cheque of one house bank to another house bank

    Dear all,           I want to post an entry where depositing a chque of one house bank to another house bank, with same currency. what is the t code of posting this transaction. how to post cheque book issuance charges in bank account. your replies w

  • Weird colour behaviour in JTextField

    Hi, I've set the background color of my JTextFields, but they keep on changing hue, and fragments of text on the JPanel - for example, text from buttons, or from titles appear in the JTextFields. I've set the color like this: Color mandatory = new Co

  • Print Dialog Printer Button

    Hi All, There are a number of printer features that we use that are only accessible via the "Printer..." button on the print dialog. This would be fine except it seems to forget what settings were last used between print jobs.  For example, we print