Weblogic 使用jdk裡的轉tiff程式

作者: cug990617 (CUG)   2016-06-13 20:02:50
系統:Linux, Weblogic12c, jdk7
Linux環境變數有設定
這是一個排程系統,每天只會運作此java檔一次,使用jdk裡的轉tiff程式(將多張圖檔轉換成一張tiff檔),有時可以正常執行(代表程式沒有問題),但是運作幾天後,會突然發生Exception,如下:
Exception in thread "upLoadTiff" java.lang.NoClassDefFoundError: com/sun/media/imageio/stream/RawImageInputStream
at com.sun.media.imageioimpl.plugins.raw.RawImageReaderSpi.canDecodeInput(RawImageReaderSpi.java:99)
at javax.imageio.ImageIO$CanDecodeInputFilter.filter(ImageIO.java:567)
at javax.imageio.spi.FilterIterator.advance(ServiceRegistry.java:810)
at javax.imageio.spi.FilterIterator.next(ServiceRegistry.java:828)
at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:528)
at javax.imageio.ImageIO$ImageReaderIterator.next(ImageIO.java:513)
at javax.imageio.ImageIO.read(ImageIO.java:1443)
at javax.imageio.ImageIO.read(ImageIO.java:1308)
at com.backend.upLoadTiff._SaveTiffImageIO(upLoadTiff.java:523)
at com.backend.upLoadTiff._ExecJob(upLoadTiff.java:135)
at com.backend.upLoadTiff.main(upLoadTiff.java:869)
Caused by: java.lang.ClassNotFoundException: com.sun.media.imageio.stream.RawImageInputStream
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:335)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:64)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:180)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:43)
發生Exception時,重Weblogic後又正常…但過幾天後又發生同樣的錯誤訊息…
這個錯誤訊息確定是由Weblogic吐出來的,因為程式裡我有包try catch (Exception),錯誤訊息是從Weblogic的log發現的!
希望有人可以給我方向解決這個問題或可以分享處理此問題方法…
手機排版,若有不好閱讀的地方請見諒。
作者: pico2k (風月)   2016-06-13 20:28:00
檢查lib相關路徑內是否有jai_imageio.jar

Links booklink

Contact Us: admin [ a t ] ucptt.com