java.lang.LinkageError:加载器约束违规:解析接口方法时“javax.servlet.jsp.JspApplicationContext.getExpressionFactory()

时间:2014-03-07 17:24:45

标签: java loader linkageerror

我在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自由不起作用,并审查几个类似的帖子,但没有解决方案可以修复

这是如何引起的?如何解决?

0 个答案:

没有答案