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
java.lang.IllegalAccessError: tried to access field when i try to run junit test #102
Comments
This looks like a dependency conflict with JBehave - check that your version of JBehave is the same as the one used by Serenity. |
Thank you for quick reply i am using serenity jbehave, |
What version of jbehave (not serenity-jbehave) are you using? |
jbehave-core 4.0.5 i am using |
The versions are OK, and the code should work. Could be a Maven repo/caching/dependency conflic issue. If you can create a sample project that reproduces the issue we can take a look. |
Thank you for your help,i created a sample project with above mentioned versions it looks ok ,and another observation if i extend test to SerenityStories then only i could see this issue. |
Hi,
I have migrated my automation framework from thucydides to serenity, when i run the tests from the maven working fine but when i try to run test from junit test ,giving below error
java.lang.IllegalAccessError: tried to access field org.jbehave.core.embedder.Embedder.embedderMonitor from class net.serenitybdd.jbehave.embedders.ExtendedEmbedder
at net.serenitybdd.jbehave.embedders.ExtendedEmbedder.(ExtendedEmbedder.java:28)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.(SerenityReportingRunner.java:79)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.(SerenityReportingRunner.java:73)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:29)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:21)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)
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)
The text was updated successfully, but these errors were encountered: