5 Replies Latest reply on Apr 29, 2004 8:58 AM by dannyyates

    actual approach to deploy cmp bean

    Nischal Sharma Newbie

      Hi
      friends

      i got one cmp bean sample code from oreilly workbook using defaultDS as datasource and i changded it to OracleDS and place Oracle-ds.xml (having my database configuration setting ).

      but when i depoy jar file on jboss-3.2.3 ,it show error message given below:

      "Verification of Enterprise Beans
      above for error messages.
      "

      --------------

      10:35:32,187 ERROR [URLDeploymentScanner] MBeanException: Exception
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@7eb4a8d4 { url=file:/C:/jboss-3
      default/deploy/titan.jar }
      deployer: org.jboss.ejb.EJBDeployer@13e0aba
      status: Deployment FAILED reason: Verification of Enterprise Beans
      above for error messages.
      state: FAILED
      watch: file:/C:/jboss-3.2.3/server/default/deploy/titan.jar
      lastDeployed: 1083206121062
      lastModified: 1083206121062
      mbeans:
      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:


      --------------

      ejb-jar.xml is->

      -------------------
      ejb-jar>
      <enterprise-beans>

      <ejb-name>CustomerEJB</ejb-name>
      com.titan.customer.CustomerHomeRemote
      com.titan.customer.CustomerRemote
      <ejb-class>com.titan.customer.CustomerBean</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>Customer</abstract-schema-name>
      <cmp-field><field-name>id</field-name></cmp-field>
      <cmp-field><field-name>lastName</field-name></cmp-field>
      <cmp-field><field-name>firstName</field-name></cmp-field>
      <cmp-field><field-name>hasGoodCredit</field-name></cmp-field>
      <primkey-field>id</primkey-field>
      <security-identity><use-caller-identity/></security-identity>

      </enterprise-beans>

      <assembly-descriptor>
      <security-role>
      <role-name>Employees</role-name>
      </security-role>
      <method-permission>
      <role-name>Employees</role-name>

      <ejb-name>CustomerEJB</ejb-name>
      <method-name>*</method-name>

      </method-permission>
      <container-transaction>

      <ejb-name>CustomerEJB</ejb-name>
      <method-name>*</method-name>

      <trans-attribute>Required</trans-attribute>
      </container-transaction>
      </assembly-descriptor>

      </ejb-jar>


      and
      jboss.xml file is:


      -------------


      <enterprise-beans>

      <ejb-name>CustomerEJB</ejb-name>
      <jndi-name>CustomerHomeRemote</jndi-name>

      </enterprise-beans>


      ............


      jbosscmp-jdbc.xml given below:

      --------------

      <jbosscmp-jdbc>


      java:/OracleDS
      <datasource-mapping>Oracle9i</datasource-mapping>
      <create-table>true</create-table>
      <remove-table>true</remove-table>


      <enterprise-beans>

      <ejb-name>CustomerEJB</ejb-name>
      <table-name>Customer</table-name>
      <cmp-field>
      <field-name>id</field-name>
      <column-name>ID</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>lastName</field-name>
      <column-name>LAST_NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>firstName</field-name>
      <column-name>FIRST_NAME</column-name>
      </cmp-field>
      <cmp-field>
      <field-name>hasGoodCredit</field-name>
      <column-name>HAS_GOOD_CREDIT</column-name>
      </cmp-field>

      </enterprise-beans>
      </jbosscmp-jdbc>

      do i have to add <entity-command name="">
      if yes wht is the name parameter in that tag similar to given below tag

      <entity-command name="mysql-get-generated-keys">
      for mysql

      and
      <auto-increment> tag

      with regards
      nischal

        • 1. Re:  actual approach to deploy cmp bean
          Alexey Loubyansky Master

          So what are 'the errors above' in the log?

          • 2. Re:  actual approach to deploy cmp bean
            Nischal Sharma Newbie

            Thanks for ur kind reply

            jboss server shows that the varification failure


            and this is what appear on console(given below between lines)

            --------
            10:35:32,187 ERROR [URLDeploymentScanner] MBeanException: Exception
            ration 'checkIncompleteDeployments()'
            Cause: Incomplete Deployment listing:
            Packages waiting for a deployer:

            Incompletely deployed packages:
            [org.jboss.deployment.DeploymentInfo@7eb4a8d4 { url=file:/C:/jboss-3
            default/deploy/titan.jar }
            deployer: org.jboss.ejb.EJBDeployer@13e0aba
            status: Deployment FAILED reason: Verification of Enterprise Beans
            above for error messages.
            state: FAILED
            watch: file:/C:/jboss-3.2.3/server/default/deploy/titan.jar
            lastDeployed: 1083206121062
            lastModified: 1083206121062
            mbeans:
            ]MBeans waiting for classes:

            MBeans waiting for other MBeans:
            --------------

            therefore fail to deploy my cmp bean

            do u know what is the cause of this error
            and how i can deploy it successfully


            • 3. Re:  actual approach to deploy cmp bean
              Joachim Van der Auwera Expert

              Look further up in the log file, you have only showed the last error. Actual cause is mentioned earlier.

              • 4. Re:  actual approach to deploy cmp bean
                Nischal Sharma Newbie

                thanks for ur instant reply..

                i think u r right the error is due to customerEJB
                due to these(lines)
                ------------
                20:48:01,546 WARN [verifier] EJB spec violation:
                Bean : CustomerEJB
                Method : public Integer ejbCreate(Integer)
                -----------

                this is what appear on console(given below between lines)

                --------


                20:48:01,171 INFO [OracleDS] Bound connection factory for resource adapter for
                ConnectionManager 'jboss.jca:service=LocalTxCM,name=OracleDS to JNDI name 'java:
                /OracleDS'
                20:48:01,171 INFO [TxConnectionManager] Started jboss.jca:service=LocalTxCM,nam
                e=OracleDS
                20:48:01,171 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/deploy/transaction-service.xml
                20:48:01,171 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
                -3.2.3/server/default/deploy/user-service.xml
                20:48:01,187 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/deploy/user-service.xml
                20:48:01,203 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
                -3.2.3/server/default/deploy/titan.jar
                20:48:01,546 WARN [verifier] EJB spec violation:
                Bean : CustomerEJB
                Method : public Integer ejbCreate(Integer)
                Section: 10.6.4
                Warning: The throws clause must define the javax.ejb.CreateException.

                20:48:01,562 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.
                2.3/server/default/deploy/titan.jar
                org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
                d, see above for error messages.
                at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
                at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at sun.reflect.GeneratedMethodAccessor21.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:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy6.deploy(Unknown Source)
                at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                tScanner.java:302)
                at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                canner.java:476)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                doScan(AbstractDeploymentScanner.java:201)
                at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                bstractDeploymentScanner.java:274)
                at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                92)
                at sun.reflect.GeneratedMethodAccessor5.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:546)
                at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                ler.java:976)
                at $Proxy0.start(Unknown Source)
                at org.jboss.system.ServiceController.start(ServiceController.java:394)
                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:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy4.start(Unknown Source)
                at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                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:546)
                at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                at $Proxy5.deploy(Unknown Source)
                at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                at org.jboss.Main.boot(Main.java:150)
                at org.jboss.Main$1.run(Main.java:395)
                at java.lang.Thread.run(Thread.java:534)
                20:48:01,578 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
                -3.2.3/server/default/deploy/jmx-console.war/
                20:48:01,687 INFO [EmbeddedTomcatService] deploy, ctxPath=/jmx-console, warUrl=
                file:/C:/jboss-3.2.3/server/default/deploy/jmx-console.war/
                20:48:01,859 INFO [Engine] SingleSignOnContextConfig[/jmx-console]: Added certi
                ficates -> request attribute Valve
                20:48:01,875 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
                loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@1299f7e
                20:48:01,875 INFO [Engine] StandardManager[/jmx-console]: Seeding random number
                generator class java.security.SecureRandom
                20:48:01,875 INFO [Engine] StandardManager[/jmx-console]: Seeding of random num
                ber generator has been completed
                20:48:01,875 INFO [Engine] StandardWrapper[/jmx-console:default]: Loading conta
                iner servlet default
                20:48:01,875 INFO [Engine] StandardWrapper[/jmx-console:invoker]: Loading conta
                iner servlet invoker
                20:48:02,375 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/deploy/jmx-console.war/
                20:48:02,375 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
                -3.2.3/server/default/deploy/management/web-console.war
                20:48:02,843 INFO [EmbeddedTomcatService] deploy, ctxPath=/web-console, warUrl=
                file:/C:/jboss-3.2.3/server/default/tmp/deploy/tmp49168web-console.war/
                20:48:03,031 INFO [Engine] SingleSignOnContextConfig[/web-console]: Added certi
                ficates -> request attribute Valve
                20:48:03,062 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
                loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@1e7d503
                20:48:03,062 INFO [Engine] StandardManager[/web-console]: Seeding random number
                generator class java.security.SecureRandom
                20:48:03,062 INFO [Engine] StandardManager[/web-console]: Seeding of random num
                ber generator has been completed
                20:48:03,312 INFO [Engine] StandardWrapper[/web-console:default]: Loading conta
                iner servlet default
                20:48:03,359 INFO [Engine] StandardWrapper[/web-console:invoker]: Loading conta
                iner servlet invoker
                20:48:03,984 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/deploy/management/web-console.war
                20:48:03,984 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
                -3.2.3/server/default/deploy/ESP.ear
                20:48:04,062 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.2.3/ser
                ver/default/deploy/ESP.ear
                20:48:10,250 INFO [EmbeddedTomcatService] deploy, ctxPath=/esp, warUrl=file:/C:
                /jboss-3.2.3/server/default/tmp/deploy/tmp49169ESP.ear-contents/ESP.war/
                20:48:11,093 INFO [Engine] SingleSignOnContextConfig[/esp]: Added certificates
                -> request attribute Valve
                20:48:11,109 WARN [EmbeddedTomcatService] Unable to invoke setDelegate on class
                loader:org.jboss.web.tomcat.tc4.WebCtxLoader$ENCLoader@1d1fc02
                20:48:11,109 INFO [Engine] StandardManager[/esp]: Seeding random number generat
                or class java.security.SecureRandom
                20:48:11,109 INFO [Engine] StandardManager[/esp]: Seeding of random number gene
                rator has been completed
                20:48:11,109 INFO [Engine] StandardWrapper[/esp:default]: Loading container ser
                vlet default
                20:48:11,109 INFO [Engine] StandardWrapper[/esp:invoker]: Loading container ser
                vlet invoker
                20:48:12,109 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-3.2.3/
                server/default/deploy/ESP.ear
                20:48:12,109 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/deploy/ESP.ear
                20:48:12,109 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
                ration 'checkIncompleteDeployments()'
                Cause: Incomplete Deployment listing:
                Packages waiting for a deployer:

                Incompletely deployed packages:
                [org.jboss.deployment.DeploymentInfo@7eb4a8d4 { url=file:/C:/jboss-3.2.3/server/
                default/deploy/titan.jar }
                deployer: org.jboss.ejb.EJBDeployer@13e0aba
                status: Deployment FAILED reason: Verification of Enterprise Beans failed, see
                above for error messages.
                state: FAILED
                watch: file:/C:/jboss-3.2.3/server/default/deploy/titan.jar
                lastDeployed: 1083242881203
                lastModified: 1083242881203
                mbeans:
                ]MBeans waiting for classes:

                MBeans waiting for other MBeans:


                20:48:12,109 INFO [URLDeploymentScanner] Started jboss.deployment:type=Deployme
                ntScanner,flavor=URL
                20:48:12,171 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.3/server/
                default/conf/jboss-service.xml
                20:48:12,171 INFO [Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3
                _2_3 date=200311301445)] Started in 23s:265ms
                ---------------------------------------

                I WILL BE GRATEFUL IF ANY ONE HEPL ME

                • 5. Re:  actual approach to deploy cmp bean
                  dannyyates Newbie

                  It's stated right there in front of you:

                  Warning: The throws clause must define the javax.ejb.CreateException.