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 <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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

Reply via email to