Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Visualizeding
6 years agoExplorer | Level 3
ZipException
Using literally exactly the same code as on the GitHub tutorial, I get a ZipException whenever I try to call a method with client.files().
DbxRequestConfig config = DbxRequestConfig.newBuilder("Greysia Bot").build();
DbxClientV2 client = new DbxClientV2(config, ACCESS_TOKEN);
ListFolderResult result = client.files().listFolder("");[01:48:22] [Thread-37/WARN]: Caused by: java.lang.RuntimeException: Error loading from "/com/dropbox/core/trusted-certs.raw": invalid stored block lengths [01:48:22] [Thread-37/WARN]: at com.dropbox.core.util.LangUtil.mkAssert(LangUtil.java:15) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.loadKeyStore(SSLConfig.java:347) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.createTrustManager(SSLConfig.java:214) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.<clinit>(SSLConfig.java:60) [01:48:22] [Thread-37/WARN]: ... 12 more [01:48:22] [Thread-37/WARN]: Caused by: java.util.zip.ZipException: invalid stored block lengths [01:48:22] [Thread-37/WARN]: at java.util.zip.InflaterInputStream.read(Unknown Source) [01:48:22] [Thread-37/WARN]: at java.util.zip.InflaterInputStream.read(Unknown Source) [01:48:22] [Thread-37/WARN]: at java.io.FilterInputStream.read(Unknown Source) [01:48:22] [Thread-37/WARN]: at java.io.DataInputStream.readUnsignedShort(Unknown Source) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.deserializeCertificates(SSLConfig.java:396) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.loadKeyStore(SSLConfig.java:375) [01:48:22] [Thread-37/WARN]: at com.dropbox.core.http.SSLConfig.loadKeyStore(SSLConfig.java:341) [01:48:22] [Thread-37/WARN]: ... 14 more
5 Replies
- Greg-DB6 years ago
Dropbox Community Moderator
Thanks for the report! I just tried this and it's working properly for me, so we'll need to investigate this further. Can you let me know:
- what operating system and version are you seeing this with?
- what version of Java are you seeing this with?
- what version of the Dropbox Java SDK are you seeing this with?
- how did you install the Dropbox Java SDK?
- Visualizeding6 years agoExplorer | Level 3
- I'm using the Windows 10 operating system, it should be the latest version of it.
- Java Version: 1.8.0_151 (according to Eclipse)
- I'm using the Dropbox SDK core version 3.1.3.
- I'm using Maven, to use the SDK as a dependency in my project.
I've attempted to fix this various ways by:
- Creating a new account (then creating a new app in the app console)
- Regenerating the access token
- Deleting dropbox from my local repository
Also, I'm getting this exception just before the ZipException
java.lang.ExceptionInInitializerError: null at com.dropbox.core.http.StandardHttpRequestor.prepRequest(StandardHttpRequestor.java:213) ~[?:?] at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:71) ~[?:?] at com.dropbox.core.http.StandardHttpRequestor.startPost(StandardHttpRequestor.java:29) ~[?:?] at com.dropbox.core.DbxRequestUtil.startPostRaw(DbxRequestUtil.java:276) ~[?:?] at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:146) ~[?:?] at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:330) ~[?:?] at com.dropbox.core.v2.DbxRawClientV2.executeRetriableWithRefresh(DbxRawClientV2.java:351) ~[?:?] at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:137) ~[?:?] at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:2082) ~[?:?] at com.dropbox.core.v2.files.DbxUserFilesRequests.listFolder(DbxUserFilesRequests.java:2132) ~[?:?] - Greg-DB6 years ago
Dropbox Community Moderator
Thanks! That should all be fine. I just tried Dropbox Java SDK v3.1.3 loaded by Maven with Java 1.8 in Eclipse on Windows and it worked for me, so there must be something more specific causing this.
The account, app registration, and access token likely shouldn't matter here, as it looks like the app is failing to connect to the Dropbox servers, before any of that would be validated (which happens on the server).
Instead, the issue is with preparing the request, when the SDK reads the file that contains the trusted certificates for the Dropbox API server TLS configuration.
Is there any special setup in your project that may be interfering with loading a local resource like that?
Also, does the "Tutorial Example" work for you? That uses Gradle, so that would be a good test to see if the installation method makes a difference. If that does work, you can try switching that to Maven to see if the issue then reproduces.
- Visualizeding6 years agoExplorer | Level 3
Hi, switching to Maven, on that tutorial class, worked perfectly. I'm actually writing a plugin for a minecraft server. That is probably what is causing the issue and interfering with it. I'll try and find a way to get it to work.
- Greg-DB6 years ago
Dropbox Community Moderator
I see, thanks for the additional context. It sounds like there is something about that environment that is interfering then. Unfortunately we can't provide support or guidance for working in a plugin like that though. Apologies I can't be of more help in that regard!
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!