5 Replies Latest reply on Sep 2, 2002 7:17 AM by psanjay

    Error while deploying MDB in JBoss3.0

    psanjay

      Hi,
      I have written an MDB & descriptors(ie ejb-jar.xml & jboss.xml).When I deploy this I get an error message in JBoss server console..

      **********************************************************
      ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@c94bd7a3{ url=file:/F:/jboss-3.0.0/server/default/deploy/mdbInvoke.jar,deployedLastModified=1030792390000 }
      org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Message Driven Bean MDBInvokerBean: expected one subscription-durability tag at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:223)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:151)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:326)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:637)

      **********************************************************

      Then as per some other document I tried changing the descriptors name as MDBInvoker-ejb-jar.xml & MDBInvoker-jboss.xml (where my MDBInvoker is my MDB name) & tried deploying I get following message in JBoss console..

      [MainDeployer] Starting deployment of package: file:/F:/jboss-3.0.0/server/default/deploy/mdbInvoke.jar
      [MainDeployer] Deployment of package: file:/F:/jboss-3.0.0/server/default/deploy/mdbInvoke.jar is waiting for an appropriate deployer.

      Now I am not able to communicate with this MDB & not able to connect.

      Could anyone let me know what should be done to make MDB to work in JBOss3.0 .
      Or where I could find a demo MDB for JBoss3.0.0

      Regards
      P.Sanjay

        • 1. Re: Error while deploying MDB in JBoss3.0

          Your problem is you have more than one
          <subscription-durability>
          in ejb-jar.xml

          "org.jboss.deployment.DeploymentException: Error in ejb-jar.xml for Message Driven Bean MDBInvokerBean: expected one subscription-durability tag at org.jboss.metadata.ApplicationMetaData.importEjbJarXml(ApplicationMetaData.java:223)"

          The dds must be called ejb-jar.xml and jboss.xml otherwise
          jboss won't recognise the jar as an ejb.

          Regards,
          Adrian

          • 2. Re: Error while deploying MDB in JBoss3.0
            psanjay

            Thanx warjort for your suggestion,Deployment error solved.

            Now I am facing another problem in MDB after deployment I get an error saying

            INFO [MainDeployer] Successfully completed deployment of package:file:/F:/jboss-3.0.0/server/default/deploy/mdbInvoke.jar
            WARN [JMSContainerInvoker] JMS provider failure detected:
            javax.jms.JMSSecurityException: Connection not authorized to do durable subscription on topic: vergil.bizlet.jms.connectionTopic
            at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:135)
            at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:599)

            But I have already configured vergil.bizlet.jms.connectionTopic in jbossmq-destinations-service.xml file.

            What changes should I do for executing this.

            Kindly look for it & let me know as I am in an urgent situation.

            Thanks & Reagrds
            P.Sanjay

            • 3. Re: Error while deploying MDB in JBoss3.0

              Did you configure username, password and clientID for your durable subscriber? (conf/jbossmq-state.xml)

              -- Juha

              • 4. Re: Error while deploying MDB in JBoss3.0
                psanjay

                Thanx warjort for your suggestion,Deployment error solved.

                Now I am facing another problem in MDB after deployment I get an error saying

                INFO [MainDeployer] Successfully completed deployment of package:file:/F:/jboss-3.0.0/server/default/deploy/mdbInvoke.jar
                WARN [JMSContainerInvoker] JMS provider failure detected:
                javax.jms.JMSSecurityException: Connection not authorized to do durable subscription on topic: vergil.bizlet.jms.connectionTopic
                at org.jboss.mq.security.ServerSecurityInterceptor.subscribe(ServerSecurityInterceptor.java:135)
                at org.jboss.mq.server.TracingInterceptor.subscribe(TracingInterceptor.java:599)

                But I have already configured vergil.bizlet.jms.connectionTopic in jbossmq-destinations-service.xml file.

                What changes should I do for executing this.

                Kindly look for it & let me know as I am in an urgent situation.

                Thanks & Reagrds
                P.Sanjay

                • 5. Re: Error while deploying MDB in JBoss3.0
                  psanjay

                  Hi,
                  Still my MDB is not configued properly.

                  I get the following error when deploying MDB..

                  INFO [JMSContainerInvoker] Trying to reconnect to JMS provider
                  ERROR [JMSContainerInvoker] Reconnect failed: JMS provider failure detected:
                  org.jboss.mq.SpyJMSException: Cannot subscribe to this Destination: null
                  at org.jboss.mq.Connection.addConsumer(Connection.java:974)

                  This keeps running continously..

                  My ejb-jar.xml is...

                  <?xml version="1.0"?>
                  <!DOCTYPE ejb-jar>

                  <ejb-jar>
                  <enterprise-beans>

                  <message-driven>
                  <ejb-name>MDBInvokerBean</ejb-name>
                  <ejb-class>com.vergil.bizlet.MDBInvokerBean</ejb-class>
                  <message-selector></message-selector>
                  <transaction-type>Bean</transaction-type>
                  <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
                  <message-driven-destination>
                  <destination-type>javax.jms.Topic</destination-type>
                  <subscription-durability>Durable</subscription-durability>
                  </message-driven-destination>

                  </message-driven>

                  <assembly-descriptor>
                  <container-transaction>

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

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

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

                  My jboss.xml is ..

                  <?xml version="1.0"?>

                  <enterprise-beans>
                  <message-driven>
                  <ejb-name>MDBInvokerBean</ejb-name>
                  <configuration-name>Standard Message Driven Bean</configuration-name>
                  <destination-jndi-name>topic/vergil.bizlet.jms.connectionTopic</destination-jndi-name>
                  <mdb-user>guest</mdb-user>
                  <mdb-passwd>guest</mdb-passwd>
                  <mdb-client-id>SampleUser</mdb-client-id>
                  </message-driven>
                  </enterprise-beans>


                  My jbossmq-state.xml is..


                  SampleUser
                  vergil.bizlet.jms.connectionTopic


                  could anyone let me know what needs to be done to test my MDB.

                  Thanks & Regards
                  P.SAnjay