8:53, EET
September 19, 2013
Hello everyone,
i’m trying to bind the bouncy castle library (bcprov-jdk16-146.jar) into my Project. I’m trying to do these with maven, but when i call the function UaClient.connect() i am getting the Stack Trace:
java.lang.SecurityException: class “org.bouncycastle.asn1.DEREncodable”‘s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:943)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:657)
at java.lang.ClassLoader.defineClass(ClassLoader.java:785)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.opcfoundation.ua.transport.security.Cert.(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.TransportChannelSettings.getServerCertificate(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.TcpConnection.initialize(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.initialize(Unknown Source)
at org.opcfoundation.ua.transport.tcp.io.SecureChannelTcp.initialize(Unknown Source)
at org.opcfoundation.ua.application.Client.createSecureChannel(Unknown Source)
at com.prosysopc.ua.client.UaClient.g(Unknown Source)
at com.prosysopc.ua.client.UaClient.connect(Unknown Source)
at de.monkeyworks.movisa.server.connector.opcua.OpcUaServer.connect(OpcUaServer.java:100)
at de.monkeyworks.movisa.server.ProcessManager.init(ProcessManager.java:93)
at de.monkeyworks.movisa.server.test.ProcessManagerBuilderTest.testCreateProcess(ProcessManagerBuilderTest.java:42)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
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)
I didn’t get a point of starting to fix this Problem. In a previous phase of developing the application loads the library from WEB-INF/lib folder in a Webapp Library. This setting didn’t throw an error. But the switch to the maven dependency leads me into this error.
The maven dependency:
org.bouncycastle
bcprov-jdk16
1.46
Thanks for help.
Regards,
jakblu
10:21, EET
December 21, 2011
The Bouncy Castle jars are signed, which makes it a bit complicated to rebuild it. We have not used Maven ourselves, nor tried to recompile the Bouncy Castle, so I am not sure about the details, but a quick Google search gave me this:
12:05, EET
September 19, 2013
Hey there,
thanks for the quick response.
I fixed the Problem. There were a duplicate dependency in the pom.xml of the main project and the pom.xml of test project with different versions of the Bouncy Castle jar. After deleting one of them the problem has gone.
Just a stupid fault, but working in team is often not the easiest one
Thanks for help.
Regards,
jakblu
Most Users Ever Online: 1919
Currently Online:
26 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 735
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1