You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Eyji <ey...@gmail.com> on 2006/10/31 14:31:22 UTC
Validation Exception
Hope you can help me out here: A validation component of mine is configured
as follows:
<sm:activationSpec componentName="validerare" service="foo:validerare"
endpoint="validerare" destinationService="foo:loggare">
<sm:component>
<bean
class="org.apache.servicemix.components.validation.ValidateComponent">
<property name="schemaResource" value="classpath:FOOAnwer.xsd" />
<property name="errorHandler"
ref="messageAggregatingErrorHandlerFactory"/>
</bean>
<bean
class="org.apache.servicemix.components.validation.ValidateComponent">
<property name="schemaResource" value="classpath:FOOQuestion.xsd" />
<property name="errorHandler"
ref="messageAggregatingErrorHandlerFactory"/>
</bean>
</sm:component>
</sm:activationSpec>
The xml messages are retrieved from a JMS-queue. If the XML file
FOOAnswer.xml is validated first, all is OK. Upon dropping the FOOAnswer.xml
on the Queue, the Runtime-exception below is thrown. If I try to resend
FOOAnswer.xml again, I get the same exception and nothing works until I
restart SM.
Stacktrace of Exception:
---------------------------------
WARN - ValidateComponent - Unable to handle error:
java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
at
org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
at
org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
at
org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
at
org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
at
org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
at
org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
at
org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
at
org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
at
org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.NotSerializableException:
javax.xml.transform.dom.DOMSource
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at java.util.HashMap.writeObject(HashMap.java:983)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at
org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at
org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
at
org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
Regards,
/Eyji
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
The problem is that the validating component may not
be the only component to use the CopyTransformer.
The DOM document may be put in the message
properties by another component. You could try
to explicitely remove the offending property from
a derived validating component.
On 11/1/06, Eyji <ey...@gmail.com> wrote:
>
> Hi!
>
> Tried this now, and it doesn't work unfortunately. The If-statement in the
> method assumes that the message is not of type StringSource which ours is.
> Upon forcing the method to taking StringSourcel anyways, the new
>
> content = sourceTransformer.toDOMSource(content);
>
> gives the same error. I would be eternally greatful if you have any more
> hints...
>
> Regards,
> /Eyji
>
>
>
> gnodet wrote:
> >
> > You could create a custom class derived from the CopyTransformer.
> > Just replace the call to sourceTransformer.toDOMSource(from) to
> > sourceTransformer.toDOMSource(content).
> > Then, you will need to configure it on the validation component
> > <property name="messageTransformer">
> > <bean class="com.company.myNewCopyTransformer" />
> > </property>
> >
> > It should work.
> >
> > On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >>
> >> Thanks for your quick reply yet again!
> >> We'll fix a JIRA for this, but is there a workaround for this you could
> >> recommend which we could try in SM? Maybe switching implementations or
> >> something, surely someone else should have run into this issue before.
> >>
> >> /Eyji
> >>
> >>
> >> gnodet wrote:
> >> >
> >> > The problems comes from the SourceTransformer class which is
> >> > used by the CopyTransformer.
> >> > When asked for a DOM representation of a NormalizedMessage, it
> >> > stores the parsed DOM node in a property on the message.
> >> >
> >> > Could you please raise a JIRA for this issue ?
> >> >
> >> > On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >> >>
> >> >> Hope you can help me out here: A validation component of mine is
> >> >> configured
> >> >> as follows:
> >> >>
> >> >> <sm:activationSpec componentName="validerare" service="foo:validerare"
> >> >> endpoint="validerare" destinationService="foo:loggare">
> >> >> <sm:component>
> >> >> <bean
> >> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >> <property
> >> >> name="schemaResource" value="classpath:FOOAnwer.xsd" />
> >> >> <property
> >> >> name="errorHandler"
> >> >> ref="messageAggregatingErrorHandlerFactory"/>
> >> >> </bean>
> >> >> <bean
> >> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >> <property
> >> >> name="schemaResource" value="classpath:FOOQuestion.xsd" />
> >> >> <property
> >> >> name="errorHandler"
> >> >> ref="messageAggregatingErrorHandlerFactory"/>
> >> >> </bean>
> >> >> </sm:component>
> >> >> </sm:activationSpec>
> >> >>
> >> >> The xml messages are retrieved from a JMS-queue. If the XML file
> >> >> FOOAnswer.xml is validated first, all is OK. Upon dropping the
> >> >> FOOAnswer.xml
> >> >> on the Queue, the Runtime-exception below is thrown. If I try to
> >> resend
> >> >> FOOAnswer.xml again, I get the same exception and nothing works until
> >> I
> >> >> restart SM.
> >> >>
> >> >> Stacktrace of Exception:
> >> >> ---------------------------------
> >> >>
> >> >> WARN - ValidateComponent - Unable to handle error:
> >> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >> at
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> >> >> at
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> >> >> at
> >> >>
> >> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> >> at
> >> >>
> >> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> >> >> at
> >> >>
> >> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> >> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> >> at
> >> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> >> at
> >> >>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> >> at
> >> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >> Source)
> >> >> at java.lang.Thread.run(Thread.java:595)
> >> >> Caused by: java.io.NotSerializableException:
> >> >> javax.xml.transform.dom.DOMSource
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> at java.util.HashMap.writeObject(HashMap.java:983)
> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> >> at
> >> >>
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> >> at
> >> >>
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> >> at java.lang.reflect.Method.invoke(Method.java:585)
> >> >> at
> >> >>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >> at
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> at
> >> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> at
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> >> >>
> >> >> Regards,
> >> >> /Eyji
> >> >> --
> >> >> View this message in context:
> >> >> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Cheers,
> >> > Guillaume Nodet
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Validation-Exception-tf2545818.html#a7094332
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7114072
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Validation Exception
Posted by Eyji <ey...@gmail.com>.
Hi!
Tried this now, and it doesn't work unfortunately. The If-statement in the
method assumes that the message is not of type StringSource which ours is.
Upon forcing the method to taking StringSourcel anyways, the new
content = sourceTransformer.toDOMSource(content);
gives the same error. I would be eternally greatful if you have any more
hints...
Regards,
/Eyji
gnodet wrote:
>
> You could create a custom class derived from the CopyTransformer.
> Just replace the call to sourceTransformer.toDOMSource(from) to
> sourceTransformer.toDOMSource(content).
> Then, you will need to configure it on the validation component
> <property name="messageTransformer">
> <bean class="com.company.myNewCopyTransformer" />
> </property>
>
> It should work.
>
> On 10/31/06, Eyji <ey...@gmail.com> wrote:
>>
>> Thanks for your quick reply yet again!
>> We'll fix a JIRA for this, but is there a workaround for this you could
>> recommend which we could try in SM? Maybe switching implementations or
>> something, surely someone else should have run into this issue before.
>>
>> /Eyji
>>
>>
>> gnodet wrote:
>> >
>> > The problems comes from the SourceTransformer class which is
>> > used by the CopyTransformer.
>> > When asked for a DOM representation of a NormalizedMessage, it
>> > stores the parsed DOM node in a property on the message.
>> >
>> > Could you please raise a JIRA for this issue ?
>> >
>> > On 10/31/06, Eyji <ey...@gmail.com> wrote:
>> >>
>> >> Hope you can help me out here: A validation component of mine is
>> >> configured
>> >> as follows:
>> >>
>> >> <sm:activationSpec componentName="validerare" service="foo:validerare"
>> >> endpoint="validerare" destinationService="foo:loggare">
>> >> <sm:component>
>> >> <bean
>> >> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >> <property
>> >> name="schemaResource" value="classpath:FOOAnwer.xsd" />
>> >> <property
>> >> name="errorHandler"
>> >> ref="messageAggregatingErrorHandlerFactory"/>
>> >> </bean>
>> >> <bean
>> >> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >> <property
>> >> name="schemaResource" value="classpath:FOOQuestion.xsd" />
>> >> <property
>> >> name="errorHandler"
>> >> ref="messageAggregatingErrorHandlerFactory"/>
>> >> </bean>
>> >> </sm:component>
>> >> </sm:activationSpec>
>> >>
>> >> The xml messages are retrieved from a JMS-queue. If the XML file
>> >> FOOAnswer.xml is validated first, all is OK. Upon dropping the
>> >> FOOAnswer.xml
>> >> on the Queue, the Runtime-exception below is thrown. If I try to
>> resend
>> >> FOOAnswer.xml again, I get the same exception and nothing works until
>> I
>> >> restart SM.
>> >>
>> >> Stacktrace of Exception:
>> >> ---------------------------------
>> >>
>> >> WARN - ValidateComponent - Unable to handle error:
>> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >> at
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
>> >> at
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
>> >> at
>> >>
>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
>> >> at
>> >>
>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>> >> at
>> >>
>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>> >> at
>> >>
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> >> at
>> >>
>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
>> >> at
>> >>
>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
>> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> >> at
>> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> >> at
>> >>
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> >> at
>> >>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >> at
>> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >> Source)
>> >> at java.lang.Thread.run(Thread.java:595)
>> >> Caused by: java.io.NotSerializableException:
>> >> javax.xml.transform.dom.DOMSource
>> >> at
>> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> at java.util.HashMap.writeObject(HashMap.java:983)
>> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >> at
>> >>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >> at
>> >>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >> at java.lang.reflect.Method.invoke(Method.java:585)
>> >> at
>> >>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> at
>> >>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >> at
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> at
>> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> at
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>> >>
>> >> Regards,
>> >> /Eyji
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7094332
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7114072
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
You could create a custom class derived from the CopyTransformer.
Just replace the call to sourceTransformer.toDOMSource(from) to
sourceTransformer.toDOMSource(content).
Then, you will need to configure it on the validation component
<property name="messageTransformer">
<bean class="com.company.myNewCopyTransformer" />
</property>
It should work.
On 10/31/06, Eyji <ey...@gmail.com> wrote:
>
> Thanks for your quick reply yet again!
> We'll fix a JIRA for this, but is there a workaround for this you could
> recommend which we could try in SM? Maybe switching implementations or
> something, surely someone else should have run into this issue before.
>
> /Eyji
>
>
> gnodet wrote:
> >
> > The problems comes from the SourceTransformer class which is
> > used by the CopyTransformer.
> > When asked for a DOM representation of a NormalizedMessage, it
> > stores the parsed DOM node in a property on the message.
> >
> > Could you please raise a JIRA for this issue ?
> >
> > On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >>
> >> Hope you can help me out here: A validation component of mine is
> >> configured
> >> as follows:
> >>
> >> <sm:activationSpec componentName="validerare" service="foo:validerare"
> >> endpoint="validerare" destinationService="foo:loggare">
> >> <sm:component>
> >> <bean
> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> <property
> >> name="schemaResource" value="classpath:FOOAnwer.xsd" />
> >> <property
> >> name="errorHandler"
> >> ref="messageAggregatingErrorHandlerFactory"/>
> >> </bean>
> >> <bean
> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> <property
> >> name="schemaResource" value="classpath:FOOQuestion.xsd" />
> >> <property
> >> name="errorHandler"
> >> ref="messageAggregatingErrorHandlerFactory"/>
> >> </bean>
> >> </sm:component>
> >> </sm:activationSpec>
> >>
> >> The xml messages are retrieved from a JMS-queue. If the XML file
> >> FOOAnswer.xml is validated first, all is OK. Upon dropping the
> >> FOOAnswer.xml
> >> on the Queue, the Runtime-exception below is thrown. If I try to resend
> >> FOOAnswer.xml again, I get the same exception and nothing works until I
> >> restart SM.
> >>
> >> Stacktrace of Exception:
> >> ---------------------------------
> >>
> >> WARN - ValidateComponent - Unable to handle error:
> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> at
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> >> at
> >> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> >> at
> >> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> >> at
> >> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> >> at
> >> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> >> at
> >> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> >> at
> >> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> at
> >> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> >> at
> >> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> at
> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> at
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> at
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> at
> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> Source)
> >> at java.lang.Thread.run(Thread.java:595)
> >> Caused by: java.io.NotSerializableException:
> >> javax.xml.transform.dom.DOMSource
> >> at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> at
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> at java.util.HashMap.writeObject(HashMap.java:983)
> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >> at
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> at
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> at java.lang.reflect.Method.invoke(Method.java:585)
> >> at
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> >> at
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> >> at
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> at
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> at
> >> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> >> at
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> at
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> at
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> >> at
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> >> at
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> at
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> at
> >> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> >> at
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> >> at
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> at
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> at
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> at
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> >>
> >> Regards,
> >> /Eyji
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7094332
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
Faults handling have not changed.
You need to build trunk from sources.
See http://issues.apache.org/activemq/browse/SM-756
for the rollbackOnError
On 11/24/06, Eyji <ey...@gmail.com> wrote:
>
> Thanks!! Would that fix be in the trunk or where can I look in order to test?
> You mention a rollback of status ERROR will be rolled back, which is good,
> but I do hope that validation "faults" will pass on as in our case to the
> Drools component.
>
> Cheers,
> /Eyji
>
>
> gnodet wrote:
> >
> > This has been fixed. You need to set the rollbackOnError="true"
> > attribute on the jca consumer endpoint, and it will rollback the
> > transaction when an exchange with an ERROR status comes back.
> >
> > On 11/24/06, Eyji <ey...@gmail.com> wrote:
> >>
> >> I've tried with both synchronous and asynchronous, but with the same
> >> results.
> >> Makes the error consistent at least :) Here is my whole service unit for
> >> the
> >> validation with endpoints and all, note that I'm now using a patched
> >> ValidateComponent:
> >>
> >> <sm:serviceunit id="jbi">
> >> <sm:activationSpecs>
> >> <!--
> >> XML validation.
> >> -->
> >> <sm:activationSpec service="sys:validerare"
> >> endpoint="eisInformationfragaValiderare"
> >>
> >> destinationService="sys:droolsRouter"
> >> destinationEndpoint="sysInformationRouting">
> >> <sm:component>
> >> <bean
> >> class="se.sys.smpatch.components.validation.ValidateComponent">
> >> <property
> >> name="schemaResource" value="classpath:SYSInformation.xsd"
> >> />
> >> <property
> >> name="errorHandler"
> >> ref="messageAggregatingErrorHandlerFactory" />
> >> </bean>
> >> </sm:component>
> >> </sm:activationSpec>
> >>
> >> <!--
> >> Drools routing
> >> -->
> >> <sm:activationSpec service="sys:droolsRouter"
> >> endpoint="sysInformationRouting">
> >> <sm:component>
> >> <bean
> >> class="org.apache.servicemix.components.drools.DroolsComponent">
> >> <property
> >> name="ruleBaseResource" value="classpath:drools/router.xml"
> >> />
> >> </bean>
> >> </sm:component>
> >> </sm:activationSpec>
> >>
> >> </sm:activationSpecs>
> >> </sm:serviceunit>
> >>
> >>
> >> The Dools rule has the following configuration:
> >>
> >> <rule name="Rule">
> >> <parameter identifier="exchange">
> >>
> >> <class>javax.jbi.messaging.MessageExchange</class>
> >> </parameter>
> >> <jbi:condition>somerule</jbi:condition>
> >> <jbi:invoke service="sys:sendToJmsOutQueue"/>
> >> </rule>
> >>
> >> My idea here is that the Drools rule take the XML message, send it
> >> further
> >> through the system if valid and to an JMS-based Errorqueue if invalid.
> >>
> >> Hope this gives the info needed to solve the issue. Is there a JIRA
> >> number I
> >> can poll to see when the bug is fixed?
> >>
> >> Regards,
> >> /Eyji
> >>
> >>
> >> gnodet wrote:
> >> >
> >> > This is an exception I will try to fix in the coming days.
> >> > I think the problem is due to a bug in the jca consumer from
> >> > servicemix-jms, which does not handle well when an exchange
> >> > with ERROR status is received. I guess you set the synchronous="true"
> >> > flag on the jca endpoint ... What's the target endpoint ?
> >> >
> >> > Anyway, in your case, you should have a fault, not an error.
> >> >
> >> > On 11/23/06, Eyji <ey...@gmail.com> wrote:
> >> >>
> >> >> Hello again!
> >> >>
> >> >> I took Gran Macdonalds advice and commented out the lines of code he
> >> >> suggested in the JIRA for this issue
> >> >> (https://issues.apache.org/activemq/browse/SM-728), and actually I do
> >> get
> >> >> further down the road to successful completion :)
> >> >> The problem now is that I get a couple of other exceptions:
> >> >>
> >> >> java.lang.UnsupportedOperationException: A destination must be
> >> specified.
> >> >> at
> >> >>
> >> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
> >> >> at
> >> >>
> >> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
> >> >> at
> >> >>
> >> org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
> >> >> at
> >> >>
> >> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
> >> >> at
> >> >>
> >> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> >> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> >> at
> >> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> >> at
> >> >>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> >> at
> >> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >> Source)
> >> >> at java.lang.Thread.run(Thread.java:595)
> >> >> DEBUG - DeliveryChannelImpl - Send
> >> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> >> >> DEBUG - DeliveryChannelImpl - Sent: InOnly[
> >> >> id: ID:PC-614199-1864-1164294222089-9:2
> >> >> status: Error
> >> >> role: consumer
> >> >> service: {http://rps.police.se/system}validation
> >> >> endpoint: myEndpoint
> >> >> in: <?xml version="1.0" encoding="UTF-8"?>
> >> >>
> >> >> error: java.lang.UnsupportedOperationException: A destination must
> >> be
> >> >> specified.
> >> >> ]
> >> >>
> >> >> DEBUG - DeliveryChannelImpl - Exception processing:
> >> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> >> >> ERROR - JmsComponent - Error setting exchange status
> >> to
> >> >> ERROR
> >> >> javax.jbi.messaging.MessagingException: illegal call to send /
> >> sendSync
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> >> at
> >> >>
> >> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> >> >> at
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> >> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> >> at
> >> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> >> at
> >> >>
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> >> at
> >> >>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> >> at
> >> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >> Source)
> >> >> at java.lang.Thread.run(Thread.java:595)
> >> >>
> >> >> Could be blissful ignorance on my behalf, or an effect of the
> >> codechange
> >> >> in
> >> >> ValidadateComponent. The flow here is that when the invalid XML is
> >> >> returned,
> >> >> it is evaluated using a drools rule and sent to a JMS queue. I've
> >> tested
> >> >> the
> >> >> flow successfully using valid XML documents. Yet again, I'm greatful
> >> for
> >> >> any
> >> >> hints on what this could be.
> >> >>
> >> >> Cheers,
> >> >> /Eyji
> >> >>
> >> >>
> >> >>
> >> >> Eyji wrote:
> >> >> >
> >> >> > Thanks for your quick reply yet again!
> >> >> > We'll fix a JIRA for this, but is there a workaround for this you
> >> could
> >> >> > recommend which we could try in SM? Maybe switching implementations
> >> or
> >> >> > something, surely someone else should have run into this issue
> >> before.
> >> >> >
> >> >> > /Eyji
> >> >> >
> >> >> >
> >> >> > gnodet wrote:
> >> >> >>
> >> >> >> The problems comes from the SourceTransformer class which is
> >> >> >> used by the CopyTransformer.
> >> >> >> When asked for a DOM representation of a NormalizedMessage, it
> >> >> >> stores the parsed DOM node in a property on the message.
> >> >> >>
> >> >> >> Could you please raise a JIRA for this issue ?
> >> >> >>
> >> >> >> On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >> >> >>>
> >> >> >>> Hope you can help me out here: A validation component of mine is
> >> >> >>> configured
> >> >> >>> as follows:
> >> >> >>>
> >> >> >>> <sm:activationSpec componentName="validerare"
> >> >> service="foo:validerare"
> >> >> >>> endpoint="validerare" destinationService="foo:loggare">
> >> >> >>> <sm:component>
> >> >> >>> <bean
> >> >> >>>
> >> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >> >>> <property
> >> >> >>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
> >> >> >>> <property
> >> >> >>> name="errorHandler"
> >> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >> >> >>> </bean>
> >> >> >>> <bean
> >> >> >>>
> >> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >> >>> <property
> >> >> >>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
> >> >> >>> <property
> >> >> >>> name="errorHandler"
> >> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >> >> >>> </bean>
> >> >> >>> </sm:component>
> >> >> >>> </sm:activationSpec>
> >> >> >>>
> >> >> >>> The xml messages are retrieved from a JMS-queue. If the XML file
> >> >> >>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
> >> >> >>> FOOAnswer.xml
> >> >> >>> on the Queue, the Runtime-exception below is thrown. If I try to
> >> >> resend
> >> >> >>> FOOAnswer.xml again, I get the same exception and nothing works
> >> until
> >> >> I
> >> >> >>> restart SM.
> >> >> >>>
> >> >> >>> Stacktrace of Exception:
> >> >> >>> ---------------------------------
> >> >> >>>
> >> >> >>> WARN - ValidateComponent - Unable to handle error:
> >> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> >> >> >>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> >> >>> at
> >> >> >>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> >> >>> at
> >> >> >>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >> >>> Source)
> >> >> >>> at java.lang.Thread.run(Thread.java:595)
> >> >> >>> Caused by: java.io.NotSerializableException:
> >> >> >>> javax.xml.transform.dom.DOMSource
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> >>> at java.util.HashMap.writeObject(HashMap.java:983)
> >> >> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> >> Method)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> >> >>> at java.lang.reflect.Method.invoke(Method.java:585)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >> >>> at
> >> >> >>>
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >> >>> at
> >> >> >>>
> >> >>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> >> >> >>>
> >> >> >>> Regards,
> >> >> >>> /Eyji
> >> >> >>> --
> >> >> >>> View this message in context:
> >> >> >>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> >> >> >>> Sent from the ServiceMix - User mailing list archive at
> >> Nabble.com.
> >> >> >>>
> >> >> >>>
> >> >> >>
> >> >> >>
> >> >> >> --
> >> >> >> Cheers,
> >> >> >> Guillaume Nodet
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Cheers,
> >> > Guillaume Nodet
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7518327
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7519144
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Validation Exception
Posted by Eyji <ey...@gmail.com>.
Thanks!! Would that fix be in the trunk or where can I look in order to test?
You mention a rollback of status ERROR will be rolled back, which is good,
but I do hope that validation "faults" will pass on as in our case to the
Drools component.
Cheers,
/Eyji
gnodet wrote:
>
> This has been fixed. You need to set the rollbackOnError="true"
> attribute on the jca consumer endpoint, and it will rollback the
> transaction when an exchange with an ERROR status comes back.
>
> On 11/24/06, Eyji <ey...@gmail.com> wrote:
>>
>> I've tried with both synchronous and asynchronous, but with the same
>> results.
>> Makes the error consistent at least :) Here is my whole service unit for
>> the
>> validation with endpoints and all, note that I'm now using a patched
>> ValidateComponent:
>>
>> <sm:serviceunit id="jbi">
>> <sm:activationSpecs>
>> <!--
>> XML validation.
>> -->
>> <sm:activationSpec service="sys:validerare"
>> endpoint="eisInformationfragaValiderare"
>>
>> destinationService="sys:droolsRouter"
>> destinationEndpoint="sysInformationRouting">
>> <sm:component>
>> <bean
>> class="se.sys.smpatch.components.validation.ValidateComponent">
>> <property
>> name="schemaResource" value="classpath:SYSInformation.xsd"
>> />
>> <property
>> name="errorHandler"
>> ref="messageAggregatingErrorHandlerFactory" />
>> </bean>
>> </sm:component>
>> </sm:activationSpec>
>>
>> <!--
>> Drools routing
>> -->
>> <sm:activationSpec service="sys:droolsRouter"
>> endpoint="sysInformationRouting">
>> <sm:component>
>> <bean
>> class="org.apache.servicemix.components.drools.DroolsComponent">
>> <property
>> name="ruleBaseResource" value="classpath:drools/router.xml"
>> />
>> </bean>
>> </sm:component>
>> </sm:activationSpec>
>>
>> </sm:activationSpecs>
>> </sm:serviceunit>
>>
>>
>> The Dools rule has the following configuration:
>>
>> <rule name="Rule">
>> <parameter identifier="exchange">
>>
>> <class>javax.jbi.messaging.MessageExchange</class>
>> </parameter>
>> <jbi:condition>somerule</jbi:condition>
>> <jbi:invoke service="sys:sendToJmsOutQueue"/>
>> </rule>
>>
>> My idea here is that the Drools rule take the XML message, send it
>> further
>> through the system if valid and to an JMS-based Errorqueue if invalid.
>>
>> Hope this gives the info needed to solve the issue. Is there a JIRA
>> number I
>> can poll to see when the bug is fixed?
>>
>> Regards,
>> /Eyji
>>
>>
>> gnodet wrote:
>> >
>> > This is an exception I will try to fix in the coming days.
>> > I think the problem is due to a bug in the jca consumer from
>> > servicemix-jms, which does not handle well when an exchange
>> > with ERROR status is received. I guess you set the synchronous="true"
>> > flag on the jca endpoint ... What's the target endpoint ?
>> >
>> > Anyway, in your case, you should have a fault, not an error.
>> >
>> > On 11/23/06, Eyji <ey...@gmail.com> wrote:
>> >>
>> >> Hello again!
>> >>
>> >> I took Gran Macdonalds advice and commented out the lines of code he
>> >> suggested in the JIRA for this issue
>> >> (https://issues.apache.org/activemq/browse/SM-728), and actually I do
>> get
>> >> further down the road to successful completion :)
>> >> The problem now is that I get a couple of other exceptions:
>> >>
>> >> java.lang.UnsupportedOperationException: A destination must be
>> specified.
>> >> at
>> >>
>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
>> >> at
>> >>
>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
>> >> at
>> >>
>> org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
>> >> at
>> >>
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
>> >> at
>> >>
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
>> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> >> at
>> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> >> at
>> >>
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> >> at
>> >>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >> at
>> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >> Source)
>> >> at java.lang.Thread.run(Thread.java:595)
>> >> DEBUG - DeliveryChannelImpl - Send
>> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
>> >> DEBUG - DeliveryChannelImpl - Sent: InOnly[
>> >> id: ID:PC-614199-1864-1164294222089-9:2
>> >> status: Error
>> >> role: consumer
>> >> service: {http://rps.police.se/system}validation
>> >> endpoint: myEndpoint
>> >> in: <?xml version="1.0" encoding="UTF-8"?>
>> >>
>> >> error: java.lang.UnsupportedOperationException: A destination must
>> be
>> >> specified.
>> >> ]
>> >>
>> >> DEBUG - DeliveryChannelImpl - Exception processing:
>> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
>> >> ERROR - JmsComponent - Error setting exchange status
>> to
>> >> ERROR
>> >> javax.jbi.messaging.MessagingException: illegal call to send /
>> sendSync
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> >> at
>> >>
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
>> >> at
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>> >> at
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
>> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> >> at
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> >> at
>> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> >> at
>> >>
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> >> at
>> >>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >> at
>> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >> Source)
>> >> at java.lang.Thread.run(Thread.java:595)
>> >>
>> >> Could be blissful ignorance on my behalf, or an effect of the
>> codechange
>> >> in
>> >> ValidadateComponent. The flow here is that when the invalid XML is
>> >> returned,
>> >> it is evaluated using a drools rule and sent to a JMS queue. I've
>> tested
>> >> the
>> >> flow successfully using valid XML documents. Yet again, I'm greatful
>> for
>> >> any
>> >> hints on what this could be.
>> >>
>> >> Cheers,
>> >> /Eyji
>> >>
>> >>
>> >>
>> >> Eyji wrote:
>> >> >
>> >> > Thanks for your quick reply yet again!
>> >> > We'll fix a JIRA for this, but is there a workaround for this you
>> could
>> >> > recommend which we could try in SM? Maybe switching implementations
>> or
>> >> > something, surely someone else should have run into this issue
>> before.
>> >> >
>> >> > /Eyji
>> >> >
>> >> >
>> >> > gnodet wrote:
>> >> >>
>> >> >> The problems comes from the SourceTransformer class which is
>> >> >> used by the CopyTransformer.
>> >> >> When asked for a DOM representation of a NormalizedMessage, it
>> >> >> stores the parsed DOM node in a property on the message.
>> >> >>
>> >> >> Could you please raise a JIRA for this issue ?
>> >> >>
>> >> >> On 10/31/06, Eyji <ey...@gmail.com> wrote:
>> >> >>>
>> >> >>> Hope you can help me out here: A validation component of mine is
>> >> >>> configured
>> >> >>> as follows:
>> >> >>>
>> >> >>> <sm:activationSpec componentName="validerare"
>> >> service="foo:validerare"
>> >> >>> endpoint="validerare" destinationService="foo:loggare">
>> >> >>> <sm:component>
>> >> >>> <bean
>> >> >>>
>> >> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >> >>> <property
>> >> >>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
>> >> >>> <property
>> >> >>> name="errorHandler"
>> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
>> >> >>> </bean>
>> >> >>> <bean
>> >> >>>
>> >> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >> >>> <property
>> >> >>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
>> >> >>> <property
>> >> >>> name="errorHandler"
>> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
>> >> >>> </bean>
>> >> >>> </sm:component>
>> >> >>> </sm:activationSpec>
>> >> >>>
>> >> >>> The xml messages are retrieved from a JMS-queue. If the XML file
>> >> >>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
>> >> >>> FOOAnswer.xml
>> >> >>> on the Queue, the Runtime-exception below is thrown. If I try to
>> >> resend
>> >> >>> FOOAnswer.xml again, I get the same exception and nothing works
>> until
>> >> I
>> >> >>> restart SM.
>> >> >>>
>> >> >>> Stacktrace of Exception:
>> >> >>> ---------------------------------
>> >> >>>
>> >> >>> WARN - ValidateComponent - Unable to handle error:
>> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
>> >> >>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> >> >>> at
>> >> >>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >> >>> at
>> >> >>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >> >>> Source)
>> >> >>> at java.lang.Thread.run(Thread.java:595)
>> >> >>> Caused by: java.io.NotSerializableException:
>> >> >>> javax.xml.transform.dom.DOMSource
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> >>> at java.util.HashMap.writeObject(HashMap.java:983)
>> >> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >> Method)
>> >> >>> at
>> >> >>>
>> >>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >> >>> at
>> >> >>>
>> >>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >> >>> at java.lang.reflect.Method.invoke(Method.java:585)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >> >>> at
>> >> >>>
>> >>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >> >>> at
>> >> >>>
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >> >>> at
>> >> >>>
>> >>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>> >> >>>
>> >> >>> Regards,
>> >> >>> /Eyji
>> >> >>> --
>> >> >>> View this message in context:
>> >> >>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
>> >> >>> Sent from the ServiceMix - User mailing list archive at
>> Nabble.com.
>> >> >>>
>> >> >>>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Cheers,
>> >> >> Guillaume Nodet
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7518327
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7519144
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
This has been fixed. You need to set the rollbackOnError="true"
attribute on the jca consumer endpoint, and it will rollback the
transaction when an exchange with an ERROR status comes back.
On 11/24/06, Eyji <ey...@gmail.com> wrote:
>
> I've tried with both synchronous and asynchronous, but with the same results.
> Makes the error consistent at least :) Here is my whole service unit for the
> validation with endpoints and all, note that I'm now using a patched
> ValidateComponent:
>
> <sm:serviceunit id="jbi">
> <sm:activationSpecs>
> <!--
> XML validation.
> -->
> <sm:activationSpec service="sys:validerare"
> endpoint="eisInformationfragaValiderare"
> destinationService="sys:droolsRouter"
> destinationEndpoint="sysInformationRouting">
> <sm:component>
> <bean class="se.sys.smpatch.components.validation.ValidateComponent">
> <property name="schemaResource" value="classpath:SYSInformation.xsd"
> />
> <property name="errorHandler"
> ref="messageAggregatingErrorHandlerFactory" />
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> <!--
> Drools routing
> -->
> <sm:activationSpec service="sys:droolsRouter"
> endpoint="sysInformationRouting">
> <sm:component>
> <bean class="org.apache.servicemix.components.drools.DroolsComponent">
> <property name="ruleBaseResource" value="classpath:drools/router.xml"
> />
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> </sm:activationSpecs>
> </sm:serviceunit>
>
>
> The Dools rule has the following configuration:
>
> <rule name="Rule">
> <parameter identifier="exchange">
> <class>javax.jbi.messaging.MessageExchange</class>
> </parameter>
> <jbi:condition>somerule</jbi:condition>
> <jbi:invoke service="sys:sendToJmsOutQueue"/>
> </rule>
>
> My idea here is that the Drools rule take the XML message, send it further
> through the system if valid and to an JMS-based Errorqueue if invalid.
>
> Hope this gives the info needed to solve the issue. Is there a JIRA number I
> can poll to see when the bug is fixed?
>
> Regards,
> /Eyji
>
>
> gnodet wrote:
> >
> > This is an exception I will try to fix in the coming days.
> > I think the problem is due to a bug in the jca consumer from
> > servicemix-jms, which does not handle well when an exchange
> > with ERROR status is received. I guess you set the synchronous="true"
> > flag on the jca endpoint ... What's the target endpoint ?
> >
> > Anyway, in your case, you should have a fault, not an error.
> >
> > On 11/23/06, Eyji <ey...@gmail.com> wrote:
> >>
> >> Hello again!
> >>
> >> I took Gran Macdonalds advice and commented out the lines of code he
> >> suggested in the JIRA for this issue
> >> (https://issues.apache.org/activemq/browse/SM-728), and actually I do get
> >> further down the road to successful completion :)
> >> The problem now is that I get a couple of other exceptions:
> >>
> >> java.lang.UnsupportedOperationException: A destination must be specified.
> >> at
> >> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
> >> at
> >> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
> >> at
> >> org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
> >> at
> >> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
> >> at
> >> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> at
> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> at
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> at
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> at
> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> Source)
> >> at java.lang.Thread.run(Thread.java:595)
> >> DEBUG - DeliveryChannelImpl - Send
> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> >> DEBUG - DeliveryChannelImpl - Sent: InOnly[
> >> id: ID:PC-614199-1864-1164294222089-9:2
> >> status: Error
> >> role: consumer
> >> service: {http://rps.police.se/system}validation
> >> endpoint: myEndpoint
> >> in: <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> error: java.lang.UnsupportedOperationException: A destination must be
> >> specified.
> >> ]
> >>
> >> DEBUG - DeliveryChannelImpl - Exception processing:
> >> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> >> ERROR - JmsComponent - Error setting exchange status to
> >> ERROR
> >> javax.jbi.messaging.MessagingException: illegal call to send / sendSync
> >> at
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> at
> >> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
> >> at
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> >> at
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> >> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> at
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> at
> >> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> at
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> at
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> at
> >> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> Source)
> >> at java.lang.Thread.run(Thread.java:595)
> >>
> >> Could be blissful ignorance on my behalf, or an effect of the codechange
> >> in
> >> ValidadateComponent. The flow here is that when the invalid XML is
> >> returned,
> >> it is evaluated using a drools rule and sent to a JMS queue. I've tested
> >> the
> >> flow successfully using valid XML documents. Yet again, I'm greatful for
> >> any
> >> hints on what this could be.
> >>
> >> Cheers,
> >> /Eyji
> >>
> >>
> >>
> >> Eyji wrote:
> >> >
> >> > Thanks for your quick reply yet again!
> >> > We'll fix a JIRA for this, but is there a workaround for this you could
> >> > recommend which we could try in SM? Maybe switching implementations or
> >> > something, surely someone else should have run into this issue before.
> >> >
> >> > /Eyji
> >> >
> >> >
> >> > gnodet wrote:
> >> >>
> >> >> The problems comes from the SourceTransformer class which is
> >> >> used by the CopyTransformer.
> >> >> When asked for a DOM representation of a NormalizedMessage, it
> >> >> stores the parsed DOM node in a property on the message.
> >> >>
> >> >> Could you please raise a JIRA for this issue ?
> >> >>
> >> >> On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >> >>>
> >> >>> Hope you can help me out here: A validation component of mine is
> >> >>> configured
> >> >>> as follows:
> >> >>>
> >> >>> <sm:activationSpec componentName="validerare"
> >> service="foo:validerare"
> >> >>> endpoint="validerare" destinationService="foo:loggare">
> >> >>> <sm:component>
> >> >>> <bean
> >> >>>
> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >>> <property
> >> >>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
> >> >>> <property
> >> >>> name="errorHandler"
> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >> >>> </bean>
> >> >>> <bean
> >> >>>
> >> class="org.apache.servicemix.components.validation.ValidateComponent">
> >> >>> <property
> >> >>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
> >> >>> <property
> >> >>> name="errorHandler"
> >> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >> >>> </bean>
> >> >>> </sm:component>
> >> >>> </sm:activationSpec>
> >> >>>
> >> >>> The xml messages are retrieved from a JMS-queue. If the XML file
> >> >>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
> >> >>> FOOAnswer.xml
> >> >>> on the Queue, the Runtime-exception below is thrown. If I try to
> >> resend
> >> >>> FOOAnswer.xml again, I get the same exception and nothing works until
> >> I
> >> >>> restart SM.
> >> >>>
> >> >>> Stacktrace of Exception:
> >> >>> ---------------------------------
> >> >>>
> >> >>> WARN - ValidateComponent - Unable to handle error:
> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >> >>> at
> >> >>>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> >> >>> at
> >> >>>
> >> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> >> >>> at
> >> >>>
> >> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> >> >>> at
> >> >>>
> >> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> >> >>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >> >>> at
> >> >>>
> >> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >> >>> at
> >> >>>
> >> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >> >>> at
> >> >>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >> >>> at
> >> >>>
> >> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >> >>> at
> >> >>>
> >> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >> >>> at
> >> >>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >> >>> Source)
> >> >>> at java.lang.Thread.run(Thread.java:595)
> >> >>> Caused by: java.io.NotSerializableException:
> >> >>> javax.xml.transform.dom.DOMSource
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >>> at java.util.HashMap.writeObject(HashMap.java:983)
> >> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> Method)
> >> >>> at
> >> >>>
> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >> >>> at
> >> >>>
> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >> >>> at java.lang.reflect.Method.invoke(Method.java:585)
> >> >>> at
> >> >>>
> >> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> >> >>> at
> >> >>>
> >> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >> >>> at
> >> >>>
> >> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >> >>> at
> >> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >> >>> at
> >> >>>
> >> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> >> >>>
> >> >>> Regards,
> >> >>> /Eyji
> >> >>> --
> >> >>> View this message in context:
> >> >>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> >> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >> --
> >> >> Cheers,
> >> >> Guillaume Nodet
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7518327
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Validation Exception
Posted by Eyji <ey...@gmail.com>.
I've tried with both synchronous and asynchronous, but with the same results.
Makes the error consistent at least :) Here is my whole service unit for the
validation with endpoints and all, note that I'm now using a patched
ValidateComponent:
<sm:serviceunit id="jbi">
<sm:activationSpecs>
<!--
XML validation.
-->
<sm:activationSpec service="sys:validerare"
endpoint="eisInformationfragaValiderare"
destinationService="sys:droolsRouter"
destinationEndpoint="sysInformationRouting">
<sm:component>
<bean class="se.sys.smpatch.components.validation.ValidateComponent">
<property name="schemaResource" value="classpath:SYSInformation.xsd"
/>
<property name="errorHandler"
ref="messageAggregatingErrorHandlerFactory" />
</bean>
</sm:component>
</sm:activationSpec>
<!--
Drools routing
-->
<sm:activationSpec service="sys:droolsRouter"
endpoint="sysInformationRouting">
<sm:component>
<bean class="org.apache.servicemix.components.drools.DroolsComponent">
<property name="ruleBaseResource" value="classpath:drools/router.xml"
/>
</bean>
</sm:component>
</sm:activationSpec>
</sm:activationSpecs>
</sm:serviceunit>
The Dools rule has the following configuration:
<rule name="Rule">
<parameter identifier="exchange">
<class>javax.jbi.messaging.MessageExchange</class>
</parameter>
<jbi:condition>somerule</jbi:condition>
<jbi:invoke service="sys:sendToJmsOutQueue"/>
</rule>
My idea here is that the Drools rule take the XML message, send it further
through the system if valid and to an JMS-based Errorqueue if invalid.
Hope this gives the info needed to solve the issue. Is there a JIRA number I
can poll to see when the bug is fixed?
Regards,
/Eyji
gnodet wrote:
>
> This is an exception I will try to fix in the coming days.
> I think the problem is due to a bug in the jca consumer from
> servicemix-jms, which does not handle well when an exchange
> with ERROR status is received. I guess you set the synchronous="true"
> flag on the jca endpoint ... What's the target endpoint ?
>
> Anyway, in your case, you should have a fault, not an error.
>
> On 11/23/06, Eyji <ey...@gmail.com> wrote:
>>
>> Hello again!
>>
>> I took Gran Macdonalds advice and commented out the lines of code he
>> suggested in the JIRA for this issue
>> (https://issues.apache.org/activemq/browse/SM-728), and actually I do get
>> further down the road to successful completion :)
>> The problem now is that I get a couple of other exceptions:
>>
>> java.lang.UnsupportedOperationException: A destination must be specified.
>> at
>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
>> at
>> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
>> at
>> org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
>> at
>> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Thread.java:595)
>> DEBUG - DeliveryChannelImpl - Send
>> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
>> DEBUG - DeliveryChannelImpl - Sent: InOnly[
>> id: ID:PC-614199-1864-1164294222089-9:2
>> status: Error
>> role: consumer
>> service: {http://rps.police.se/system}validation
>> endpoint: myEndpoint
>> in: <?xml version="1.0" encoding="UTF-8"?>
>>
>> error: java.lang.UnsupportedOperationException: A destination must be
>> specified.
>> ]
>>
>> DEBUG - DeliveryChannelImpl - Exception processing:
>> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
>> ERROR - JmsComponent - Error setting exchange status to
>> ERROR
>> javax.jbi.messaging.MessagingException: illegal call to send / sendSync
>> at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> at
>> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Thread.java:595)
>>
>> Could be blissful ignorance on my behalf, or an effect of the codechange
>> in
>> ValidadateComponent. The flow here is that when the invalid XML is
>> returned,
>> it is evaluated using a drools rule and sent to a JMS queue. I've tested
>> the
>> flow successfully using valid XML documents. Yet again, I'm greatful for
>> any
>> hints on what this could be.
>>
>> Cheers,
>> /Eyji
>>
>>
>>
>> Eyji wrote:
>> >
>> > Thanks for your quick reply yet again!
>> > We'll fix a JIRA for this, but is there a workaround for this you could
>> > recommend which we could try in SM? Maybe switching implementations or
>> > something, surely someone else should have run into this issue before.
>> >
>> > /Eyji
>> >
>> >
>> > gnodet wrote:
>> >>
>> >> The problems comes from the SourceTransformer class which is
>> >> used by the CopyTransformer.
>> >> When asked for a DOM representation of a NormalizedMessage, it
>> >> stores the parsed DOM node in a property on the message.
>> >>
>> >> Could you please raise a JIRA for this issue ?
>> >>
>> >> On 10/31/06, Eyji <ey...@gmail.com> wrote:
>> >>>
>> >>> Hope you can help me out here: A validation component of mine is
>> >>> configured
>> >>> as follows:
>> >>>
>> >>> <sm:activationSpec componentName="validerare"
>> service="foo:validerare"
>> >>> endpoint="validerare" destinationService="foo:loggare">
>> >>> <sm:component>
>> >>> <bean
>> >>>
>> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >>> <property
>> >>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
>> >>> <property
>> >>> name="errorHandler"
>> >>> ref="messageAggregatingErrorHandlerFactory"/>
>> >>> </bean>
>> >>> <bean
>> >>>
>> class="org.apache.servicemix.components.validation.ValidateComponent">
>> >>> <property
>> >>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
>> >>> <property
>> >>> name="errorHandler"
>> >>> ref="messageAggregatingErrorHandlerFactory"/>
>> >>> </bean>
>> >>> </sm:component>
>> >>> </sm:activationSpec>
>> >>>
>> >>> The xml messages are retrieved from a JMS-queue. If the XML file
>> >>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
>> >>> FOOAnswer.xml
>> >>> on the Queue, the Runtime-exception below is thrown. If I try to
>> resend
>> >>> FOOAnswer.xml again, I get the same exception and nothing works until
>> I
>> >>> restart SM.
>> >>>
>> >>> Stacktrace of Exception:
>> >>> ---------------------------------
>> >>>
>> >>> WARN - ValidateComponent - Unable to handle error:
>> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> >>> at
>> >>>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
>> >>> at
>> >>>
>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
>> >>> at
>> >>>
>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
>> >>> at
>> >>>
>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> >>> at
>> >>>
>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
>> >>> at
>> >>>
>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
>> >>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> >>> at
>> >>>
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> >>> at
>> >>>
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> >>> at
>> >>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> >>> at
>> >>>
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> >>> at
>> >>>
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> >>> at
>> >>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> >>> Source)
>> >>> at java.lang.Thread.run(Thread.java:595)
>> >>> Caused by: java.io.NotSerializableException:
>> >>> javax.xml.transform.dom.DOMSource
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >>> at java.util.HashMap.writeObject(HashMap.java:983)
>> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> Method)
>> >>> at
>> >>>
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> >>> at
>> >>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> >>> at java.lang.reflect.Method.invoke(Method.java:585)
>> >>> at
>> >>>
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
>> >>> at
>> >>>
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> >>> at
>> >>>
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> >>> at
>> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> >>> at
>> >>>
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>> >>>
>> >>> Regards,
>> >>> /Eyji
>> >>> --
>> >>> View this message in context:
>> >>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
>> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>>
>> >>>
>> >>
>> >>
>> >> --
>> >> Cheers,
>> >> Guillaume Nodet
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7518327
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
This is an exception I will try to fix in the coming days.
I think the problem is due to a bug in the jca consumer from
servicemix-jms, which does not handle well when an exchange
with ERROR status is received. I guess you set the synchronous="true"
flag on the jca endpoint ... What's the target endpoint ?
Anyway, in your case, you should have a fault, not an error.
On 11/23/06, Eyji <ey...@gmail.com> wrote:
>
> Hello again!
>
> I took Gran Macdonalds advice and commented out the lines of code he
> suggested in the JIRA for this issue
> (https://issues.apache.org/activemq/browse/SM-728), and actually I do get
> further down the road to successful completion :)
> The problem now is that I get a couple of other exceptions:
>
> java.lang.UnsupportedOperationException: A destination must be specified.
> at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
> at
> org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
> at
> org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
> at
> org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:595)
> DEBUG - DeliveryChannelImpl - Send
> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> DEBUG - DeliveryChannelImpl - Sent: InOnly[
> id: ID:PC-614199-1864-1164294222089-9:2
> status: Error
> role: consumer
> service: {http://rps.police.se/system}validation
> endpoint: myEndpoint
> in: <?xml version="1.0" encoding="UTF-8"?>
>
> error: java.lang.UnsupportedOperationException: A destination must be
> specified.
> ]
>
> DEBUG - DeliveryChannelImpl - Exception processing:
> ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
> ERROR - JmsComponent - Error setting exchange status to
> ERROR
> javax.jbi.messaging.MessagingException: illegal call to send / sendSync
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> at
> org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:595)
>
> Could be blissful ignorance on my behalf, or an effect of the codechange in
> ValidadateComponent. The flow here is that when the invalid XML is returned,
> it is evaluated using a drools rule and sent to a JMS queue. I've tested the
> flow successfully using valid XML documents. Yet again, I'm greatful for any
> hints on what this could be.
>
> Cheers,
> /Eyji
>
>
>
> Eyji wrote:
> >
> > Thanks for your quick reply yet again!
> > We'll fix a JIRA for this, but is there a workaround for this you could
> > recommend which we could try in SM? Maybe switching implementations or
> > something, surely someone else should have run into this issue before.
> >
> > /Eyji
> >
> >
> > gnodet wrote:
> >>
> >> The problems comes from the SourceTransformer class which is
> >> used by the CopyTransformer.
> >> When asked for a DOM representation of a NormalizedMessage, it
> >> stores the parsed DOM node in a property on the message.
> >>
> >> Could you please raise a JIRA for this issue ?
> >>
> >> On 10/31/06, Eyji <ey...@gmail.com> wrote:
> >>>
> >>> Hope you can help me out here: A validation component of mine is
> >>> configured
> >>> as follows:
> >>>
> >>> <sm:activationSpec componentName="validerare" service="foo:validerare"
> >>> endpoint="validerare" destinationService="foo:loggare">
> >>> <sm:component>
> >>> <bean
> >>> class="org.apache.servicemix.components.validation.ValidateComponent">
> >>> <property
> >>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
> >>> <property
> >>> name="errorHandler"
> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >>> </bean>
> >>> <bean
> >>> class="org.apache.servicemix.components.validation.ValidateComponent">
> >>> <property
> >>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
> >>> <property
> >>> name="errorHandler"
> >>> ref="messageAggregatingErrorHandlerFactory"/>
> >>> </bean>
> >>> </sm:component>
> >>> </sm:activationSpec>
> >>>
> >>> The xml messages are retrieved from a JMS-queue. If the XML file
> >>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
> >>> FOOAnswer.xml
> >>> on the Queue, the Runtime-exception below is thrown. If I try to resend
> >>> FOOAnswer.xml again, I get the same exception and nothing works until I
> >>> restart SM.
> >>>
> >>> Stacktrace of Exception:
> >>> ---------------------------------
> >>>
> >>> WARN - ValidateComponent - Unable to handle error:
> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> >>> at
> >>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> >>> at
> >>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> >>> at
> >>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> >>> at
> >>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> >>> at
> >>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> >>> at
> >>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> >>> at
> >>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> >>> at
> >>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> >>> at
> >>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> >>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> >>> at
> >>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> >>> at
> >>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> >>> at
> >>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> >>> at
> >>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> >>> at
> >>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> >>> at
> >>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
> >>> Source)
> >>> at java.lang.Thread.run(Thread.java:595)
> >>> Caused by: java.io.NotSerializableException:
> >>> javax.xml.transform.dom.DOMSource
> >>> at
> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >>> at java.util.HashMap.writeObject(HashMap.java:983)
> >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>> at
> >>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>> at
> >>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>> at java.lang.reflect.Method.invoke(Method.java:585)
> >>> at
> >>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> >>> at
> >>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> >>> at
> >>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> >>> at
> >>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >>> at
> >>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >>> at
> >>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> >>> at
> >>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> >>> at
> >>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> >>> at
> >>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> >>> at
> >>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> >>> at
> >>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> >>> at
> >>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> >>> at
> >>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
> >>>
> >>> Regards,
> >>> /Eyji
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> >>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>
> >>
> >> --
> >> Cheers,
> >> Guillaume Nodet
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet
Re: Validation Exception
Posted by Eyji <ey...@gmail.com>.
Hello again!
I took Gran Macdonalds advice and commented out the lines of code he
suggested in the JIRA for this issue
(https://issues.apache.org/activemq/browse/SM-728), and actually I do get
further down the road to successful completion :)
The problem now is that I get a couple of other exceptions:
java.lang.UnsupportedOperationException: A destination must be specified.
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:448)
at
org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:356)
at
org.apache.servicemix.jms.jca.JcaConsumerProcessor.process(JcaConsumerProcessor.java:142)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:431)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:43)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
DEBUG - DeliveryChannelImpl - Send
ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
DEBUG - DeliveryChannelImpl - Sent: InOnly[
id: ID:PC-614199-1864-1164294222089-9:2
status: Error
role: consumer
service: {http://rps.police.se/system}validation
endpoint: myEndpoint
in: <?xml version="1.0" encoding="UTF-8"?>
error: java.lang.UnsupportedOperationException: A destination must be
specified.
]
DEBUG - DeliveryChannelImpl - Exception processing:
ID:PC-614199-1864-1164294222089-9:2 in DeliveryChannel{servicemix-jms}
ERROR - JmsComponent - Error setting exchange status to
ERROR
javax.jbi.messaging.MessagingException: illegal call to send / sendSync
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.handleSend(MessageExchangeImpl.java:571)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:364)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:55)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:602)
at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
at
org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
at
org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
at
org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Thread.java:595)
Could be blissful ignorance on my behalf, or an effect of the codechange in
ValidadateComponent. The flow here is that when the invalid XML is returned,
it is evaluated using a drools rule and sent to a JMS queue. I've tested the
flow successfully using valid XML documents. Yet again, I'm greatful for any
hints on what this could be.
Cheers,
/Eyji
Eyji wrote:
>
> Thanks for your quick reply yet again!
> We'll fix a JIRA for this, but is there a workaround for this you could
> recommend which we could try in SM? Maybe switching implementations or
> something, surely someone else should have run into this issue before.
>
> /Eyji
>
>
> gnodet wrote:
>>
>> The problems comes from the SourceTransformer class which is
>> used by the CopyTransformer.
>> When asked for a DOM representation of a NormalizedMessage, it
>> stores the parsed DOM node in a property on the message.
>>
>> Could you please raise a JIRA for this issue ?
>>
>> On 10/31/06, Eyji <ey...@gmail.com> wrote:
>>>
>>> Hope you can help me out here: A validation component of mine is
>>> configured
>>> as follows:
>>>
>>> <sm:activationSpec componentName="validerare" service="foo:validerare"
>>> endpoint="validerare" destinationService="foo:loggare">
>>> <sm:component>
>>> <bean
>>> class="org.apache.servicemix.components.validation.ValidateComponent">
>>> <property
>>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
>>> <property
>>> name="errorHandler"
>>> ref="messageAggregatingErrorHandlerFactory"/>
>>> </bean>
>>> <bean
>>> class="org.apache.servicemix.components.validation.ValidateComponent">
>>> <property
>>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
>>> <property
>>> name="errorHandler"
>>> ref="messageAggregatingErrorHandlerFactory"/>
>>> </bean>
>>> </sm:component>
>>> </sm:activationSpec>
>>>
>>> The xml messages are retrieved from a JMS-queue. If the XML file
>>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
>>> FOOAnswer.xml
>>> on the Queue, the Runtime-exception below is thrown. If I try to resend
>>> FOOAnswer.xml again, I get the same exception and nothing works until I
>>> restart SM.
>>>
>>> Stacktrace of Exception:
>>> ---------------------------------
>>>
>>> WARN - ValidateComponent - Unable to handle error:
>>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>>> at
>>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
>>> at
>>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
>>> at
>>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
>>> at
>>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>>> at
>>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>>> at
>>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>>> at
>>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>>> at
>>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
>>> at
>>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
>>> at
>>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>>> at
>>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
>>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>>> at
>>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>>> at
>>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>>> at
>>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>>> at
>>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>>> at
>>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>>> at
>>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>>> Source)
>>> at java.lang.Thread.run(Thread.java:595)
>>> Caused by: java.io.NotSerializableException:
>>> javax.xml.transform.dom.DOMSource
>>> at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>>> at
>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>>> at java.util.HashMap.writeObject(HashMap.java:983)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>> at java.lang.reflect.Method.invoke(Method.java:585)
>>> at
>>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
>>> at
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
>>> at
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>>> at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>>> at
>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>>> at
>>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
>>> at
>>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>>> at
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>>> at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>>> at
>>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
>>> at
>>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
>>> at
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>>> at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>>> at
>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>>> at
>>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
>>> at
>>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
>>> at
>>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>>> at
>>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>>> at
>>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>>> at
>>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>>> at
>>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>>>
>>> Regards,
>>> /Eyji
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> Cheers,
>> Guillaume Nodet
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818s12049.html#a7510181
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Eyji <ey...@gmail.com>.
Thanks for your quick reply yet again!
We'll fix a JIRA for this, but is there a workaround for this you could
recommend which we could try in SM? Maybe switching implementations or
something, surely someone else should have run into this issue before.
/Eyji
gnodet wrote:
>
> The problems comes from the SourceTransformer class which is
> used by the CopyTransformer.
> When asked for a DOM representation of a NormalizedMessage, it
> stores the parsed DOM node in a property on the message.
>
> Could you please raise a JIRA for this issue ?
>
> On 10/31/06, Eyji <ey...@gmail.com> wrote:
>>
>> Hope you can help me out here: A validation component of mine is
>> configured
>> as follows:
>>
>> <sm:activationSpec componentName="validerare" service="foo:validerare"
>> endpoint="validerare" destinationService="foo:loggare">
>> <sm:component>
>> <bean
>> class="org.apache.servicemix.components.validation.ValidateComponent">
>> <property
>> name="schemaResource" value="classpath:FOOAnwer.xsd" />
>> <property
>> name="errorHandler"
>> ref="messageAggregatingErrorHandlerFactory"/>
>> </bean>
>> <bean
>> class="org.apache.servicemix.components.validation.ValidateComponent">
>> <property
>> name="schemaResource" value="classpath:FOOQuestion.xsd" />
>> <property
>> name="errorHandler"
>> ref="messageAggregatingErrorHandlerFactory"/>
>> </bean>
>> </sm:component>
>> </sm:activationSpec>
>>
>> The xml messages are retrieved from a JMS-queue. If the XML file
>> FOOAnswer.xml is validated first, all is OK. Upon dropping the
>> FOOAnswer.xml
>> on the Queue, the Runtime-exception below is thrown. If I try to resend
>> FOOAnswer.xml again, I get the same exception and nothing works until I
>> restart SM.
>>
>> Stacktrace of Exception:
>> ---------------------------------
>>
>> WARN - ValidateComponent - Unable to handle error:
>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
>> at
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
>> at
>> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
>> at
>> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
>> at
>> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
>> at
>> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
>> at
>> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
>> at
>> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
>> at
>> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
>> at
>> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
>> at
>> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
>> at
>> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
>> at
>> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
>> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
>> at
>> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
>> at
>> org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
>> at
>> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
>> at
>> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
>> at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown
>> Source)
>> at java.lang.Thread.run(Thread.java:595)
>> Caused by: java.io.NotSerializableException:
>> javax.xml.transform.dom.DOMSource
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
>> at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> at java.util.HashMap.writeObject(HashMap.java:983)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
>> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
>> at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
>> at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> at
>> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
>> at
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> at
>> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
>> at
>> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
>> at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> at
>> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
>> at
>> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
>> at
>> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
>> at
>> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
>> at
>> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
>> at
>> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
>> at
>> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>>
>> Regards,
>> /Eyji
>> --
>> View this message in context:
>> http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7094332
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: Validation Exception
Posted by Guillaume Nodet <gn...@gmail.com>.
The problems comes from the SourceTransformer class which is
used by the CopyTransformer.
When asked for a DOM representation of a NormalizedMessage, it
stores the parsed DOM node in a property on the message.
Could you please raise a JIRA for this issue ?
On 10/31/06, Eyji <ey...@gmail.com> wrote:
>
> Hope you can help me out here: A validation component of mine is configured
> as follows:
>
> <sm:activationSpec componentName="validerare" service="foo:validerare"
> endpoint="validerare" destinationService="foo:loggare">
> <sm:component>
> <bean
> class="org.apache.servicemix.components.validation.ValidateComponent">
> <property name="schemaResource" value="classpath:FOOAnwer.xsd" />
> <property name="errorHandler"
> ref="messageAggregatingErrorHandlerFactory"/>
> </bean>
> <bean
> class="org.apache.servicemix.components.validation.ValidateComponent">
> <property name="schemaResource" value="classpath:FOOQuestion.xsd" />
> <property name="errorHandler"
> ref="messageAggregatingErrorHandlerFactory"/>
> </bean>
> </sm:component>
> </sm:activationSpec>
>
> The xml messages are retrieved from a JMS-queue. If the XML file
> FOOAnswer.xml is validated first, all is OK. Upon dropping the FOOAnswer.xml
> on the Queue, the Runtime-exception below is thrown. If I try to resend
> FOOAnswer.xml again, I get the same exception and nothing works until I
> restart SM.
>
> Stacktrace of Exception:
> ---------------------------------
>
> WARN - ValidateComponent - Unable to handle error:
> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> java.lang.RuntimeException: javax.xml.transform.dom.DOMSource
> at
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:102)
> at
> org.apache.activemq.command.ActiveMQObjectMessage.setObject(ActiveMQObjectMessage.java:144)
> at
> org.apache.activemq.ActiveMQSession.createObjectMessage(ActiveMQSession.java:361)
> at
> org.apache.activemq.ra.ManagedSessionProxy.createObjectMessage(ManagedSessionProxy.java:215)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.sendJmsMessage(JCAFlow.java:703)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doRouting(JCAFlow.java:561)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.doSend(JCAFlow.java:520)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.send(AbstractFlow.java:121)
> at
> org.apache.servicemix.jbi.nmr.DefaultBroker.sendExchangePacket(DefaultBroker.java:298)
> at
> org.apache.servicemix.jbi.security.SecuredBroker.sendExchangePacket(SecuredBroker.java:80)
> at
> org.apache.servicemix.jbi.container.JBIContainer.sendExchange(JBIContainer.java:793)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:375)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.send(DeliveryChannelImpl.java:411)
> at
> org.apache.servicemix.components.util.PojoSupport.fail(PojoSupport.java:275)
> at
> org.apache.servicemix.components.util.TransformComponentSupport.onMessageExchange(TransformComponentSupport.java:92)
> at
> org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:624)
> at
> org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:169)
> at
> org.apache.servicemix.jbi.nmr.flow.jca.JCAFlow.onMessage(JCAFlow.java:596)
> at org.jencks.XAEndpoint.onMessage(XAEndpoint.java:126)
> at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.onMessage(MessageEndpointProxy.java:120)
> at
> org.apache.activemq.ra.MessageEndpointProxy.onMessage(MessageEndpointProxy.java:60)
> at org.apache.activemq.ActiveMQSession.run(ActiveMQSession.java:692)
> at
> org.apache.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java:163)
> at
> org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
> at java.lang.Thread.run(Thread.java:595)
> Caused by: java.io.NotSerializableException:
> javax.xml.transform.dom.DOMSource
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> at java.util.HashMap.writeObject(HashMap.java:983)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:890)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1333)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> at
> org.apache.servicemix.jbi.messaging.NormalizedMessageImpl.writeExternal(NormalizedMessageImpl.java:305)
> at
> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1369)
> at
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1341)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1284)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> at
> org.apache.servicemix.jbi.messaging.ExchangePacket.writeExternal(ExchangePacket.java:373)
> at
> org.apache.servicemix.jbi.messaging.MessageExchangeImpl.writeExternal(MessageExchangeImpl.java:562)
> at
> java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1304)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1282)
> at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1073)
> at
> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:291)
> at
> org.apache.activemq.command.ActiveMQObjectMessage.storeContent(ActiveMQObjectMessage.java:98)
>
> Regards,
> /Eyji
> --
> View this message in context: http://www.nabble.com/Validation-Exception-tf2545818.html#a7093895
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
--
Cheers,
Guillaume Nodet