栏目:应用服务器(<--点此查看更多)Java 应用服务器,Tomcat|Weblogic|Jboss|WebSphere相关信息
  • NoClassDefFoundError: javax/el/ExpressionFactory Weblogic 启动错误

  • Mon Jan 21 23:09:03 CST 2013 编程者 我要收藏(...) 评论 ...
  • Weblogic 启动错误:java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
  • 在一次程序发布过程中遇到这个问题,虽然比较简单但还是对我们造成了比较大的影响,我们有四个环境,发布包在其他 3 个环境下均没有出现问题,最终发布的时候却出现了问题,怀疑是环境差异造成的,但几番检查之后,也未找到不同环境之间的差异,只能本着“缺什么补什么”的原则先解决问题。现总结如下:
    (系统及环境信息请参考 Weblogic 输入的日志信息)

    .
    .
    JAVA Memory arguments: -Xms256m -Xmx512m  -XX:MaxPermSize=128m
    .
    WLS Start Mode=Production
    .
    CLASSPATH=:/app/wls9/bea/patch_weblogic923/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/app/wls9/jrockit-R27.5.0-jdk1.5.0_14/lib/tools.jar:/app/wls9/bea/weblogic92/server/lib/weblogic_sp.jar:/app/wls9/bea/weblogic92/server/lib/weblogic.jar:/app/wls9/bea/weblogic92/server/lib/webservices.jar::/app/wls9/bea/weblogic92/common/eval/pointbase/lib/pbclient51.jar:/app/wls9/bea/weblogic92/server/lib/xqrl.jar::
    .
    PATH=/app/wls9/bea/weblogic92/server/bin:/app/wls9/jrockit-R27.5.0-jdk1.5.0_14/jre/bin:/app/wls9/jrockit-R27.5.0-jdk1.5.0_14/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/cpic/sxcpkf/bin
    .
    ***************************************************
    *  To start WebLogic Server, use a username and   *
    *  password assigned to an admin-level user.  For *
    *  server administration, use the WebLogic Server *
    *  console at http://hostname:port/console        *
    ***************************************************
    starting weblogic with Java version:
    java version "1.5.0_14"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03)
    BEA JRockit(R) (build R27.5.0-110_o-99226-1.5.0_14-20080528-1505-linux-x86_64, compiled mode)
    Starting WLS with line:
    /app/wls9/jrockit-R27.5.0-jdk1.5.0_14/bin/java -server   -Xms256m -Xmx512m  -XX:MaxPermSize=128m   -da -Dplatform.home=/app/wls9/bea/weblogic92 -Dwls.home=/app/wls9/bea/weblogic92/server -Dwli.home=/app/wls9/bea/weblogic92/integration  -Dweblogic.management.discover=true  -Dwlw.iterativeDev=false -Dwlw.testConsole=false -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=/app/wls9/bea/patch_weblogic923/profiles/default/sysext_manifest_classpath -Dweblogic.Name=AdminServer -Djava.security.policy=/app/wls9/bea/weblogic92/server/lib/weblogic.policy   weblogic.Server
    [WARN ] -XX:MaxPermSize=128m is not a valid VM option. Ignoring
    <2013-1-19 上午01时37分26秒 CST> <Notice> <WebLogicServer> <BEA-000395> <Following extensions directory contents added to the end of the classpath:
    /app/wls9/bea/weblogic92/platform/lib/p13n/p13n-schemas.jar:/app/wls9/bea/weblogic92/platform/lib/p13n/p13n_common.jar:/app/wls9/bea/weblogic92/platform/lib/p13n/p13n_system.jar:/app/wls9/bea/weblogic92/platform/lib/wlp/netuix_common.jar:/app/wls9/bea/weblogic92/platform/lib/wlp/netuix_schemas.jar:/app/wls9/bea/weblogic92/platform/lib/wlp/netuix_system.jar:/app/wls9/bea/weblogic92/platform/lib/wlp/wsrp-common.jar>
    <2013-1-19 上午01时37分27秒 CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.5.0-110_o-99226-1.5.0_14-20080528-1505-linux-x86_64 from BEA Systems, Inc.>
    <2013-1-19 上午01时37分29秒 CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 9.2 MP3  Mon Mar 10 08:28:41 EDT 2008 1096261 >
    <2013-1-19 上午01时37分31秒 CST> <Info> <WebLogicServer> <BEA-000215> <Loaded License : /app/wls9/bea/license.bea>
    <2013-1-19 上午01时37分31秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <2013-1-19 上午01时37分31秒 CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
    <2013-1-19 上午01时37分32秒 CST> <Notice> <Log Management> <BEA-170019> <The server log file /cpic/sxcpkf/user_projects/domains/prod_domain/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
    <2013-1-19 上午01时37分35秒 CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <2013-1-19 上午01时37分40秒 CST> <Notice> <Security> <BEA-090171> <Loading the identity certificate and private key stored under the alias DemoIdentity from the jks keystore file /app/wls9/bea/weblogic92/server/lib/DemoIdentity.jks.>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /app/wls9/bea/weblogic92/server/lib/DemoTrust.jks.>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <Security> <BEA-090169> <Loading trusted certificates from the jks keystore file /app/wls9/jrockit-R27.5.0-jdk1.5.0_14/jre/lib/security/cacerts.>
    <2013-1-19 上午01时37分41秒 CST> <Alert> <Security> <BEA-090152> <Demo trusted CA certificate is being used in production mode: [
    The system is vulnerable to security attacks, since it trusts certificates signed by the demo trusted CA.>
    <2013-1-19 上午01时37分41秒 CST> <Warning> <Server> <BEA-002611> <Hostname "SXCPGLAPP171", maps to multiple IP addresses: 10.190.117.171, 127.0.0.1>
    <2013-1-19 上午01时37分41秒 CST> <Warning> <Server> <BEA-002611> <Hostname "localhost.localdomain", maps to multiple IP addresses: 10.190.117.171, 127.0.0.1>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <Server> <BEA-002613> <Channel "DefaultAdministration" is now listening on 10.190.117.171:9002 for protocols admin, ldaps, https.>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <Server> <BEA-002613> <Channel "DefaultAdministration[1]" is now listening on 127.0.0.1:9002 for protocols admin, ldaps, https.>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
    <2013-1-19 上午01时37分41秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
    <2013-1-19 上午01时37分47秒 CST> <Error> <HTTP> <BEA-101163> <Could not load user defined listener: com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
        at java.lang.Class.getConstructor0(Class.java:2671)
        at java.lang.Class.newInstance0(Class.java:321)
        at java.lang.Class.newInstance(Class.java:303)
        Truncated. see log file for complete stacktrace
    >

    <2013-1-19 上午01时37分47秒 CST> <Error> <Deployer> <BEA-149205> <Failed to initialize the application 'ipm' due to error weblogic.application.ModuleException: .
    weblogic.application.ModuleException:
        at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:292)
        at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:360)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
        Truncated. see log file for complete stacktrace
    java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
        at java.lang.Class.getConstructor0(Class.java:2671)
        at java.lang.Class.newInstance0(Class.java:321)
        at java.lang.Class.newInstance(Class.java:303)
        Truncated. see log file for complete stacktrace
    >

    log4j:ERROR Could not find value for key log4j.appender.debug
    log4j:ERROR Could not instantiate appender named "debug".
    <2013-1-19 上午01时38分04秒 CST> <Notice> <Log Management> <BEA-170027> <The server initialized the domain log broadcaster successfully. Log messages will now be broadcasted to the domain log.>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.190.117.171:7001 for protocols iiop, t3, ldap, http.>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, http.>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <WebLogicServer> <BEA-000329> <Started WebLogic Admin Server "AdminServer" for domain "prod_domain" running in Production Mode>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
    <2013-1-19 上午01时38分05秒 CST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

    造成此错误的原因是缺少包含 javax.el.ExpressionFactory 类的 javaee.jar 处理的方式有两种:
    第一种是将 javaee.jar 放入应用程序的 lib 目录下,就是添加 javaee.jar 的引用;
    第二种是将 javaee.jar 放入 Weblogic 域目录下的 lib 目录下;
    两种方式请视情况选择,如果仍然不能解决问题,那么可以尝试加入其它包含
    javax.el.ExpressionFactory 类的 jar 包,祝您顺利解决问题。
  • 信息来源:http://bianchengzhe.com (举报这篇文章)
  • 好评(...) 中评(...) 差评(...)