Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TestBench doesn't work with V14 + Java 16 #1295

Open
tarekoraby opened this issue Aug 30, 2021 · 1 comment
Open

TestBench doesn't work with V14 + Java 16 #1295

tarekoraby opened this issue Aug 30, 2021 · 1 comment

Comments

@tarekoraby
Copy link

TestBench doesn't seem to work with the combo of Vaadin version 14 + Java 16.

To reproduce:

Run V14 branch of the skeleton-starter-flow-spring project with Java 16 (tested with Vaadin 14.6.8 + Amazon Correto 16.0.2).

Then execute the tests of MainViewIT. The following errors are observed:

java.lang.IllegalStateException: Unable to create proxy for driver

	at com.vaadin.testbench.TestBench.createDriver(TestBench.java:122)
	at com.vaadin.testbench.TestBench.createDriver(TestBench.java:99)
	at org.vaadin.example.AbstractViewTest.setup(AbstractViewTest.java:58)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at com.vaadin.testbench.parallel.ParallelRunner$1.evaluate(ParallelRunner.java:468)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:61)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at com.vaadin.testbench.parallel.ParallelScheduler$1.call(ParallelScheduler.java:48)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @396a51ab
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at javassist.util.proxy.SecurityActions.setAccessible(SecurityActions.java:103)
	at javassist.util.proxy.FactoryHelper.toClass2(FactoryHelper.java:181)
	at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:164)
	at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:507)
	at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492)
	at javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428)
	at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:400)
	at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:675)
	at javassist.util.proxy.ProxyFactory.create(ProxyFactory.java:660)
	at com.vaadin.testbench.TestBench.createDriver(TestBench.java:116)
	... 25 more
@tarekoraby
Copy link
Author

And to clarify, the same tests work just fine with Java 16 on the same machine with Vaadin 20.0.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant