Skip to main content
Question

Getting Error while try to connect to box sdk versopm 4.0.1

  • May 23, 2025
  • 1 reply
  • 25 views

Forum|alt.badge.img

Hi Team 

I am getting the below error while try to establish the connection. I have updgraded box sdk to 4.0.1. 

 

Could you please let me know what I am missing here

 

java.lang.IllegalAccessError: class com.box.sdk.BoxAPIConnection tried to access method 'void okhttp3.OkHttpClient$Builder.<init>(okhttp3.OkHttpClient)' (com.box.sdk.BoxAPIConnection and okhttp3.OkHttpClient$Builder are in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @6ec7bce0)

1 reply

Forum|alt.badge.img

Hello,

it looks like a problem with Spring Boot:

https://stackoverflow.com/questions/57750294/class-loader-error-unnamed-module-of-loader-org-springframework-boot-devtools

We had similar problem reported and upgrade of Spring Boot resolved the issue: https://github.com/box/box-java-sdk/issues/1160#issuecomment-1513558246

Can you try that?