Why fuse throws SAXParseException when using ClassPathXmlApplicationContext in OSGI environment ?

Solution Verified - Updated -

Issue

  • Trying to load spring beans using ClassPathXmlApplicationContext class file, while loading it is trying to download spring-beans-3.2.xsd file however it is already there in org.apache.servicemix.bundles.spring-beans-3.2.8.RELEASE_1.jar file.
  • Following is the log trace.
2015-01-20 02:05:30,793 | INFO  | edhat-379/deploy | ClassPathXmlApplicationContext   | ?                                   ? | 121 - org.apache.servicemix.bundles.spring-context - 3.2.8.RELEASE_1 | Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@6867b0d6: startup date [Tue Jan 20 02:05:30 EST 2015]; root of context hierarchy
2015-01-20 02:05:30,794 | INFO  | edhat-379/deploy | XmlBeanDefinitionReader          | ?                                   ? | 333 - org.apache.servicemix.bundles.spring-beans - 3.2.8.RELEASE_1 | Loading XML bean definitions from class path resource [XXX-factory.xml]
2015-01-20 02:06:34,067 | WARN  | edhat-379/deploy | XmlBeanDefinitionReader          | ?                                   ? | 333 - org.apache.servicemix.bundles.spring-beans - 3.2.8.RELEASE_1 | Ignored XML validation warning
java.net.ConnectException: Connection timed out
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)[:]
        at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source)[:]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)[:]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source)[:]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument1(Unknown Source)[:]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)[:]
        at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)[:]
        at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)[:]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)[:]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)[:]
        at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source)[:]
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)[:]
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)[:]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)[:]
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)[:]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)[:]
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)[:]
        at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)[:]
        at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)[:]
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:75)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:388)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)[333:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)[121:org.apache.servicemix.bundles.spring-context:3.2.8.RELEASE_1]

Environment

  • Red Hat JBoss Fuse
    • 6.1.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.