Hey all,
i am trying to run the UA-Java-Legacy Samples in a new project. I did a maven "package and install", and then importet this in my new project to my pom.xml. This is all fine. Now I try to run one of the Samples, that are given with the stack -> SampleClient.java. The issue is every time I run this mentioned class the line 94 errors with the exception:
Exception in thread "main" java.lang.ExceptionInInitializerError at SampleClient.main(SampleClient.java:94) Caused by: java.lang.NullPointerException
at org.opcfoundation.ua.examples.certs.ExampleKeys.(ExampleKeys.java:218) ... 1 more.
The getCert-method from ExampleKeys is where something goes wrong. The certificates have something wrong in it. The method in line 94 for the KeyPair is not jumping to getCert(...) in ExampleKeys, instead it goes to static{....}. After that it error in line 218 in ExampleKeys.
Has any one of you ever seen such a error or an idea how to solve it ?
Thank you.
Hey all, i am trying to run the UA-Java-Legacy Samples in a new project. I did a maven "package and install", and then importet this in my new project to my pom.xml. This is all fine. Now I try to run one of the Samples, that are given with the stack -> SampleClient.java. The issue is every time I run this mentioned class the line 94 errors with the exception:
Exception in thread "main" java.lang.ExceptionInInitializerError at SampleClient.main(SampleClient.java:94) Caused by: java.lang.NullPointerException at org.opcfoundation.ua.examples.certs.ExampleKeys.(ExampleKeys.java:218) ... 1 more.
The getCert-method from ExampleKeys is where something goes wrong. The certificates have something wrong in it. The method in line 94 for the KeyPair is not jumping to getCert(...) in ExampleKeys, instead it goes to static{....}. After that it error in line 218 in ExampleKeys. Has any one of you ever seen such a error or an idea how to solve it ? Thank you.
This is the SampleClient.java:
This is the ExampleKeys.java