1 Reply Latest reply on Oct 13, 2003 4:13 PM by Chris Buckley

    primkey-field must be the same type as prim-key-class - Depl

    mafuertes Newbie

      Hi all,

      I got the following error when deploying my JAR, and the entity beans are not started due to an error related to the issue 'primkey-field must be the same type as prim-key-class':


      14:29:42,717 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=ejb/RegistrationApplicationLocal,servi
      org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCCMPFieldMetaData.(JDBCCMPFieldMetaData.java:130)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.(JDBCEntityMetaData.java:289)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:117)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:52)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCStoreManager.java:677)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:389)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:339)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:782)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1058)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
      at $Proxy4.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:413)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy215.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:404)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:165)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:1003)
      at $Proxy4.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:413)
      at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy10.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:395)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:814)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:627)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:591)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy3.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:435)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:561)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:217)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:230)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:207)


      - It happens for all my CMP entity beans. It is also shown the following:

      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:jndiName=ejb/CompanyAccount,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=AccessRigh
      tLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=ChargeLoca
      l,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=UserTypeLo
      cal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=AccessRigh
      tTypeLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=LesseeLoca
      l,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=ChargeType
      Local,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=UserAccess
      Local,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Bean UserAccessBean not found within this application., ObjectName: jboss.j2ee:jndiName=LessorLoc
      al,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=PricingPol
      icyLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=UserAccoun
      tLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=ejb/Regist
      rationApplicationLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=EsharingAd
      minAccountLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class, ObjectName: jboss.j2ee:jndiName=CompanyPro
      fileLocal,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: primkey-field must be the same type as prim-key-class]


      - I have (I think) well configured my 'ejb-jar.xml', having:

      <prim-key-class>java.lang.Integer</prim-key-class>
      ...
      <primkey-field>registrationID</primkey-field>

      for all the entitys and the types of the primary key fields are all integer.

      Could anybody help me? What could be missing?

      Thanks.

      Miguel