0 Replies Latest reply on Jul 11, 2008 12:50 PM by olivier merlin

    MDB deployment problem on JBoss 5 Beta 4 with DD

    olivier merlin Newbie

      Hello,


      My problem is not so simple.
      We need to have a messageSelector depending on System properties.

      We notes that this substitution is possible ONLY in descriptor deployement
      It's not possible to do this substitution in the ActivationConfigProperty .

      (Remark : this is possible in Glassfish )

      The problem is that we have a stacktrace when we deploy our MDB with definition only in DD.
      We have this stack trace :

      2008-07-11 10:43:32,742 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=jboss.j2ee:jar=testMDB-ejb.jar,name=MDB1Bean,service=EJB3 state=Create
      org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@e2da7a[name=destinationType descriptions=[DescriptionMetaData@18657ce[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(
       messageSelector
       =
       provisioning_id like
       'A20902000%'
       ), ActivationConfigProperty(
       acknowledgeMode
       =
       Auto-acknowledge
       ), ActivationConfigProperty(
       destination
       =
       queue/Capabilities
       ), ActivationConfigProperty(
       destinationType
       =
       javax.jms.Queue
       ), ActivationConfigProperty(subscriptionDurability=false), ActivationConfigProperty(destination=queue/Capabilities)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
       at org.jboss.resource.deployment.ActivationSpecFactory.createActivationSpec(ActivationSpecFactory.java:95)
       at org.jboss.resource.deployers.RARDeployment.createActivationSpec(RARDeployment.java:312)
       at org.jboss.resource.deployers.RARDeployment.internalInvoke(RARDeployment.java:276)
       at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
       at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
       at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.createActivationSpec(JBossMessageEndpointFactory.java:294)
       at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:192)
       at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:187)
       at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:151)
       at org.jboss.ejb3.mdb.MDB.start(MDB.java:123)
       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:597)
       at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
       at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
       at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
       at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
       at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
       at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
       at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
       at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
       at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:96)
       at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:90)
       at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:153)
       at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:352)
       at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:413)
       at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:53)
       at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:37)
       at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
       at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
       at java.lang.Thread.run(Thread.java:619)
      2008-07-11 10:43:32,748 DEBUG [org.jboss.ejb3.Ejb3Deployment] Bound ejb3 container jboss.j2ee:jar=testMDB-ejb.jar,name=MDB1Bean,service=EJB3
      2008-07-11 10:43:32,748 DEBUG [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] Added component jboss:id=testMDB-ejb.jar,service=jacc to vfsfile:/home/ngoutal/jboss-5.0.0.Beta4/server/default/deploy/testMDB-ejb.jar
      2008-07-11 10:43:32,749 DEBUG [org.jboss.system.ServiceCreator] About to create bean: jboss:service=jacc,id=testMDB-ejb.jar with code: org.jboss.deployment.security.JaccPolicy
      2008-07-11 10:43:32,750 DEBUG [org.jboss.system.ServiceCreator] Created mbean: jboss:service=jacc,id=testMDB-ejb.jar
      2008-07-11 10:43:32,750 DEBUG [org.jboss.system.ServiceController] Creating service jboss:service=jacc,id=testMDB-ejb.jar
      2008-07-11 10:43:32,750 DEBUG [org.jboss.system.ServiceController] starting service jboss:service=jacc,id=testMDB-ejb.jar
      2008-07-11 10:43:32,750 DEBUG [org.jboss.deployers.plugins.deployers.DeployersImpl] Fully Deployed vfsfile:/home/ngoutal/jboss-5.0.0.Beta4/server/default/deploy/testMDB-ejb.jar
      2008-07-11 10:43:32,751 WARN [org.jboss.system.server.profileservice.hotdeploy.HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** CONTEXTS IN ERROR: Name -> Error
      
      jboss.j2ee:jar=testMDB-ejb.jar,name=MDB1Bean,service=EJB3 -> org.jboss.deployment.DeploymentException: Required config property RequiredConfigPropertyMetaData@e2da7a[name=destinationType descriptions=[DescriptionMetaData@18657ce[language=en]]] for messagingType 'javax.jms.MessageListener' not found in activation config [ActivationConfigProperty(
       messageSelector
       =
       provisioning_id like
       'A20902000%'
       ), ActivationConfigProperty(
       acknowledgeMode
       =
       Auto-acknowledge
       ), ActivationConfigProperty(
       destination
       =
       queue/Capabilities
       ), ActivationConfigProperty(
       destinationType
       =
       javax.jms.Queue
       ), ActivationConfigProperty(subscriptionDurability=false), ActivationConfigProperty(destination=queue/Capabilities)] ra=jboss.jca:service=RARDeployment,name='jms-ra.rar'
      
      
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:291)
       at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
       at java.lang.Thread.run(Thread.java:619)
      2008-07-11 10:44:45,425 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - first pass <Fri, 11 Jul 2008 10:44:45>
      2008-07-11 10:44:45,427 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] StatusModule: first pass
      2008-07-11 10:44:45,427 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_3] - TORecoveryModule - first pass
      2008-07-11 10:44:45,427 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.firstpass] Local XARecoveryModule - first pass
      2008-07-11 10:44:55,430 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] Periodic recovery - second pass <Fri, 11 Jul 2008 10:44:55>
      2008-07-11 10:44:55,430 DEBUG [com.arjuna.ats.arjuna.logging.arjLogger] AtomicActionRecoveryModule: Second pass
      2008-07-11 10:44:55,431 DEBUG [com.arjuna.ats.txoj.logging.txojLoggerI18N] [com.arjuna.ats.internal.txoj.recovery.TORecoveryModule_6] - TORecoveryModule - second pass
      2008-07-11 10:44:55,431 DEBUG [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.info.secondpass] Local XARecoveryModule - second pass
      


      Our ejb-jar.xml is the following :

      <?xml version="1.0" encoding="UTF-8"?>
      
      <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"
      
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
      
      
       <enterprise-beans>
       <message-driven>
       <display-name>MDB1Bean</display-name>
       <ejb-name>MDB1Bean</ejb-name>
       <ejb-class>com.gemalto.session.MDB1Bean</ejb-class>
       <messaging-type>javax.jms.MessageListener</messaging-type>
       <transaction-type>Container</transaction-type>
       <activation-config>
       <activation-config-property>
       <activation-config-property-name>
      
       messagingType
      
       </activation-config-property-name>
      
       <activation-config-property-value>
      
       javax.jms.MessageListener
      
       </activation-config-property-value>
      
       </activation-config-property>
      
       <activation-config-property>
      
       <activation-config-property-name>
       destinationType
       </activation-config-property-name>
       <activation-config-property-value>
       javax.jms.Queue
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       destination
       </activation-config-property-name>
       <activation-config-property-value>
       queue/Capabilities
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       acknowledgeMode
       </activation-config-property-name>
       <activation-config-property-value>
       Auto-acknowledge
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       messageSelector
       </activation-config-property-name>
       <activation-config-property-value>
       provisioning_id like
       '${PROVISIONING_TAG}${PROVISIONING_PREFIX}%'
       </activation-config-property-value>
       </activation-config-property>
      
       </activation-config>
       </message-driven>
       </enterprise-beans>
      </ejb-jar>
      
      


      In fact the problem seems related to DD usage.
      But in our case only DD deployement allow the system properties substitution.
      Without this constraint the MDB work fine.

      Someone has an idea ?
      Best regards,
      Olivier