EJB programming & troubleshooting: problem deploying ejb (local-home) to oc4j (ias 9.0.3)
I'm trying to deploy a ejb entity bean to oc4j with only a local interface
- Posted by: Henk J Meulekamp
- Posted on: March 12 2003 07:21 EST
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
- part of my xml ejb-jar. by Henk J Meulekamp on March 12 2003 07:24 EST
- I have 12 CMP2.0 entity beans deloyed to oc4j 903 standalone. by Andy Stefancik on March 12 2003 11:32 EST
- use jdev UML by Andy Stefancik on March 12 2003 11:46 EST
public interface PersonHome extends javax.ejb.EJBLocalHome
public interface Person extends javax.ejb.EJBLocalObject
abstract public class PersonBean implements EntityBean
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
I see now. The end tags for the xml disappear when you post.
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.
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.
I think there is a mistake when the jDeveloper generates the ejb.jar.xml and the orion.jar.xml files..do 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 option..so 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..