hi edward,
rickard could solve it. i had to remove the primkey-field in ejb-jar.xml.
the examples i referred to are not the ones shipped with jboss.
jakob
>From: "Kenworthy, Edward" <[EMAIL PROTECTED]>
>Reply-To: "jBoss" <[EMAIL PROTECTED]>
>To: 'jBoss' <[EMAIL PROTECTED]>
>Subject: RE: [jBoss-User] CMP deployment Section: 9.4.7.1
>Date: Fri, 8 Dec 2000 13:07:56 -0000
>
>Reading the warning ;-)
>
>Have a look at these entries in your ejb-jar.xml file:
>
>primkey-field
>prim-key-class
>
>Try this:
>
> <prim-key-class>java.lang.String</prim-key-class>
> <primkey-field>id</primkey-field>
>
>Also your entity class needs changing:
>
>public class PersonBean implements EntityBean
>{
> transient private EntityContext entityContext;
>
> public java.lang.String id; // <---------------------------NOTE !
> public java.lang.String name;
> public java.lang.String vorname;
> public java.lang.String adresse;
> public java.util.Date geburtsDatum;
> public boolean boss;
> public int test;
>}
>
>The examples don't use a primary key class, they just use a String (hence
>the reason their primary key class is declared as a String in the
>deployment
>descriptor.) You seem to have muddled the two together ;-)
>
>Hope this helps.
>
>Edward
>
>-----Original Message-----
>From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
>Sent: 08 December 2000 12:54
>To: [EMAIL PROTECTED]
>Subject: Re: [jBoss-User] CMP deployment Section: 9.4.7.1
>
>
>hi,
>
>i removed the primkey-field an i gets really nasty :
>
>[Auto deploy] Starting
>[Auto deploy] Auto deploy of file:/D:/Java/JBOSS/deploy/brjPerson.jar
>[J2EE Deployer] Deploy J2EE application:
>file:/D:/Java/JBOSS/deploy/brjPerson.jar
>[J2EE Deployer] Could not delete temporary file:
>/d:/java/jboss/tmp/deploy/copy1001.zip
>[J2EE Deployer] Create application brjPerson.jar
>[J2EE Deployer] Installing EJB package: brjPerson.jar
>[J2EE Deployer] Starting module brjPerson.jar
>[Container factory]
>Deploying:file:/d:/java/jboss/tmp/deploy/brjPerson.jar/ejb1002.jar
>[Container factory] Loading ejb-jar.xml :
>jar:file:/d:/java/jboss/tmp/deploy/brjPerson.jar/ejb1002.jar!/META-INF/ejb-j
>ar.xml
>[Container factory] org.jboss.ejb.DeploymentException: Error in ejb-jar.xml
>for Entity Bean Person: expected one prim-key-class tag
>[Container factory] at
>org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.j
>ava:107)
>[Container factory] at
>org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:89)
>[Container factory] at
>org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:341)
>[Container factory] at
>org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:272)
>[Container factory] at java.lang.reflect.Method.invoke(Native Method)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>[Container factory] at
>org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:645)
>[Container factory] at
>org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:137)
>[Container factory] at java.lang.reflect.Method.invoke(Native Method)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>[Container factory] at
>org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:332)
>[Container factory] at
>org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:268)
>[Container factory] at
>org.jboss.ejb.AutoDeployer.startService(AutoDeployer.java:311)
>[Container factory] at
>org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:92)
>[Container factory] at java.lang.reflect.Method.invoke(Native Method)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
>[Container factory] at
>com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
>[Container factory] at
>org.jboss.dependencies.DependencyManager.startMBean(DependencyManager.java:2
>84)
>[Container factory] at
>org.jboss.dependencies.DependencyManager.loadService(DependencyManager.java:
>261)
>[Container factory] at
>org.jboss.dependencies.DependencyManager.processService(DependencyManager.ja
>va:243)
>[Container factory] at
>org.jboss.dependencies.DependencyManager.startMBeans(DependencyManager.java:
>117)
>[Container factory] at org.jboss.Main.<init>(Main.java:162)
>[Container factory] at org.jboss.Main$1.run(Main.java:87)
>[Container factory] at
>java.security.AccessController.doPrivileged(Native
>Method)
>[Container factory] at org.jboss.Main.main(Main.java:83)
>[J2EE Deployer] Starting brjPerson.jar failed!
>[J2EE Deployer] Module brjPerson.jar is not running
>[J2EE Deployer] Destroying application brjPerson.jar
>
>jakob
>
> >From: Rickard �berg <[EMAIL PROTECTED]>
> >Reply-To: "jBoss" <[EMAIL PROTECTED]>
> >To: jBoss <[EMAIL PROTECTED]>
> >Subject: Re: [jBoss-User] CMP deployment Section: 9.4.7.1
> >Date: Fri, 08 Dec 2000 13:44:29 +0100
> >
> >Hi!
> >
> >Jakob Braeuchi wrote:
> > > as i understand the warning, the id attribute of my PersonBean should
>be
>
> >of
> > > type PersonPK ??
> >
> >Please, remove the primkey-field element from ejb-jar.xml and see what
> >happens.
> >
> > > but this does not match the samples i have.
> > >
> > > jakob
> > >
> > > >From: "Kenworthy, Edward" <[EMAIL PROTECTED]>
> > > >Reply-To: "jBoss" <[EMAIL PROTECTED]>
> > > >To: 'jBoss' <[EMAIL PROTECTED]>
> > > >Subject: RE: [jBoss-User] CMP deployment Section: 9.4.7.1
> > > >Date: Fri, 8 Dec 2000 12:14:28 -0000
> > > >
> > > >Reading the warning ! and change your deployment descriptor
> >accordingly.
> > > >
> > > >-----Original Message-----
> > > >From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]]
> > > >Sent: 08 December 2000 12:08
> > > >To: [EMAIL PROTECTED]
> > > >Subject: [jBoss-User] CMP deployment Section: 9.4.7.1
> > > >
> > > >
> > > >hi,
> > > >
> > > >i'm using a simple CMP entity bean:
> > > >
> > > >public class PersonBean implements EntityBean
> > > >{
> > > > transient private EntityContext entityContext;
> > > >
> > > > public long id;
> > > > public java.lang.String name;
> > > > public java.lang.String vorname;
> > > > public java.lang.String adresse;
> > > > public java.util.Date geburtsDatum;
> > > > public boolean boss;
> > > > public int test;
> > > >}
> > > >
> > > >and i also have a primaryKey:
> > > >
> > > >public class PersonPK implements java.io.Serializable
> > > >{
> > > > public long id;
> > > >}
> > > >
> > > >when deploying the bean i get the following warning:
> > > >
> > > >[Verifier]
> > > >Bean : Person
> > > >Section: 9.4.7.1
> > > >Warning: The type of the field named in the primkey-field element
>must
> > > >match
> > > >
> > > >the class in the prim-key-class element.
> > > >
> > > >accessing the Persons using a finder works well, but i'm not able to
> > > >findByPrimaryKey.
> > > >
> > > >thanks
> > > >
> > > >Jakob Braeuchi
> > > >
> > >
> >
> >___________________________________________________________________________
>_
> > > >_________
> > > >Get more from the Web. FREE MSN Explorer download :
> > > >http://explorer.msn.com
> > > >
> > > >
> > > >
> > > >--
> > > >--------------------------------------------------------------
> > > >To subscribe: [EMAIL PROTECTED]
> > > >To unsubscribe: [EMAIL PROTECTED]
> > > >Problems?: [EMAIL PROTECTED]
> > > >
> > > >
> > > >--
> > > >--------------------------------------------------------------
> > > >To subscribe: [EMAIL PROTECTED]
> > > >To unsubscribe: [EMAIL PROTECTED]
> > > >Problems?: [EMAIL PROTECTED]
> > > >
> > >
> > >
> >___________________________________________________________________________
>__________
> > > Get more from the Web. FREE MSN Explorer download :
> >http://explorer.msn.com
> > >
> > > --
> > > --------------------------------------------------------------
> > > To subscribe: [EMAIL PROTECTED]
> > > To unsubscribe: [EMAIL PROTECTED]
> > > Problems?: [EMAIL PROTECTED]
> >
> >--
> >Rickard �berg
> >
> >Email: [EMAIL PROTECTED]
> >
> >
> >--
> >--------------------------------------------------------------
> >To subscribe: [EMAIL PROTECTED]
> >To unsubscribe: [EMAIL PROTECTED]
> >Problems?: [EMAIL PROTECTED]
> >
>
>____________________________________________________________________________
>_________
>Get more from the Web. FREE MSN Explorer download :
>http://explorer.msn.com
>
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Problems?: [EMAIL PROTECTED]
>
>
>--
>--------------------------------------------------------------
>To subscribe: [EMAIL PROTECTED]
>To unsubscribe: [EMAIL PROTECTED]
>Problems?: [EMAIL PROTECTED]
>
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]