2 Replies Latest reply: Apr 29, 2012 3:08 PM by Dan Allen RSS

    Nullpointer on ClientConnectionOpenListener

    wolowizard Newbie

      Hi.

       

      I am trying to set up some integration testing on a legacy webservice app (to get the refactoring going) and arquillian is looking promising, but I have a bit of an issue.

       

      What I do is this:

      - Create a profile for integration testing

      - Download JBoss locally

      - Try to run a simple test using arquillian

       

      Here is how the pom-profile looks:

      <profiles>
          <profile>
              <id>itest</id>
              <build>
                  <plugins>
                      <plugin>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <executions>
                              <execution>
                                  <id>surefire-itest</id>
                                  <phase>integration-test</phase>
                                  <goals>
                                      <goal>test</goal>
                                  </goals>
                                  <configuration>
                                      <excludes>
                                          <exclude>none</exclude>
                                      </excludes>
                                  </configuration>
                              </execution>
                          </executions>
                      </plugin>
                      <plugin>
                          <artifactId>maven-dependency-plugin</artifactId>
                          <executions>
                              <execution>
                                  <id>unpack</id>
                                  <phase>process-test-classes</phase>
                                  <goals>
                                      <goal>unpack</goal>
                                  </goals>
                                  <configuration>
                                      <artifactItems>
                                          <artifactItem>
                                              <groupId>org.jboss.as.myjboss</groupId>
                                              <artifactId>jboss-as-myjboss</artifactId>
                                              <version>7.1.1</version>
                                              <type>zip</type>
                                              <overWrite>false</overWrite>
                                              <outputDirectory>target</outputDirectory>
                                          </artifactItem>
                                      </artifactItems>
                                  </configuration>
                              </execution>
                          </executions>
                      </plugin>
                  </plugins>
              </build>
              <dependencies>
                  <dependency>
                      <groupId>org.jboss.spec</groupId>
                      <artifactId>jboss-javaee-6.0</artifactId>
                      <version>1.0.0.Final</version>
                      <type>pom</type>
                      <scope>provided</scope>
                  </dependency>
                  <dependency>
                      <groupId>org.jboss.as</groupId>
                      <artifactId>jboss-as-arquillian-container-managed</artifactId>
                      <version>7.0.2.Final</version>
                      <scope>test</scope>
                  </dependency>
              </dependencies>
          </profile>
      </profiles>
      

       

       

      In addition, I have an arquillian.xml-file that says where the local jboss is installed (target/jboss-7.1.1)

       

      I then run "mvn -Pitest install"

       

      Download, unpack, startup and deploy seems to work like a charm, then I get a problem:

       

      ERROR: A channel event listener threw an exception
      java.lang.NullPointerException
              at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:291)
              at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:182)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:71)
              at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:173)
              at org.xnio.channels.TranslatingSuspendableChannel$2.handleEvent(TranslatingSuspendableChannel.java:94)
              at org.xnio.channels.TranslatingSuspendableChannel$2.handleEvent(TranslatingSuspendableChannel.java:92)
              at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:71)
              at org.xnio.nio.NioHandle.invoke(NioHandle.java:77)
              at org.xnio.nio.AbstractNioChannelThread$1.run(AbstractNioChannelThread.java:142)
              at java.lang.Thread.run(Thread.java:662)11.apr.2012 09:45:12 org.xnio.ChannelListeners invokeChannelListener
      

       

       

      I suspect it has to do with the version of the "jboss-as-arquillian-container-managed"-plugin, but not sure. Is there a newer version out or is there another fix?

       

      Thanks in advance.