You must call lookup for the jndiName KSValidatorS, not KSValidatorSHome
Annegret
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Jiri
Chaloupka
Sent: Sonntag, 25. Januar 2004 17:55
To: JBOSS-USER
Subject: [JBoss-user] deploying ejb on jboss / cannot found home
interface
Hallo,
I am learning the ejbs, create some session CMP bean in Sun one studio
and deploy it to jboss (3.2.2).
I write a simply client, which looking for ejb and call business method.
This client is started from jboss scheduller.
So, I have bean as this ejb-jar.xml descriptor:
KS_EJB
KSValidatorS
KSValidatorS
cz.chalu.ks.ejb.KSValidatorSHome
cz.chalu.ks.ejb.KSValidatorS
cz.chalu.ks.ejb.KSValidatorSBean
Stateless
Container
This value was set as a default by Sun ONE
Studio.
KSValidatorS
*
Required
cz.chalu.ks.client.KSValidatorClient
and some client, created as I learn in book Mastering EJB from Ed Roman.
This client has code:
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("KSValidatorSHome");
SValidatorSHome home = (KSValidatorSHome)
javax.rmi.PortableRemoteObject.narrow(obj, KSValidatorSHome.class);
But I got the error :
16:50:50,011 ERROR [KSValidatorClient] fail perform(): KSValidatorSHome
not bound
16:50:50,012 ERROR [STDERR] javax.naming.NameNotFoundException:
KSValidatorSHome not bound
I was looking for some information into JBoss AdminDevel book, and I was
modify client to:
Context ejbCtx = (Context) ctx.lookup("java:comp/env/ejb");
KSValidatorSHome home = (KSValidatorSHome)
ejbCtx.lookup("KSValidatorSHome");
but now I was got:
17:11:40,003 ERROR [KSValidatorClient] fail perform(): comp not bound
17:11:40,003 ERROR [STDERR] javax.naming.NameNotFoundException: comp not
bound
Now I modify the descriptor as I read in AdminDevel book to:
KSValidatorS
KSValidatorS
ejb/KSValidatorSHome
Session
cz.chalu.ks.ejb.KSValidatorSHome
cz.chalu.ks.ejb.KSValidatorS
cz.chalu.ks.ejb.KSValidatorSBean
Stateless
Container
but I still got the same error.
When I deploy ejb jar, in log I see:
17:07:01,677 INFO [MainDeployer] Starting deployment of package:
file:/opt/jboss-3.2.2/server/default/deploy/KS_EJB.jar
17:07:02,020 INFO [EjbModule] Deploying KSValidatorS
17:07:02,098 INFO [StatelessSessionInstancePool] Started
jboss.j2ee:jndiName=KSValidatorS,plugin=pool,service=EJB
17:07:02,099 INFO [StatelessSessionContainer] Started
jboss.j2ee:jndiName=KSValidatorS,service=EJB
17:07:02,099 INFO [EjbModule] Started
jboss.j2ee:module=KS_EJB.jar,service=EjbModule
17:07:02,100 INFO [EJBDeployer] Deployed:
file:/opt/jboss-3.2.2/server/default/deploy/KS_EJB.jar
17:07:02,107 INFO [MainDeployer] Deployed package:
file:/opt/jboss-3.2.2/server/default/deploy/KS_EJB.jar
Where is my mistake?
Thanks,
Jiri
---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
---
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user