Page 1 of 1

Day Communique - NoClassDefFoundError

PostPosted: Tue Jan 22, 2013 9:07 pm
by PapLaci
Hello,

I'm new to docx4j and I have a problem.

I managed to create a project, using docx4j (HTML+CSS -> PDF,DOCX). Everything worked fine. :)

But after deploying (CQ5) i recieve this error message and makes me mad for 4 days.

Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage
at com.mycomp.cq.workflow.CreatePdf.execute(CreatePdf.java:76)
at com.day.cq.workflow.impl.job.HandlerBase.executeProcess(HandlerBase.java:184)
at com.day.cq.workflow.impl.job.JobHandler.process(JobHandler.java:112)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

This statement throws the error :

WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();

Help plz!

Re: Could not initialize class org.docx4j.openpackaging.pack

PostPosted: Tue Jan 22, 2013 9:20 pm
by jason
Your question might be better asked in the Day support channels, as I don't have much to suggest other than make docx4j and its dependencies available to the relevant class loader.

Re: Day Communique - NoClassDefFoundError

PostPosted: Tue Jan 22, 2013 9:38 pm
by PapLaci
Docx4j version: 2.8.1
Java: 1.7 (64 bit)

Everything is up-to-date.

Re: Day Communique - NoClassDefFoundError

PostPosted: Tue Jan 22, 2013 9:42 pm
by PapLaci
Thy for your fast answer.

I will write to them too. :)

Btw we tried to make an OSGI bundle from docx4j, and we encountered some error. Do you know maybe where can I find some help about this?

Re: Day Communique - NoClassDefFoundError

PostPosted: Wed Jan 23, 2013 7:31 am
by jason
Excuse my ignorance, but have Adobe/Day rolled their own app server from scratch, or is it based on some open source product, or deployed into something (eg WebLogic, WebSphere)?

Re: Day Communique - NoClassDefFoundError

PostPosted: Tue Dec 30, 2014 7:00 pm
by Trevis
Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage
at com.mycomp.cq.workflow.CreatePdf.execute(CreatePdf.java:76)
at com.day.cq.workflow.impl.job.HandlerBase.executeProcess(HandlerBase.java:184)
at com.day.cq.workflow.impl.job.JobHandler.process(JobHandler.java:112)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

Re: Day Communique - NoClassDefFoundError

PostPosted: Tue Dec 30, 2014 8:50 pm
by jason
Trevis wrote:Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.openpackaging.packages.WordprocessingMLPackage


The docx4j jar (or possibly one of its dependencies?) is not on your classpath