problem deploying ejb (local-home) to oc4j (ias 9.0.3)


EJB programming & troubleshooting: problem deploying ejb (local-home) to oc4j (ias 9.0.3)

  1. I'm trying to deploy a ejb entity bean to oc4j with only a local interface
    and not a remote via the enterpise manager wbesite (the one that uses port

    I just doesnt seem to deploy EJB Entity beans with only local interfaces,
    if i click though all the pages in the admin site, the following message is
    shown on the EJB:

         illegal - no home specified in config file for jblearningEJB.jar:Person

    But i just followed and doublechecked the guidlines from oracle:

    Where they also dont implement the Home interface for a local only ejb.

    Is this a common problem? And just related to my method of deployment (via
    the ias admin site) or is it a -bug- in oracle 9.0.3 rc2?

    My statelesssession beans do work, only the entity beans with only a local home give the aboe error.

    All help appreciated,
    Tia & regards

    Threaded Messages (6)

  2. part of my xml ejb-jar.[ Go to top ]


    public interface PersonHome extends javax.ejb.EJBLocalHome
    public interface Person extends javax.ejb.EJBLocalObject
    abstract public class PersonBean implements EntityBean
  3. <entity>

    >             <display-name>Person
    >             <ejb-name>Person
    >             <local-home>com.denkk.jblearning.ejb.person.PersonHome
    >             <local>com.denkk.jblearning.ejb.person.Person
    >             <ejb-class>com.denkk.jblearning.ejb.person.PersonBean
    >             <persistence-type>Container
    >             <prim-key-class>java.math.BigDecimal
    >             <reentrant>False
    >             <cmp-version>2.x
    >             <abstract-schema-name>Person
    >             <cmp-field>
    > ......
    > classes..

    The beans all work.
    The only thing I can think of is the endtags in the ejb-jar.xml.


    If you have all this, then perhaps there is a typo in the ejb-jar.xml.
     When I deploy the first time,(use ant), I make sure the orion-ejb-jar.xml
    is not in the ejb.jar. That way the tables are created at deploy time
    in the db. After that I always deploy with the orion-ejb-jar.xml to prevent
    the deploy from trying to recreate the tables.
    > public interface PersonHome extends javax.ejb.EJBLocalHome
    > public interface Person extends javax.ejb.EJBLocalObject
    > abstract public class PersonBean implements EntityBean
  4. end tags disappeared[ Go to top ]

    I see now. The end tags for the xml disappear when you post.
  5. use jdev UML[ Go to top ]

    if you have jdeveloper 903 you can build the bean(s) using
    the jdev UML. See the jdeveloper help. This will bring up a wizard as you
    draw the entity in the UML class diagram which will create the bean and interfaces and
    the xml for it. You can also do the relationships and multiplicity
    in the UML diagram, and it will auto update your ejb-jar.xml file
    for you. This feature and the new EJB refactoring feature are the
    2 things I like most about the 903 jdeveloper.
  6. And, if i add a remote interface, but still use the local interface, its gets deployed and runs fine.. (using the local interfaceS).

    So it seems to be a problem with the deployement (tool) or app server.
  7. verify your ejb.jar.xml[ Go to top ]

    I think there is a mistake when the jDeveloper generates the ejb.jar.xml and the orion.jar.xml the following steps .
    1) Once you have created the entity and the session beans go to the menu and try verifying your ejb.jar.xml through the verify the same for the
    orion.jar.xml.If these two doesn't give any error try creating a client out from the entity bean which gives a problem.try invoking the create(String pk) trough the client...if your client works perfectly then u can be certain that it is able to make a JNDI lookup properly .Try deploying the same on a OC4J 9.0.3 stand-alone instance by doing a
    pscp pw -oracle c:\your_ejb.jar /opt/oracle/product/9ias/j2ee/home/applications

    2)If while deploying it gives error while creating tables..ignore the same.if it is deployed sucessfully it give you a message of bind -0 which signifies it has deployed sucessfully. Try acessing the entity bean with a client.

    3)If you are able to do so,then you try deploying this ejb.jar throught the EnterpriseManager website.

    4)If again you are getting a problem in step 8 of deployment, you need to re-build your Project in your jDeveloper and also the ejb.jar.xml and verify it again

    5)But before you do step 4 , log on to the server where 9ias is installed, go to the path /opt/oracle/product/9ias/j2ee/home/application-deployments and delete the orion-jar.xml and the deployment cache.

    hope this helps..