2 Replies Latest reply on Dec 3, 2002 10:33 AM by Horatiu Stanciu

    CMP 1.1 Entity EJB wrongly deployed as CMP 2.0 EJB

    MN Newbie

      Hello,

      I don't know what causes this, but my CMP 1.1 Entity EJBs are deployed as CMP 2.0 Entity EJBs by JBoss 3.0.2. I think I will be able to declare the correct container-configuration in jboss.xml, and through this fix this behaviour. But shouldn't JBoss automatically recognize the right CMP version out of ejb-jar.xml, and set "Standard CMP EntityBean" as configuration for 1.1 CMP EJBs? I think JBoss did it right before, so I guess I made a mistake somewhere in another configuration file. Any hints?

      Thanks in advance...
      Michael

      14:05:59,685 WARN [JawsApplicationMetaData] Warning: data found in jaws.xml for
      entity IndexedWordOccurrence but bean is not a jaws-managed cmp entity in ejb-jar.xml

      .......

      14:06:01,497 WARN [ServiceController] Problem starting service jboss.j2ee:servi
      ce=EJB,jndiName=polypol/UserRecommendation
      org.jboss.deployment.DeploymentException: Home interface does not have a findByP
      rimaryKey method
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
      r.java:97)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
      CStoreManager.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      r.java:369)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      er.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:764)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:967)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy415.start(Unknown Source)
      at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
      64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
      ler.java:967)
      at $Proxy5.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:396)
      at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy9.start(Unknown Source)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:394)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:427)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:553)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:225)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:202)
      14:06:01,527 INFO [EjbModule] Started
      14:06:01,527 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.0.2/server/
      default/deploy/polypol.jar
      14:06:01,547 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:service=EJB,jndiName=polypol/UserRecommendation
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Home interface does no
      t have a findByPrimaryKey method]

        • 1. Re: CMP 1.1 Entity EJB wrongly deployed as CMP 2.0 EJB
          Juha Lindfors Master

          If I remember correctly the DOCTYPE declaration in your ejb-jar.xml decides which container config is picked for CMP

          • 2. Re: CMP 1.1 Entity EJB wrongly deployed as CMP 2.0 EJB
            Horatiu Stanciu Newbie

            The same things happends to me. The only difference is that I try to deploy an ENtity Bean written for EJB 2.0.
            The references to DTDs are correct.

            The message that I receive is:

            "

            16:49:50,226 INFO [MainDeployer] Starting deployment of package: file:/D:/Java/
            jboss-3.0.3/server/entity/deploy/examples.jar
            16:49:50,326 INFO [EjbModule] Creating
            16:49:50,346 INFO [EjbModule] Deploying Street
            16:49:50,406 INFO [EjbModule] Created
            16:49:50,406 INFO [EjbModule] Starting
            16:50:03,415 INFO [Street] Table 'STREET_TABLE' already exists
            16:50:03,425 WARN [ServiceController] Problem starting service jboss.j2ee:jndiN
            ame=Street,service=EJB
            org.jboss.deployment.DeploymentException: Home interface does not have a findByP
            rimaryKey method
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
            r.java:99)
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDB
            CStoreManager.java:463)
            at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
            r.java:369)
            at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
            er.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(ServiceControl
            ler.java:976)
            at $Proxy5.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:397)
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy25.start(Unknown Source)
            at org.jboss.ejb.EjbModule.startService(EjbModule.java:430)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
            64)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
            ler.java:976)
            at $Proxy5.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:397)
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy14.start(Unknown Source)
            at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:394)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
            at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy4.deploy(Unknown Source)
            at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
            tScanner.java:427)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scanDirectory(URLDe
            ploymentScanner.java:648)
            at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
            canner.java:499)
            at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
            bstractDeploymentScanner.java:261)
            at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
            64)
            at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
            ler.java:976)
            at $Proxy0.start(Unknown Source)
            at org.jboss.system.ServiceController.start(ServiceController.java:397)
            at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
            at $Proxy3.start(Unknown Source)
            at org.jboss.deployment.SARDeployer.start(SARDeployer.java:249)
            at org.jboss.deployment.MainDeployer.start(MainDeployer.java:802)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:616)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:580)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:564)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
            java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
            sorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
            nDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:324)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:221)
            at org.jboss.Main.boot(Main.java:148)
            at org.jboss.Main$1.run(Main.java:381)
            at java.lang.Thread.run(Thread.java:536)
            16:50:03,455 INFO [EjbModule] Started
            16:50:03,455 INFO [MainDeployer] Deployed package: file:/D:/Java/jboss-3.0.3/se
            rver/entity/deploy/examples.jar
            16:50:03,455 INFO [MainDeployer] Starting deployment of package: file:/D:/Java/
            jboss-3.0.3/server/entity/deploy/jbossweb-ejb.jar
            16:50:03,565 INFO [EjbModule] Creating
            16:50:03,585 INFO [EjbModule] Deploying CMPState
            16:50:03,625 INFO [EjbModule] Created
            16:50:03,625 INFO [EjbModule] Starting
            16:50:03,815 INFO [CMPState] Created table 'JETTY_HTTPSESSION_CMPSTATE' success
            fully.
            16:50:04,016 INFO [EjbModule] Started
            16:50:04,016 INFO [MainDeployer] Deployed package: file:/D:/Java/jboss-3.0.3/se
            rver/entity/deploy/jbossweb-ejb.jar
            16:50:04,016 INFO [MainDeployer] Starting deployment of package: file:/D:/Java/
            jboss-3.0.3/server/entity/deploy/jmx-ejb-adaptor.jar
            16:50:04,106 INFO [EjbModule] Creating
            16:50:04,126 INFO [EjbModule] Deploying jmx/ejb/Adaptor
            16:50:04,156 INFO [EjbModule] Created
            16:50:04,156 INFO [EjbModule] Starting
            16:50:04,216 INFO [EjbModule] Started
            16:50:04,216 INFO [MainDeployer] Deployed package: file:/D:/Java/jboss-3.0.3/se
            rver/entity/deploy/jmx-ejb-adaptor.jar
            16:50:04,216 INFO [MainDeployer] Starting deployment of package: file:/D:/Java/
            jboss-3.0.3/server/entity/deploy/jmx-console.war/
            16:50:04,346 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationCo
            ntext=2,context=/jmx-console
            16:50:05,137 INFO [jbossweb] Started WebApplicationContext[/jmx-console,file:/D
            :/Java/jboss-3.0.3/server/entity/deploy/jmx-console.war/]
            16:50:05,157 INFO [jbossweb] successfully deployed file:/D:/Java/jboss-3.0.3/se
            rver/entity/deploy/jmx-console.war/ to /jmx-console
            16:50:05,157 INFO [MainDeployer] Deployed package: file:/D:/Java/jboss-3.0.3/se
            rver/entity/deploy/jmx-console.war/
            16:50:05,167 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
            ration 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:

            MBeans waiting for classes:

            MBeans waiting for other MBeans:
            [ObjectName: jboss.j2ee:jndiName=Street,service=EJB
            state: FAILED
            I Depend On:
            Depends On Me: org.jboss.deployment.DeploymentException: Home interface does no
            t have a findByPrimaryKey method]
            16:50:05,167 INFO [URLDeploymentScanner] Started
            16:50:05,167 INFO [MainDeployer] Deployed package: file:/D:/Java/jboss-3.0.3/se
            rver/entity/conf/jboss-service.xml
            16:50:05,177 INFO [Server] JBoss (MX MicroKernel) [3.0.3 Date:200209301503] Sta
            rted in 0m:37s:994ms
            17:12:45,884 INFO [JBossManagedConnectionPool] Exception destroying ManagedConn
            ection
            javax.resource.ResourceException: SQLException
            at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.checkExc
            eption(LocalManagedConnection.java:501)
            at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.destroy(
            LocalManagedConnection.java:230)
            at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.do
            Destroy(InternalManagedConnectionPool.java:273)
            at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.re
            moveTimedOut(InternalManagedConnectionPool.java:191)
            at org.jboss.resource.connectionmanager.IdleRemover$1.run(IdleRemover.ja
            va:70)
            at java.lang.Thread.run(Thread.java:536)

            "

            Thanx,
            H