[JBoss JIRA] (ARQGRA-511) Graphene proxies don't support calling protected/package-protected methods in a valid context
by Vsevolod Golovanov (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-511?page=com.atlassian.jira.plugin... ]
Vsevolod Golovanov updated ARQGRA-511:
--------------------------------------
Summary: Graphene proxies don't support calling protected/package-protected methods in a valid context (was: Graphene proxies don't support calling protected/package-protected methods in valid context)
> Graphene proxies don't support calling protected/package-protected methods in a valid context
> ---------------------------------------------------------------------------------------------
>
> Key: ARQGRA-511
> URL: https://issues.jboss.org/browse/ARQGRA-511
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.1.0.Final
> Reporter: Vsevolod Golovanov
>
> I have this base Component (Page Fragment) Class:
> {code}
> public abstract class Component {
> protected WebElement getRoot() {
> // ...
> }
> @Override
> public boolean equals(Object obj) {
> if (!(obj instanceof Component))
> return false;
> // WebElementUtils.equal is a ARQGRA-484 workaround, irrelevant here
> return WebElementUtils.equal(getRoot(), ((Component) obj).getRoot());
> }
> }
> {code}
> The equals call results in an exception
> {code}java.lang.RuntimeException: unexpected invocation exception during invocation of ru.argustelecom.system.inf.testframework.it.ui.comp.Component#getRoot(), on target 'ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete@83ddf46d': Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:137)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.getRoot(<generated>)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.Component.equals(Component.java:283)
> 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.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.equals(<generated>)
> at org.junit.Assert.isEquals(Assert.java:131)
> at org.junit.Assert.equalsRegardingNull(Assert.java:127)
> at org.junit.Assert.assertEquals(Assert.java:111)
> at org.junit.Assert.assertEquals(Assert.java:144)
> at ru.argustelecom.system.inf.testframework.it.ui.comp.test.AutoCompleteIT.autoComplete(AutoCompleteIT.java:42)
> 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
> at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> 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.core.impl.EventImpl.fire(EventImpl.java:67)
> at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
> 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: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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
> at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:363)
> at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259)
> at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
> at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:315)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
> at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
> at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
> 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:94)
> at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
> 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: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.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
> at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:311)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204)
> at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
> at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
> at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
> at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
> at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
> at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
> Caused by: java.lang.IllegalAccessException: Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
> at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
> at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
> at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
> at java.lang.reflect.Method.invoke(Method.java:491)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> ... 151 more
> {code}
> Looking at the GrapheneProxyHandler code:
> {code}
> protected Object invokeReal(Object target, Method method, Object[] args) throws Throwable {
> Object result;
> try {
> if (target instanceof GrapheneProxyInstance) {
> target = ((GrapheneProxyInstance) target).unwrap();
> }
> if (!method.getDeclaringClass().isInstance(target)) {
> Method realMethod = target.getClass().getDeclaredMethod(method.getName(), method.getParameterTypes());
> if (!realMethod.isAccessible()) {
> realMethod.setAccessible(true);
> }
> result = realMethod.invoke(target, args);
> } else {
> result = method.invoke(target, args);
> }
> // ...
> {code}
> This {{!method.getDeclaringClass().isInstance(target)}} check doesn't pass, so the accessibility modification is skipped. And naturally GrapheneProxyHandler doesn't have an access to Component#getRoot since it's in a different package and not a subclass.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (ARQGRA-511) Graphene proxies don't support calling protected/package-protected methods in valid context
by Vsevolod Golovanov (JIRA)
Vsevolod Golovanov created ARQGRA-511:
-----------------------------------------
Summary: Graphene proxies don't support calling protected/package-protected methods in valid context
Key: ARQGRA-511
URL: https://issues.jboss.org/browse/ARQGRA-511
Project: Arquillian Graphene
Issue Type: Bug
Components: core
Affects Versions: 2.1.0.Final
Reporter: Vsevolod Golovanov
I have this base Component (Page Fragment) Class:
{code}
public abstract class Component {
protected WebElement getRoot() {
// ...
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof Component))
return false;
// WebElementUtils.equal is a ARQGRA-484 workaround, irrelevant here
return WebElementUtils.equal(getRoot(), ((Component) obj).getRoot());
}
}
{code}
The equals call results in an exception
{code}java.lang.RuntimeException: unexpected invocation exception during invocation of ru.argustelecom.system.inf.testframework.it.ui.comp.Component#getRoot(), on target 'ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete@83ddf46d': Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:137)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.getRoot(<generated>)
at ru.argustelecom.system.inf.testframework.it.ui.comp.Component.equals(Component.java:283)
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.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:162)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:212)
at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:208)
at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:234)
at ru.argustelecom.system.inf.testframework.it.ui.comp.AutoComplete$$EnhancerByGraphene$$4040d070.equals(<generated>)
at org.junit.Assert.isEquals(Assert.java:131)
at org.junit.Assert.equalsRegardingNull(Assert.java:127)
at org.junit.Assert.assertEquals(Assert.java:111)
at org.junit.Assert.assertEquals(Assert.java:144)
at ru.argustelecom.system.inf.testframework.it.ui.comp.test.AutoCompleteIT.autoComplete(AutoCompleteIT.java:42)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:370)
at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
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.core.impl.EventImpl.fire(EventImpl.java:67)
at org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:53)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
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: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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:136)
at org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:363)
at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:245)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:259)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:315)
at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.execute(ClientBeforeAfterLifecycleEventExecuter.java:99)
at org.jboss.arquillian.container.test.impl.execution.ClientBeforeAfterLifecycleEventExecuter.on(ClientBeforeAfterLifecycleEventExecuter.java:72)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:124)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:130)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92)
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:94)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73)
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: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.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
at org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:311)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:204)
at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422)
at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: java.lang.IllegalAccessException: Class org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler can not access a member of class ru.argustelecom.system.inf.testframework.it.ui.comp.Component with modifiers "protected"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
at java.lang.reflect.Method.invoke(Method.java:491)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
... 151 more
{code}
Looking at the GrapheneProxyHandler code:
{code}
protected Object invokeReal(Object target, Method method, Object[] args) throws Throwable {
Object result;
try {
if (target instanceof GrapheneProxyInstance) {
target = ((GrapheneProxyInstance) target).unwrap();
}
if (!method.getDeclaringClass().isInstance(target)) {
Method realMethod = target.getClass().getDeclaredMethod(method.getName(), method.getParameterTypes());
if (!realMethod.isAccessible()) {
realMethod.setAccessible(true);
}
result = realMethod.invoke(target, args);
} else {
result = method.invoke(target, args);
}
// ...
{code}
This {{!method.getDeclaringClass().isInstance(target)}} check doesn't pass, so the accessibility modification is skipped. And naturally GrapheneProxyHandler doesn't have an access to Component#getRoot since it's in a different package and not a subclass.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (ARQ-2132) Support for FirefoxOptions and SafariOptions in Drone
by Vaclav Muzikar (JIRA)
Vaclav Muzikar created ARQ-2132:
-----------------------------------
Summary: Support for FirefoxOptions and SafariOptions in Drone
Key: ARQ-2132
URL: https://issues.jboss.org/browse/ARQ-2132
Project: Arquillian
Issue Type: Feature Request
Components: Extension - Drone
Reporter: Vaclav Muzikar
Assignee: Vaclav Muzikar
FirefoxOptions are mainly needed for setting up the GeckoDriver logger level.
SafariOptions are needed for testing with Safari Technical Preview.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (ARQ-2131) Fix for multiple JVM arguments not released
by Gerhard Poul (JIRA)
[ https://issues.jboss.org/browse/ARQ-2131?page=com.atlassian.jira.plugin.s... ]
Gerhard Poul commented on ARQ-2131:
-----------------------------------
[~aslak] What do you think? Would you be able to push a new beta out?
> Fix for multiple JVM arguments not released
> -------------------------------------------
>
> Key: ARQ-2131
> URL: https://issues.jboss.org/browse/ARQ-2131
> Project: Arquillian
> Issue Type: Bug
> Components: WebSphere Containers
> Environment: {code}arquillian-container-was-1.0.0.Beta2{code}
> {{arquillian.xml}} snippet:
> {code:xml} <container qualifier="liberty-ci-managed">
> <configuration>
> <property name="deployType">xml</property>
> <property name="javaVmArguments">-Dsetting1=x -Dsetting2=y</property>
> </configuration>
> </container>{code}
> Reporter: Benjamin Marwell
> Assignee: Gerhard Poul
> Fix For: was_1.0.0.next
>
>
> Hello,
> h2. expected output
> Process started with (from Debug):
> {{FINER: Starting server with command: [java, -Dsetting1=x, -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. actual output
> note the missing comma betweed setting1 and setting2:
> {{FINER: Starting server with command: [java, -Dsetting1=x -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. Solution
> Already exists. This commit is currently not in a release:
> https://github.com/arquillian/arquillian-container-was/commit/a1a77fe9241...
> What can't be seen from here: this commit is needed to have multiple JVM args. Otherwise all jvm args are concatenated into a single String.
> So, the bug is fixed in trunk, but not released.
> h2. Proposed test case
> It is also missing a test case.
> Please add a test case with two or more {{-D}}-Parameters and check in your servlet if they are set.
> Thank you very much!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (ARQ-2131) Fix for multiple JVM arguments not released
by Gerhard Poul (JIRA)
[ https://issues.jboss.org/browse/ARQ-2131?page=com.atlassian.jira.plugin.s... ]
Gerhard Poul updated ARQ-2131:
------------------------------
Summary: Fix for multiple JVM arguments not released (was: Fix for multiple JVM arguments not release)
> Fix for multiple JVM arguments not released
> -------------------------------------------
>
> Key: ARQ-2131
> URL: https://issues.jboss.org/browse/ARQ-2131
> Project: Arquillian
> Issue Type: Bug
> Components: WebSphere Containers
> Environment: {code}arquillian-container-was-1.0.0.Beta2{code}
> {{arquillian.xml}} snippet:
> {code:xml} <container qualifier="liberty-ci-managed">
> <configuration>
> <property name="deployType">xml</property>
> <property name="javaVmArguments">-Dsetting1=x -Dsetting2=y</property>
> </configuration>
> </container>{code}
> Reporter: Benjamin Marwell
> Assignee: Gerhard Poul
> Fix For: was_1.0.0.next
>
>
> Hello,
> h2. expected output
> Process started with (from Debug):
> {{FINER: Starting server with command: [java, -Dsetting1=x, -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. actual output
> note the missing comma betweed setting1 and setting2:
> {{FINER: Starting server with command: [java, -Dsetting1=x -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. Solution
> Already exists. This commit is currently not in a release:
> https://github.com/arquillian/arquillian-container-was/commit/a1a77fe9241...
> What can't be seen from here: this commit is needed to have multiple JVM args. Otherwise all jvm args are concatenated into a single String.
> So, the bug is fixed in trunk, but not released.
> h2. Proposed test case
> It is also missing a test case.
> Please add a test case with two or more {{-D}}-Parameters and check in your servlet if they are set.
> Thank you very much!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (ARQ-2131) Fix for multiple JVM arguments not release
by Benjamin Marwell (JIRA)
[ https://issues.jboss.org/browse/ARQ-2131?page=com.atlassian.jira.plugin.s... ]
Benjamin Marwell commented on ARQ-2131:
---------------------------------------
Hello [~gpoul],
thanks for your reply. I know there is a fix coming in the next release. This issue is about the fact, that there was no release for two years.
I'd look into it about the test.
> Fix for multiple JVM arguments not release
> ------------------------------------------
>
> Key: ARQ-2131
> URL: https://issues.jboss.org/browse/ARQ-2131
> Project: Arquillian
> Issue Type: Bug
> Components: WebSphere Containers
> Environment: {code}arquillian-container-was-1.0.0.Beta2{code}
> {{arquillian.xml}} snippet:
> {code:xml} <container qualifier="liberty-ci-managed">
> <configuration>
> <property name="deployType">xml</property>
> <property name="javaVmArguments">-Dsetting1=x -Dsetting2=y</property>
> </configuration>
> </container>{code}
> Reporter: Benjamin Marwell
> Assignee: Gerhard Poul
> Fix For: was_1.0.0.next
>
>
> Hello,
> h2. expected output
> Process started with (from Debug):
> {{FINER: Starting server with command: [java, -Dsetting1=x, -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. actual output
> note the missing comma betweed setting1 and setting2:
> {{FINER: Starting server with command: [java, -Dsetting1=x -Dsetting2=y, -javaagent:lib/bootstrap-agent.jar, -jar, lib/ws-launch.jar, defaultServer]}}
> h2. Solution
> Already exists. This commit is currently not in a release:
> https://github.com/arquillian/arquillian-container-was/commit/a1a77fe9241...
> What can't be seen from here: this commit is needed to have multiple JVM args. Otherwise all jvm args are concatenated into a single String.
> So, the bug is fixed in trunk, but not released.
> h2. Proposed test case
> It is also missing a test case.
> Please add a test case with two or more {{-D}}-Parameters and check in your servlet if they are set.
> Thank you very much!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months