Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7258

ActiveMQ does not start if Karaf is offline (SAXParseException)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Problem
    • 5.15.9
    • None
    • OSGi/Karaf
    • None
    • Karaf, Offline

    • Important

    Description

      To reproduce:

      • Download, unpack and start karaf 4.2.7

      feature:repo-add activemq
      feature:install activemq-broker

      ActiveMQ will start succesfully.
      Now stop karaf, go offline and start karaf again.

      This time the exception below can be found in the log and ActiveMQ fails to start.

      Caused by: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 24 in XML document from URL [file:/Users/jkop/Downloads/apache-karaf-4.2.6/etc/activemq.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 24; columnNumber: 101; cvc-elt.1: Cannot find the declaration of element 'beans'.
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:404) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257) ~[98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128) ~[99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94) ~[99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133) ~[99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:636) ~[99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:521) ~[99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126) ~[59:org.apache.activemq.activemq-osgi:5.15.9]
          ... 7 more
      
      
      org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203) ~[?:?]
          at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.warning(ErrorHandlerWrapper.java:99) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:392) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4158) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaWarning(XSDHandler.java:4149) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2491) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2193) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:578) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:610) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2447) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1768) [?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) [?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505) [?:?]
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842) [?:?]
          at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771) [?:?]
          at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [?:?]
          at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243) [?:?]
          at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) [?:?]
          at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257) [98:org.apache.servicemix.bundles.spring-beans:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128) [99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94) [99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133) [99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:636) [99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:521) [99:org.apache.servicemix.bundles.spring-context:5.1.7.RELEASE_1]
          at org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126) [59:org.apache.activemq.activemq-osgi:5.15.9]
          at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.updated(ManagedServiceFactoryTracker.java:159) [9:org.apache.felix.configadmin:1.9.14]
          at org.apache.felix.cm.impl.helper.ManagedServiceFactoryTracker.provideConfiguration(ManagedServiceFactoryTracker.java:93) [9:org.apache.felix.configadmin:1.9.14]
          at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.provide(ConfigurationManager.java:1248) [9:org.apache.felix.configadmin:1.9.14]
          at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceFactoryUpdate.run(ConfigurationManager.java:1192) [9:org.apache.felix.configadmin:1.9.14]
          at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [9:org.apache.felix.configadmin:1.9.14]
          at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [9:org.apache.felix.configadmin:1.9.14]
          at java.lang.Thread.run(Thread.java:748) [?:?]
      Caused by: java.net.UnknownHostException: www.springframework.org
          at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) ~[?:?]
          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]
          at java.net.Socket.connect(Socket.java:589) ~[?:?]
          at java.net.Socket.connect(Socket.java:538) ~[?:?]
          at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[?:?]
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:463) ~[?:?]
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:558) ~[?:?]
          at sun.net.www.http.HttpClient.<init>(HttpClient.java:242) ~[?:?]
          at sun.net.www.http.HttpClient.New(HttpClient.java:339) ~[?:?]
          at sun.net.www.http.HttpClient.New(HttpClient.java:357) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1226) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1162) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1056) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:990) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570) ~[?:?]
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:647) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:583) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:686) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530) ~[?:?]
          at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2181) ~[?:?]
          ... 39 more
      

      Attachments

        1. spring.schemas
          7 kB
          Martin Lichtin
        2. pom.xml
          4 kB
          Giuseppe Piscopo
        3. karaf.log
          181 kB
          Jonas

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              manid Jonas
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h