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: <ejb-jar> <display-name>KS_EJB</display-name> <enterprise-beans> <session> <display-name>KSValidatorS</display-name> <ejb-name>KSValidatorS</ejb-name> <home>cz.chalu.ks.ejb.KSValidatorSHome</home> <remote>cz.chalu.ks.ejb.KSValidatorS</remote> <ejb-class>cz.chalu.ks.ejb.KSValidatorSBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session> </enterprise-beans> <assembly-descriptor> <container-transaction> <description>This value was set as a default by Sun ONE Studio.</description> <method> <ejb-name>KSValidatorS</ejb-name> <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> <ejb-client-jar>cz.chalu.ks.client.KSValidatorClient</ejb-client-jar> </ejb-jar> 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: <enterprise-beans> <session> <display-name>KSValidatorS</display-name> <ejb-name>KSValidatorS</ejb-name> <ejb-ref> <ejb-ref-name>ejb/KSValidatorSHome</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> </ejb-ref> <home>cz.chalu.ks.ejb.KSValidatorSHome</home> <remote>cz.chalu.ks.ejb.KSValidatorS</remote> <ejb-class>cz.chalu.ks.ejb.KSValidatorSBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session> </enterprise-beans> 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
