> Where am I getting wrong? The fact that you're attempting to modify broker.xml and/or bootstap.xml indicates to me that you didn't understand my comment on Stackoverflow. I specifically noted that you need to use "a web application with a Camel context," and linked to some documentation on that for 5.x that should help you put together the web-application. Can you try this approach?
Justin On Mon, Nov 20, 2017 at 6:49 AM, alisu <alisu7...@gmail.com> wrote: > Thanks Justin and gtully for your responses. As Justin said, it is > possible t > run camel routes inside the broker, now I have been experimenting with > this. > First, I have tried this with ActiveMQ 5.15.1 as described in [1], and > everything works fine. But when I do the same thing with Artemis, by adding > /*<import resource="camel.xml"/>*/ inside broker.xml or bootstrap.xml file > , > the server doesn't start up instead I get the following exception: > > /Exception in thread "main" javax.xml.bind.UnmarshalException > - with linked exception: > [org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 32; > cvc-complex-type.2.4.a: Invalid content was found starting with element > 'import'. One of '{"http://activemq.org/schema":component, > "http://activemq.org/schema":web}' is expected.] > at > com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl. > handleStreamException(UnmarshallerImpl.java:468) > at > com.sun.xml.internal.bind.v2.runtime.unmarshaller. > UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:402) > at > com.sun.xml.internal.bind.v2.runtime.unmarshaller. > UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:371) > at org.apache.activemq.artemis.dto.XmlUtil.decode(XmlUtil. > java:117) > at > org.apache.activemq.artemis.cli.factory.xml.XmlBrokerFactoryHandler. > createBroker(XmlBrokerFactoryHandler.java:35) > at > org.apache.activemq.artemis.cli.factory.BrokerFactory. > createBrokerConfiguration(BrokerFactory.java:46) > at > org.apache.activemq.artemis.cli.factory.BrokerFactory. > createBrokerConfiguration(BrokerFactory.java:53) > at > org.apache.activemq.artemis.cli.commands.Configurable. > getBrokerDTO(Configurable.java:105) > at org.apache.activemq.artemis.cli.commands.Run.execute(Run. > java:65) > at > org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149) > at org.apache.activemq.artemis.cli.Artemis.execute(Artemis. > java:96) > at org.apache.activemq.artemis.cli.Artemis.execute(Artemis. > java:123) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: > 62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke( > DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at org.apache.activemq.artemis.boot.Artemis.execute(Artemis. > java:129)/ > > Where am I getting wrong? > > [1] > https://github.com/apache/activemq/blob/57795bafcea290c6879bb288822435 > c480a9212d/assembly/src/release/examples/conf/camel.xml > <https://github.com/apache/activemq/blob/57795bafcea290c6879bb288822435 > c480a9212d/assembly/src/release/examples/conf/camel.xml> > > > > -- > Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User- > f2341805.html >