Skip to main content

Hi,

 

I have used the BoxApiConnection service to connect my application to the developer box . I am running the application in WAS Liberty Profile while connecting to Box it throws me an error as below.

I have given the correct path for ketstore but still i see this issue.

 

Is there any particular SSL certificate to upload in Liberty Server. Please help me on this.

 

eerr] com.box.sdk.BoxAPIException: Couldn't connect to the Box API due to a network error.
rerr]     at com.box.sdk.BoxAPIRequest.trySend(BoxAPIRequest.java:395)
:err]     at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:209)
aerr]     at com.box.sdk.BoxAPIRequest.send(BoxAPIRequest.java:184)
terr]     at com.box.sdk.BoxUser.getCurrentUser(BoxUser.java:138)
Uerr]     at com.ibm.sc.analytics.DigitalAnalyticsDAO.getBoxApiConnectivity(DigitalAnalyticsDAO.java:248)
terr]     at com.ibm.sc.analytics.DigitalAnalyticsDAO.getBoxConnectivity(DigitalAnalyticsDAO.java:232)
aerr]     at com.ibm.sc.web.actions.BuyerDashboard.execute(BuyerDashboard.java:103)
uerr]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
merr]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
oerr]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
eerr]     at java.lang.reflect.Method.invoke(Unknown Source)
ferr]     at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
terr]     at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
ierr]     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
ierr]     at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
oerr]     at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
rerr]     at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
aerr]     at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
verr]     at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
lerr]     at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
ferr]     at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
Verr]     at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercep


any solution ???



See my post

https://community.box.com/t5/Developer-Forum/Box-Java-SDK-Connection-Problem-SSLHandshakeException/m-p/27133/highlight/true#M1288  and  

https://community.box.com/t5/Developer-Forum/Error-when-using-box-java-sdk/m-p/16321/highlight/false#M202

for the same error "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

 

Hope it helps or at least gives you some clues.



I fixed that by placing proper keystore file into the 

wlp\usr\servers\defaultServer\resources\security

Liberty directory.

In my case its name was - "jssecacerts" (i believe that "cacerts" would be enough as it has similar content)

then i added next lines to the Server.xml

 

.....
ssl-1.0
.....

As it seems Liberty has its own key storage. I came to this conclusion when i saw that my UnitTests used the same calls to remote server and they worked OK. That's why it didn't work via Liberty when i put this file into jre/lib/security. 

 

Hope this helps.

 



Reply