activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Nebot <daniel_ne...@yahoo.com>
Subject Startup WhenType Null Pointer Exception
Date Mon, 26 May 2008 12:03:35 GMT
Hi, 

I am getting a NullPointerException as soon as I have included a slightly more complex route
into the activemq.xml :

Anybody as new to Camel as me stuck on the same step? I will be very grateful if somebody
could have a look at the console output. Any indications will be strongly welcome.

The route is:
<route>
            <from uri="activemq:QUEUE_HL7LISC_OUT"/>
                    <choice>
                      <when>
                        <predicate>
                          <header name="msgAppFrom"/>
                          <isEqualTo value="APP1"/>
                        </predicate> 
                            <to uri="activemq:QUEUE_ALLPLISC_IN"/>
                      </when>
                      <when>
                        <predicate>
                          <header name="msgAppFrom"/>
                          <isEqualTo value="APP2"/>
                        </predicate>
                        <to uri="activemq:example.A"/>
                      </when>
                      <otherwise>
                        <to uri="activemq:example.B"/>
                      </otherwise>
                    </choice> 
                </route>    

The output is:
ACTIVEMQ_HOME: C:\Program Files\apache-activemq-5.1.0\bin\..
ACTIVEMQ_BASE: C:\Program Files\apache-activemq-5.1.0\bin\..
Loading message broker from: xbean:activemq.xml
INFO  BrokerService                  - Using Persistence Adapter: AMQPersistence
Adapter(C:\Program Files\apache-activemq-5.1.0\bin\..\data)
INFO  BrokerService                  - ActiveMQ 5.1.0 JMS Message Broker (localh
ost) is starting
INFO  BrokerService                  - For help or more information please see:
http://activemq.apache.org/
INFO  AMQPersistenceAdapter          - AMQStore starting using directory: C:\Pro
gram Files\apache-activemq-5.1.0\bin\..\data
INFO  KahaStore                      - Kaha Store using data directory C:\Progra
m Files\apache-activemq-5.1.0\bin\..\data\kr-store\state
INFO  AMQPersistenceAdapter          - Active data files: [1]
INFO  KahaStore                      - Kaha Store using data directory C:\Progra
m Files\apache-activemq-5.1.0\bin\..\data\kr-store\data
INFO  TransportServerThreadSupport   - Listening for connections at: tcp://pc911
830016168:61616
INFO  TransportConnector             - Connector openwire Started
INFO  TransportServerThreadSupport   - Listening for connections at: ssl://pc911
830016168:61617
INFO  TransportConnector             - Connector ssl Started
INFO  TransportServerThreadSupport   - Listening for connections at: stomp://pc9
11830016168:61613
INFO  TransportConnector             - Connector stomp Started
INFO  TransportServerThreadSupport   - Listening for connections at: xmpp://pc91
1830016168:61222
INFO  TransportConnector             - Connector xmpp Started
INFO  NetworkConnector               - Network Connector default-nc Started
INFO  BrokerService                  - ActiveMQ JMS Message Broker (localhost, I
D:pc911830016168-4261-1211802211218-0:0) started
INFO  log                            - Logging to org.slf4j.impl.JCLLoggerAdapte
r(org.mortbay.log) via org.mortbay.log.Slf4jLog
INFO  log                            - jetty-6.1.9
INFO  WebConsoleStarter              - ActiveMQ WebConsole initialized.
INFO  /admin                         - Initializing Spring FrameworkServlet 'dis
patcher'
INFO  log                            - ActiveMQ Console at http://0.0.0.0:8161/a
dmin
INFO  log                            - ActiveMQ Web Demos at http://0.0.0.0:8161
/demo
INFO  log                            - RESTful file access application at http:/
/0.0.0.0:8161/fileserver
INFO  log                            - Started SelectChannelConnector@0.0.0.0:81
61
ERROR: java.lang.RuntimeException: Failed to execute start task. Reason: java.la
ng.NullPointerException
java.lang.RuntimeException: Failed to execute start task. Reason: java.lang.Null
PointerException
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:98)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:129)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: java.lang.NullPointerException
        at org.apache.camel.model.ExpressionNode.createFilterProcessor(Expressio
nNode.java:91)
        at org.apache.camel.model.WhenType.createProcessor(WhenType.java:49)
        at org.apache.camel.model.ChoiceType.createProcessor(ChoiceType.java:57)

        at org.apache.camel.model.ProcessorType.makeProcessor(ProcessorType.java
:1387)
        at org.apache.camel.model.ProcessorType.addRoutes(ProcessorType.java:95)

        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:189)
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:83)
        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(Defau
ltCamelContext.java:438)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext
.java:430)
        at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext
.java:148)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringC
amelContext.java:102)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1
.run(SimpleApplicationEventMulticaster.java:78)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecut
or.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.m
ulticastEvent(SimpleApplicationEventMulticaster.java:76)
        at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:260)
        at org.springframework.context.support.AbstractApplicationContext.finish
Refresh(AbstractApplicationContext.java:744)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:372)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(
ResourceXmlApplicationContext.java:64)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(
ResourceXmlApplicationContext.java:52)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext
(XBeanBrokerFactory.java:96)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBroker
Factory.java:52)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:71)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCom
mand.java:111)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:73)
        ... 10 more
ERROR: java.lang.Exception: java.lang.NullPointerException
java.lang.Exception: java.lang.NullPointerException
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:99)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.runTask(ShellCommand
.java:129)
        at org.apache.activemq.console.command.AbstractCommand.execute(AbstractC
ommand.java:57)
        at org.apache.activemq.console.command.ShellCommand.main(ShellCommand.ja
va:79)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.apache.activemq.console.Main.runTaskClass(Main.java:222)
        at org.apache.activemq.console.Main.main(Main.java:106)
Caused by: java.lang.NullPointerException
        at org.apache.camel.model.ExpressionNode.createFilterProcessor(Expressio
nNode.java:91)
        at org.apache.camel.model.WhenType.createProcessor(WhenType.java:49)
        at org.apache.camel.model.ChoiceType.createProcessor(ChoiceType.java:57)

        at org.apache.camel.model.ProcessorType.makeProcessor(ProcessorType.java
:1387)
        at org.apache.camel.model.ProcessorType.addRoutes(ProcessorType.java:95)

        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:189)
        at org.apache.camel.model.RouteType.addRoutes(RouteType.java:83)
        at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(Defau
ltCamelContext.java:438)
        at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext
.java:430)
        at org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext
.java:148)
        at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:47)
        at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringC
amelContext.java:102)
        at org.springframework.context.event.SimpleApplicationEventMulticaster$1
.run(SimpleApplicationEventMulticaster.java:78)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecut
or.java:49)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.m
ulticastEvent(SimpleApplicationEventMulticaster.java:76)
        at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:260)
        at org.springframework.context.support.AbstractApplicationContext.finish
Refresh(AbstractApplicationContext.java:744)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:372)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(
ResourceXmlApplicationContext.java:64)
        at org.apache.xbean.spring.context.ResourceXmlApplicationContext.<init>(
ResourceXmlApplicationContext.java:52)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext
(XBeanBrokerFactory.java:96)
        at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker(XBeanBroker
Factory.java:52)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:71)
        at org.apache.activemq.broker.BrokerFactory.createBroker(BrokerFactory.j
ava:54)
        at org.apache.activemq.console.command.StartCommand.startBroker(StartCom
mand.java:111)
        at org.apache.activemq.console.command.StartCommand.runTask(StartCommand
.java:73)
        ... 10 more

Thanks
Danie Nebot

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message