4 Replies Latest reply on Jul 15, 2008 1:03 PM by olivier merlin

    Unable to deploy a simple MDB with SwiftMQ on JBOSS 5

    olivier merlin Newbie

      Hello,

      I was unable to deploy the MDB sample http://www.swiftmq.com/developers/howto_swiftmq_jboss404/ on JBoss 5 CR1

      The example work fine on JBoss 4.2.2.


      18:09:15,942 WARN [CollectionPropertyHandler] ClassInfo.getDeclaredConstructor(null) didn't work for org.jboss.metadata.ejb.spec.In
      terceptorClassesMetaData, found the default ctor in ClassInfo.getDeclaredConstructors()
      18:09:16,535 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/dep
      loy/simplemdb.ear state=Not Installed mode=Manual requiredState=Parse
      org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/de
      ploy/simplemdb.ear/simplemdb-ejb.jar
       at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
      ut.java:343)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
      ut.java:303)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
      ut.java:275)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:
      236)
       at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1023)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
       at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
       at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
       at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
       at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
       at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
       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:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: cvc-datatype-valid.1.2.1: 'queue/SimpleMessageEJB' is not
      a valid value for 'NMTOKEN'. @ vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear/simplemdb-ejb.jar/META-INF/ej
      b-jar.xml[8,50]
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
       at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
       at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:198)
       at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
       at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
       at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
       at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:128)
       at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
      ut.java:329)
       ... 27 more
      Caused by: org.xml.sax.SAXException: cvc-datatype-valid.1.2.1: 'queue/SimpleMessageEJB' is not a valid value for 'NMTOKEN'. @ vfszip
      :/D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear/simplemdb-ejb.jar/META-INF/ejb-jar.xml[8,50]
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler.error(SaxJBossXBParser.java:426)
       at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.elementLocallyValidType(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.processElementContent(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
       at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown Source)
       at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)
       ... 34 more
      18:09:16,707 WARN [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
      
      vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear -> org.xml.sax.SAXException: cvc-datatype-valid.1.2.1: 'queu
      e/SimpleMessageEJB' is not a valid value for 'NMTOKEN'. @ vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear/si
      mplemdb-ejb.jar/META-INF/ejb-jar.xml[8,50]
      
      
       at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:676)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:661)
       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:417)
       at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      
      


      My ejb-jar.xml is :
      <?xml version="1.0" encoding="UTF-8"?>
      <!-- Copyright (c) 2003 Sun Microsystems, Inc. All rights reserved. -->
      <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
       <display-name>SimpleMessageJAR</display-name>
       <enterprise-beans>
       <message-driven>
       <display-name>SimpleMessageEJB</display-name>
       <ejb-name>SimpleMessageEJB</ejb-name>
       <ejb-class>mdb.simple.SimpleMessageBean</ejb-class>
       <messaging-type>javax.jms.MessageListener</messaging-type>
       <transaction-type>Container</transaction-type>
       <activation-config>
       <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>
       sample1-input@router1
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       ConnectionFactoryName
       </activation-config-property-name>
       <activation-config-property-value>
       ConnectionFactory
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       Transacted
       </activation-config-property-name>
       <activation-config-property-value>
       true
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       Xa
       </activation-config-property-name>
       <activation-config-property-value>
       true
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       DeliveryOption
       </activation-config-property-name>
       <activation-config-property-value>
       A
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       MaxPoolSize
       </activation-config-property-name>
       <activation-config-property-value>
       5
       </activation-config-property-value>
       </activation-config-property>
       <activation-config-property>
       <activation-config-property-name>
       MaxMessages
       </activation-config-property-name>
       <activation-config-property-value>
       5
       </activation-config-property-value>
       </activation-config-property>
       </activation-config>
       </message-driven>
       </enterprise-beans>
      
       <assembly-descriptor >
       <container-transaction >
       <method >
       <ejb-name>SimpleMessageEJB</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
       </assembly-descriptor>
      
      </ejb-jar>
      
      
      


      Does someone has achieve to do a simpleMDB on Jboss 5 with Swiftmq ??

      Thanks,

        • 1. Re: Unable to deploy a simple MDB with SwiftMQ on JBOSS 5
          Peter Johnson Master

          Are you sure you posted the correct ejb-jar.xml file? The error is:

          Caused by: org.xml.sax.SAXException: cvc-datatype-valid.1.2.1: 'queue/SimpleMessageEJB' is not a valid value for 'NMTOKEN'. @ vfszip
          :/D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear/simplemdb-ejb.jar/META-INF/ejb-jar.xml[8,50]

          But line 8 if the file reads:

          <ejb-name>SimpleMessageEJB</ejb-name>


          and that line is only 44 chars long. Look at the exact file in the error message (D:/win32app/jboss-5.0.0.CR1/server/default/deploy/simplemdb.ear/simplemdb-ejb.jar/META-INF/ejb-jar
          .xml), line 8 probably reads:

          <ejb-name>queue/SimpleMessageEJB</ejb-name>


          which is not a valid EJB name.


          • 2. Re: Unable to deploy a simple MDB with SwiftMQ on JBOSS 5
            olivier merlin Newbie

            Hello Peter,

            You're right - there was a mistake in the jboss.xml file in the ejb-name tag.
            But when i correct this file, i have another stack trace that is much more worrying :

            17:47:15,217 ERROR [AbstractKernelController] Error installing to Parse: name=vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/dep
            loy/simplemdb.ear state=Not Installed mode=Manual requiredState=Parse
            org.jboss.deployers.spi.DeploymentException: Error creating managed object for vfszip:/D:/win32app/jboss-5.0.0.CR1/server/default/de
            ploy/simplemdb.ear/simplemdb-ejb.jar
             at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
             at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
            ut.java:343)
             at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
            ut.java:303)
             at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
            ut.java:275)
             at org.jboss.deployment.JBossEjbParsingDeployer.createMetaData(JBossEjbParsingDeployer.java:105)
             at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.deploy(AbstractParsingDeployerWithOutput.java:
            236)
             at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:174)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:970)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1023)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:911)
             at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
             at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1392)
             at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:784)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:912)
             at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:834)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:672)
             at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:455)
             at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:594)
             at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
             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:417)
             at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
             at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
             at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
             at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
             at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
             at java.lang.Thread.run(Thread.java:595)
            Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Failed to parse schema for nsURI=, baseURI=null, schemaLoc
            ation=http://www.jboss.org/j2ee/dtd/jboss.dtd
             at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
             at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
             at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:198)
             at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
             at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
             at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
             at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:128)
             at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutp
            


            In Jboss 5, the jboss.dtd does not support the following jboss.xml anymore :

            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE jboss SYSTEM "D:\download\simplemdb\simplemdb\jboss.dtd">
            <jboss>
             <enterprise-beans>
             <message-driven>
             <ejb-name>SimpleMessageEJB</ejb-name>
             <invoker-bindings>
             <invoker>
             <invoker-proxy-binding-name>message-inflow-driven-bean</invoker-proxy-binding-name>
             </invoker>
             </invoker-bindings>
             <resource-adapter-name>swiftmq.rar</resource-adapter-name>
             </message-driven>
             </enterprise-beans>
            </jboss>
            


            The tags message-driven & resource-adapter-name are no more recognized in jboss 5

            So the wiki are no more valid for JCA on Jboss 5
            What is the method to configure JCA with an external JMS broker in JBoss 5 ?

            regards,



            • 3. Re: Unable to deploy a simple MDB with SwiftMQ on JBOSS 5
              olivier merlin Newbie

              hello,


              <!DOCTYPE jboss SYSTEM "D:\download\simplemdb\simplemdb\jboss.dtd">
              

              in my previous message is equivalent to the standard DOCTYPE :

              <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS//EN" "http://www.jboss.org/j2ee/dtd/jboss.dtd">


              rgds,

              • 4. Re: Unable to deploy a simple MDB with SwiftMQ on JBOSS 5
                olivier merlin Newbie

                Hello,

                Ok - sorry for the previous mail
                The good DTD for jboss.xml in jboss 5.0 is of course :

                http://www.jboss.org/j2ee/dtd/jboss_5_0.dtd
                (logic)

                rgds,