[
https://issues.apache.org/jira/browse/KARAF-6773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17385448#comment-17385448
]
Frank Zinner commented on KARAF-6773:
-------------------------------------
I have a similar problem with karaf-assembly 4.2.10, ActiveMQ 5.16.2 and Camel
3.7.5:
{code:java}
// Current configuration:
<installedFeatures>
<feature>wrapper</feature>
<feature>camel</feature>
</installedFeatures>
<startupFeatures>
<feature>eventadmin</feature>
<feature>aries-blueprint</feature>
<feature>pax-url-aether</feature>
<feature>spring-legacy</feature>
<feature>activemq-broker-noweb</feature>
<feature>wrap</feature>
</startupFeatures>
<bootFeatures>
<feature>bundle</feature>
<!-- Camel & Components begin -->
<feature>camel-core</feature>
<feature>camel-activemq</feature>
<feature>camel-bindy</feature>
<feature>camel-gson</feature>
<feature>camel-http</feature>
<feature>camel-jackson</feature>
<feature>camel-jms</feature>
<feature>camel-jpa</feature>
<feature>camel-netty</feature>
<feature>camel-quartz</feature>
<feature>camel-stream</feature>
<!-- Camel & Components end -->
<feature>config</feature>
<feature>diagnostic</feature>
<feature>feature</feature>
<feature>hawtio</feature>
<feature>jaas</feature>
<feature>jasypt-encryption</feature>
<feature>kar</feature>
<feature>log</feature>
<feature>management</feature>
<feature>package</feature>
<feature>shell</feature>
<feature>ssh</feature>
<feature>service</feature>
<feature>spring-legacy</feature>
<feature>spring</feature>
<feature>system</feature>
<feature>deployer</feature>
</bootFeatures>
{code}
Only the workaround mentioned here does the trick. I'm working behind a proxy
and Karaf with ActiveMQ Broker will only start when I use a proxy configuration
in system.properties or this workaround here.
As you can see in my configuration I added spring-legacy but this doesn't help.
> ActiveMQ won't properly start in offline mode
> ---------------------------------------------
>
> Key: KARAF-6773
> URL: https://issues.apache.org/jira/browse/KARAF-6773
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.2.9
> Reporter: Gerald Kallas
> Assignee: Jean-Baptiste Onofré
> Priority: Major
>
> I've created a docker image based on Karaf 4.2.9 and ActiveMQ 5.15.13
> (amongst other features).
> After embedding all features I enabled the offline mode for Karaf startup in
> org.ops4j.pax.url.mvn.cfg as following
> {code:java}
> #
> # If set to true, no remote repository will be accessed when resolving
> artifacts
> #
> org.ops4j.pax.url.mvn.offline = true
> {code}
> When starting in offline mode there's an error
> {code:java}
> ...
> Caused by: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
> declaration of element 'beans'.
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:327)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:284)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1901)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:741)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3132)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:852)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
> ~[?:1.8.0_242]
> at
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
> ~[?:1.8.0_242]
> at
> org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:77)
> ~[!/:?]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:434)
> ~[!/:?]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
> ~[!/:?]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
> ~[!/:?]
> at
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
> ~[!/:?]
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
> ~[!/:?]
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:224)
> ~[!/:?]
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:195)
> ~[!/:?]
> at
> org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:257)
> ~[!/:?]
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:128)
> ~[!/:?]
> at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:94)
> ~[!/:?]
> at
> org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:133)
> ~[!/:?]
> at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:636)
> ~[!/:?]
> at
> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:521)
> ~[!/:?]
> at
> org.apache.activemq.osgi.ActiveMQServiceFactory.updated(ActiveMQServiceFactory.java:126)
> ~[!/:5.15.11]
> ... 7 more
> {code}
> I created a workaround as described in
> https://issues.apache.org/jira/browse/KARAF-6616
> {code:java}
> Temporary solution : Update the etc/activemq.xml root element which has been
> provided by the feature installation like this
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> file:spring-beans-4.3.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
> and provided the spring-beans-4.3 at ${KARAF_HOME}. Than the instance was
> able to start again.
> {code}
> The error was gone in Karaf 4.2.8 but occured again in Karaf 4.2.9.
> Best
> Gerald
--
This message was sent by Atlassian Jira
(v8.3.4#803005)