Free Support Forum - groupdocs.com

Cannot convert Word document to PDF in Java

Hi,

We are trying to use GroupDocs.Conversion to convert Word documents to PDF. We are doing this in a Spring Boot Java application.

When we run locally the JAR, everything works as expected. When we try to convert from the remote Docker container, we get the following issue:

 Exception: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.groupdocs.conversion.internal.c.a.w.internal.ok
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.groupdocs.conversion.internal.c.a.w.internal.ok
	at com.groupdocs.conversion.internal.c.a.w.internal.oc.naj(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.internal.xG.a(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.internal.xG.ai(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.internal.xG.pt(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.internal.nY.os(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.zzCL.zzZKQ(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.zzCL.zzZRe(Unknown Source)
(...shortened for clarity...)
	at com.groupdocs.conversion.internal.c.a.w.zz8B.zzZDJ(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.zzZ4C.zzYOb(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.Document.updatePageLayout(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.Document.zzWw(Unknown Source)
	at com.groupdocs.conversion.internal.c.a.w.Document.getPageCount(Unknown Source)
	at com.groupdocs.conversion.contracts.documentinfo.WordprocessingDocumentInfo.<init>(Unknown Source)
	at com.groupdocs.conversion.documents.ae.<init>(Unknown Source)
	at com.groupdocs.conversion.documents.ae.<init>(Unknown Source)
	at com.groupdocs.conversion.loading.loaders.WordProcessingDocumentLoader.load(Unknown Source)
	at com.groupdocs.conversion.pipeline.g.a(Unknown Source)
	at com.groupdocs.conversion.Converter.convert(Unknown Source)
	at com.groupdocs.conversion.Converter.convert(Unknown Source)
	at com.groupdocs.conversion.Converter.convert(Unknown Source)

We are using the following Gradle dependency: compile("com.groupdocs:groupdocs-conversion:20.10.3")

We are using it with a working license (no free tier or trial).

Can you please help us? Are we missing another dependency of some sort?

Thanks for your time.

1 Like

@Tonyyy

Please share complete details/specifications for the remote Docker container that you’re using. We’d appreciate if you share a screencast/video that covers this issue and a simple application using that we could reproduce it at our end.

Hi, thanks for your reply.

While trying to provide a tiny sample application to reproduce the bug, we encountered another one… “vendorName == null!”

It’s a shame the Java examples in Github are all outdated, some of them even impossible to run.

Anyway, here’s what I’ve been able to produce: http://www.filedropper.com/demo_23

I perform the 3 following steps to simulate our new issue:

./gradlew clean build
docker build -t test:latest .
docker run test:latest

As always, thanks for your time.

@Tonyyy

In order to investigate this issue, we still need details/specifications on the remote Docker container that you’re working with. Additionally, we requested a video/screencast that coverts this issue. Could you please share that as well?

The sample application I provided contains a Dockerfile. This is all you need to get the information about the Docker container I’m running.

About the video/screencast, I’m sorry but I don’t see the point, the sample app is fairly quick to build and run to avoid requiring this.

@Tonyyy

We are investigating this scenario. Your investigation ticket ID is CONVERSIONJAVA-1205. You’ll be notified as there’s any update.