6 Replies Latest reply on Feb 14, 2012 11:33 AM by Chris Lott

    Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final

    Chris Lott Newbie

      Short version: Quickstart example of message-driven bean fails to deploy to the server, followed instructions exactly, please help.

       

      Long version.

       

      I downloaded jboss-as-7.0.2.Final.tar.gz and jboss-as-quickstarts-7.0.2.CR3-dist.zip, unpacked both, and started the server successfully - I get a usable page at localhost:8080.  Then I started following the instructions from file jboss-as-quickstarts-7.0.2.CR3/helloworld-mdb/README.html.   I edited the file $JBOSS_HOME/standalone/configuration/mgmt-users.properties to un-comment the "admin=admin" line.  Then I could visit the console at http://localhost:9990/console/.  All good so far.  Then I built the helloworld-mdb quickstart example with maven (version info on maven and java is below). 

       

      $ mvn -version

      Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)

      Maven home: /home/kdd/apache-maven-3.0.4

      Java version: 1.6.0_30, vendor: Sun Microsystems Inc.

      Java home: /usr/java/jdk1.6.0_30/jre

      Default locale: en_US, platform encoding: UTF-8

      OS name: "linux", version: "2.6.32-131.0.15.el6.x86_64", arch: "amd64", family: "unix"

       

      Build and package succeeds.  Then I tried to deploy using the command "mvn jboss-as:deploy" and it went south.  The mvn command yields this error:

       

      Feb 13, 2012 2:56:05 PM org.jboss.remoting3.remote.RemoteConnection handleException

      ERROR: JBREM00200: Remote connection failed: java.io.IOException: Message data for non-existent channel

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 15.705s

      [INFO] Finished at: Mon Feb 13 14:56:05 EST 2012

      [INFO] Final Memory: 6M/359M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.2.Final:deploy (default-cli) on project jboss-as-helloworld-mdb: Could not execute goal deploy on jboss-as-helloworld-mdb.war. Reason: Deployment failed and was rolled back. -> [Help 1]

       

      The server console log shows this error:

       

      14:56:05,698 INFO  [org.jboss.as.server.controller] (pool-1-thread-3) Deployment of "jboss-as-helloworld-mdb.war" was rolled back with failure message {"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.jboss-as-helloworld-mdb.jboss-as-helloworld-mdb.env.\"org.jboss.as.quickstarts.servlet.HelloWorldMDBServletClient\".queue missing [ jboss.naming.context.java.queue.test ]","jboss.naming.context.java.module.jboss-as-helloworld-mdb.jboss-as-helloworld-mdb.env.\"org.jboss.as.quickstarts.servlet.HelloWorldMDBServletClient\".connectionFactory missing [ jboss.naming.context.java.ConnectionFactory ]"]}

      14:56:05,714 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-19) Stopped deployment jboss-as-helloworld-mdb.war in 16ms

       

      This is completely straight out of the box, freshly unpacked, zero tweaking or changes.  Am I doing something wrong?

       

      I checked release 7.1.0.Beta1b in the hope it might work better there, but totally missing - there is no helloworld-mdb subdirectory.

       

      Please help!  Thanks in advance.

        • 1. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
          jaikiran pai Master

          Chris, welcome to the forums.

           

          I haven't looked at the quickstarts lately, but you might want to try it against 7.1.0.CR1b. I'll check with someone who knows the quickstarts better.

          • 2. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
            Chris Lott Newbie

            I also tested the 7.0.2.CR3 quickstart against AS 7.1.0.CR1b with equally poor (altho different) results. 

             

            A bit of grep-ing solved the problem.  Based on the error message that seemed to indicate the queue and connection factory were not found, I searched for the queue name.  I finally figured out that a critical few lines are missing from jboss-as-7.0.2.Final/standalone/configuration/standalone.xml.  The following XML instance is present in jboss-as-7.0.2.Final/standalone/configuration/standalone-preview.xml (and some others).

             

                        <jms-destinations>
                            <jms-queue name="testQueue">
                                <entry name="queue/test"/>
                            </jms-queue>
                            <jms-topic name="testTopic">
                                <entry name="topic/test"/>
                            </jms-topic>
                        </jms-destinations>

             

            I looked at the launcher jboss-as-7.0.2.Final/bin/standalone.sh but could not figure out if there's a way to tell it to read standalone-preview.xml (instead of standalone.xml).  So I simply renamed standalone-preview.xml to standalone.xml and relaunched the server.  Then the quickstart helloworld-mdb could be deployed successfully using the specified maven command, and I could see messages being reported in the server log.

             

            I'll be happy to create a new issue at https://issues.jboss.org/browse/AS7 as a request for this fix to be applied to the distributed version, any guidance?

             

            HTH. 

            • 3. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
              Pete Muir Master

              Hi Chris,

               

              The correct way to do this is to run the quickstart with the "standalone-full.xml" configuration. Subsequent to the CR3 release of the quickstarts we fixed the instructions. You can find the correct instructions at https://github.com/jbossas/quickstart/blob/master/helloworld-mdb/README.md - we're in the process of doing an updated release of the quickstarts for AS 7.1.0.Final (version 7.1.0.CR1 of the quickstarts) so it should be properly fixed soon.


              Pete

              1 of 1 people found this helpful
              • 4. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
                Chris Lott Newbie

                Thanks for the quick reply.  I see in the git-supplied instructions that I should use the command-line arguments "-c standalone-XYZ.xml" when running standalone.sh. 

                 

                Tested that on jboss-as-7.1.0.CR1b with argument "standalone-full.xml" and that successfully launched the server. 

                 

                However, in the 7.0.2.FINAL version, there is no "standalone-full.xml" in the configuration directory, and further the 7.0.2.FINAL launcher rejects the "-c" argument.  I can write an issue about this if that's helpful, but if the 7.0.2 development line will not get further love then I won't clutter up your issue DB.

                 

                Just for completeness, I tried deploying the 7.0.2 quickstart hello-mdb to the freshly launched 7.1.0.CR1b.  I got a mess of exceptions.  Because that's probably combining apples and oranges, I will spare you the ugly details

                 

                For 7.0.2.FINAL, my hack of jiggering the standalone.xml and standalone-preview.xml files is a workaround.

                • 5. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
                  jaikiran pai Master

                  Chris Lott wrote:

                   

                   

                  and further the 7.0.2.FINAL launcher rejects the "-c" argument. 

                  ./standalone.sh -server-config=standalone-preview.xml

                   

                  is what you need. The -c is a convenient way to pass -server-config parameter and is there for ease of migration from previous AS versions (5, 6 etc...) which allowed that option. That option was (re)introduced post 7.0.2, so isn't available in that version.

                   

                   

                  Chris Lott wrote:

                   

                  I can write an issue about this if that's helpful, but if the 7.0.2 development line will not get further love then I won't clutter up your issue DB.

                   

                  There's no plan for anymore 7.0.x releases.

                  • 6. Re: Deploy helloworld-mdb from quickstart 7.0.2.CR3 fails on AS 7.0.2.Final
                    Chris Lott Newbie

                    OK!  The "-server-config" command-line option works in 7.0.2.FINAL, and the server started in that fashion accepts deployment of the 7.0.2.CR3 version of the helloworld-mdb example, thanks very much.