LinkageError in Websphere (IIOMetadata.getAsTree)

1

I have a web application mounted on a Websphere, in which I export to excel using the mythical poi library. And I missed a Linkage error when executing the next sentence, it is just in the line of pict.resize ();

 Picture pict = drawing.createPicture(anchor, pictureIdx);
 // ajustar imagen al ancho de las columnas
 pict.resize(1.084018264840183D); //linea problemática

The error it produces is as follows:

java.lang.LinkageError: loading constraint violation when resolving method "javax/imageio/metadata/IIOMetadata.getAsTree(Ljava/lang/String;)Lorg/w3c/dom/Node;" : loader "com/ibm/ws/classloader/CompoundClassLoader@a60f1997" of class "org/apache/poi/ss/util/ImageUtils" and loader "com/ibm/oti/vm/BootstrapClassLoader@123472f2" of class "javax/imageio/metadata/IIOMetadata" have different types for the method signature
at org.apache.poi.ss.util.ImageUtils.getResolution(ImageUtils.java:106)
at org.apache.poi.ss.util.ImageUtils.getImageDimension(ImageUtils.java:68)
at org.apache.poi.xssf.usermodel.XSSFPicture.getImageDimension(XSSFPicture.java:278)
at org.apache.poi.xssf.usermodel.XSSFPicture.getPreferredSize(XSSFPicture.java:203)
at org.apache.poi.xssf.usermodel.XSSFPicture.resize(XSSFPicture.java:170)

I understand that it is a problem of the libraries that is loading the classloader, but I can not identify which, I am clear that the problematic method is "IIOMetadata.getAsTree ()", which tells me that it is declared differently in the classes ImageUtils (from poi.jar) and IIOMetadata (from rt.jar that is from sdk).

    
asked by Damian Roa 21.08.2017 в 13:59
source

0 answers