![Avatar](https://opcfoundation.org/wp-content/uploads/sp-resources/forum-avatars/defaults/userdefault.png)
07/27/2017
![sp_UserOfflineSmall](https://opcfoundation.org/wp-content/sp-resources/forum-themes/reboot/images/darkpack/sp_UserOfflineSmall.png)
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.
1 Guest(s)