2 Replies Latest reply on May 2, 2002 11:47 AM by Lateef Jackson

    JBoss 3.0RC1 Deployment problem

    Lateef Jackson Newbie

      I am running JDK1.4 Linux, JBoss 3.0RC1
      It seems like the beans are being deployed as 1.1 but I am not sure if that is what the problem is. I am new to EJB so there might be something easy I am missing.
      Thanks
      Lateef

      The deploment descriptor:
      <?xml version="1.0"?>

      <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, INC.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-ja
      r_2_0.dtd">

      <!-- Created by Lateef Jackson on April 22, 2002, 7:10 PM -->

      <ejb-jar>
      <enterprise-beans>

      <ejb-name>PrimaryKeyGenerator</ejb-name>
      org.util.bean.PrimaryKeyGeneratorHome
      org.util.bean.PrimaryKeyGenerator

      <local-home>org.util.bean.PrimaryKeyGeneratorLocalHome</local-home>
      org.util.bean.PrimaryKeyGeneratorLocal

      <ejb-class>org.util.bean.PrimaryKeyGeneratorBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>

      False

      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>PrimaryKeyGeneratornBean</abstract-schema-name>

      <cmp-field><field-name>id</field-name></cmp-field>


      </enterprise-beans>

      </ejb-jar>


      And here is the stack trace:
      10:54:37,391 INFO [EJBDeployer]
      Bean : PrimaryKeyGenerator
      Section: 9.2.2
      Warning: The entity bean class must not be defined as abstract.

      10:54:37,414 INFO [EJBDeployer]
      Bean : PrimaryKeyGenerator
      Section: 9.4.7.2
      Warning: At least one field in the primary key class must be non-static.

      10:54:37,430 INFO [EjbModule] Creating
      10:54:37,580 INFO [EjbModule] Deploying PrimaryKeyGenerator
      10:54:37,768 ERROR [EntityContainer] Exception in service lifecyle operation: create
      org.jboss.deployment.DeploymentException: Bean PrimaryKeyGenerator has PK of type java.lang.Integer, so it should have a cmp-field named MIN_VALUE
      at org.jboss.ejb.plugins.jaws.metadata.JawsEntityMetaData.(JawsEntityMetaData.java:179)
      at org.jboss.ejb.plugins.jaws.metadata.JawsApplicationMetaData.(JawsApplicationMetaData.java:107)
      at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load(JawsXmlFileLoader.java:58)
      at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.(JDBCCommandFactory.java:139)
      at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.create(JAWSPersistenceManager.java:102)
      at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:155)