11 Replies Latest reply on Jan 3, 2012 9:41 AM by Alex Ander

    Arquillian and JBoss 7.1

    Mandar Kulkarni Newbie

      We are using JBoss 7.1(nightly build) and Arquillian 1.0.0CR6.


      We have been using arquillian 1.0.0Alpha with JBoss 6 successfully for the past few days. As part of migration to JBoss 7, we are migrating tests to arquillian 1.0.0CR7.

      As per the requirement we will be using arquillian managed container and Servlet 3.0 protocol for communicating with server.


      Problem :

      We are able to successfully start the server once we run the maven profile for arquillian tests.But then the server simply hangs.Surprisingly arquillian does not time out even though we set a timeout of 2 min.

      Last time when we had faced similar issue with JBoss 6, our analysis suggested that arquillian was not able to detect that the server is started and failed to proceed further.

      Looks like we have a similar issue with JBoss 7.1 + arquillian and our deployment.


      Since we have configured the defaultprotocol to be servet 3.0, I assume that arquillian will make HTTP requests to a predefined URL in order to identify the server status ?

      Looking at the arequillian source packaged inside JBoss 7.1, i don't see any logging indicating what URL arquillian is using while making an HTTP requests specifically to get the server status.

      Does anyone know what this predefined URL is(for JBoss 7.1) ?


      Can someone guide us how can we debug this?

        • 1. Re: Arquillian and JBoss 7.1
          Aslak Knutsen Master

          The Servlet Protocol is only used for Test execution. Startup verification is in AS7 done by connecting to the managementAddress:managementPort and asking it for it's state...


          You only seeing this in Maven or? If so, which surefire version are you using ? (had some issues previously with surefire 2.9~ where it 'hangs' due to some console output pipe buffering gone wrong..)

          • 2. Re: Arquillian and JBoss 7.1
            Mandar Kulkarni Newbie

            We have using surefire version 2.7.2.

            Haven't really tried with TestNG as we have the evironment setup with Maven.Finally we need it working with maven.


            Any idea how can we debug it further ?

            • 3. Re: Arquillian and JBoss 7.1
              Aslak Knutsen Master

              any luck with surefire 2.11 ?

              • 4. Re: Arquillian and JBoss 7.1
                Mandar Kulkarni Newbie

                Not really. Problem still persists with Surefire 2.11.

                Attaching the arquilian configuration. Let me know if you find any error in configuration.

                • 5. Re: Arquillian and JBoss 7.1
                  Aslak Knutsen Master

                  You shouldn't need to set the Servlet 3.0 Protocol Configuration, that will be auto extracted from the management api. (and it's also wrong, it's pointing to the management api port, not the web port 8080)


                  But that shouldn't be related to the server not starting..



                  Do you have the console output / server.log ?

                  • 6. Re: Arquillian and JBoss 7.1
                    Mandar Kulkarni Newbie

                    There is absolutely nothing in the log for arquillian. The last line in the log indicates that a web context for application is established.

                    How can I enable logging so that I can get to see what arquillian is trying to do?

                    I have set the property "outputToConsole" to true but nothing appears on the console.




                    • 7. Re: Arquillian and JBoss 7.1
                      Aslak Knutsen Master

                      which "web context for application" was established ?


                      nothing in any surefire test reports files?


                      can you post a stripped down version of your project so I can attempt to recreate the issue locally ?

                      • 8. Re: Arquillian and JBoss 7.1
                        Mandar Kulkarni Newbie

                        I have deployed my EAR on the application server against which all the system tests will be executed.

                        The tests will actually interact with the EJBs in EAR.

                        So "web-context" is for my application.


                        Tests are not executed at all, so no test-reports as well.


                        As per my understanding maven-arquillian works as follows(correct me if i am wrong)

                        1) Start JBoss

                        2) Once it receives the notification that the container is started, it will build the project create a Jar containing all the test classes.

                        3) Build an ear containing all the dependencies and the jar containing tests.

                        4) Deploy the test EAR to JBoss.

                        5) Start tests.


                        In my case, I am not able to proceed beyond step 1.

                        Looking at the log, I can see that the JBoss is started successfully.But then, everything just hangs.

                        No activity on the console and nothing in server.log.


                        Can you tell me, what is the safest versioning for following maven dependencies?


                        Current configuration:

















                        • 9. Re: Arquillian and JBoss 7.1
                          Mandar Kulkarni Newbie

                          Hi Aslak,


                          I am still facing this issue.

                          Debugging further, i can see following messages in server.log. Looking at the arquillian's source code and the logs I am 100% sure that Arquillian is not able to identify that "server is started".

                          Is this an issue of Arquillian not being compatible with JBoss 7 Management API or vice-versa ?


                          09:08:45,180 TRACE [org.jboss.remoting.remote.server] (Remoting "ukesmandard1c:MANAGEMENT" read-1) Excluding mechanism GSSAPI because it is not in the allowed list

                          09:08:45,180 TRACE [org.jboss.remoting.remote] (Remoting "ukesmandard1c:MANAGEMENT" read-1) Sent message java.nio.HeapByteBuffer[pos=60 lim=60 cap=8192] (direct)

                          09:08:45,180 TRACE [org.jboss.remoting.remote] (Remoting "ukesmandard1c:MANAGEMENT" read-1) Flushed channel (direct)

                          09:08:45,181 TRACE [org.jboss.remoting.remote.server] (Remoting "ukesmandard1c:MANAGEMENT" read-1) Server received authentication request

                          09:08:45,181 TRACE [org.jboss.remoting.remote] (Remoting "ukesmandard1c:MANAGEMENT" read-1) Connection error detail: java.io.IOException: JBREM000201: Received invalid message on Remoting connection 3c38a5d7 to /

                                    at org.jboss.remoting3.remote.ServerConnectionOpenListener$Initial.handleEvent(ServerConnectionOpenListener.java:374) [jboss-remoting-3.2.0.CR8.jar:3.2.0.CR8]

                                    at org.jboss.remoting3.remote.ServerConnectionOpenListener$Initial.handleEvent(ServerConnectionOpenListener.java:115) [jboss-remoting-3.2.0.CR8.jar:3.2.0.CR8]

                                    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.0.CR7.jar:3.0.0.CR7]

                                    at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:187) [xnio-api-3.0.0.CR7.jar:3.0.0.CR7]

                                    at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:101) [xnio-api-3.0.0.CR7.jar:3.0.0.CR7]

                                    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72) [xnio-api-3.0.0.CR7.jar:3.0.0.CR7]

                                    at org.xnio.nio.NioHandle.run(NioHandle.java:90)

                                    at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)


                          • 10. Re: Arquillian and JBoss 7.1
                            Mandar Kulkarni Newbie

                            Finally..... Looks like it was a bug in "jboss-as-arquillian-container-managed".

                            Upgrading to 7.1.CR1 seem to have resolved the issue.



                            • 11. Re: Arquillian and JBoss 7.1
                              Alex Ander Newbie

                              Hi Mandar & Aslak,


                              i had absolutly the same problem as Mandar. Now I upgraded to:


                              - JBoss 7.1.0CR1b

                              - Aquillian core 1.0.0.CR7

                              - Arqullian JBoss AS managed 7.1.0.CR1b


                              and it works!