It looks like the problem is that when Spring in PluggableSchemaResolver.getSchemaMappings() tries to load all the "META-INF/spring.schemas" files, it only finds the one located in the activemq-osgi JAR. For some reason, the classloader does not return any of the "spring.schemas" files from the Spring JARs.
The quick workaround for me was to copy over the mappings from Spring bean JAR into the ActiveMQ spring.schemas file (i.e. patching that JAR). Martin Lichtin wrote > Hi > After upgrading from a 5.12.x version to 5.14.0, it looks like > ActiveMQServiceFactory, > instantiating the Spring application context, has a problem accessing the > Spring > schema and resorts to trying to access the Internet. > > Any ideas what could have changed that's causing this unwanted remote > access? > > > 2016-09-13 15:57:41,376 | WARN | apache.activemq.server]) | > XmlBeanDefinitionReader | k.util.xml.SimpleSaxErrorHandler 47 | > 89 - org.apache.servicemix.bundles.spring-beans - 3.2.17.RELEASE_1 | > Ignored XML validation warning > java.net.UnknownHostException: www.springframework.org > 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)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:542)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126)[102:org.apache.activemq.activemq-osgi:5.14.0] > at Proxy100ea4f1_e93e_4f29_9036_c1420fd17f44.updated(Unknown Source)[:] > at > org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1597)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1540)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[6:org.apache.felix.configadmin:1.8.4] > at java.lang.Thread.run(Thread.java:745)[:1.8.0_66] > 2016-09-13 15:57:41,382 | ERROR | apache.activemq.server]) | configadmin > > | ? ? | 6 - org.apache.felix.configadmin > - 1.8.4 | [org.osgi.service.cm.ManagedServiceFactor > y, id=690, bundle=102/mvn:org.apache.activemq/activemq-osgi/5.14.0]: > Updating configuration > org.apache.activemq.server.ce0fa390-a1d8-46d8-9f6c-6349b5e6a630 caused a > problem: Cannot start the broker > org.osgi.service.cm.ConfigurationException: null : Cannot start the broker > at > org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:144)[102:org.apache.activemq.activemq-osgi:5.14.0] > at Proxy100ea4f1_e93e_4f29_9036_c1420fd17f44.updated(Unknown Source)[:] > at > org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1597)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1540)[6:org.apache.felix.configadmin:1.8.4] > at > org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)[6:org.apache.felix.configadmin:1.8.4] > at java.lang.Thread.run(Thread.java:745)[:1.8.0_66] > Caused by: > org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: > Line 3 in XML document from URL [file:/app/M12/karaf/etc/activemq.xml] is > invalid; nested exception > is org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the declaration > of element 'beans'. > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:397)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:243)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:127)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:542)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451)[91:org.apache.servicemix.bundles.spring-context:3.2.17.RELEASE_1] > at > org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126)[102:org.apache.activemq.activemq-osgi:5.14.0] > ... 7 more > Caused by: org.xml.sax.SAXParseException: cvc-elt.1.a: Cannot find the > declaration of element 'beans'. > at > org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source)[:] > at org.apache.xerces.util.ErrorHandlerWrapper.error(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.XMLErrorReporter.reportError(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)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > at > org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:389)[89:org.apache.servicemix.bundles.spring-beans:3.2.17.RELEASE_1] > ... 19 more -- View this message in context: http://activemq.2283324.n4.nabble.com/Cannot-start-Activemq-5-14-0-in-a-Karaf-OSGi-container-without-internet-access-tp4716513p4716538.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.