1 Reply Latest reply on Jul 31, 2009 9:58 AM by ubhole

    org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found

    pchandler

      How can I get servicemix to find this class?

       

      My code:

                System.setProperty("javax.xml.parsers.DocumentBuilderFactory", "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl" );

                System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl" );

                URL urlSpring = context.getBundle().getEntry("./dbConnectionInfo.xml");

              // find the resource file.

              Resource res = new UrlResource(urlSpring);

              // make a new XmlBeanFactory

              XmlBeanFactory factory = new XmlBeanFactory(res); // Error

       

      In my Bundle-ClassPath is:

      xercesImpl-2.7.1.jar

       

      Exception:

      org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL bundle://433.0:0/./dbConnectionInfo.xml; nested exception is javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)

              at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)

              at org.springframework.beans.factory.xml.XmlBeanFactory.(XmlBeanFactory.java:61)

        • 1. Re: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
          ubhole

          The proble here is xercesImpl-2.7.1.jar you are using may not be exporting the impl classes that XmlBeanFactory needs. Are you creating bundle for XmlBeanFactory yourself of pulling in from somewhere else?

          Is it possible to share a testcase which exibits this problem? It will help figuring out the problem in more details but from the information you provided it is more of a issue with bundles (import/export) than with FUSE ESB.

           

          Ulhas