Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-452

NPE in ServletUtil.determineBaseURI(ServletUtil.java:44) with multiple @Deployment methods that have non-unique names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.0.CR5
    • 1.0.0.Alpha5
    • Base Implementation
    • None
    • Hide
      1. Create a test something like this
      2. Run the test in JBoss 6 remote mode.
      Show
      Create a test something like this Run the test in JBoss 6 remote mode.
      1. Give the @Deployment annotations unique name attributes.
      2. Reference the deployment in the test methods with @OperateOnDeployment

    Description

      When there are multiple @Deployment methods in a test, and the @Deployment methods have the same name Arquillian will throw a NullPointerException:

      testSomething(eg.domainmodel.UserTest)  Time elapsed: 0.019 sec  <<< ERROR!
      java.lang.NullPointerException
              at org.jboss.arquillian.protocol.servlet.ServletUtil.determineBaseURI(ServletUtil.java:44)
              at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:56)
              at org.jboss.arquillian.protocol.servlet.BaseServletProtocol.getExecutor(BaseServletProtocol.java:30)
              at org.jboss.arquillian.impl.execution.RemoteTestExecuter.getContainerMethodExecutor(RemoteTestExecuter.java:105)
              at org.jboss.arquillian.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:96)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      ...
      

      Attachments

        Activity

          People

            aslak@redhat.com Aslak Knutsen
            pgmjsd_jira Joshua Davis (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: