1. <legend id='YuOJb'><style id='YuOJb'><dir id='YuOJb'><q id='YuOJb'></q></dir></style></legend>

    <small id='YuOJb'></small><noframes id='YuOJb'>

    <i id='YuOJb'><tr id='YuOJb'><dt id='YuOJb'><q id='YuOJb'><span id='YuOJb'><b id='YuOJb'><form id='YuOJb'><ins id='YuOJb'></ins><ul id='YuOJb'></ul><sub id='YuOJb'></sub></form><legend id='YuOJb'></legend><bdo id='YuOJb'><pre id='YuOJb'><center id='YuOJb'></center></pre></bdo></b><th id='YuOJb'></th></span></q></dt></tr></i><div id='YuOJb'><tfoot id='YuOJb'></tfoot><dl id='YuOJb'><fieldset id='YuOJb'></fieldset></dl></div>
  2. <tfoot id='YuOJb'></tfoot>

        <bdo id='YuOJb'></bdo><ul id='YuOJb'></ul>
    1. 加载程序约束违规

      时间:2023-07-28
        <tbody id='WX3p5'></tbody>
      <i id='WX3p5'><tr id='WX3p5'><dt id='WX3p5'><q id='WX3p5'><span id='WX3p5'><b id='WX3p5'><form id='WX3p5'><ins id='WX3p5'></ins><ul id='WX3p5'></ul><sub id='WX3p5'></sub></form><legend id='WX3p5'></legend><bdo id='WX3p5'><pre id='WX3p5'><center id='WX3p5'></center></pre></bdo></b><th id='WX3p5'></th></span></q></dt></tr></i><div id='WX3p5'><tfoot id='WX3p5'></tfoot><dl id='WX3p5'><fieldset id='WX3p5'></fieldset></dl></div>

      <legend id='WX3p5'><style id='WX3p5'><dir id='WX3p5'><q id='WX3p5'></q></dir></style></legend>

        <bdo id='WX3p5'></bdo><ul id='WX3p5'></ul>
                <tfoot id='WX3p5'></tfoot>

              1. <small id='WX3p5'></small><noframes id='WX3p5'>

                本文介绍了加载程序约束违规的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我在一个项目中遇到了两次相同的 .jar(对我来说是 el-api.jar v2.1)的问题,因此,当我尝试使用 Tomcat 6 运行我的项目时出现以下错误堆栈.

                I encountered the problem of having the same .jar (for my case, el-api.jar v2.1)twice for one project, hence, the following error stack when I try to run my project using Tomcat 6.

                WARNING: Unexpected error forwarding to login page
                javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/login_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
                
                 at java.lang.Thread.run(Thread.java:619)
                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 org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/login_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
                

                我找到了http://blog.springsource.com/2008/10/20/understanding-the-osgi-uses-directive/

                但这没有用,因为解决方案影响了我项目的太多部分.

                but that is not useful as the solution effects too many parts of my project.

                我无法对 Tomcat 进行任何更改,并且该项目将被许多其他用户使用.

                I can't make any changes to the Tomcat as well as the project will be used by many other user.

                当前的解决方法是每次我们进行构建并使用 Tomcat6 时手动删除 el-api.jar.然后我们需要把 .jar 放回去,因为这是其他东西的要求.

                The current work around is to manuelly delete the el-api.jar every time we do a build AND uses Tomcat6. Then we need to put the .jar back as that is requested for other stuff.

                我使用 Maven 2 和 Maven 3 构建.(顺便说一句,有人知道在 Jruby 上使用 Maven3 吗?)

                I am used Maven 2 and Maven 3 to build. (btw, did anyone know about use Maven3 on Jruby?)

                谁能帮我解决这个问题?

                Can anyone help me with the issue?

                推荐答案

                我在一个项目中遇到了两次相同的 .jar(对我来说是 el-api.jar v2.1)的问题,因此,当我尝试使用 Tomcat 6 运行我的项目时出现以下错误堆栈.

                I encountered the problem of having the same .jar (for my case, el-api.jar v2.1)twice for one project, hence, the following error stack when I try to run my project using Tomcat 6.

                如果是,则将 el-api.jar 工件标记为 provided.

                Then mark the el-api.jar artifact as provided, if it is.

                当前的解决方法是每次我们进行构建并使用 Tomcat6 时手动删除 el-api.jar.然后我们需要把 .jar 放回去,因为这是其他东西的要求.

                The current work around is to manuelly delete the el-api.jar every time we do a build AND uses Tomcat6. Then we need to put the .jar back as that is requested for other stuff.

                处理此问题的更好方法是在配置文件中声明依赖项并将其标记为 provided(例如在tomcat6"配置文件中)或不根据需要.

                A much better way to handle this would be to declare the dependency inside profiles and to mark it as provided (e.g. in a "tomcat6" profile) or not depending on the needs.

                这篇关于加载程序约束违规的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:是否可以仅从一个特定分支触发 Jenkins? 下一篇:进行持续交付时,自动项目版本的 Maven 方式是什

                相关文章

                最新文章

              2. <i id='vRHC9'><tr id='vRHC9'><dt id='vRHC9'><q id='vRHC9'><span id='vRHC9'><b id='vRHC9'><form id='vRHC9'><ins id='vRHC9'></ins><ul id='vRHC9'></ul><sub id='vRHC9'></sub></form><legend id='vRHC9'></legend><bdo id='vRHC9'><pre id='vRHC9'><center id='vRHC9'></center></pre></bdo></b><th id='vRHC9'></th></span></q></dt></tr></i><div id='vRHC9'><tfoot id='vRHC9'></tfoot><dl id='vRHC9'><fieldset id='vRHC9'></fieldset></dl></div>
                  <bdo id='vRHC9'></bdo><ul id='vRHC9'></ul>

                <small id='vRHC9'></small><noframes id='vRHC9'>

              3. <legend id='vRHC9'><style id='vRHC9'><dir id='vRHC9'><q id='vRHC9'></q></dir></style></legend>

                  <tfoot id='vRHC9'></tfoot>