Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Bouncy Castle Library
October 28, 2013
8:53, EEST
Avatar
jakblu
Member
Members
Forum Posts: 7
Member Since:
September 19, 2013
sp_UserOfflineSmall Offline

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

October 28, 2013
10:21, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 846
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

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:

http://stackoverflow.com/quest…..ch/6388117

October 29, 2013
12:05, EEST
Avatar
jakblu
Member
Members
Forum Posts: 7
Member Since:
September 19, 2013
sp_UserOfflineSmall Offline

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 Wink

Thanks for help.

Regards,
jakblu

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 267

Currently Online:
10 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 100

pramanj: 86

ibrahim: 70

kapsl: 57

gjevremovic: 49

TimK: 41

Fransua33: 39

fred: 37

Rainer Versteeg: 32

Thomas Reuther: 26

Member Stats:

Guest Posters: 0

Members: 1058

Moderators: 14

Admins: 1

Forum Stats:

Groups: 3

Forums: 14

Topics: 981

Posts: 4145

Newest Members:

mats989, Sebastien Petitrenaud, sting2005, Ron Hoppe, Seb, p.devito, g.ilengo, MohamedLazrek, brittr83165991, martintinsley9

Moderators: Jouni Aro: 846, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 523, Heikki Tahvanainen: 402, Jukka Asikainen: 1, Teppo Uimonen: 20, Markus Johansson: 18, Matti Siponen: 31, Lusetti: 0

Administrators: admin: 0