1

我在 Eclipse IDE 中使用 JSF 2.1.13 和 Spring 3.1.3。当我尝试在 WAS liberty 8.5 中进行部署时,出现以下错误:

[err] log4j:WARN No appenders could be found for logger 

(org.springframework.web.context.ContextLoader).
[err] log4j:WARN Please initialize the log4j system properly.
[err] log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[ERROR   ] Critical error during deployment: 
loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of com/ibm/ws/classloading/internal/ParentLastClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type licationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; used in the signature
[ERROR   ] SRVE0283E: Se ha detectado una excepción al inicializar el contexto: java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of com/ibm/ws/classloading/internal/ParentLastClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type licationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; used in the signature
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:290)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2220)
    at [internal classes]
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of com/ibm/ws/classloading/internal/ParentLastClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type licationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; used in the signature
    at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:690)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:241)
    ... 2 more

[ERROR   ] SRVE0265E: Se ha producido un error al notificar a los escuchas el inicio de la aplicación web: java.lang.RuntimeException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of com/ibm/ws/classloading/internal/ParentLastClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type licationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; used in the signature
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:290)
    at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:2220)
    at [internal classes]
Caused by: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of com/ibm/ws/classloading/internal/ParentLastClassLoader) of the current class, com/sun/faces/config/ConfigureListener, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type licationContext.getExpressionFactory()Ljavax/el/ExpressionFactory; used in the signature
    at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:690)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:241)
    ... 2 more     

我的 pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.telecom.telcel.sirefuV2</groupId>
    <artifactId>SIREFU_V2</artifactId>
    <version>0.0.1-SNAPSHOT</version>

    <name>SIREFU_V2</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <j-everis.version>3.0.0-RELEASE</j-everis.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>com.jeveris</groupId>
            <artifactId>j-everis-web-primefaces</artifactId>
            <version>${j-everis.version}</version>
            <exclusions>
                <!-- <exclusion> -->
                <!-- <artifactId>javax.el-api</artifactId> -->
                <!-- <groupId>javax.el</groupId> -->
                <!-- </exclusion> -->
                <exclusion>
                    <artifactId>jsf-impl</artifactId>
                    <groupId>com.sun.faces</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>aspectjweaver</artifactId>
                    <groupId>org.aspectj</groupId>
                </exclusion>

                <exclusion>
                    <artifactId>asm</artifactId>
                    <groupId>asm</groupId>
                </exclusion>

                <exclusion>
                    <artifactId>jstl</artifactId>
                    <groupId>javax.servlet</groupId>
                </exclusion>
                <!--coment para liberty <exclusion> -->
                <!-- <artifactId>javax.el-api</artifactId> -->
                <!-- <groupId>javax.el</groupId> -->
                <!-- </exclusion> -->

                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
            </exclusions>
        </dependency>




        <dependency>
            <groupId>org.primefaces</groupId>
            <artifactId>primefaces</artifactId>
            <version>3.5</version>
        </dependency>

        <!-- JSR-330 -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>

        <!-- JSF -->
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>com.sun.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>2.0.3</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.1.3.RELEASE</version>
            <exclusions>
                <exclusion>
                    <artifactId>commons-logging</artifactId>
                    <groupId>commons-logging</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.1.3.RELEASE</version>

        </dependency>


    </dependencies>


</project>

我已将项目部署到 tomcat 并运行,但我可以在 WAS 自由不工作,并查看几个类似的帖子,但没有解决方案可以解决

这是如何引起的,我该如何解决?

4

0 回答 0