WebLogic - Jar在那里,但NoClassDefFoundError:org / apache / commons / io / IOUtils

时间:2015-04-08 16:54:43

标签: java maven jar weblogic

将ear(myapp.ear)部署到weblogic 12.1.3时出现部署错误。错误:

  

NoClassDefFoundError:org / apache / commons / io / IOUtils

注意:

  1. 编译好:mvn clean; mvn install
  2. EAR有 APP-INF / lib / commons-io-2.4.jar 有哪个类
  3. 想到也许是一个罐子冲突。 weblogic有2个jars w / same package.class(wlserver / modules / com.bea.core.apache.commons.io_1.2.0.0_1-4.jar& wlserver / modules / features / weblogic.server.merged.jar)但是......那些不在课堂上
  4. 再次尝试将jar添加到app(scope = provided - pom.xml)但错误相同
  5. 实际错误:

    ####<Apr 7, 2015 8:12:01 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451921167> <BEA-423147> <Exception [com.bea.portlet.adapter.scopedcontent.ActionLookupFailedException: java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils] thrown while trying to do task [handlePostbackData] in class [com.bea.netuix.servlets.controls.content.PageFlowContent].> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922415> <BEA-423405> <An exception [java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils] was thrown while rendering the content at [null].> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922415> <BEA-423137> <There was an error loading the requested URI null.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922431> <BEA-423223> <There was an error while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control :: null ::.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423405> <An exception [java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils] was thrown while rendering the content at [/com/bea/console/actions/app/install/Flow.jpf].> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423137> <There was an error loading the requested URI /com/bea/console/actions/app/install/Flow.jpf.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423223> <There was an error while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control :: null ::.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423405> <An exception [java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils] was thrown while rendering the content at [null].> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423137> <There was an error loading the requested URI null.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922446> <BEA-423223> <There was an error while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control :: null ::.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922477> <BEA-423405> <An exception [java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils] was thrown while rendering the content at [null].> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922477> <BEA-423137> <There was an error loading the requested URI null.> 
    ####<Apr 7, 2015 8:12:02 PM EDT> <Error> <netuix> <IBMADM-BL787D> <myserver> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <> <1428451922477> <BEA-423223> <There was an error while running a lifecycle stage :: Lifecycle: UIControl.render :: for the control :: null ::.> 
    

1 个答案:

答案 0 :(得分:0)

请参阅<prefer-web-inf-classes><prefer-application-packages>

http://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogic_xml.htm#WBAPP602

类似的问题如下:

How to set order of jars in WebLogic?

我会首先尝试<prefer-application-packages>解决方案。

然而,NoClassDef意味着该字体确实找不到。你编译它但它不再在类路径上(所以也检查你的耳朵的结构)。请参阅:What causes and what are the differences between NoClassDefFoundError and ClassNotFoundException?