The error message is as follows:
Java. Lang. abstractmethoderror: org. Apache. xerces. Dom. deferredentimpl. setxmlstandalone (z) V
Solution 1:
In the use of cxf for webserive, the first time not to add and database operations all normal, when added to the commons-pool.jar package after the following error is reported:
Java. lang. abstractmethoderror: Org. apache. xerces. dom. deferredentimpl. setxmlstandalone (z) V Org. apache. cxf. transport. HTTP. wsdlqueryhandler. updatedoc (wsdlqueryhandler. java: 324) Org. apache. cxf. transport. HTTP. wsdlqueryhandler. writeresponse (wsdlqueryhandler. java: 223)
Org. apache. cxf. transport. servlet. servletcontroller. invoke (servletcontroller. java: 170) Org. apache. cxf. transport. servlet. abstractcxfservlet. invoke (abstractcxfservlet. java: 148) Org. apache. cxf. transport. servlet. abstracthttpservlet. handlerequest (abstracthttpservlet. java: 179)
Org. apache. cxf. transport. servlet. abstracthttpservlet. doget (abstracthttpservlet. java: 108) javax. servlet. HTTP. httpservlet. service (httpservlet. java: 690) Org. apache. cxf. transport. servlet. abstracthttpservlet. service (abstracthttpservlet. java: 159)
The reason is that the cxf package conflicts with the xercesimpl. jar package, because the commons-pool.jar depends on the xercesimpl. jar package. Therefore, the preceding error is caused by the following solution:
<Dependency>
<Groupid> commons-pool </groupid>
<Artifactid> commons-pool </artifactid>
<Version> 1.1 </version>
<Exclusions>
<Exclusion>
<Groupid> xerces </groupid>
<Artifactid> xerces </artifactid>
</Exclusion>
</Exclusions>
</Dependency>
<Dependency>
<Groupid> xerces </groupid>
<Artifactid> xercesimpl </artifactid>
<Version> 2.8.0 </version>
</Dependency>
If a project package is used to export jar POM and other packages, You need to execute exclusion in pom.
Solution 2:
Remove xerces-2.4.0.jar or use the latest version (not tested)