2 Replies Latest reply on Apr 21, 2003 12:46 PM by sancher

    JBoss CMP 2.0 giving error

    sancher Newbie

      I get the following error/exception


      12:01:13,008 INFO [MainDeployer] Undeployed file:/C:/JBoss/jboss-3.0.6/server/all/deploy/ejb-test.jar
      12:01:13,018 INFO [MainDeployer] Starting deployment of package: file:/C:/JBoss/jboss-3.0.6/server/all/deploy/ejb-test
      12:01:13,369 INFO [EjbModule] Creating
      12:01:13,399 INFO [EjbModule] Deploying RouterEntity
      12:01:13,459 INFO [EjbModule] Deploying SubnetEntity
      12:01:13,479 INFO [EjbModule] Deploying LocationEntity
      12:01:13,489 INFO [EjbModule] Deploying LinkEntity
      12:01:13,509 INFO [EjbModule] Deploying TopologySession
      12:01:13,589 INFO [EjbModule] Created
      12:01:13,589 INFO [EjbModule] Starting
      12:01:13,840 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=apogeenet.Link,service=EJB
      org.jboss.deployment.DeploymentException: CMP field for key not found: field name=id

      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKeyFields(JDBCRelationshipRoleMetaD
      4)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init(JDBCRelationshipRoleMetaData.java:
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:313)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCApplicationMetaData.java:383)
      at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLoader.java:75)
      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:756)
      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.GeneratedMethodAccessor3.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 $Proxy44.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      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)

        • 1. Re: JBoss CMP 2.0 giving error
          Raja Master

          Can you post relevant portions of ejb-jar.xml and jbosscmp-jdbc.xml?

          Make sure all the fields are mapped to database-columns in jbosscmp-jdbc.xml

          -Raj

          • 2. Re: JBoss CMP 2.0 giving error
            sancher Newbie

            here are the is part of the deployment files.
            jbosscmp-jdbc>

            java:/DefaultDS
            <datasource-mapping>Hypersonic SQL</datasource-mapping>
            <create-table>true</create-table>
            <remove-table>true</remove-table>


            <enterprise-beans>

            <!--
            To add beans that you have deployment descriptor info for, add
            a file to your XDoclet merge directory called jbosscmp-jdbc-beans.xml
            that contains the markup for those beans.
            -->



            <ejb-name>LinkEntity</ejb-name>
            <table-name>Link</table-name>

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

            </cmp-field>
            <cmp-field>
            <field-name>speed</field-name>
            <column-name>speed</column-name>

            </cmp-field>
            <cmp-field>
            <field-name>type</field-name>
            <column-name>type</column-name>

            </cmp-field>
            <cmp-field>
            <field-name>description</field-name>
            <column-name>desc</column-name>

            </cmp-field>

            <!-- merge point: jbosscmp-jdbc-load-{0}.xml -->