facebook

Debugging Weblogic 8.1 EJB with MyEclipse [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #216087 Reply

    Any help would be appreciated.

    I am in the processing of converting our environment from Weblogic 5.1 SP2 to Weblogic 8.1. Previously, we were using the now defunct Visual Cafe for our IDE. I have successfully deployed several applications into the new environment using Eclipse. Our applications are windows based apps and we deploy JAR files to access the code remotely. I’ve read some documentation on what I need to do to “step thru” these EJB’s in debug mode, but I have a couple of questions.

    1) In my current project, I have an ejb-jar.xml and weblogic-ejb-jar.xml. What code do I need to add to either of these XML files to allow for debugging? The examples I’ve seen are JSP specific.

    2) After I have redeployed this jar file with the correct debugging properties, is there anything else I have to do to “step into” the code and debug the EJB?

    weblogic-ejb-jar.xml
    <?xml version=”1.0″ encoding=”UTF-8″?>

    <!DOCTYPE weblogic-ejb-jar PUBLIC “-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN” “http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd”&gt;

    <weblogic-ejb-jar>
    <description><![CDATA[Generated by XDoclet]]></description>
    <weblogic-enterprise-bean>
    <ejb-name>CNRVMSMainEJB</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>CNRVMSMain</jndi-name>
    </weblogic-enterprise-bean>
    <weblogic-enterprise-bean>
    <ejb-name>CNRVMSCalc</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <reference-descriptor>
    </reference-descriptor>
    <jndi-name>CNRVMSCalc</jndi-name>
    </weblogic-enterprise-bean>
    <!–
    To add enterprise beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called weblogic-enterprise-beans.xml that contains
    the <weblogic-enterprise-bean></weblogic-enterprise-bean> markup for those beans.
    –>

    </weblogic-ejb-jar>

    ejb-jar.xml
    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE ejb-jar PUBLIC “-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN” “http://java.sun.com/dtd/ejb-jar_2_0.dtd”&gt;

    <ejb-jar >

    <description><![CDATA[No Description.]]></description>
    <display-name>Generated by XDoclet</display-name>

    <enterprise-beans>

    <!– Session Beans –>
    <session >
    <description><![CDATA[CNRVMSMainEJB EJB]]></description>
    <display-name>CNRVMSMainEJB</display-name>

    <ejb-name>CNRVMSMainEJB</ejb-name>

    <home>com.cnr.vms.interfaces.CNRVMSMainEJBHome</home>
    <remote>com.cnr.vms.interfaces.CNRVMSMainEJB</remote>
    <ejb-class>com.cnr.vms.ejb.CNRVMSMainEJBSession</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>

    </session>

    <session >
    <description><![CDATA[CNRVMSCalc EJB]]></description>
    <display-name>CNRVMSCalc</display-name>

    <ejb-name>CNRVMSCalc</ejb-name>

    <home>com.cnr.vms.interfaces.CNRVMSCalcHome</home>
    <remote>com.cnr.vms.interfaces.CNRVMSCalc</remote>
    <ejb-class>com.cnr.vms.ejb.CNRVMSCalcSession</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>

    </session>

    <!–
    To add session beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called session-beans.xml that contains
    the <session></session> markup for those beans.
    –>

    <!– Entity Beans –>
    <!–
    To add entity beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called entity-beans.xml that contains
    the <entity></entity> markup for those beans.
    –>

    <!– Message Driven Beans –>
    <!–
    To add message driven beans that you have deployment descriptor info for, add
    a file to your XDoclet merge directory called message-driven-beans.xml that contains
    the <message-driven></message-driven> markup for those beans.
    –>

    </enterprise-beans>

    <!– Relationships –>

    <!– Assembly Descriptor –>
    <assembly-descriptor >
    <!–
    To add additional assembly descriptor info here, add a file to your
    XDoclet merge directory called assembly-descriptor.xml that contains
    the <assembly-descriptor></assembly-descriptor> markup.
    –>

    <!– finder permissions –>

    <!– finder permissions –>

    <!– transactions –>

    <!– finder transactions –>
    </assembly-descriptor>

    </ejb-jar>

    #216107

    Riyad Kalla
    Member

    1) In my current project, I have an ejb-jar.xml and weblogic-ejb-jar.xml. What code do I need to add to either of these XML files to allow for debugging? The examples I’ve seen are JSP specific.

    Just be sure to run the app server in debug mode with a JDK 1.4+ VM and debugging of beans will work as it should.

    2) After I have redeployed this jar file with the correct debugging properties, is there anything else I have to do to “step into” the code and debug the EJB?

    Just make sure to be using a 1.4 VM (preferablly late 1.4.1 or 1.4.2 releases) and be sure to start the app server in debug mode (check the WebLogic connector settings in MyEclipse under “Launch”).

    You should be cooking with oil now!

    #216120

    Robert Varga
    Participant

    @support-rkalla wrote:

    1) In my current project, I have an ejb-jar.xml and weblogic-ejb-jar.xml. What code do I need to add to either of these XML files to allow for debugging? The examples I’ve seen are JSP specific.

    Just be sure to run the app server in debug mode with a JDK 1.4+ VM and debugging of beans will work as it should.

    2) After I have redeployed this jar file with the correct debugging properties, is there anything else I have to do to “step into” the code and debug the EJB?

    Just make sure to be using a 1.4 VM (preferablly late 1.4.1 or 1.4.2 releases) and be sure to start the app server in debug mode (check the WebLogic connector settings in MyEclipse under “Launch”).

    You should be cooking with oil now!

    And also be sure to include any additional jars which setDomainEnv.cmd puts into the startup classpath in prepend and append to classpath list boxes, if you happen to use a non-server domain (integration, workshop, platform, etc).

    Also you might need to start up Pointbase manually in these cases.

    Regards,

    Robert

    #216203

    Thanks to each of you for your help. I am now successfully stepping thru he EJB’s.

    Randy

    #216281

    While I was able to step into Debug mode yesterday, I seem to be having difficulty recreating exactly how I did it. Here is the process I go thru:
    1) I double clike MyEclipse from my desktop.
    2) I click on the debug icon to open in Debug mode. (Does it matter what perspective I am in at this point).
    3) I have breakpoints established on the methods I want to debug.
    4) I start the Weblogic 8.1 server from within MyEclipse.
    5) I verify that my DCOM port is available.
    6) I run the VB app and expect to hit the breakpoint, but it does not.

    I’m sure it’s user error, but I’m relatively new to this environment. It also appears I’m stepping into System code in debug mode which I don’t really want to do.

    I can provide other information if needed. As I said, I did have it debugging yesterday, but I had tried so many different things that I’m not able to recreate.

    I do appreciate all of the help.

    Thanks,

    Randy

    #216286

    Riyad Kalla
    Member

    Randy,
    Double check that the connector is set to run in debug mode, and that you are using a 1.4 JDK to run it… also reevaluate that you used Rob’s suggestions… other than that, I’m not sure why the breakpoints aren’t getting hit.

    Are you sure you have them all set?

    #216971

    I have just set up myeclipse on my windows workstation.
    My weblogic 8 environment is remote on a unix server.
    which contains a seperate web app for me and around 30 other
    developers. It is not an option for me to map the BEA directories to my windows pc.
    I can use the remote debugger for debugging servlets, beans, ect.
    However, I cannot debug the JSP pages. I can add breakpoints but they are never caught.
    I have enabled JSP debugging in my weblogic.xml file using the suggestion
    posted in another thread on this forum.
    i.e. adding the following to my weblogic-web-app element

    <jsp-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </jsp-param>

    I have seen conflicting messages stating that remote debugging works
    and doesn’t work for JSP. I would like to pose the question again and
    ask that if anyone has done it, can they share their experience?
    Thanks,
    Gerard.

    #216998

    Riyad Kalla
    Member

    Gerard,
    Remote debugging of JSP pages is not supported. We use a custom source located integrated with the Eclipse debugger in order to debug JSP pages, it is not available when doing remote debugging sessions. Sorry for the trouble.

    #217115

    Thanks for your response Riyad.
    Is this feature on the horizon or even technically feasible?
    regards,
    Gerard.

    #217123

    Riyad Kalla
    Member

    Gerard,
    I believe most anything is technically feasible, there just hasn’t been a big demand for it. If you start a poll in the Feature Requests forum, and a lot of users want this, we will definately bump it up on our TODO list.

    #217124

    Great, Riyad
    Thanks.
    Gerard.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: Debugging Weblogic 8.1 EJB with MyEclipse [Closed]

You must be logged in to post in the forum log in