You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently have a WebSphere traditional (8.5.5.9 java EE 6/java SE 7) running an application using docx4j v3.2.2 This application has been running for years without problems. We are currently migrating our application to WebSphere Liberty (20.0.0.8 java EE 8/java SE 8). WebSphere Liberty is a modular OSGI based application server. We tried several different versions of docx4j but they all seem to have problems running within the OSGI container.
Currently we are getting an exception in the following part of the docx4j code
private static Object tryUsingRI(Marshaller m)
throws JAXBException {
try {
Class c = Class.forName("org.docx4j.jaxb.ri.NamespacePrefixMapper");
prefixMapper = c.newInstance();
// Weird 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.ri.NamespacePrefixMapper
// at com.sun.xml.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:502)
// with ServiceMix 5.4.1 and org.apache.servicemix.bundles.jaxb-impl 2.2.11_1
// Recommend you upgrade to ServiceMix 7.0.1, which works
m.setProperty("com.sun.xml.bind.namespacePrefixMapper", prefixMapper );
// Try RI suitable one
log.info("Using ri.NamespacePrefixMapper, which is suitable for the JAXB RI");
return prefixMapper;
} catch (Exception e) {
//log.error("JAXB: Can't instantiate JAXB Reference Implementation", e);
throw new JAXBException("JAXB: Can't instantiate JAXB Reference Implementation", e);
}
}
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.ri.NamespacePrefixMapper
We read the comment about ServiceMix but in our instance this does not apply. Is there anything we can do from a point of configuration of our maven setup or other setup that could solve our problem ?
The text was updated successfully, but these errors were encountered:
Yes I did, but I have no idea how this karaf solution will help us with our websphere liberty situation. We decided to clone the repository and are attempting now to write a solution for liberty in NamespacePrefixMapperUtils. I'll keep this updated if we find a solution. If it's generic enough we could open a pull request to your main project.
Hey,
We currently have a WebSphere traditional (8.5.5.9 java EE 6/java SE 7) running an application using docx4j v3.2.2 This application has been running for years without problems. We are currently migrating our application to WebSphere Liberty (20.0.0.8 java EE 8/java SE 8). WebSphere Liberty is a modular OSGI based application server. We tried several different versions of docx4j but they all seem to have problems running within the OSGI container.
Currently we are getting an exception in the following part of the docx4j code
We read the comment about ServiceMix but in our instance this does not apply. Is there anything we can do from a point of configuration of our maven setup or other setup that could solve our problem ?
The text was updated successfully, but these errors were encountered: