4 Replies Latest reply on Mar 27, 2002 4:27 PM by ups2000

    3.0 Beta and CMP2 book example

    whitmad


      Has anyone successfully compiled, deployed and run the example code from the CMP2 book on Jboss 3.0 beta? I have worked my way through a couple of errors, "expected one strategy tag", "Failed to parse ej-ql" and haven't got it working. Latest is it appears not to like the use of "Order" as a shema name (I think).

      David

        • 1. Re: 3.0 Beta and CMP2 book example
          dsundstrom

          I'm working on updating the docs right now.

          Between the alpha and beta the system was changed to use the cmr field name as the default name for the fk field. This is a problem for order-lineItem as the fk field for lineItem will be order which is a reserved word in SQL.

          • 2. Re: 3.0 Beta and CMP2 book example
            anc623

            Hello.
            I've bought the CMP2workbook. Is it possible to get a lastest version after you update it?

            Thanks!
            Eric

            • 3. Re: 3.0 Beta and CMP2 book example
              lewis

              I tried it. I updated the jbosscmp-jdbc.xml file to conform to the latest dtd in CVS and deployed it on the beta 2 release. My deployment resulted in the following error:

              2002-03-19 10:29:19,094 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] getObjectName(), name: jboss.management.single:name=cmp2-example.jar,J2EEServer=Single,J2EEApplication=cmp2-example.ear,j2eeType=EJBModule
              2002-03-19 10:29:19,094 DEBUG [org.jboss.management.j2ee.J2EEManagedObject] postRegister(), parent: jboss.management.single:name=cmp2-example.ear,J2EEServer=Single,j2eeType=J2EEApplication
              2002-03-19 10:29:19,094 INFO [org.jboss.ejb.EjbModule] Deploying UserEJB
              2002-03-19 10:29:19,865 INFO [org.jboss.ejb.EjbModule] Deploying CustomerEJB
              2002-03-19 10:29:19,875 INFO [org.jboss.ejb.EjbModule] Deploying OrderEJB
              2002-03-19 10:29:19,875 INFO [org.jboss.ejb.EjbModule] Deploying AddressEJB
              2002-03-19 10:29:19,885 INFO [org.jboss.ejb.EjbModule] Deploying LineItemEJB
              2002-03-19 10:29:19,885 INFO [org.jboss.ejb.EjbModule] Deploying ProductEJB
              2002-03-19 10:29:19,895 INFO [org.jboss.ejb.EjbModule] Deploying ProductCategoryEJB
              2002-03-19 10:29:19,905 INFO [org.jboss.ejb.EjbModule] Deploying EJBTestRunnerEJB
              2002-03-19 10:29:20,025 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] Initializing CMP plugin for AddressEJB
              2002-03-19 10:29:20,166 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] Loading standardjbosscmp-jdbc.xml : file:/D:/Projects/jboss-all/build/output/jboss-3.0.0beta2/server/default/conf/standardjbosscmp-jdbc.xml
              2002-03-19 10:29:20,316 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.AddressEJB] jar:njar:file:/D:/Projects/jboss-all/build/output/jboss-3.0.0beta2/server/default/tmp/deploy/D/Projects/jboss-all/build/output/jboss-3.0.0beta2/server/default/deploy/cmp2-example.ear/67.cmp2-example.ear^/cmp2-example.jar!/META-INF/jbosscmp-jdbc.xml found. Overriding defaults
              2002-03-19 10:29:20,376 ERROR [org.jboss.ejb.EntityContainer] Exception in service lifecyle operation: create
              org.jboss.deployment.DeploymentException: CMP field for key not found: field name=userId
              at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKeyFields(JDBCRelationshipRoleMetaData.java:370)
              at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init(JDBCRelationshipRoleMetaData.java:157)
              at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRelationMetaData.java:308)
              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:502)
              at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.create(JDBCStoreManager.java:265)
              at org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.java:138)
              at org.jboss.ejb.EntityContainer.create(EntityContainer.java:329)
              at org.jboss.ejb.Container.invoke(Container.java:765)
              at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1003)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:745)
              at $Proxy0.create(Unknown Source)
              at org.jboss.system.ServiceController.create(ServiceController.java:255)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:73)
              at $Proxy3.create(Unknown Source)
              at org.jboss.ejb.EjbModule.createService(EjbModule.java:342)
              at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:134)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:745)
              at $Proxy0.create(Unknown Source)
              at org.jboss.system.ServiceController.create(ServiceController.java:255)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:73)
              at $Proxy3.create(Unknown Source)
              at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:397)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:603)
              at org.jboss.deployment.MainDeployer.create(MainDeployer.java:597)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:499)
              at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:463)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:73)
              at $Proxy2.deploy(Unknown Source)
              at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:300)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDeploymentScanner.java:506)
              at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:379)
              at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:228)
              at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:745)
              at $Proxy0.start(Unknown Source)
              at org.jboss.system.ServiceController.start(ServiceController.java:324)
              at org.jboss.system.ServiceController.start(ServiceController.java:342)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
              at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
              at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:326)
              at org.jboss.system.server.ServerImpl.start(ServerImpl.java:208)
              at org.jboss.Main.boot(Main.java:131)
              at org.jboss.Main$1.run(Main.java:364)
              at java.lang.Thread.run(Thread.java:484)

              • 4. Re: 3.0 Beta and CMP2 book example
                ups2000

                dsundstrom,
                could You please tell is it true that cmr field name used for fk field even if I explicitely made fk as cmp-field of pk from ejb in relation?
                pk field is orderId
                cmr is order

                and system takes in sql statement CustomerEJB_order instead of order_id
                Thanks