Bevo
Bevo

Reputation: 550

Null pointer when parsing camelContext.xml file during startup

This is an intermittent problem, roughly 4/5 starts hit null pointer. Camel-Context.xml is below.

            <!-- Announce route -->
            <route id="Announcer" startupOrder="3">
                <from uri="file:src/data?noop=true" />
                <choice>
                    <when>
                        <xpath>$eventtype = 'shipment'</xpath>
                        <to uri="jmsEDA:topic:orderMgmt" />
                    </when>
                    <otherwise>
                        <to uri="jmsEDA:topic:orderMgmt" />
                    </otherwise>
                </choice>
            </route>

            <!-- Listen route -->
            <route id="Listener" startupOrder="2">
                <from uri="jmsEDA:topic:orderMgmt" />
                <to uri="file://target/test?noop=true" />
                <to uri="outputToScreen" />
                <log message="done" />
            </route>

        </camelContext>

        <!-- EDA JMS endpoint URL -->
        <bean id="jmsEDA" class="org.apache.camel.component.jms.JmsComponent">
            <property name="connectionFactory">
                <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                    <property name="brokerURL"
                        value="vm://localhost?broker.persistent=false&amp;broker.useJmx=false" />
                </bean>
            </property>
        </bean>

        <!-- Screen output endpoint -->
        <bean id="outputToScreen"
            class="com.softwareag.eda.NERD.outputToScreen">
        </bean>

    </beans>

Upvotes: 2

Views: 7722

Answers (4)

ZaurM
ZaurM

Reputation: 1

It is fixed in JBoss 7.1.2. So you need to fix it yourself in JBoss 7.1.1

You can find more about this issue here.

Upvotes: 0

fdaugan
fdaugan

Reputation: 798

Same thing for 1.6.0_30-b12 (32 bit) with Camel 2.8 and 2.9
I've downgraded my jaxb-impl version from 2.2.4 to 2.2.3.

I think it's not a JDK, but a JAXB issue :
C:\java\jdk1.7.0_03\bin\xjc.exe -version
xjc 2.2.4

Upvotes: 2

Wayne Tanner
Wayne Tanner

Reputation: 1356

I came across your question due to experiencing the same problem. On Feb 18, 2012 the 2.2.5 version of JAXB was released. After upgrading to 2.2.5, the problem seems to have been resolved. So far, it hasn't occurred again in testing.

See http://jaxb.java.net/ for details.

For reference, my configuration uses Camel 2.8.4 and Spring 3.0.5.

Upvotes: 5

ChrLipp
ChrLipp

Reputation: 15668

The problem is also mentioned here and it has an statement from Claus Ibsen here. You solved it already, it is Java 7.

Upvotes: 2

Related Questions