1

I have a project based in Spring Web model-view-controller (MVC) framework. The version of the Spring Web model-view-controller (MVC) framework is 3.2.8 deployed on a WebLogic Server Version: 12.1.2.0.0

I have this error:

]] Root cause of ServletException.
com.google.common.util.concurrent.ExecutionError: java.lang.NoClassDefFoundError: com/github/jaiimageio/impl/plugins/bmp/BMPImageReader
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2212)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4053)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4057)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4986)
    at com.tdk.iot.utils.DeviceCache.get(DeviceCache.java:42)
    Truncated. see log file for complete stacktrace
Caused By: java.lang.NoClassDefFoundError: com/github/jaiimageio/impl/plugins/bmp/BMPImageReader
    at com.github.jaiimageio.impl.plugins.bmp.BMPImageReaderSpi.createReaderInstance(BMPImageReaderSpi.java:123)
    at javax.imageio.spi.ImageReaderSpi.createReaderInstance(ImageReaderSpi.java:320)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:529)
    at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
    at javax.imageio.ImageIO.read(ImageIO.java:1443)
    Truncated. see log file for complete stacktrace

I've checked the ear and I have already included these jars:

jai-imageio-core-1.3.1.jar
jai_codec.jar
ai_core.jar
mlibwrapper_jai.jar

The Curious think is that the same ear works fine in my localhost, but not in anoher server with the same configuration

Here When I find the class in my eclipse:

enter image description here

I also added this to weblogic-application.xml

<prefer-application-packages>
   <package-name>com.github.jaiimageio.*</package-name>
</prefer-application-packages>
Amadeu Cabanilles
  • 913
  • 3
  • 19
  • 47
  • did you try to isolate the class-loader by loading classes first from your webapp? – Angelo Immediata Jan 24 '17 at 15:33
  • Adding on @AngeloImmediata Did you check up if your class has been correctly loaded by class loader or not.Try this may be http://stackoverflow.com/questions/482633/in-java-is-it-possible-to-know-whether-a-class-has-already-been-loaded – Shivam Aggarwal Jan 25 '17 at 07:20
  • 1
    You can also use the integrated classloader analysis tool, usually found at http://localhost:7001/wls-cat (only works in development mode) – Slettal Jan 25 '17 at 07:41

0 Answers0