Error on converting word file to HTML

When we deploy our product on JBOSS we are seeing the following exception when we try to convert word document into HTML using aspose. We tried with the latest version of aspose or words (14.+). We do not see the issue when deployed on Websphere. The issue is more prevalent with documents that have images in them.

java.lang.LinkageError: loader constraint violation: when resolving method "javax.imageio.metadata.IIOMetadata.getAsTree(Ljava/lang/String;)Lorg/w3c/dom/Node;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, asposewobfuscated/zzOX, and the class loader (instance of ) for resolved class, javax/imageio/metadata/IIOMetadata, have different Class objects for the type org/w3c/dom/Node used in the signature
at asposewobfuscated.zzOX.zzZ(Unknown Source)
at asposewobfuscated.zzOY.zzp(Unknown Source)
at com.aspose.words.zzZ78.zzZI(Unknown Source)
at com.aspose.words.zzZ78.zzZ(Unknown Source)
at com.aspose.words.ShapeRenderer.zzZ(Unknown Source)
at com.aspose.words.zzZS9.zzZ(Unknown Source)
at com.aspose.words.zzZS9.zzZPf(Unknown Source)
at com.aspose.words.zzZS9.zzZ(Unknown Source)
at com.aspose.words.zzZNT.zzO(Unknown Source)
at com.aspose.words.zzZNS.zzM(Unknown Source)
at com.aspose.words.zzZNX.visitShapeStart(Unknown Source)
at com.aspose.words.Shape.zzZ(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Shape.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Paragraph.accept(Unknown Source)
at com.aspose.words.CompositeNode.acceptChildren(Unknown Source)
at com.aspose.words.CompositeNode.acceptCore(Unknown Source)
at com.aspose.words.Body.accept(Unknown Source)
at com.aspose.words.zzZZQ.zzl(Unknown Source)
at com.aspose.words.zzZZQ.zzZ(Unknown Source)
at com.aspose.words.zzZZQ.zzY(Unknown Source)
at com.aspose.words.zzZZQ.writeBody(Unknown Source)
at com.aspose.words.zzZZQ.zz6N(Unknown Source)
at com.aspose.words.zzZZQ.zzZTu(Unknown Source)
at com.aspose.words.zzZW6.zzZ(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.bci.author.domain.dataImport.WordFileReader.readContent(WordFileReader.java:435)
at com.bci.author.domain.handler.ImportProcessHandler.importContentFromFile(ImportProcessHandler.java:158)
at com.bci.author.view.actions.FileUploadServlet.sendToHandler(FileUploadServlet.java:393)
at com.bci.author.view.actions.FileUploadServlet.doPost(FileUploadServlet.java:209)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.internalProcess(ActiveRequestResponseCacheValve.java:74)
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:47)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:599)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
at java.lang.Thread.run(Thread.java:662)
Also can you please let me know the version of org/w3c/dom/Node jar files used in Aspose.word (10.3.0.0 and in aspose latest version both).

Hi Jose,

Thanks for your inquiry.

bviggiano:

When we deploy our product on JBOSS we are seeing the following exception when we try to convert word document into HTML using aspose.

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v14.8.0) from here and let us know how it goes on your side. If the problem still remains, please share following detail for investigation purposes.

  • Please attach your input Word document.
  • Please

    create a standalone/runnable simple Java application that demonstrates the code (Aspose.Words code) you used to generate
    your output document.


Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we’ll start our investigation into your issue.
bviggiano:

Also can you please let me know the version of org/w3c/dom/Node jar files used in Aspose.word (10.3.0.0 and in aspose latest version both).

Unfortunately, we don’t provide support for older released versions of Aspose.Words. Please use the latest version of Aspose.Words for Java 14.8.0.