Struts2 ClassNotFoundException:AbstractInterceptor for 2.5.10.1

时间:2017-11-01 16:27:11

标签: java struts2

我得到了这个堆栈跟踪。它似乎是在加载jar本身之前尝试加载一个拦截器。但是Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.interceptor.AbstractInterceptor [java] at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:357) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_51] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_51] [java] at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.7.0_51] [java] at java.lang.ClassLoader.defineClass(ClassLoader.java:800) ~[?:1.7.0_51] [java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.7.0_51] [java] at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:412) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:366) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:318) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[?:1.7.0_51] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_51] [java] at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.FilteringClassLoader.findClass(FilteringClassLoader.java:125) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.FilteringClassLoader.loadClass(FilteringClassLoader.java:100) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:412) ~[?:1.7.0_51] [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[?:1.7.0_51] [java] at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:186) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:50) ~[weblogic.server.merged.jar:12.1.3.0.0] [java] at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:168) ~[struts2-core-2.5.10.1.jar:2.5.10.1] [java] at com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:124) ~[struts2-core-2.5.10.1.jar:2.5.10.1] [java] at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:185) ~[struts2-core-2.5.10.1.jar:2.5.10.1] [java] at com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:172) ~[struts2-core-2.5.10.1.jar:2.5.10.1] [java] at com.opensymphony.xwork2.factory.DefaultInterceptorFactory.buildInterceptor(DefaultInterceptorFactory.java:47) ~[struts2-core-2.5.10.1.jar:2.5.10.1] 包含在struts2-core-2.5.10.1.jar中!我应该在XWork上添加额外的依赖吗?

   public class NBKI_Response
  {
    [Column("Nb_delays_90+_ever")]
    public int? Nb_delays_90__ever { get; set; }

    [Column("Nb_delays_90+_2y")]
    public int? Nb_delays_90__2y { get; set; }
   }

1 个答案:

答案 0 :(得分:0)

我通过将Struts core 2.5依赖项从war maven模块移动到ear模块来解决了这个错误。这是在Weblogic 12.1.3应用程序服务器上。我还必须将struts2-core-2.5.13.jar / META-INF中的struts-tags.tld复制到web-app的WEB-INF中。