[JBoss JIRA] (ARQGRA-454) NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-454?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-454:
------------------------------
Fix Version/s: 2.0.4.Final
> NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
> --------------------------------------------------------------
>
> Key: ARQGRA-454
> URL: https://issues.jboss.org/browse/ARQGRA-454
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juergen Zimmermann
> Fix For: 2.0.4.Final
>
>
> I'm getting a GrapheneTestEnricherException caused by a NPE (see stacktrace below) after upgrading Arquillian to 1.1.5.Final. The issue doesn't exist with Arquillian 1.1.4.Final.
> The stacktrace:
> {code}
> org.jboss.arquillian.graphene.enricher.exception.GrapheneTestEnricherException:
> Error while initializing: class de.shop.util.IndexPage
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:78)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:125)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:120)
> at org.jboss.arquillian.graphene.Graphene.goTo(Graphene.java:291)
> at de.shop.util.AbstractWebTest.before(AbstractWebTest.java:54)
> 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:483)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
> at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:73)
> at org.jboss.arquillian.graphene.enricher.PageObjectEnricher.setupPage(PageObjectEnricher.java:97)
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:76)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQGRA-454) NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-454?page=com.atlassian.jira.plugin... ]
Lukáš Fryč edited comment on ARQGRA-454 at 8/27/14 10:36 AM:
-------------------------------------------------------------
Ok, this happens with graphene 2.0.3 as with 2.1.0.Alpha1.
Minimum example to reproduce:
{code}
@RunWith(Arquillian.class)
public class NpeTest {
@Location("foobar")
public static class Page {
}
@Before
public void throws_npe_due_to_missing_GrapheneConfiguration() {
Graphene.goTo(Page.class);
}
@RunAsClient
@Test
public void just_needed_to_execute_at_before() {
}
}
{code}
was (Author: tilm4nn):
Ok, this happens with graphene 2.0.3 as with 2.1.0.Alpha1.
Minimum example to reproduce:
@RunWith(Arquillian.class)
public class NpeTest {
@Location("foobar")
public static class Page {
}
@Before
public void throws_npe_due_to_missing_GrapheneConfiguration() {
Graphene.goTo(Page.class);
}
@RunAsClient
@Test
public void just_needed_to_execute_at_before() {
}
}
> NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
> --------------------------------------------------------------
>
> Key: ARQGRA-454
> URL: https://issues.jboss.org/browse/ARQGRA-454
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juergen Zimmermann
>
> I'm getting a GrapheneTestEnricherException caused by a NPE (see stacktrace below) after upgrading Arquillian to 1.1.5.Final. The issue doesn't exist with Arquillian 1.1.4.Final.
> The stacktrace:
> {code}
> org.jboss.arquillian.graphene.enricher.exception.GrapheneTestEnricherException:
> Error while initializing: class de.shop.util.IndexPage
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:78)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:125)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:120)
> at org.jboss.arquillian.graphene.Graphene.goTo(Graphene.java:291)
> at de.shop.util.AbstractWebTest.before(AbstractWebTest.java:54)
> 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:483)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
> at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:73)
> at org.jboss.arquillian.graphene.enricher.PageObjectEnricher.setupPage(PageObjectEnricher.java:97)
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:76)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQGRA-454) NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
by Tilmann Kuhn (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-454?page=com.atlassian.jira.plugin... ]
Tilmann Kuhn commented on ARQGRA-454:
-------------------------------------
Ok, this happens with graphene 2.0.3 as with 2.1.0.Alpha1.
Minimum example to reproduce:
@RunWith(Arquillian.class)
public class NpeTest {
@Location("foobar")
public static class Page {
}
@Before
public void throws_npe_due_to_missing_GrapheneConfiguration() {
Graphene.goTo(Page.class);
}
@RunAsClient
@Test
public void just_needed_to_execute_at_before() {
}
}
> NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
> --------------------------------------------------------------
>
> Key: ARQGRA-454
> URL: https://issues.jboss.org/browse/ARQGRA-454
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juergen Zimmermann
>
> I'm getting a GrapheneTestEnricherException caused by a NPE (see stacktrace below) after upgrading Arquillian to 1.1.5.Final. The issue doesn't exist with Arquillian 1.1.4.Final.
> The stacktrace:
> {code}
> org.jboss.arquillian.graphene.enricher.exception.GrapheneTestEnricherException:
> Error while initializing: class de.shop.util.IndexPage
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:78)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:125)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:120)
> at org.jboss.arquillian.graphene.Graphene.goTo(Graphene.java:291)
> at de.shop.util.AbstractWebTest.before(AbstractWebTest.java:54)
> 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:483)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
> at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:73)
> at org.jboss.arquillian.graphene.enricher.PageObjectEnricher.setupPage(PageObjectEnricher.java:97)
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:76)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQGRA-454) NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
by Tilmann Kuhn (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-454?page=com.atlassian.jira.plugin... ]
Tilmann Kuhn edited comment on ARQGRA-454 at 8/27/14 10:08 AM:
---------------------------------------------------------------
I have the same issue. I think the key information here is that this happens in an @Before method of the test.
Though I didn't have time to create a minimum example to reproduce yet. I just checked with the debugger:
Not visible in the stacktrace above is that the problem actually occurs in ManagerImpl.resolve(GrapheneConfiguration.class) while resolving the get() of Instance<GrapheneConfiguration>
The GrapheneConfiguration is stored in ClassContext and at this point the only active context is ApplicationContext.
Hence GrapheneConfiguration is not found and null returned by the ManagerImpl. Maybe this is connected to the changes in core connected to the support of Junit Rules?
WebDriver.navigate().to(...) works in @Before and can be used as a workaround if you have fixed server configuration.
was (Author: tilm4nn):
I have the same issue. I think the key information here is that this happens in an @Before method of the test.
Though I didn't have time to create a minimum example to reproduce yet. I just checked with the debugger:
Not visible in the stacktrace above is that the problem actually occurs in ManagerImpl.resolve(GrapheneConfiguration.class) when querying get() of Instance<GrapheneConfiguration>
The GrapheneConfiguration is stored in ClassContext and at this point the only active context is ApplicationContext.
Hence GrapheneConfiguration is not found and null returned by the ManagerImpl. Maybe this is connected to the changes in core connected to the support of Junit Rules?
WebDriver.navigate().to(...) works in @Before and can be used as a workaround if you have fixed server configuration.
> NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
> --------------------------------------------------------------
>
> Key: ARQGRA-454
> URL: https://issues.jboss.org/browse/ARQGRA-454
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juergen Zimmermann
>
> I'm getting a GrapheneTestEnricherException caused by a NPE (see stacktrace below) after upgrading Arquillian to 1.1.5.Final. The issue doesn't exist with Arquillian 1.1.4.Final.
> The stacktrace:
> {code}
> org.jboss.arquillian.graphene.enricher.exception.GrapheneTestEnricherException:
> Error while initializing: class de.shop.util.IndexPage
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:78)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:125)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:120)
> at org.jboss.arquillian.graphene.Graphene.goTo(Graphene.java:291)
> at de.shop.util.AbstractWebTest.before(AbstractWebTest.java:54)
> 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:483)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
> at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:73)
> at org.jboss.arquillian.graphene.enricher.PageObjectEnricher.setupPage(PageObjectEnricher.java:97)
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:76)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQGRA-454) NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
by Tilmann Kuhn (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-454?page=com.atlassian.jira.plugin... ]
Tilmann Kuhn commented on ARQGRA-454:
-------------------------------------
I have the same issue. I think the key information here is that this happens in an @Before method of the test.
Though I didn't have time to create a minimum example to reproduce yet. I just checked with the debugger:
Not visible in the stacktrace above is that the problem actually occurs in ManagerImpl.resolve(GrapheneConfiguration.class) when querying get() of Instance<GrapheneConfiguration>
The GrapheneConfiguration is stored in ClassContext and at this point the only active context is ApplicationContext.
Hence GrapheneConfiguration is not found and null returned by the ManagerImpl. Maybe this is connected to the changes in core connected to the support of Junit Rules?
WebDriver.navigate().to(...) works in @Before and can be used as a workaround if you have fixed server configuration.
> NPE in WebElementEnricher.enrich() with Arquillian 1.1.5.Final
> --------------------------------------------------------------
>
> Key: ARQGRA-454
> URL: https://issues.jboss.org/browse/ARQGRA-454
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juergen Zimmermann
>
> I'm getting a GrapheneTestEnricherException caused by a NPE (see stacktrace below) after upgrading Arquillian to 1.1.5.Final. The issue doesn't exist with Arquillian 1.1.4.Final.
> The stacktrace:
> {code}
> org.jboss.arquillian.graphene.enricher.exception.GrapheneTestEnricherException:
> Error while initializing: class de.shop.util.IndexPage
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:78)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:125)
> at org.jboss.arquillian.graphene.DefaultGrapheneRuntime.goTo(DefaultGrapheneRuntime.java:120)
> at org.jboss.arquillian.graphene.Graphene.goTo(Graphene.java:291)
> at de.shop.util.AbstractWebTest.before(AbstractWebTest.java:54)
> 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:483)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
> at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
> at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:267)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
> at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
> at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.graphene.enricher.WebElementEnricher.enrich(WebElementEnricher.java:68)
> at org.jboss.arquillian.graphene.enricher.AbstractSearchContextEnricher.enrichRecursively(AbstractSearchContextEnricher.java:73)
> at org.jboss.arquillian.graphene.enricher.PageObjectEnricher.setupPage(PageObjectEnricher.java:97)
> at org.jboss.arquillian.graphene.location.LocationEnricher.goTo(LocationEnricher.java:76)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQ-1842) Show original exception instead of NullPointerExcetpion from TransactionHandler
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/ARQ-1842?page=com.atlassian.jira.plugin.s... ]
SBS JIRA Integration updated ARQ-1842:
--------------------------------------
Forum Reference: https://community.jboss.org/message/901475#901475
> Show original exception instead of NullPointerExcetpion from TransactionHandler
> -------------------------------------------------------------------------------
>
> Key: ARQ-1842
> URL: https://issues.jboss.org/browse/ARQ-1842
> Project: Arquillian
> Issue Type: Sub-task
> Components: Base Implementation
> Reporter: Alexandr Sokolov
> Fix For: 2.0.0.CR1
>
>
> Arquillan architecture based on observers. But now, if one of observers throws an exception and transactions are used. We are getting:
>
> java.lang.NullPointerException: null
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
>
> Although the actual exception in my case was thrown by DBUnitDataHandler.prepare().
>
> Could you please change the logic so the original exception is displayed in the output? Otherwise we have to debug to get the actual exception. There is no way to find a solution without debugging via arquillian classes. It really takes rather long time.
> Full exception log:
> {code}
> java.lang.NullPointerException: null
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.rollbackRequired(TransactionHandler.java:159)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransaction(TransactionHandler.java:123)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransactionAfterTest(TransactionHandler.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:277)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:159)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:125)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:89)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
> at java.lang.Thread.run(Thread.java:744)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQ-1842) Show original exception instead of NullPointerExcetpion from TransactionHandler
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1842?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen commented on ARQ-1842:
------------------------------------
I think this is related to https://issues.jboss.org/browse/ARQ-1807
Could you verify with arquillian-core upstream master branch?
> Show original exception instead of NullPointerExcetpion from TransactionHandler
> -------------------------------------------------------------------------------
>
> Key: ARQ-1842
> URL: https://issues.jboss.org/browse/ARQ-1842
> Project: Arquillian
> Issue Type: Sub-task
> Components: Base Implementation
> Reporter: Alexandr Sokolov
> Fix For: 2.0.0.CR1
>
>
> Arquillan architecture based on observers. But now, if one of observers throws an exception and transactions are used. We are getting:
>
> java.lang.NullPointerException: null
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
>
> Although the actual exception in my case was thrown by DBUnitDataHandler.prepare().
>
> Could you please change the logic so the original exception is displayed in the output? Otherwise we have to debug to get the actual exception. There is no way to find a solution without debugging via arquillian classes. It really takes rather long time.
> Full exception log:
> {code}
> java.lang.NullPointerException: null
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.rollbackRequired(TransactionHandler.java:159)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransaction(TransactionHandler.java:123)
> at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransactionAfterTest(TransactionHandler.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
> at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
> at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:277)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
> at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:159)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:125)
> at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:89)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
> at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
> at java.lang.Thread.run(Thread.java:744)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)
10 years, 4 months
[JBoss JIRA] (ARQ-1842) Show original exception instead of NullPointerExcetpion from TransactionHandler
by Alexandr Sokolov (JIRA)
Alexandr Sokolov created ARQ-1842:
-------------------------------------
Summary: Show original exception instead of NullPointerExcetpion from TransactionHandler
Key: ARQ-1842
URL: https://issues.jboss.org/browse/ARQ-1842
Project: Arquillian
Issue Type: Sub-task
Reporter: Alexandr Sokolov
Arquillan architecture based on observers. But now, if one of observers throws an exception and transactions are used. We are getting:
java.lang.NullPointerException: null
at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
Although the actual exception in my case was thrown by DBUnitDataHandler.prepare().
Could you please change the logic so the original exception is displayed in the output? Otherwise we have to debug to get the actual exception. There is no way to find a solution without debugging via arquillian classes. It really takes rather long time.
Full exception log:
{code}
java.lang.NullPointerException: null
at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.testRequiresRollbackDueToFailure(TransactionHandler.java:170)
at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.rollbackRequired(TransactionHandler.java:159)
at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransaction(TransactionHandler.java:123)
at org.jboss.arquillian.transaction.impl.lifecycle.TransactionHandler.endTransactionAfterTest(TransactionHandler.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.testenricher.cdi.CreationalContextDestroyer.destory(CreationalContextDestroyer.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.after(EventTestRunnerAdaptor.java:103)
at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:277)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:193)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:345)
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:49)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:207)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:155)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:66)
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:159)
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:125)
at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:165)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:372)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:679)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:931)
at java.lang.Thread.run(Thread.java:744)
{code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months
[JBoss JIRA] (ARQ-1841) Spacelift can not deal with background process invocation
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1841?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic commented on ARQ-1841:
----------------------------------------
https://github.com/smiklosovic/spacelift-hanging
> Spacelift can not deal with background process invocation
> ---------------------------------------------------------
>
> Key: ARQ-1841
> URL: https://issues.jboss.org/browse/ARQ-1841
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Spacelift
> Affects Versions: spacelift_1.0.0.Alpha2
> Reporter: Stefan Miklosovic
>
> Let's have this simple script:
> {code:title=run_agent_bg.sh|borderStyle=solid}
> #!/bin/sh
> curpath=`dirname $0`
> nohup ${curpath}/run_agent.sh $@ > /dev/null & 2>&1
> {code}
> I execute it like this:
> {code:title=App.java|borderStyle=solid}
> public class App {
> public static void main(String[] args) throws IOException {
> Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
> System.out.println("before");
> Tasks.prepare(CommandTool.class)
> .programName("/bin/bash")
> .parameters("-c", "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh")
> .execute().await();
>
> System.out.println("after");
> }
> }
> {code}
> So it effectively does this:
> {code}
> /bin/bash -c "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh"
> {code}
> However it never reaches "after" output, that process in the script is started but Spacelift does not send it to the background and it still waits untill it is finished which never happen.
> Executing that script directly like following does the job:
> {code:title=App.java|borderStyle=solid}
> public class App {
> public static void main(String[] args) throws IOException {
> Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
> System.out.println("before");
> Runtime.getRuntime().exec("/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh");
>
> System.out.println("after");
> }
> }
> {code}
> Started process survives JVM termination.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months
[JBoss JIRA] (ARQ-1841) Spacelift can not deal with background process invocation
by Stefan Miklosovic (JIRA)
[ https://issues.jboss.org/browse/ARQ-1841?page=com.atlassian.jira.plugin.s... ]
Stefan Miklosovic updated ARQ-1841:
-----------------------------------
Description:
Let's have this simple script:
{code:title=run_agent_bg.sh|borderStyle=solid}
#!/bin/sh
curpath=`dirname $0`
nohup ${curpath}/run_agent.sh $@ > /dev/null & 2>&1
{code}
I execute it like this:
{code:title=App.java|borderStyle=solid}
public class App {
public static void main(String[] args) throws IOException {
Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
System.out.println("before");
Tasks.prepare(CommandTool.class)
.programName("/bin/bash")
.parameters("-c", "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh")
.execute().await();
System.out.println("after");
}
}
{code}
So it effectively does this:
{code}
/bin/bash -c "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh"
{code}
However it never reaches "after" output, that process in the script is started but Spacelift does not send it to the background and it still waits untill it is finished which never happen.
Executing that script directly like following does the job:
{code:title=App.java|borderStyle=solid}
public class App {
public static void main(String[] args) throws IOException {
Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
System.out.println("before");
Runtime.getRuntime().exec("/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh");
System.out.println("after");
}
}
{code}
Started process survives JVM termination.
was:
Let's have this simple script:
{code}
#!/bin/sh
curpath=`dirname $0`
nohup ${curpath}/run_agent.sh $@ > /dev/null & 2>&1
{code}
I execute it like this:
{code}
public class App {
public static void main(String[] args) throws IOException {
Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
System.out.println("before");
Tasks.prepare(CommandTool.class)
.programName("/bin/bash")
.parameters("-c", "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh")
.execute().await();
System.out.println("after");
}
}
{code}
So it effectively does this:
{code}
/bin/bash -c "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh"
{code}
However it never reaches "after" output, that process in the script is started but Spacelift does not send it to the background and it still waits untill it is finished which never happen.
Executing that script directly like following does the job:
{code}
public class App {
public static void main(String[] args) throws IOException {
Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
System.out.println("before");
Runtime.getRuntime().exec("/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh");
System.out.println("after");
}
}
{code}
Started process survives JVM termination.
> Spacelift can not deal with background process invocation
> ---------------------------------------------------------
>
> Key: ARQ-1841
> URL: https://issues.jboss.org/browse/ARQ-1841
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Spacelift
> Affects Versions: spacelift_1.0.0.Alpha2
> Reporter: Stefan Miklosovic
>
> Let's have this simple script:
> {code:title=run_agent_bg.sh|borderStyle=solid}
> #!/bin/sh
> curpath=`dirname $0`
> nohup ${curpath}/run_agent.sh $@ > /dev/null & 2>&1
> {code}
> I execute it like this:
> {code:title=App.java|borderStyle=solid}
> public class App {
> public static void main(String[] args) throws IOException {
> Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
> System.out.println("before");
> Tasks.prepare(CommandTool.class)
> .programName("/bin/bash")
> .parameters("-c", "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh")
> .execute().await();
>
> System.out.println("after");
> }
> }
> {code}
> So it effectively does this:
> {code}
> /bin/bash -c "/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh"
> {code}
> However it never reaches "after" output, that process in the script is started but Spacelift does not send it to the background and it still waits untill it is finished which never happen.
> Executing that script directly like following does the job:
> {code:title=App.java|borderStyle=solid}
> public class App {
> public static void main(String[] args) throws IOException {
> Tasks.setDefaultExecutionServiceFactory(new DefaultExecutionServiceFactory());
> System.out.println("before");
> Runtime.getRuntime().exec("/tmp/ngrinder-agent/ngrinder-agent/run_agent_bg.sh");
>
> System.out.println("after");
> }
> }
> {code}
> Started process survives JVM termination.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months