Running Sample OPC UA Client in Java |OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Running Sample OPC UA Client in Java
Avatar
Dev Sylfen
New Member
Members
Forum Posts: 1
Member Since:
07/27/2017
sp_UserOfflineSmall Offline
1
07/27/2017 - 01:32
sp_Permalink sp_Print

Hello,

I am new to OPC UA implementations,and I want to create an OPC UA client.

I have some errors that i did not succeed to solve.

I hope you could help me.

I try to run the SampleClient,that exists on the GitHub of the foundation.

However,I have some policy errors (i think) for which I can't find the root.

Application myApplication = new Application();
Client myClient = new Client(myApplication);

myApplication.addLocale( ENGLISH );
myApplication.setApplicationName( new LocalizedText("Java Sample Client", Locale.ENGLISH) );
myApplication.setProductUri( "urn:JavaSampleClient" );

CertificateUtils.setKeySize(2048); // default = 1024

KeyPair pair = ExampleKeys.getCert("TestCA");

That is what i am trying to run.

And the error that it send is:

Exception in thread "main" java.lang.ExceptionInInitializerError
at interfacebd.Connect.main(Connect.java:239)
Caused by: java.lang.RuntimeException: java.io.IOException: keystore password was incorrect
at org.opcfoundation.ua.examples.certs.ExampleKeys.<clinit>(ExampleKeys.java:242)
... 1 more
Caused by: java.io.IOException: keystore password was incorrect
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2015)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.opcfoundation.ua.examples.certs.ExampleKeys.<clinit>(ExampleKeys.java:236)
... 1 more
Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: java.io.IOException: getSecretKey failed: PBE SecretKeyFactory not available
... 4 more

 

 

I would like to precise that I have already installed all the jar files of policies of java.

Thanks.

Avatar
Guest
Guests
2
07/27/2017 - 21:54
sp_Permalink sp_Print

I recommend that you enter your issue directly into the github repository. This forum is mainly for issues about the OPC standard and not so much for sample or toolkit implementations.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 21
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1353
Posts: 4589