java - ClassNotFoundException: org.docx4j.openpackaging.exceptions.Docx4JException -
so here go again. head banging on pc few hours, can't figured out do. on local pc run java code intellij idea. works. have create jar
file make able use on remote server. added libraries, jars program needs @ project settings (added libraries @ artifacts section). doesn't work running @ remote server. imports program needs:
import org.docx4j.dml.ctblip; import org.docx4j.jaxb.xpathbinderassociationispartialexception; import org.docx4j.openpackaging.exceptions.docx4jexception; import org.docx4j.openpackaging.packages.wordprocessingmlpackage; import org.docx4j.openpackaging.parts.partname; import org.docx4j.openpackaging.parts.relationships.relationshipspart; import org.docx4j.relationships.relationship; import javax.xml.bind.jaxbexception; import java.io.file; import java.util.list;
error:
exception in thread "main" java.lang.noclassdeffounderror: org/docx4j/openpackaging/exceptions/docx4jexception caused by: java.lang.classnotfoundexception: org.docx4j.openpackaging.exceptions.docx4jexception @ java.net.urlclassloader$1.run(urlclassloader.java:217) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:205) @ java.lang.classloader.loadclass(classloader.java:323) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:294) @ java.lang.classloader.loadclass(classloader.java:268) not find main class: main. program exit.
so problem in creating jar? missed something?
org.docx4j.openpackaging.exceptions.docx4jexception in docx4j.jar file, make sure (and docx4j's dependencies) on classpath.
Comments
Post a Comment