Page 1 of 1

Docx4j and Jonas

PostPosted: Sat Feb 22, 2014 12:22 am
by julie
Hi,

I have a problem with docx4j.
I want to modify an existant docx file.
When I launch my application on eclipse, I open my file modify it, save it and download. This works fine.
But when I deploy my application on Jonas, I can't open the file I have this error :
Code: Select all
ERROR o.d.jaxb.NamespacePrefixMapperUtils - JAXB: neither Reference Implementation nor Java 6 implementation present? javax.xml.bind.PropertyException: property "com.sun.xml.bind.namespacePrefixMapper" must be an instance of type com.sun.xml.bind.marshaller.NamespacePrefixMapper, not org.docx4j.jaxb.NamespacePrefixMapper
   at com.sun.xml.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:511)
ERROR org.docx4j.jaxb.Context - PANIC! No suitable JAXB implementation available
ERROR org.docx4j.jaxb.Context - JAXB: neither Reference Implementation nor Java 6 implementation present? javax.xml.bind.JAXBException: JAXB: neither Reference Implementation nor Java 6 implementation present?
   at org.docx4j.jaxb.NamespacePrefixMapperUtils.tryUsingRI(NamespacePrefixMapperUtils.java:91)

I don't know what to do. Can you help me please?

Jonas version : 5.2.2
Java version : 1.7.0_02
docx4j version : 3.0.1

Julie

Re: Docx4j and Jonas

PostPosted: Sat Feb 22, 2014 9:38 am
by jason
Are you using the same version of Java in Eclipse? Provided you aren't using the JAXB reference implementation (eg via endorsed dir mechanism), that would prove the JAXB in your JVM is playing nicely with docx4j.

If that's the case, I wonder what JONAS is doing differently. (Maybe it uses some different JAXB) See http://jira.ow2.org/browse/JONAS-968 ..

Googling "jonas.ow2.org endorsed" the results include "Mastering JOnAS ClassLoaders" PDF. It might be worth having a look at that. See also http://jonas.ow2.org/JONAS_5_1_1/doc/do ... lassloader

You could try adding the JAXB reference implementation

Re: Docx4j and Jonas

PostPosted: Tue Feb 25, 2014 6:46 pm
by julie
Hi!

Thanks for your reply! But it doesn't help me. I already add jaxb library (jaxb-impl, jaxb-xjc, jaxb-api, jaxb-core, jaxb-jxc) in the lib/ext in Jonas. It doesn't do nothing.

I tried yesterday to deploy my app on a jonas 5.3 but I have other errors that prevents me.

Someone else have an idea, please?

Julie