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

Imported library throwing signature exception #198

Closed
johanhaleby opened this Issue Jul 20, 2015 · 4 comments

Comments

Projects
None yet
1 participant
@johanhaleby
Collaborator

johanhaleby commented Jul 20, 2015

From brucew...@gmail.com on March 14, 2011 17:59:37

What steps will reproduce the problem? 1. Setting up a new project
2. Imported the 3 libraries as asked
3. When running the first test created the following exception happens
java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.jayway.restassured.internal.ResponseSpecificationImpl.class$(ResponseSpecificationImpl.groovy)
at com.jayway.restassured.internal.ResponseSpecificationImpl.$get$$class$org$hamcrest$Matchers(ResponseSpecificationImpl.groovy)
at com.jayway.restassured.internal.ResponseSpecificationImpl.statusCode(ResponseSpecificationImpl.groovy:76)
at test.java.SITRestTests.resttests.EM3GetTest.testEm3Rest(EM3GetTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) What is the expected output? What do you see instead? What version of the product are you using? On what operating system? The latest. Using eclipse in conjunction with junit.

Essentially no tests can run. Please provide any additional information below.

Original issue: http://code.google.com/p/rest-assured/issues/detail?id=43

@johanhaleby

This comment has been minimized.

Show comment
Hide comment
@johanhaleby

johanhaleby Jul 20, 2015

Collaborator

From johan.ha...@gmail.com on March 15, 2011 00:14:53

It seems to be a problem with the Hamcrest library. See https://code.google.com/p/hamcrest/issues/detail?id=128 for details and a solution. I doubt that there's anything that can be done in REST Assured to prevent this.

Status: WontFix

Collaborator

johanhaleby commented Jul 20, 2015

From johan.ha...@gmail.com on March 15, 2011 00:14:53

It seems to be a problem with the Hamcrest library. See https://code.google.com/p/hamcrest/issues/detail?id=128 for details and a solution. I doubt that there's anything that can be done in REST Assured to prevent this.

Status: WontFix

@johanhaleby

This comment has been minimized.

Show comment
Hide comment
@johanhaleby

johanhaleby Jul 20, 2015

Collaborator

From brucew...@gmail.com on March 15, 2011 02:00:34

Thanks Johan, I put Junit down the bottom and that seems to have worked.

Collaborator

johanhaleby commented Jul 20, 2015

From brucew...@gmail.com on March 15, 2011 02:00:34

Thanks Johan, I put Junit down the bottom and that seems to have worked.

@johanhaleby

This comment has been minimized.

Show comment
Hide comment
@johanhaleby

johanhaleby Jul 20, 2015

Collaborator

From johan.ha...@gmail.com on March 15, 2011 06:42:29

Great! Thanks for using the project.

Collaborator

johanhaleby commented Jul 20, 2015

From johan.ha...@gmail.com on March 15, 2011 06:42:29

Great! Thanks for using the project.

@johanhaleby

This comment has been minimized.

Show comment
Hide comment
@johanhaleby

johanhaleby Jul 20, 2015

Collaborator

From Guido.Sc...@googlemail.com on February 23, 2015 01:54:37

just had the problem too, found a solution somewhere else. Instead of import org.hamcrest.Matchers.; i used import static org.hamcrest.CoreMatchers.;
and it worked for me in Eclipse + Junit4

Collaborator

johanhaleby commented Jul 20, 2015

From Guido.Sc...@googlemail.com on February 23, 2015 01:54:37

just had the problem too, found a solution somewhere else. Instead of import org.hamcrest.Matchers.; i used import static org.hamcrest.CoreMatchers.;
and it worked for me in Eclipse + Junit4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment