提问者:小点点

我升级了hibernate-validator版本6.1.5和应用程序不工作的是8.5.5.17


除了我使用我的应用程序的许多组件之外:

  • Spring Framework(版本4.3.20. RELEASE)
  • Hibernate(版本4.3.11.Final)

我决定将hibernate-validator组件从版本5.4.3.Final升级到6.1.5.Final。当我在was上部署和运行我的应用程序时,我收到了错误:由java. lang.ClassNotFoundException:javax.el.ELManager引起。在Tomcat 9上一切正常。

我找到了一些想法。第一个来自https://hibernate.org/validator/documentation/getting-started/.它说:

Hibernate Validator also requires an implementation of the Unified Expression
Language (JSR 341) for evaluating dynamic expressions in constraint violation messages.
For instance, you can add the following dependency to use the JSR 341 reference
implementation:
<dependency>
   <groupId>org.glassfish</groupId>
   <artifactId>javax.el</artifactId>
   <version></version>
</dependency>

秒来自链接,几乎是一样的:

Add:
<dependency>
    <groupId>javax.el</groupId>
    <artifactId>javax.el-api</artifactId>
    <version>3.0.0</version>
</dependency>

我实现了这两种解决方案,但当我尝试到达登录页面时,我收到了新的错误:

2020-07-13T11:54:59,068 ERROR DbLogEntryDao                  - sun.reflect.NativeMethodAccessorImpl.invoke0 (location: NativeMethodAccessorImpl.java:-2) Unexpected error at server dockerhost: [java.lang.Exception [1594641299057] : status code 500 :java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/ibm/_jsp/_unk_5F_menu, method=_jspx_meth_c_forEach_0(Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z, pc=75; Type Mismatch, argument 1 in signature org/apache/jasper/el/ELContextWrapper.<init>:(Ljavax/el/ELContext;Ljavax/el/FunctionMapper;)V does not match
Exception Details:
  Location:
    com/ibm/_jsp/_unk_5F_menu._jspx_meth_c_forEach_0(Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z @75: JBinvokespecial
  Reason:
    Type 'org/apache/jasper/runtime/ProtectedFunctionMapper' (current frame, stack[8]) is not assignable to 'javax/el/FunctionMapper'
  Current Frame:
    bci: @75
    flags: { }
    locals: { 'com/ibm/_jsp/_unk_5F_menu', 'javax/servlet/jsp/tagext/JspTag', 'javax/servlet/jsp/PageContext', 'javax/servlet/jsp/JspWriter', 'org/apache/taglibs/standard/tag/rt/core/ForEachTag' }
    stack: { 'org/apache/taglibs/standard/tag/rt/core/ForEachTag']
2020-07-13T11:54:59,087 ERROR ErrorPageControllerMIGRATION   - Unexpected error
java.lang.Exception: java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/ibm/_jsp/_unk_5F_menu, method=_jspx_meth_c_forEach_0(Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z, pc=75; Type Mismatch, argument 1 in signature org/apache/jasper/el/ELContextWrapper.<init>:(Ljavax/el/ELContext;Ljavax/el/FunctionMapper;)V does not match
Exception Details:
  Location:
    com/ibm/_jsp/_unk_5F_menu._jspx_meth_c_forEach_0(Ljavax/servlet/jsp/tagext/JspTag;Ljavax/servlet/jsp/PageContext;)Z @75: JBinvokespecial
  Reason:
    Type 'org/apache/jasper/runtime/ProtectedFunctionMapper' (current frame, stack[8]) is not assignable to 'javax/el/FunctionMapper'
  Current Frame:
    bci: @75
    flags: { }
    locals: { 'com/ibm/_jsp/_unk_5F_menu', 'javax/servlet/jsp/tagext/JspTag', 'javax/servlet/jsp/PageContext', 'javax/servlet/jsp/JspWriter', 'org/apache/taglibs/standard/tag/rt/core/ForEachTag' }
    stack: { 'org/apache/taglibs/standard/tag/rt/core/ForEachTag', 'uninitialized', 'uninitialized', 'java/lang/String', 'javax/el/ExpressionFactory', 'uninitialized', 'uninitialized', 'javax/el/ELContext', 'org/apache/jasper/runtime/ProtectedFunctionMapper' }
  Exception Handler Table:
    bci [113, 149] => handler: 260
    bci [156, 175] => handler: 260
    bci [182, 201] => handler: 260
    bci [208, 253] => handler: 260
    bci [113, 149] => handler: 297
    bci [156, 175] => handler: 297
    bci [182, 201] => handler: 297
    bci [208, 253] => handler: 297
    bci [260, 289] => handler: 297
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadServlet(ServletWrapper.java:1581) ~[com.ibm.ws.webcontainer.jar:?]

你知道什么会导致这种情况吗?我也找到了一些解决方案,但它不适用于我,因为我使用常规的是。


共1个答案

匿名用户

这个链接怎么样:

https://developer.ibm.com/wasdev/downloads/#asset/features-com.ibm.websphere.appserver.el-3.0

使用feature ureManager命令,例如:

bin/featureManager install el-3.0 --when-file-exists=ignore