Re: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class
I think it goes into your ejb-jar.xml file .. not the jboss... John - Original Message - From: "David M. Karr" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, October 08, 2001 2:10 AM Subject: Re: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class > >>>>> "Nguyen" == Nguyen Thanh Phong <[EMAIL PROTECTED]> writes: > > Nguyen> If you deploy your beans and EJBUtils separately (i.e. they are not in the > Nguyen> same jar file), you cannot use ejb-link in your ejb-jar.xml. Instead, you > Nguyen> have to put the JNDI of the ejb-ref in the jboss.xml. For example: > > Nguyen> > Nguyen> > Nguyen> UserBean > Nguyen> [JNDI of UserBean] > Nguyen> Standard CMP EntityBean > Nguyen> > Nguyen> ejb/UIDHighKeyGenerator > Nguyen> [JNDI of UIDHighKeyGenerator] > Nguyen> > Nguyen> > > So a block like this goes into the "jboss.xml", and does anything similar go > into the "ejb-jar.xml" for my application? I've tried three variations, with > no success. > > If I just put the following into my jboss.xml (I get the "jndi-name" value from > the "jboss.xml" from the ejbutils-deploy.jar): > --- > >UIDHighKeyGenerator >ejb/UIDHighKeyGenerator > > > --- > > then I get the following: > --- > [Container factory] failed to load jboss.xml. There could be a syntax error. > [Container factory] org.jboss.ejb.DeploymentException: Error in jboss.xml for Bean UIDHighKeyGenerator: found in jboss.xml but not in ejb-jar.xml > [Container factory] at org.jboss.metadata.ApplicationMetaData.importJbossXml (ApplicationMetaData.java:387) > --- > > If I instead put the following into my application's ejb-jar.xml, inside the > "" element that is referencing the session bean (and not include the > "jboss.xml" block): > --- > > ejb/UIDHighKeyGenerator > Session > ejb/UIDHighKeyGenerator > org.ejbutils.uid.UIDHighKeyGeneratorHome > org.ejbutils.uid.UIDHighKeyGenerator > > --- > > then I get the following: > --- > [Container factory] org.jboss.ejb.DeploymentException: ejb-ref ejb/UIDHighKeyGenerator, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml > [Container factory] at org.jboss.ejb.Container.setupEnvironment(Container.java:495) > --- > > If I instead add them both, I get this, which is the same as the first case: > --- > [Container factory] failed to load jboss.xml. There could be a syntax error. > [Container factory] org.jboss.ejb.DeploymentException: Error in jboss.xml for Bean UIDHighKeyGenerator: found in jboss.xml but not in ejb-jar.xml > [Container factory] at org.jboss.metadata.ApplicationMetaData.importJbossXml (ApplicationMetaData.java:387) > --- > > -- > === > David M. Karr ; Best Consulting > [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class
xx> "David" == David M Karr <[EMAIL PROTECTED]> writes: > "Nguyen" == Nguyen Thanh Phong <[EMAIL PROTECTED]> writes: Nguyen> If you deploy your beans and EJBUtils separately (i.e. they are not in the Nguyen> same jar file), you cannot use ejb-link in your ejb-jar.xml. Instead, you Nguyen> have to put the JNDI of the ejb-ref in the jboss.xml. For example: Nguyen> Nguyen> Nguyen> UserBean Nguyen> [JNDI of UserBean] Nguyen> Standard CMP EntityBean Nguyen> Nguyen> ejb/UIDHighKeyGenerator Nguyen> [JNDI of UIDHighKeyGenerator] Nguyen> Nguyen> Oh, and the other variation I tried was to have no reference to UIDHighKeyGenerator in either my ejb-jar.xml or jboss.xml. When I do this, it deploys without error. However, when I reference the bean method, I get the following: - [UIDHighKeyGenerator] Application error: BMT stateless bean UIDHighKeyGenerator should complete transactions before returning (ejb1.1 spec, 11.6.1) [UserBean] CONTAINER EXCEPTION:No transaction. [UserBean] java.lang.IllegalStateException: No transaction. [UserBean] at org.jboss.tm.TransactionImpl.setRollbackOnly(TransactionImpl. - I had noticed the code did not "commit()" the connection before returning. I tried adding that commit (after verifying it really gets to the "return" by adding print statements), but it no effect. I still get the "should complete transactions" exception. -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class
> "Nguyen" == Nguyen Thanh Phong <[EMAIL PROTECTED]> writes: Nguyen> If you deploy your beans and EJBUtils separately (i.e. they are not in the Nguyen> same jar file), you cannot use ejb-link in your ejb-jar.xml. Instead, you Nguyen> have to put the JNDI of the ejb-ref in the jboss.xml. For example: Nguyen> Nguyen> Nguyen> UserBean Nguyen> [JNDI of UserBean] Nguyen> Standard CMP EntityBean Nguyen> Nguyen> ejb/UIDHighKeyGenerator Nguyen> [JNDI of UIDHighKeyGenerator] Nguyen> Nguyen> So a block like this goes into the "jboss.xml", and does anything similar go into the "ejb-jar.xml" for my application? I've tried three variations, with no success. If I just put the following into my jboss.xml (I get the "jndi-name" value from the "jboss.xml" from the ejbutils-deploy.jar): --- UIDHighKeyGenerator ejb/UIDHighKeyGenerator --- then I get the following: --- [Container factory] failed to load jboss.xml. There could be a syntax error. [Container factory] org.jboss.ejb.DeploymentException: Error in jboss.xml for Bean UIDHighKeyGenerator: found in jboss.xml but not in ejb-jar.xml [Container factory] at org.jboss.metadata.ApplicationMetaData.importJbossXml (ApplicationMetaData.java:387) --- If I instead put the following into my application's ejb-jar.xml, inside the "" element that is referencing the session bean (and not include the "jboss.xml" block): --- ejb/UIDHighKeyGenerator Session ejb/UIDHighKeyGenerator org.ejbutils.uid.UIDHighKeyGeneratorHome org.ejbutils.uid.UIDHighKeyGenerator --- then I get the following: --- [Container factory] org.jboss.ejb.DeploymentException: ejb-ref ejb/UIDHighKeyGenerator, expected either ejb-link in ejb-jar.xml or jndi-name in jboss.xml [Container factory] at org.jboss.ejb.Container.setupEnvironment(Container.java:495) --- If I instead add them both, I get this, which is the same as the first case: --- [Container factory] failed to load jboss.xml. There could be a syntax error. [Container factory] org.jboss.ejb.DeploymentException: Error in jboss.xml for Bean UIDHighKeyGenerator: found in jboss.xml but not in ejb-jar.xml [Container factory] at org.jboss.metadata.ApplicationMetaData.importJbossXml (ApplicationMetaData.java:387) --- -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class
If you deploy your beans and EJBUtils separately (i.e. they are not in the same jar file), you cannot use ejb-link in your ejb-jar.xml. Instead, you have to put the JNDI of the ejb-ref in the jboss.xml. For example: UserBean [JNDI of UserBean] Standard CMP EntityBean ejb/UIDHighKeyGenerator [JNDI of UIDHighKeyGenerator] Nguyen Thanh Phong Tel: 84-8-837 25 06/837 25 07 Saigon Software Development Company (SDC)Fax: 84-8-837 25 11 10 Co Giang Street, Dist I, HCMC Email: [EMAIL PROTECTED] Vietnam - Original Message - From: "David M. Karr" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 07, 2001 3:14 AM Subject: [JBoss-user] Deployed ejbutils-deploy.jar, but can't find class > I'm trying to set up my application to use EJBUtils. I was able to build it, > deploy it, and create the table. I'm deploying the "ejbutils-client.jar" in my > EAR with a "Class-Path" entry in the EAR manifest. I was able to compile my > application, but when I deploy it, it's able to create the tables, but then I > get the following exception: > > [Container factory] org.jboss.ejb.DeploymentException: Bean UIDHighKeyGenerator not found within this application. > [Container factory] at org.jboss.ejb.Container.setupEnvironment(Container.java:484) > [Container factory] at org.jboss.ejb.Container.init(Container.java:360) > [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja > > I think I'm likely doing something wrong in my ejb-jar, but I'm not sure what > it is. > > The "ejb-jar.xml" for my application has "" elements for this bean > inside each "" element that is using the generator to get its PK. > > Following this is one "" element. > > --- > >User of system >UserBean >com.intsoft.sgs.ejb.UserHome >com.intsoft.sgs.ejb.UserRemote >com.intsoft.sgs.ejb.UserBean >Container >java.lang.String >False >oid >userID >password >lastName >firstNameAndInitials >oid > > ejb/UIDHighKeyGenerator > Session > org.ejbutils.uid.UIDHighKeyGeneratorHome > org.ejbutils.uid.UIDHighKeyGenerator > UIDHighKeyGenerator > > > --- > > -- > === > David M. Karr ; Best Consulting > [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Deployed ejbutils-deploy.jar, but can't find class
I'm trying to set up my application to use EJBUtils. I was able to build it, deploy it, and create the table. I'm deploying the "ejbutils-client.jar" in my EAR with a "Class-Path" entry in the EAR manifest. I was able to compile my application, but when I deploy it, it's able to create the tables, but then I get the following exception: [Container factory] org.jboss.ejb.DeploymentException: Bean UIDHighKeyGenerator not found within this application. [Container factory] at org.jboss.ejb.Container.setupEnvironment(Container.java:484) [Container factory] at org.jboss.ejb.Container.init(Container.java:360) [Container factory] at org.jboss.ejb.EntityContainer.init(EntityContainer.ja I think I'm likely doing something wrong in my ejb-jar, but I'm not sure what it is. The "ejb-jar.xml" for my application has "" elements for this bean inside each "" element that is using the generator to get its PK. Following this is one "" element. --- User of system UserBean com.intsoft.sgs.ejb.UserHome com.intsoft.sgs.ejb.UserRemote com.intsoft.sgs.ejb.UserBean Container java.lang.String False oid userID password lastName firstNameAndInitials oid ejb/UIDHighKeyGenerator Session org.ejbutils.uid.UIDHighKeyGeneratorHome org.ejbutils.uid.UIDHighKeyGenerator UIDHighKeyGenerator --- -- === David M. Karr ; Best Consulting [EMAIL PROTECTED] ; Java/Unix/XML/C++/X ; BrainBench CJ12P (#12004) ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user