Announcement Announcement Module
No announcement yet.
java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory

    Get the following classcastexception on deploy of web application that uses spring bean configuration. Problem occurs in WL 9, did not occur in WL 8. WL 9 runs on Java 5, so I had to remove Xerces from my webapp's lib. Also deploys fine on Tomcat.

    Anybody out there been where I am, and solved the problem?

    [HTTP:101216]Servlet: "init" failed to preload on startup in Web application: "TBMCSAdapter.war". java.lang.ClassCastException: weblogic.xml.jaxp.RegistryDocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstan ce()Ljavax.xml.parsers.DocumentBuilderFactory;(Unk nown Source) at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.createDocumentBuilderFactory(XmlBeanDe at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR at BeanDefinitionReader.loadBeanDefinitions(AbstractB at BeanDefinitionReader.loadBeanDefinitions(AbstractB at licationContext.loadBeanDefinitions(AbstractXmlApp at licationContext.loadBeanDefinitions(AbstractXmlApp at hableApplicationContext.refreshBeanFactory(Abstrac at ationContext.refresh(AbstractApplicationContext.ja va:269) at plicationContext.<init>(ClassPathXmlApplicationCon at plicationContext.<init>(ClassPathXmlApplicationCon at plicationContext.<init>(ClassPathXmlApplicationCon at gov.jcre.adapter.util.ServicesManager.init(Service at gov.jcre.adapter.util.InitServlet.init(InitServlet .java:59) at javax.servlet.GenericServlet.init(GenericServlet.j ava:256) at weblogic.servlet.internal.StubSecurityHelper$Servl at t.doAs( at at weblogic.servlet.internal.StubSecurityHelper.creat eServlet( at weblogic.servlet.internal.StubLifecycleHelper.crea teOneInstance( at weblogic.servlet.internal.StubLifecycleHelper.<ini t>( at weblogic.servlet.internal.ServletStubImpl.prepareS ervlet( at weblogic.servlet.internal.WebAppServletContext.pre loadServlet( at weblogic.servlet.internal.WebAppServletContext.loa dServletsOnStartup( at weblogic.servlet.internal.WebAppServletContext.pre loadResources( at weblogic.servlet.internal.WebAppServletContext.sta rt( at weblogic.servlet.internal.WebAppModule.startContex ts( at weblogic.servlet.internal.WebAppModule.start(WebAp at weblogic.application.internal.flow.ModuleListenerI nvoker.start(

  • #2
    Possible Solution


    I was facing the exact same problem, but on different versions of WebLogic 8.1 (sp3 and sp4).

    We were building our .war artifact with maven2 and it was adding a xml-beans-1.xb2 to the lib directory. We modified the pom so it does not include that jar file with the following:


    Now it is working fine.
    Our project was also using weblogic.xml to specify that the web-inf classes should be first in the classpath than weblogic's ones

    Hope this helps to anobody else out there.

    Best Regards,
    Andrés Bernasconi.


    • #3
      I was having the same problem with Weblogic 10.3 and this solution worked perfectly.

      Thanks a lot for your help.


      • #4
        I'm Glad!

        It's incredible the reach of even old forums. 3 years later and this info was useful to somebody...who would have known.

        Regards and good luck


        • #5
          Thank you very much. Helped me out 4 years later


          • #6
            Originally posted by Priit View Post
            Thank you very much. Helped me out 4 years later
            Yes, me too, 7 years later :-) Thanks!


            • #7
              Thanks a ton
              .. it helped me too 7 years later


              • #8
                Thanks a ton Sotretus.. it helped me too 7 years later


                • #9
                  Thanks a ton, it helped me too 7 years later