{"action":"created","issue":{"url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/812","repository_url":"https://api.github.com/repos/arquillian/arquillian-cube","labels_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/812/labels{/name}","comments_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/812/comments","events_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/812/events","html_url":"https://github.com/arquillian/arquillian-cube/issues/812","id":261620588,"number":812,"title":"NPE when deploying WAR file via @Deployment method","user":{"login":"acidowl","id":16694135,"avatar_url":"https://avatars0.githubusercontent.com/u/16694135?v=4","gravatar_id":"","url":"https://api.github.com/users/acidowl","html_url":"https://github.com/acidowl","followers_url":"https://api.github.com/users/acidowl/followers","following_url":"https://api.github.com/users/acidowl/following{/other_user}","gists_url":"https://api.github.com/users/acidowl/gists{/gist_id}","starred_url":"https://api.github.com/users/acidowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidowl/subscriptions","organizations_url":"https://api.github.com/users/acidowl/orgs","repos_url":"https://api.github.com/users/acidowl/repos","events_url":"https://api.github.com/users/acidowl/events{/privacy}","received_events_url":"https://api.github.com/users/acidowl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-29T12:06:51Z","updated_at":"2017-10-18T10:46:24Z","closed_at":null,"author_association":"NONE","body":"When deploying a war via @Deployment method I always get a NPE.\r\nStacktrace:\r\n<details>\r\n\r\n```\r\njava.lang.NullPointerException\r\n\tat org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.validate(DeploymentGenerator.java:99)\r\n\tat org.jboss.arquillian.container.test.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:84)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)\r\n\tat org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)\r\n\tat org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)\r\n\tat org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)\r\n\tat org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:100)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)\r\n\tat org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\r\n\tat org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.lang.reflect.Method.invoke(Method.java:498)\r\n\tat org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)\r\n\tat org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)\r\n\tat org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)\r\n\tat org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)\r\n\tat org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87)\r\n\tat org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:201)\r\n\tat org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:426)\r\n\tat org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)\r\n\tat org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)\r\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\r\n\tat org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:128)\r\n\tat org.junit.runners.Suite.runChild(Suite.java:27)\r\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\r\n\tat org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:393)\r\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\r\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\r\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\r\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n```\r\n\r\n</details>\r\n\r\nThis is my deployment method:\r\n```\r\n  @Deployment(testable = false, name = \"idpDeployment\", order = 1)\r\n  @TargetsContainer(\"test_kolibrisrv*\")\r\n  public static WebArchive createIdpDeployment() {\r\n    System.out.println(\"Deploying idp...\");\r\n    String baseDir = System.getProperty(\"basedir\");\r\n\r\n    File warFile = new File(baseDir.substring(0, baseDir.lastIndexOf('/'))\r\n        + \"/kolibri-wildfly/identity-provider/target/identity-provider.war\");\r\n\r\n    WebArchive webArchive = ShrinkWrap.createFromZipFile(WebArchive.class, warFile);\r\n    webArchive.delete(\"WEB-INF/classes/META-INF/BaseApplication-persistence.xml\");\r\n    webArchive.addAsResource(\"persistence/idp-persistence.xml\", \"META-INF/persistence.xml\");\r\n\r\n     return webArchive;    \r\n  }\r\n```\r\n\r\nAnd these are my docker containers defined in arquillian.xml:\r\n```\r\n      test_kolibridb*:\r\n        image: kolibri/db:latest\r\n        exposedPorts: [3306/tcp]\r\n        privileged: true\r\n        portBindings: [3306/tcp]\r\n        await:\r\n          strategy: sleeping\r\n          sleepTime: 30 s\r\n\r\n      test_kolibrisrv*:\r\n        image: kolibri/testserver:latest\r\n        exposedPorts: [8080/tcp, 9990/tcp]\r\n        links:\r\n          - test_kolibridb*:db\r\n        privileged: true\r\n        portBindings: [8080/tcp, 9990/tcp]\r\n        await:\r\n          strategy: sleeping\r\n          sleepTime: 30 s\r\n```\r\n\r\nWe're currently using arquillian-cube-bom @ version 1.9.0\r\nAlso these dependencies were used:\r\n```\r\n                <dependency>\r\n                    <groupId>org.arquillian.cube</groupId>\r\n                    <artifactId>arquillian-cube-docker</artifactId>\r\n                    <scope>test</scope>\r\n                </dependency>\r\n                <dependency>\r\n                    <groupId>org.jboss.arquillian.core</groupId>\r\n                    <artifactId>arquillian-core-impl-base</artifactId>\r\n                    <scope>test</scope>\r\n                </dependency>\r\n                <dependency>\r\n                    <groupId>org.jboss.arquillian.test</groupId>\r\n                    <artifactId>arquillian-test-impl-base</artifactId>\r\n                    <scope>test</scope>\r\n                </dependency>\r\n                <dependency>\r\n                    <groupId>org.wildfly.arquillian</groupId>\r\n                    <artifactId>wildfly-arquillian-container-managed</artifactId>\r\n                    <version>2.1.0.Final</version>\r\n                    <scope>test</scope>\r\n                </dependency>\r\n```\r\n\r\nMaven version: 3.5.0\r\nOS: Ubuntu 16.04\r\nJDK Version: 1.8.0_144\r\n\r\nIs there anything wrong with our deployment method or is this a bug?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/comments/337548915","html_url":"https://github.com/arquillian/arquillian-cube/issues/812#issuecomment-337548915","issue_url":"https://api.github.com/repos/arquillian/arquillian-cube/issues/812","id":337548915,"user":{"login":"mbrasier","id":800143,"avatar_url":"https://avatars1.githubusercontent.com/u/800143?v=4","gravatar_id":"","url":"https://api.github.com/users/mbrasier","html_url":"https://github.com/mbrasier","followers_url":"https://api.github.com/users/mbrasier/followers","following_url":"https://api.github.com/users/mbrasier/following{/other_user}","gists_url":"https://api.github.com/users/mbrasier/gists{/gist_id}","starred_url":"https://api.github.com/users/mbrasier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbrasier/subscriptions","organizations_url":"https://api.github.com/users/mbrasier/orgs","repos_url":"https://api.github.com/users/mbrasier/repos","events_url":"https://api.github.com/users/mbrasier/events{/privacy}","received_events_url":"https://api.github.com/users/mbrasier/received_events","type":"User","site_admin":false},"created_at":"2017-10-18T10:46:24Z","updated_at":"2017-10-18T10:46:24Z","author_association":"NONE","body":"This occurs if there is no <container> configured in arquillian.xml (or at least that was the issue for me). "}}
{"actor":{"display_login":"mbrasier"}}