문제

I am getting the following error when I try to start my Application...

[java.lang.IllegalStateException: java.lang.NullPointerException^M at com.tivoli.pd.jutil.kb$1.run(kb$1.java:41)^M at java.security.AccessController.doPrivileged(AccessController.java:229 )^M at com.tivoli.pd.jutil.kb.c(kb.java:141)^M at com.tivoli.pd.jutil.kb.(kb.java:56)^M at com.tivoli.pd.jutil.PDContext.(PDContext.java:76)^M at com.tivoli.pd.jazn.PDAuthorizationContext.(PDAuthorizationConte xt.java:66)^M

I double checked the config file was accessible and I could read it. The code I am using looks as follows...

aC = new PDAuthorizationContext(cFile);

Is there a way to get more information on what is causing the NPE?

More information!!!

After debuging a bit, it appears the issue comes from this code (they use progaurd so it is a little hard to be 100% confident)...

Certificate[] arrayOfCertificate1 = ((KeyStore)???).getCertificateChain("DefaultID");
//Throws Null pointer (presumably because array is null)
Certificate localCertificate1 = arrayOfCertificate1[0];

EVEN MORE INFO

This appears to be some kind of dependency conflict (guess), because if I just create a sample App using PDAuthorizationContext it works fine.

도움이 되었습니까?

해결책

Problem was related to the PD.jar version that I was using. Although I thought I was using one version I was using another. This was because on version was registered in my WebSphere library (under build path in eclipse). Once the proper library was introduced everything worked.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top