4 Replies Latest reply on Apr 4, 2006 3:19 PM by Anuj Shah

    when i deploy an ejb with jboss4.0.4,those exceptions occure

    Song Chi Newbie

      Warning: A Session bean must define at least one ejbCreate method.

      17:21:20,656 ERROR [MainDeployer] Could not create deployment: file:/G:/DevelopTools/JAVA/JBoss/jboss-4.0.4RC1/jboss-4.0.4RC1/server/all/deploy/PersonManager.jar
      org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:594)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy26.create(Unknown Source)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:334)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:522)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:207)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:280)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:974)
      at $Proxy0.start(Unknown Source)
      at org.jboss.system.ServiceController.start(ServiceController.java:417)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy4.start(Unknown Source)
      at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
      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:585)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:260)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:190)
      at $Proxy5.deploy(Unknown Source)
      at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:477)
      at org.jboss.system.server.ServerImpl.start(ServerImpl.java:357)
      at org.jboss.Main.boot(Main.java:200)
      at org.jboss.Main$1.run(Main.java:464)
      at java.lang.Thread.run(Thread.java:595)

      but in my session bean ,i have already defined an ejbCreate() method

      the ejb-jar.xml:
      <?xml version="1.0" encoding="UTF-8"?>

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

      <ejb-jar >

      <![CDATA[No Description.]]>
      <display-name>Generated by XDoclet</display-name>
      <enterprise-beans>
      <!-- Session Beans -->

      <![CDATA[]]>
      <ejb-name>PersonManager</ejb-name>
      PersonManagerHome
      PersonManager
      <local-home>PersonManagerLocalHome</local-home>
      PersonManagerLocal
      <ejb-class>PersonManagerBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Container</transaction-type>

      <assembly-descriptor >

      </assembly-descriptor>

      </ejb-jar>

        • 1. Re: when i deploy an ejb with jboss4.0.4,those exceptions oc
          Thomas Termin Newbie

          Hello,

          It would be good if you would have an ejbCreate() method in your SB.

          That is the first message from the exception!

          Thomas

          • 2. Re: when i deploy an ejb with jboss4.0.4,those exceptions oc
            Anuj Shah Newbie

            I get a similiar message, and i have an ejbCreate method in my bean.

            I am using Message Driven Bean here along with XDoclet. But it seems no matter what i do I always get that exception.

            Here's a snapshot of my bean

            /**
             * @ejb.bean name="NCBIMessageDrivenBean"
             * destination-type="javax.jms.Queue"
             *
             * @jboss.destination-jndi-name name="queue/NCBIQueue"
             */
            public class NCBIMessageDrivenBean implements MessageDrivenBean, MessageListener {
            
             /**
             * @ejb.create-method
             */
             public void ejbCreate() throws javax.ejb.CreateException {
            
             }
            


            My guess is Xdoclet is screwing up somewhere but I am not sure where. Since XDoclet generally just generates the supporting JAVA and XML files. This seems to be more like a deployment issue with JBOSS.

            Any clues on how to proceed debugging this ??

            Thanks
            anuj


            • 3. Re: when i deploy an ejb with jboss4.0.4,those exceptions oc
              Anuj Shah Newbie

              Sorry, wrong post. i don't get a warning, in fact I get an error from JBOSS
              saying

              Bean : NCBIMessageDrivenBean
              Method : public void ejbCreate() throws CreateException
              Section: 15.7.3
              Warning: The ejbCreate() method must define no application exceptions.
              
              12:08:54,724 ERROR [MainDeployer] Could not create deployment: file:/C:/jboss-4.0.3SP1/server/default/tmp/deploy/tmp23571brm.ear-contents/brm-server.jar
              org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
               at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:575)
               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:585)
               at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDisp


              • 4. Re: when i deploy an ejb with jboss4.0.4,those exceptions oc
                Anuj Shah Newbie

                It's interesting that I am the only one replying to my own posts. But nevertheless this might help someone along the line who runs into this.

                I solved the problem by simply removing the throws clause from both ejbCreate and ejbRemove methods.

                At least the bean deployed just fine.

                -Anuj