Page 1 of 1

how to install docx4j and netbeans, pls help

PostPosted: Sun Apr 17, 2011 8:21 am
by naked11
Hi guys,
i need help with intall docx4j on ma computer, win xp, sp3, netbeans,
i download docx4j.jar and add library to my project, but it throws exceptions, jlogger, cant open file...
i cant run this code, thx for any help

viewtopic.php?f=6&t=686

Re: how to install docx4j and netbeans, pls help

PostPosted: Sun Apr 17, 2011 9:38 am
by jason
Which version of Netbeans?

What is the error message, exactly?

Re: how to install docx4j and netbeans, pls help

PostPosted: Mon Apr 18, 2011 12:30 am
by naked11
error mess:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at org.docx4j.openpackaging.Base.<clinit>(Base.java:40)
at zk.spust.main(spust.java:41)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 2 more
Java Result: 1

NETBEANS 6.8

Re: how to install docx4j and netbeans, pls help

PostPosted: Mon Apr 18, 2011 9:46 am
by jason
Add log4j-1.2.15.jar to your class path, along with the other jars included in the dist:

Code: Select all
avalon-framework-api-4.3.1.jar   commons-lang-2.4.jar           hwpf-3.4.0.jar        xalan-2.7.1.jar
avalon-framework-impl-4.3.1.jar  commons-logging-1.1.1.jar      jdom-1.0.jar          xml-apis-1.3.04.jar
commons-vfs-patched-1.9.1.jar  log4j-1.2.15.jar      xmlgraphics-commons-1.4.jar
commons-codec-1.3.jar                       serializer-2.7.1.jar
commons-io-1.3.1.jar             fop-1.0.jar                    wmf2svg-0.8.3.jar


Google will tell you how to do that, I'm sure.