9 Replies Latest reply on Aug 27, 2012 1:33 PM by ctomc

    Does jboss-as-maven-plugin not support Java 7

    randahl

      With the new Oracle Java 7 for Mac out I dedided to upgrade my projects to run on Java 7. It turns out that this upgrade makes my deployment process fail. I am using the jboss-as-maven-plugin, and it has worked just fine up until now, but now I get this error:

       

      Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:deploy (default) on project wefend-server: Error executing FORCE_DEPLOY: Could not execute operation '{

      "operation" => "read-children-names",

      "child-type" => "deployment"

      }': java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out

      -> [Help 1]

       

      The strange thing is I did not get this error when running on Java 1.6. I am certain that JBoss is in fact listening on port 9999 because the log contains this line

       

      15:03:44,786 INFO  [org.jboss.as.remoting] (MSC service thread 1-23) JBAS017100: Listening on /127.0.0.1:9999

       

       

      I am trying to deploy using this plugin configuration (which worked on Java 1.6):

       




      <plugin>




      <groupId>org.jboss.as.plugins</groupId>




      <artifactId>jboss-as-maven-plugin</artifactId>




      <version>7.1.1.Final</version>




      <configuration>





      <hostname>localhost</hostname>





      <port>9999</port>




      </configuration>




      <executions>





      <execution>






      <phase>package</phase>






      <goals>







      <goal>deploy</goal>






      </goals>





      </execution>




      </executions>



      </plugin>
        • 1. Re: Does jboss-as-maven-plugin not support Java 7
          randahl

          Can anyone confirm they have got the plugin working with Java 7 (on Windows or elsewhere)?

           

          Thanks.

          • 2. Re: Does jboss-as-maven-plugin not support Java 7
            randahl

            I switched back to traditional Apple Java 1.6, and now the plugin is again able to contact JBoss for deployment.

            • 3. Re: Does jboss-as-maven-plugin not support Java 7
              jamezp

              Currently we're just using GitHub issues for the maven plugin. Feel free to file an issue there.

               

              --

              James R. Perkins

              • 4. Re: Does jboss-as-maven-plugin not support Java 7
                bookwood

                I can confirm your issue on Gentoo Linux with "IcedTea JDK 6.1.11.3 [icedtea-6]" too. I saw the helloworld-html5 example in my Jboss Tools and I'm bursting with curiosity. After installation I would be asked to read the Readme and I noticed the "mvn package jboss-as:deploy" command. I stopped and leave the jbosstools and start with a "mvn clean; mvn package jboss-as:deploy". The result:

                [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.Final:deploy (default-cli) on project helloworld-html5: Could not execute goal deploy on helloworld-html5.war. Reason: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out -> [Help 1]

                [ERROR]

                 

                Under my handinstalled jboss-as-maven-plugin:7.1.1.Final everything is running fine (icedtea-6 too).

                • 5. Re: Does jboss-as-maven-plugin not support Java 7
                  nickarls

                  I use jboss-as:deploy on java 7 (Windows) and it works for me.

                  • 6. Re: Does jboss-as-maven-plugin not support Java 7
                    ctomc

                    Hi,

                     

                    there are bunch of bugs in JDK7 for mac, especialy in area of NIO, which is technology jboss maven plugin uses to connect to AS.

                     

                    you can check bug database for this exact issue: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7159361

                     

                    workaround is to add -Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.KQueueSelectorProvider to app running this, in your case maven.

                     

                    --

                    tomaz

                    • 7. Re: Does jboss-as-maven-plugin not support Java 7
                      jamezp

                      Jochen Buchholz wrote:

                       

                      I can confirm your issue on Gentoo Linux with "IcedTea JDK 6.1.11.3 [icedtea-6]" too. I saw the helloworld-html5 example in my Jboss Tools and I'm bursting with curiosity. After installation I would be asked to read the Readme and I noticed the "mvn package jboss-as:deploy" command. I stopped and leave the jbosstools and start with a "mvn clean; mvn package jboss-as:deploy". The result:

                      [ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.Final:deploy (default-cli) on project helloworld-html5: Could not execute goal deploy on helloworld-html5.war. Reason: java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out -> [Help 1]

                      [ERROR]

                       

                      Under my handinstalled jboss-as-maven-plugin:7.1.1.Final everything is running fine (icedtea-6 too).

                      That sounds more like maybe the application server was not running. The deploy goal does require a standalone or domain server to be running in order to deploy.

                       

                      --

                      James R. Perkins

                      • 8. Re: Does jboss-as-maven-plugin not support Java 7
                        alitokmen

                        As an alternative, you can simply use Codehaus CARGO, http://cargo.codehaus.org/

                         

                        It can locally or remotely deploy to many application servers and many versions of them; including JBoss 7. Read more on: http://cargo.codehaus.org/JBoss+Remote+Deployer

                        • 9. Re: Does jboss-as-maven-plugin not support Java 7
                          ctomc

                          Savas,

                          given that cargo plugin under the hood uses jboss-as-controller-client it has same problem on mac jdk7 becouse of broken nio.

                           

                           

                          --

                          tomaz