dcsimg
Problem lookingup entity EJB on Orion 2.0
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Razvan_Droscaru
Posted On:   Friday, July 11, 2003 02:09 AM

Hi, I'm new to J2EE technology, so, I apologise for my stupid problem, but I can't handle it. I use Orion 2.0, and MySql 4.0.13. I have a table in a database, an entity bean for that table, and a simple web application for selecting and inserting using the entity bean. I have the following structure dir/files: /WLTestOrionEAR /WLTestOrionEAR/META-INF /WLTestOrionEAR/META-INF/Manifest.mf /WLTestOrionEAR/META-INF/application.xml /WLTestOrionEAR/wltest.jar /WLTestOrionEAR/WLTestOrionWEB.war application.xml looks like: <?xml version="1.0" encoding="UTF-8"?>    More>>

Hi,

I'm new to J2EE technology, so, I apologise for my stupid problem, but I can't handle it.



I use Orion 2.0, and MySql 4.0.13. I have a table in a database, an entity bean for that table, and a simple web application for selecting and inserting using the entity bean.

I have the following structure dir/files:



/WLTestOrionEAR

/WLTestOrionEAR/META-INF

/WLTestOrionEAR/META-INF/Manifest.mf

/WLTestOrionEAR/META-INF/application.xml

/WLTestOrionEAR/wltest.jar

/WLTestOrionEAR/WLTestOrionWEB.war



application.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>





WLTestOrionEAR



wltest.jar







WLTestOrionWEB.war

WLTestOrionWEB









wltest.jar contains:

/META-INF

/META-INF/MANIFEST.MF

/META-INF/ejb-jar.xml

/wltest

/wltest/Users.class

/wltest/UsersBean.class

/wltest/UsersHome.class



ejb-jar.xml looks like:



<?xml version="1.0" encoding="UTF-8"?>









Users

wltest.Users

wltest.UsersHome

wltest.Users

wltest.UsersBean

Bean

java.lang.Integer

False











Users

*



Required











In the client application I use the following code to lookup the EJB:



InitialContext ic = new InitialContext();

Object objRef = ic.lookup("java:comp/env/ejb/Users");

home = (UsersHome)PortableRemoteObject.narrow(objRef, UsersHome.class);



I tried:

.. ic.lookup("ejb/Users");

.. ic.lookup("Users");

.. ic.lookup("wltest.Users");

.. and many others ....








The error is:



javax.naming.NameNotFoundException: ejb/Users not found in WLTestOrion/WLTestOrionWEB, there are no bound values

at com.evermind._jm.lookup(.:79)

at com.evermind._au._rw(.:129)

at com.evermind._au.lookup(.:62)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

at util.WLManage. (WLManage.java:21)

at __jspPage0_index_jsp._jspService(__jspPage0_index_jsp.java:34)

at com.orionserver.http.OrionHttpJspPage.service(.:68)

at com.evermind._ay._rfb(.:5737)

at com.evermind.server.http.JSPServlet.service(.:31)

at com.evermind._cub._phd(.:518)

at com.evermind._cub._bgc(.:174)

at com.evermind._ax._lqc(.:614)

at com.evermind._ax._tvb(.:189)

at com.evermind._bf.run(.:62)



It seems to me that the name I use for lookingup the bean is wrong.



Thanks for any advice!



Razvan Droscaru


   <<Less

Re: Problem lookingup entity EJB on Orion 2.0

Posted By:   Razvan_Droscaru  
Posted On:   Friday, July 11, 2003 04:15 AM

My /WLTestOrionEAR/WLTestOrionWEB/Web-inf/web.xml looked like:











and it should look like:











ejb/Users

Entity

wltest.UsersHome

wltest.Users







Razvan Droscaru


About | Sitemap | Contact