简体   繁体   English

如何解决对init方法的调用失败:java.lang.AbstractMethodError

[英]How to solve invocation of init method failed: java.lang.AbstractMethodError

I am trying JBOSS Eap 6.4 to 7.2 migration. 我正在尝试从JBOSS Eap 6.4迁移到7.2。

My project runs fine on jboss eap 6 server. 我的项目在jboss eap 6服务器上运行良好。 but when I try to deploy it on jboss eap 7.2 server I get following error. 但是,当我尝试将其部署在jboss eap 7.2服务器上时,出现以下错误。

Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DUMMY' defined in ServletContext resource: Invocation of init method failed; 相关原因:org.springframework.beans.factory.BeanCreationException:在ServletContext资源中创建名称为'DUMMY'的bean时出错:调用init方法失败; nested exception is java.lang.AbstractMethodError: javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava/lang/String;Z)V 嵌套的异常是java.lang.AbstractMethodError:javax.xml.parsers.DocumentBuilderFactory.setFeature(Ljava / lang / String; Z)V

Why this is happening and how to solve it? 为什么会发生这种情况以及如何解决?

Adding this statement in VM Arguments solved my issue: 在VM参数中添加此语句解决了我的问题:

Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl

I took reference from here, 我从这里参考

http://developerblogging.blogspot.com/2013/04/javalangabstractmethoderror.html http://developerblogging.blogspot.com/2013/04/javalangabstractmethoderror.html

posting the answer, just so if anyone facing the same issue can refer. 发布答案,只要遇到相同问题的任何人都可以参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM