NoClassDefFoundError and Zip64 Error Using GroupDocs Viewer in Legacy Spring Boot 1.5

Hello,
We are trying to use groupdocs-viewer-25.2.jar in a closed network environment with the following stack:

  • Java 1.8
  • Gradle 4.6
  • Spring Boot 1.5.x
  • No internet access (air-gapped network)

We have added the GroupDocs JAR like this in build.gradle:

compile files('libs/groupdocs/groupdocs-viewer-25.2.jar')

The JAR is correctly present and included in the final packaged JAR file.

-----Issue-----
When calling any class or function from the GroupDocs library, we get:

java.lang.NoClassDefFoundError

We tried unpacking groupdocs-viewer-25.2.jar using:

from { zipTree('libs/groupdocs/groupdocs-viewer-25.2.jar') }

However, Spring Boot 1.5 throws the following error:

java.lang.IllegalStateException: Zip64 archives are not supported

We realized that Spring Boot 1.5 does not support zip64, and the GroupDocs JAR appears to be in zip64 format.

The feature we are implementing is:

Convert DWG files to image, encode as Base64, and return the result (in a Spring REST API).

It works fine in local dev environments like Eclipse (non-packaged), but fails when running the Spring Boot packaged JAR.

-----Constraints-----

  • Upgrading Spring Boot or Gradle is not feasible due to internal security and legacy policies.
  • Internet access is strictly restricted (closed network).

-----Request-----

  1. Is there any non-zip64 version of groupdocs-viewer-25.2.jar that we can use in Spring Boot 1.5?
  2. Alternatively, can you provide a lighter-weight or modular version of the JAR that avoids this issue?
  3. Any recommended workaround for use in a legacy Spring Boot environment?

Thanks in advance for your help!

Hello @90023 ,

Thank you for contacting us.

Unfortunately, the issue you’re experiencing is directly related to the limitations of Spring Boot 1.5.x, and at this time, we do not plan to release a lightweight version of GroupDocs.Viewer for Java specifically for this framework.

There are a few possible workarounds that could help resolve this issue. We would be happy to investigate further if you could share a sample version of your project with us. Alternatively, you can try the following options yourself:

Option 1: Do not include groupdocs-viewer-25.2.jar inside the final Spring Boot JAR

Steps:

  1. Exclude groupdocs-viewer-25.2.jar from the final bootJar.
  2. Place the JAR in a libs/ folder.
  3. Configure the build script to load it externally.

Example in build.gradle:

dependencies {
    compile files('libs/groupdocs-viewer-25.2.jar')
}

bootJar {
    classpath = classpath.filter {
        !it.name.contains("groupdocs-viewer")
    }
}

Run your application manually:

java -cp "libs/groupdocs-viewer-25.2.jar:my-spring-app.jar" com.mycompany.MyApp

Option 2: Extract the JAR and use it as unpacked resources

You can extract the contents of the GroupDocs JAR and reference them directly from the file system:

mkdir -p external/groupdocs
cd external/groupdocs
jar -xf ../../libs/groupdocs-viewer-25.2.jar

Then start your application with the unpacked directory in the classpath:

java -cp "external/groupdocs:build/libs/myapp.jar" com.mycompany.MyApp

We’ll be waiting for your feedback and results.