8 Replies Latest reply on Jan 19, 2010 7:27 AM by sathish avunoori

    could not create component

    sathish avunoori Newbie
      hi am creating a jms queue from a session bean component but when i deploy my project seam raise an error like could not create component. can any one suggest me  the right way to create a jms in a session bean? my session bean like this


      package org.domain.DigesterDemo.session;


      import org.domain.DigesterDemo.entity.Contact;
      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.In;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.log.Log;
      import org.xml.sax.SAXException;

      import java.io.IOException;
      import java.io.Serializable;


      import javax.ejb.MessageDriven;
      import javax.ejb.Remove;

      import javax.jms.JMSException;
      import javax.jms.Message;
      import javax.jms.MessageListener;
      import javax.jms.ObjectMessage;

      import javax.jms.QueueReceiver;
      import javax.jms.QueueSender;
      import javax.jms.QueueSession;

      import javax.ejb.ActivationConfigProperty;




      @MessageDriven(activationConfig = {@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue")
                 , @ActivationConfigProperty(propertyName="destination", propertyValue="queue/phoneListQueue")})

      @Name("addBook")
      @Scope(ScopeType.SESSION)

      public class AddressBookParser implements MessageListener,AddressBookLocal,Serializable
      {
          
            
             @In(create=true,required=false)
             private transient QueueSender phoneQueueSender;
             @In(create=true,required=false)
             private transient QueueSession queueSession;
            
            
           
            
            
             public void onMessage(Message message) {
                      System.out.println("object message received.");
                         if(message instanceof ObjectMessage) {
                             
      System.out.println("queue got object message..");
                          
                        }
                        else{
                            
                        System.out.println("not an object message");
                       
                        }
                       
                       
                   }

            
            
        

           public void make_call()
           {
                try{
                     //ObjectMessage msg =queueSession.createObjectMessage() ;
                     //msg.setObject(myEmpls);
                     System.out.println("before sending .........."+myEmpls);
                       phoneQueueSender.send(queueSession.createObjectMessage((Serializable) myEmpls));  
                  }catch(Exception e)
                         {
                              e.printStackTrace();
                         }
              
           }
         

        
         
         
          @Remove @Destroy
           public void destroy() {
                // TODO Auto-generated method stub

           }
         
      }

        • 2. Re: could not create component
          sathish avunoori Newbie

          hi Nikolay ,
          Here is the stack trace  from jboss-4.2.3GA console,
          Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
          java.lang.RuntimeException: Could not create Component: addBook
               at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1178)
               at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1094)
               at org.jboss.seam.init.Initialization.init(Initialization.java:728)
               at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
               at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
               at sun.reflect.GeneratedMethodAccessor1252.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:616)
               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
               at sun.reflect.GeneratedMethodAccessor1250.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:616)
               at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
               at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
               at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
               at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
               at org.jboss.web.WebModule.startModule(WebModule.java:83)
               at org.jboss.web.WebModule.startService(WebModule.java:61)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
               at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
               at sun.reflect.GeneratedMethodAccessor696.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:616)
               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:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
               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:43)
               at java.lang.reflect.Method.invoke(Method.java:616)
               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:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy44.start(Unknown Source)
               at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
               at sun.reflect.GeneratedMethodAccessor429.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
               at java.lang.reflect.Method.invoke(Method.java:616)
               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.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
               at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
               at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
               at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
               at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
               at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
               at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
               at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
               at $Proxy45.start(Unknown Source)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
               at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
               at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)

          • 3. Re: could not create component
            Nikolay Elenkov Master

            That's not the full stack trace, check your logs. The root cause of the exception should be at the end of the trace.

            • 4. Re: could not create component
              sathish avunoori Newbie
              ok this is the full stack trace ,



              10:02:41,531 INFO  [Initialization] Installing components...
              10:02:41,548 ERROR [[/DigesterDemo]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
              java.lang.RuntimeException: Could not create Component: addBook
                   at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1178)
                   at org.jboss.seam.init.Initialization.installComponents(Initialization.java:1094)
                   at org.jboss.seam.init.Initialization.init(Initialization.java:728)
                   at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35)
                   at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3856)
                   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
                   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:790)
                   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:770)
                   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.apache.catalina.core.StandardContext.init(StandardContext.java:5312)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:296)
                   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                   at org.jboss.web.WebModule.startModule(WebModule.java:83)
                   at org.jboss.web.WebModule.startService(WebModule.java:61)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   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:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy44.start(Unknown Source)
                   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                   at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy45.start(Unknown Source)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              Caused by: java.lang.IllegalArgumentException: Message-driven beans must be bound to STATELESS context: addBook
                   at org.jboss.seam.Component.checkScopeForComponentType(Component.java:409)
                   at org.jboss.seam.Component.<init>(Component.java:230)
                   at org.jboss.seam.Component.<init>(Component.java:206)
                   at org.jboss.seam.init.Initialization.addComponent(Initialization.java:1162)
                   ... 93 more
              10:02:41,646 ERROR [StandardContext] Error listenerStart
              10:02:41,646 ERROR [StandardContext] Context [/DigesterDemo] startup failed due to previous errors
              10:02:41,650 WARN  [ServiceController] Problem starting service jboss.web.deployment:war=DigesterDemo.war,id=-233259882
              org.jboss.deployment.DeploymentException: URL file:/home/logic/jboss-4.2.3.GA/server/default/tmp/deploy/tmp1480606294302525312DigesterDemo-ear.ear-contents/DigesterDemo-exp.war/ deployment failed
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                   at org.jboss.web.WebModule.startModule(WebModule.java:83)
                   at org.jboss.web.WebModule.startService(WebModule.java:61)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   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:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy44.start(Unknown Source)
                   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                   at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy45.start(Unknown Source)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
              10:02:41,666 ERROR [MainDeployer] Could not start deployment: file:/home/logic/jboss-4.2.3.GA/server/default/tmp/deploy/tmp1480606294302525312DigesterDemo-ear.ear-contents/DigesterDemo.war
              org.jboss.deployment.DeploymentException: URL file:/home/logic/jboss-4.2.3.GA/server/default/tmp/deploy/tmp1480606294302525312DigesterDemo-ear.ear-contents/DigesterDemo-exp.war/ deployment failed
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:386)
                   at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
                   at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
                   at org.jboss.web.WebModule.startModule(WebModule.java:83)
                   at org.jboss.web.WebModule.startService(WebModule.java:61)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
                   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
                   at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
                   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:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy44.start(Unknown Source)
                   at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
                   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
                   at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
                   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
                   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
                   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
                   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy45.start(Unknown Source)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
                   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
                   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
                   at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
                   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                   at java.lang.reflect.Method.invoke(Method.java:616)
                   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:264)
                   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
                   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
                   at $Proxy9.deploy(Unknown Source)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
                   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
                   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)


              • 5. Re: could not create component
                Nikolay Elenkov Master

                There you go:


                Caused by: java.lang.IllegalArgumentException: Message-driven beans must be bound to STATELESS context: addBook
                 at org.jboss.seam.Component.checkScopeForComponentType(Component.java:409)
                



                Your MDB component cannot be bound to the session scope. Remove the @Scope(ScopeType.SESSION).


                • 6. Re: could not create component
                  sathish avunoori Newbie

                  ok thanks for your quick replay. i have removed session scope and @destroy method from mdb.
                  my intension is , i want to send an xml file to my mdb queue and parse that file when onMessage() method called and view those parsed data  and want to persist those details in db from my MDB. is it possible to write those parse and persist methods in my MDB?

                  • 7. Re: could not create component
                    Nikolay Elenkov Master

                    sathish avunoori wrote on Jan 19, 2010 06:05:


                    is it possible to write those parse and persist methods in my MDB?


                    Yes. You could have the parsing method(s) in another class/component. Fore persistence, you need to inject the EntityManager in your MDB using @PersistenceContext EntityManager em.


                    HTH

                    • 8. Re: could not create component
                      sathish avunoori Newbie

                      thnkq Nikolay,


                      Can i expect any examples related to my thought?