Hi What OS, JDK, and JAXB version do you use? And have you added saxon to the classpath, eg using camel-saxon. Saxon is usually faster and better as xpath than what comes out of the box from the JDK.
On Fri, Apr 19, 2013 at 9:32 PM, gmdavidson62 <gmdavidso...@gmail.com> wrote: > We randomly get the following error during a split....we handle hundreds of > messages without error, then see one or two, any help greatly appreciated. > We are running Apache Camel 2.10.4. > > ERROR: > No body available of type: java.lang.String but has value: [Policy: null] of > type: org.apache.xerces.dom.DeferredElementNSImpl on: Message: > <Policy> > <EffectiveDt>2005-04-08</EffectiveDt> > <ExpirationDt>2013-04-08</ExpirationDt> > <PolicyNumber>99999999999999</PolicyNumber> > <PolicyId>ABC</PolicyId> > <Relationship>BBB</Relationship> > <PolicyType>AS</PolicyType> > <ViewPolicyDetail>Y</ViewPolicyDetail> > <PolicyDescription>BBB-DESC</PolicyDescription> > </Policy> > Caused by: Error during type conversion from type: > org.apache.xerces.dom.DeferredElementNSImpl to the required type: > java.lang.String with value > [Policy: null] due java.lang.NullPointerException. Exchange[Message: > <Policy> > <EffectiveDt>2005-04-08</EffectiveDt> > <ExpirationDt>2013-04-08</ExpirationDt> > <PolicyNumber>99999999999999</PolicyNumber> > <PolicyId>ABC</PolicyId> > <Relationship>BBB</Relationship> > <PolicyType>AS</PolicyType> > <ViewPolicyDetail>Y</ViewPolicyDetail> > <PolicyDescription>BBB-DESC</PolicyDescription> > </Policy> > Caused by: [org.apache.camel.TypeConversionException - Error during type > conversion from type: org.apache.xerces.dom.DeferredElementNSImpl > to the required type: java.lang.String with value [Policy: null] due > java.lang.NullPointerException] > > > We have this route: > ---------------------------------------------------------- > <route id="BOB-GetAccountSummaryPolicyDetails" trace="true" > streamCache="true" > > <from > uri="{{csp.ws.transport}}://0.0.0.0:10019/BOB-GetAccountSummaryPolicyDetails/"/> > > <setHeader headerName="cspServiceName"> > <constant>BOB-GetAccountSummaryPolicyDetails</constant> > </setHeader> > > <camel:setProperty propertyName="clientId"> > <camel:xpath > resultType="java.lang.String">/BOB-GetAccountSummaryRequest/ClientId/text()</camel:xpath> > </camel:setProperty> > > <camel:to uri="direct:getPolicyList"/> > > <camel:split parallelProcessing="true" > strategyRef="policyDetailsAggregator" timeout="60000"> > > <camel:xpath>/BOB-GetPoliciesByClientResponse/Policies/Policy</camel:xpath> > <camel:to uri="direct:getPolicyDetails"/> > </camel:split> > > </route> > ---------------------------------------------------------- > > XML result from: <camel:to uri="direct:getPolicyList"/> > which we do the split on > ---------------------------------------------------------- > <Policies> > <Policy> > <EffectiveDt>2005-04-08</EffectiveDt> > <ExpirationDt>2013-04-08</ExpirationDt> > <PolicyNumber>99999999999999</PolicyNumber> > <PolicyId>ABC</PolicyId> > <Relationship>BBB</Relationship> > <PolicyType>AS</PolicyType> > <ViewPolicyDetail>Y</ViewPolicyDetail> > <PolicyDescription>BBB-DESC</PolicyDescription> > </Policy> > <Policy> > <EffectiveDt>2013-04-09</EffectiveDt> > <ExpirationDt>2013-10-09</ExpirationDt> > <PolicyNumber>88888888888888</PolicyNumber> > <PolicyId>EFG</PolicyId> > <Relationship>CCC</Relationship> > <PolicyType>PAU</PolicyType> > <ViewPolicyDetail>Y</ViewPolicyDetail> > <PolicyDescription>CCC-DESC</PolicyDescription> > </Policy> > <Policy> > <EffectiveDt>2013-03-06</EffectiveDt> > <ExpirationDt>2013-09-06</ExpirationDt> > <PolicyNumber>APV 0004518523</PolicyNumber> > <PolicyId>HIJ</PolicyId> > <Relationship>DDD</Relationship> > <PolicyType>PAU</PolicyType> > <ViewPolicyDetail>Y</ViewPolicyDetail> > <PolicyDescription>DDD-DESC</PolicyDescription> > </Policy> > > ---------------------------------------------------------- > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/random-splitter-error-tp5731160.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen