ClassCastException while invoking Beans from Spring Context. (Doc ID 1091075.1)

Last updated on OCTOBER 20, 2016

Applies to:

Oracle WebLogic Server - Version 10.3 and later
Information in this document applies to any platform.

Symptoms

You will see the below exception when a Spring Framework application is deployed on WebLogic 10.3.

java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.createDocumentBuilderFactory(XmlBeanDefinitionReader.java:379)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:352)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:308)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:283)
Truncated. see log file for complete stacktrace

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms