ClassCastException of persistence.xml

java.lang.ClassCastException: : org.apache.xerces.parsers.XIncludeAwareParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration" occurred while attempting to determine the version of "zip:C:/JDeveloper/11.1.1.4.0/user_projects/domains/.../persistence.xml".

The problem maybe caused by the encoding of the persistence.xml.

Another possible reason is caused by the classloading of the xercesImpl.jar. Qwblogic has built-in xercesImpl.jar, your application should load the jar from parent classloader. However,  using org.apache.xerces.* in weblogic-application.xml may cause classloading problem. 


Solution:
Remove the prefer settings from weblogic-application.xml - not exactly work
or
exclude this jar from POM.xml. - work


留言

這個網誌中的熱門文章

Disable ionic's sidemenu content drag to toggle menu

Multiple writable mappings exist for the field. Only one may be defined as writable, all others must be specified read-only.

java.lang.NoClassDefFoundError: org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl$Parser