facebook

Orion Deploy

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

    vlenin
    Member

    – System Setup ——————————-
    Operating System and version: XP SP2
    Eclipse version: 2.1.2
    Eclipse build id: 200311030802
    MyEclipse version: 2.7 RC2
    Eclipse JDK version: 1.4.2_03
    Application Server JDK version: 1.4.2_03

    – Message Body ——————————-
    Hi,

    I am trying to deploy a J2EE project written with MyEclipse to Orion 2.0.2.
    I wrote a very simple app with a Web project and a EJB module.
    I configured the MyEclipse/XDoclet parameters as instructed in the Help docs.
    I have a stateless session bean with 1 method I wrote. The rest of the bean is generated by XDoclet/MyEclipse.
    In my web project I have a servlet that calls on the bean.
    When I deploy (as an archive), I get the following error when I start Orion:
    Error in application TTT: Error loading package at file:/C:/orion/application-autodeploy/TTT/TTTEJB.jar, com.mike.ccc.MikeBean does not implement javax.ejb.EJBObject (it implements javax.ejb.SessionBean)

    Any idea why?

    Thanks

    Mikeundefined

    #202424 Reply

    vlenin
    Member

    Ok, the problem I listed above is fixed. I forgot to end my package name with ejb.

    Now there is another issue.
    I get javax.naming.NameNotFoundException: ejb/MikeBeanHome not found in TTT, when I run my servlet.

    Why can’t it find the home interface? Is there any additional configuration that I need to do to Orion?

    Thanks

    Mike

    #202436 Reply

    Scott Anderson
    Participant

    Mike,

    You’ll need to be sure you’re getting XDoclet to generate the orion-ejb-jar.xml file that specifies what JNDI mapping to use for your EJB. You’ll need to be sure that the Orion subtask has been added to the ejbdoclet task for the project in the MyEclipse-XDoclet settings under the project Properties.

    #202445 Reply

    vlenin
    Member

    I had already done that. I followed the instructions in the MyEclipse Help exactly.

    Here is the orion-ejb-jar.xml file that XDoclet generated.

    <?xml version=”1.0″?>
    <!DOCTYPE orion-ejb-jar PUBLIC “-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN” “http://www.orionserver.com/dtds/orion-ejb-jar.dtd”&gt;

    <orion-ejb-jar deployment-version=”2.0.2″ deployment-time=”fa4dc36342″>
    <enterprise-beans>
    <session-deployment name=”MikeBean” location=”MikeBean” wrapper=”MikeBeanHome_StatelessSessionHomeWrapper1″ persistence-filename=”MikeBean” />
    </enterprise-beans>
    <assembly-descriptor>
    <default-method-access>
    <security-role-mapping name=”<default-ejb-caller-role>” impliesAll=”true” />
    </default-method-access>
    </assembly-descriptor>
    </orion-ejb-jar>

    Here’s my code that is calling on my bean:

    Properties prop = System.getProperties();
    Context ctx = new InitialContext(prop);
    java.lang.Object objRef = ctx.lookup(MikeBeanHome.JNDI_NAME);
    MikeBeanHome mbHome =
    (MikeBeanHome) PortableRemoteObject.narrow(objRef,MikeBeanHome.class);
    this.mb = (MikeBean) mbHome.create();

    Any idea what could be wrong?

    #202483 Reply

    Scott Anderson
    Participant

    What is the setting of MikeBeanHome.JNDI_NAME?

    #202493 Reply

    vlenin
    Member

    MikeBeanHome.JNDI_NAME = “ejb/MikeBeanHome”

    #202548 Reply

    Scott Anderson
    Participant

    Try referencing it as “MikeBean” , since that’s what is specified in your orion-ejb-jar.xml file. You can change the generated name by playing with the XDoclet properties but you need to bear in mind that the properties you specify for Orion must match the ones you’ve specified for the general EJB settings and utility classes. Right now it looks like you’ve got a disconnect since the JNDI_NAME doesn’t match what is being generated to the deployment descriptor for Orion.

    #202582 Reply

    vlenin
    Member

    I tried it and it didn’t work.
    I tried referencing it a number of different ways.
    But nothing works.
    I keep getting ClassCastExceptions or javax.naming.NameNotFoundException.

    I would have thought that MyEclipse would have generated the correct xml files for me. I’m not trying to do anything fancy, just have a servlet call on an EJB all within the same enterprise project.

    #202749 Reply

    Scott Anderson
    Participant

    I would have thought that MyEclipse would have generated the correct xml files for me.

    Right now our XDoclet support still requires you to manually and properly configure XDoclet to generate the necessary descriptors for your server. We’ll be working on usability enhancements in this area in the future.

Viewing 9 posts - 1 through 9 (of 9 total)
Reply To: Orion Deploy

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