Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.validate(DeploymentGenerator.java:94) #42

Open
slawek-mazur opened this issue May 16, 2018 · 0 comments

Comments

@slawek-mazur
Copy link

Issue Overview

I'm unable to run simplest possible test scenario due to NPE from DeploymentGenerator

Expected Behaviour

Test run

Current Behaviour
java.lang.NullPointerException
	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.validate(DeploymentGenerator.java:94)

Steps To Reproduce
package com.crmsuite.autosoftconnect;

import com.crmsuite.autosoftconnect.client.gen.ConnectService;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.test.api.ArquillianResource;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.MethodSorters;

import javax.xml.namespace.QName;
import java.net.URL;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;

@RunWith(Arquillian.class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class MainTest {

    private static ConnectService connectService;


    @Deployment(testable = false)
    public static JavaArchive createDeployment() {
        return ShrinkWrap.create(JavaArchive.class);
    }

    @ArquillianResource
    private URL url;

    @Before
    public void setUp() throws Exception {
        connectService = new ConnectService(
            new URL(url, "EBookStoreImplService?wsdl"),
            new QName("http://endpoint.jaxws.javaee7.org/", "EBookStoreImplService"));
    }

    @Test
    public void testNothing() {
        assertThat("1", equalTo("1"));
    }
}
<details>
   <summary>pom.xml</summary>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.core</groupId>
            <artifactId>arquillian-core-impl-base</artifactId>
            <version>${arquillian.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.test</groupId>
            <artifactId>arquillian-test-impl-base</artifactId>
            <version>${arquillian.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-core</artifactId>
            <version>${arquillian.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-api</artifactId>
            <version>${arquillian.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
            <version>1.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-api</artifactId>
            <version>${shrinkwrap.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-impl-base</artifactId>
            <version>${shrinkwrap.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-impl-maven-archive</artifactId>
            <version>2.2.5</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</details>
  1. either from Intellij IDEA run the test or mvn clean test
Additional Information
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_152-ea, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-124-generic", arch: "amd64", family: "unix"
<details>
 <summary>$ mvn dependency:tree</summary>
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building crmsuite 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ crmsuite ---
[INFO] autosoftconnect:crmsuite:jar:1.0-SNAPSHOT
[INFO] +- junit:junit:jar:4.12:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.4.0.Final:test
[INFO] |  +- org.jboss.arquillian.core:arquillian-core-api:jar:1.4.0.Final:test
[INFO] |  \- org.jboss.arquillian.core:arquillian-core-spi:jar:1.4.0.Final:test
[INFO] +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.4.0.Final:test
[INFO] |  +- org.jboss.arquillian.test:arquillian-test-api:jar:1.4.0.Final:test
[INFO] |  \- org.jboss.arquillian.test:arquillian-test-spi:jar:1.4.0.Final:test
[INFO] +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.4.0.Final:test
[INFO] +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.4.0.Final:test
[INFO] |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0:test
[INFO] +- org.jboss.arquillian.container:arquillian-glassfish-embedded-3.1:jar:1.0.2:test
[INFO] |  +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.1.15.Final:test
[INFO] |  |  +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.15.Final:test
[INFO] |  |  \- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.1.15.Final:test
[INFO] |  +- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.1.15.Final:test
[INFO] |  +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.1.15.Final:test
[INFO] |  |  +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.1.15.Final:test
[INFO] |  |  \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0:test
[INFO] |  +- org.jboss.arquillian.testenricher:arquillian-testenricher-cdi:jar:1.1.15.Final:test
[INFO] |  +- org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.1.15.Final:test
[INFO] |  +- org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.1.15.Final:test
[INFO] |  \- org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.1.15.Final:test
[INFO] +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:test
[INFO] +- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.2.6:test
[INFO] |  \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.2.6:test
[INFO] \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive:jar:2.2.5:test
[INFO]    +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:2.2.5:test
[INFO]    |  \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:2.2.5:test
[INFO]    +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven-archive:jar:2.2.5:test
[INFO]    |  \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi:jar:2.2.5:test
[INFO]    +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven-archive:jar:2.2.5:test
[INFO]    +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:2.2.5:test
[INFO]    |  +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven:jar:2.2.5:test
[INFO]    |  +- org.eclipse.aether:aether-api:jar:1.0.0.v20140518:test
[INFO]    |  +- org.eclipse.aether:aether-impl:jar:1.0.0.v20140518:test
[INFO]    |  +- org.eclipse.aether:aether-spi:jar:1.0.0.v20140518:test
[INFO]    |  +- org.eclipse.aether:aether-util:jar:1.0.0.v20140518:test
[INFO]    |  +- org.eclipse.aether:aether-connector-basic:jar:1.0.0.v20140518:test
[INFO]    |  +- org.eclipse.aether:aether-transport-wagon:jar:1.0.0.v20140518:test
[INFO]    |  +- org.apache.maven:maven-aether-provider:jar:3.2.5:test
[INFO]    |  +- org.apache.maven:maven-model:jar:3.2.5:test
[INFO]    |  +- org.apache.maven:maven-model-builder:jar:3.2.5:test
[INFO]    |  +- org.apache.maven:maven-repository-metadata:jar:3.2.5:test
[INFO]    |  +- org.apache.maven:maven-settings:jar:3.2.5:test
[INFO]    |  +- org.apache.maven:maven-settings-builder:jar:3.2.5:test
[INFO]    |  +- com.google.guava:guava:jar:18.0:test
[INFO]    |  +- org.codehaus.plexus:plexus-interpolation:jar:1.21:test
[INFO]    |  +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:test
[INFO]    |  |  \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
[INFO]    |  +- org.apache.maven.wagon:wagon-provider-api:jar:2.6:test
[INFO]    |  +- org.apache.maven.wagon:wagon-file:jar:2.6:test
[INFO]    |  |  \- commons-lang:commons-lang:jar:2.6:test
[INFO]    |  \- org.apache.maven.wagon:wagon-http-lightweight:jar:2.6:test
[INFO]    |     \- org.apache.maven.wagon:wagon-http-shared:jar:2.6:test
[INFO]    |        +- org.jsoup:jsoup:jar:1.7.2:test
[INFO]    |        \- commons-io:commons-io:jar:2.2:test
[INFO]    +- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.0.M1:test
[INFO]    |  +- javax.enterprise:cdi-api:jar:1.0:test
[INFO]    |  |  +- javax.annotation:jsr250-api:jar:1.0:test
[INFO]    |  |  \- javax.inject:javax.inject:jar:1:test
[INFO]    |  +- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.0.M1:test
[INFO]    |  \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:test
[INFO]    +- org.codehaus.plexus:plexus-compiler-javac:jar:2.3:test
[INFO]    |  \- org.codehaus.plexus:plexus-compiler-api:jar:2.3:test
[INFO]    \- org.codehaus.plexus:plexus-utils:jar:3.0.20:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.230 s
[INFO] Finished at: 2018-05-16T11:59:06+02:00
[INFO] Final Memory: 14M/303M
[INFO] ------------------------------------------------------------------------
</details>

OS - Ubuntu 16.04 LTS
JDK -

java version "1.8.0_152-ea"
Java(TM) SE Runtime Environment (build 1.8.0_152-ea-b05)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b05, mixed mode)
<details>
 <summary>$ mvn clean test</summary>
java.lang.NullPointerException
	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.validate(DeploymentGenerator.java:94)
	at org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:81)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
	at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:95)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
	at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
	at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
	at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
	at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:89)
	at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:163)
	at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
	at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
	at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:177)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:115)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant