in org.docx4j.jaxb.Context there is the following code:
- Code: Select all
try {
// JBOSS might use a different class loader to load JAXBContext, which causes problems,
// so explicitly specify our class loader.
Context tmp = new Context();
java.lang.ClassLoader classLoader = tmp.getClass().getClassLoader();
//log.info("\n\nClassloader: " + classLoader.toString() );
log.info("loading Context jc");
However, when our application is running standalone (running from command line) the classLoader variable is null.
The command line looks like:
- Code: Select all
..\jre6\bin\java -Dlog4j.configuration=.\conf\log4j.xml -Djava.endorsed.dirs=".\endorsed" -Xms1024m -Xmx1024m -server -jar .<myJarFile>
Is there some configuration we should be adding to ensure we get a value for classLoader?
Running the application as an applet through our IDE picks up a Tomcat class loader successfully and docx4j then works fine, but we need it to work standalone too.