java.lang.IllegalAccessError: tried to access method org.junit.runners.BlockJUnit4ClassRunner.validateFields(Ljava/util/List;)V from class junitparams.JUnitParamsRunner


Solutions on the web

Solution icon of github
via GitHub by perwestling
, 9 months ago
tried to access method org.junit.runners.BlockJUnit4ClassRunner.validateFields(Ljava/util/List;)V from class junitparams.JUnitParamsRunner

Solution icon of github
tried to access method org.junit.runners.BlockJUnit4ClassRunner.validateFields(Ljava/util/List;)V from class junitparams.JUnitParamsRunner

Solution icon of stackoverflow
via Stack Overflow by Jingjing
, 7 months ago
tried to access method org.junit.runners.BlockJUnit4ClassRunner.validateFields(Ljava/util/List;)V from class junitparams.JUnitParamsRunner

Stack trace

java.lang.IllegalAccessError: tried to access method org.junit.runners.BlockJUnit4ClassRunner.validateFields(Ljava/util/List;)V from class junitparams.JUnitParamsRunner
	at junitparams.JUnitParamsRunner.collectInitializationErrors(JUnitParamsRunner.java:405)
	at org.junit.runners.ParentRunner.validate(ParentRunner.java:344)
	at org.junit.runners.ParentRunner.<init>(ParentRunner.java:74)
	at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:55)
	at junitparams.JUnitParamsRunner.<init>(JUnitParamsRunner.java:393)
	at examples.MyJUnitParamsRunner.<init>(MyJUnitParamsRunner.java:17)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
	at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
	at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
	at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
	at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:84)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.