You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

Nicole L.5's avatar
Nicole L.5
New member | Level 1
9 years ago

java api+tomcat: HttpsURLConnectionOldImpl cannot be cast to HttpsURLConnection

When using the client API on a web app under tomcat, it would seem that all client requests I've tried so far give me this error:

com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ssl.HttpsURLConnection

For example:

using a string token created from the control panel for access:

config=new DBXRequestConfig("Jamz","en_US");
client= new DBXClient(config,"token");
client.getMetadataWithChildren("/");

Then boom. Exception. Anybody seen anything like this? I feel like I need to rebuild the api with options to match tomcat, but I'm a little out of my league here. Any advice?

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    Hi Nicole, we came across this looking into this for you:

    https://community.oracle.com/thread/1150553

    It looks like you might be including an old or obsolete JAR in your deployment, and classes in that JAR are somehow conflicting with the newer/correct version of the classes. 

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,882 PostsLatest Activity: 14 hours ago
325 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!