Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 89910 invoked from network); 23 Jun 2009 12:13:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Jun 2009 12:13:16 -0000 Received: (qmail 1618 invoked by uid 500); 23 Jun 2009 12:13:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 1581 invoked by uid 500); 23 Jun 2009 12:13:26 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 1571 invoked by uid 99); 23 Jun 2009 12:13:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 12:13:26 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Jun 2009 12:13:15 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MJ4ru-00018c-13 for users@camel.apache.org; Tue, 23 Jun 2009 05:12:54 -0700 Message-ID: <24164806.post@talk.nabble.com> Date: Tue, 23 Jun 2009 05:12:54 -0700 (PDT) From: RuneB To: users@camel.apache.org Subject: Re: Message body lost when message moved by exception clause In-Reply-To: <5380c69c0906220314h4ce5c7cs99ec64f4de452e79@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: rune.berg@spk.no References: <24088536.post@talk.nabble.com> <5380c69c0906180138u6b356159w3ae2960bbf2c945e@mail.gmail.com> <24088903.post@talk.nabble.com> <5380c69c0906180207j5d914222h60cd18b12504a788@mail.gmail.com> <24092993.post@talk.nabble.com> <5380c69c0906220216y75d421f0q4ae8c3c43b0ebb3d@mail.gmail.com> <24144738.post@talk.nabble.com> <5380c69c0906220314h4ce5c7cs99ec64f4de452e79@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Ok. See CAMEL-1749. - Rune Claus Ibsen-2 wrote: > > On Mon, Jun 22, 2009 at 12:10 PM, RuneB wrote: > >> >> No, it's not the JAXB unmarshaller that throws the exception. >> Unmarshalling >> seems to work fine. >> >> It's for exceptions thrown *after* unmarshalling that the message body is >> lost. My testing indicates that the presence of the unmarshalling step >> causes message body loss if an exception occurs afterwards. >> > > Hi > > Could you create a JIRA ticket for this then we dont forget to look into > it. > And if possible attach a sample with the JAXB that causes this behavior. > > For instance a route in XML or Java is sufficient but a real unit test is > of > course much better. > > > >> >> - Rune >> >> >> Claus Ibsen-2 wrote: >> > >> > On Thu, Jun 18, 2009 at 3:28 PM, RuneB wrote: >> > >> >> >> >> A couple of more points: >> >> >> >> * 1.6.0 behaves like 1.6.1, as far as I can tell. >> >> >> >> * Loss of message body only occurs if *unmarshalling has taken place*. >> >> We've >> >> an element like this: >> >> >> >> > >> contextPath="no.spk.felles.domene.melding" /> >> >> >> >> If I replace this element (and the bean calls it's for), with a bean >> >> call >> >> that simply throws an exception, >> >> the message body will be intact after the message has been moved by >> >> onException. >> >> >> > >> > Is it the JAXB unmarshaller that throws the exception? Eg does the >> > exception >> > occur during JAXB unmarshalling? >> > >> > What does the body look like after the unmarshal? You can use a >> processor >> > to >> > do some system out, or use the Tracer in Camel to look it. >> > >> > Maybe the JAXB clears the body before hand it tries to convert it. >> > >> > >> > As a side note: >> > In Camel 2.0 there is a new option: useOriginalBody that allows you to >> use >> > the body that you received when the route started. >> > This allows you to store the original payload instead of the mutated. >> > >> > >> > >> > >> >> - Rune >> >> >> >> >> >> >> >> Claus Ibsen-2 wrote: >> >> > >> >> > On Thu, Jun 18, 2009 at 10:51 AM, RuneB wrote: >> >> > >> >> >> >> >> >> Hi, >> >> >> >> >> >> The message body is definitely there when the message is consumed >> from >> >> >> the >> >> >> original queue. >> >> >> >> >> >> It's in the moving to the destination queue, as a result of an >> >> exception, >> >> >> that the message body is lost. >> >> >> >> >> >> I'm inspecting the destination queue using the ActiveMQ admin tool. >> >> Also, >> >> >> we >> >> >> have a bean that in turn consumes the destination queue; debugging >> >> this >> >> >> bean >> >> >> confirms that the body is lost. >> >> >> >> >> >> I'll get back to you about the other things you asked. >> >> > >> >> > >> >> > Cool. I will be out of office in a hour or so, but will be back on >> >> monday. >> >> > >> >> > >> >> > >> >> >> >> >> >> >> >> >> - Rune >> >> >> >> >> >> >> >> >> >> >> >> Claus Ibsen-2 wrote: >> >> >> > >> >> >> > Hi >> >> >> > No we have not have this reported before. >> >> >> > Could you create a small unit test that demonstrates this bug / >> >> issue? >> >> >> > >> >> >> > Do you say you loose the body when you consume it from the JMS >> >> queue? >> >> >> > Or do you lose the body before its sent to the JMS queue? >> >> >> > eg when you use a JMS queue browser can you see the body? >> >> >> > >> >> >> > Can you try with 1.6.0 also. That would help narrow down the >> number >> >> of >> >> >> > code >> >> >> > changes in between. >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > On Thu, Jun 18, 2009 at 10:23 AM, RuneB wrote: >> >> >> > >> >> >> >> >> >> >> >> After upgrading from 1.5.0 to 1.6.1, we find that that exception >> >> >> clauses >> >> >> >> such >> >> >> >> as this one >> >> >> >> >> >> >> >> >> >> >> >> my.package.SomeException >> >> >> >> >> >> >> >> >> >> >> >> true >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> cause the message body to be *empty* after the message has been >> >> moved >> >> >> to >> >> >> >> tpforholdArbeidskoe. >> >> >> >> >> >> >> >> (tpforholdArbeidskoe is a message queue on ActiveMQ, as is the >> >> route's >> >> >> >> from-endpoint). >> >> >> >> >> >> >> >> The following trace may be of relevance: >> >> >> >> --------------------------------------------------- >> >> >> >> 17:11:20,844 ERROR [STDERR] 17.jun.2009 17:11:20 >> >> >> >> org.apache.camel.component.jms.JmsProducer process >> >> >> >> WARNING: Disabling JMSReplyTo as this Exchange is not OUT >> capable: >> >> >> >> Exchange[JmsMessage: ActiveMQTextMessage {commandId = >> >> >> >> 8, responseRequired = false, messageId = >> >> >> >> ID:vmutvjee1-b58-2757-1245247294282-2:3:1:1:4, >> originalDestination >> >> = >> >> >> >> null, >> >> >> >> ori >> >> >> >> ginalTransactionId = null, producerId = >> >> >> >> ID:vmutvjee1-b58-2757-1245247294282-2:3:1:1, destination = >> >> >> >> queue://queue.samordn >> >> >> >> ing.TPForhold, transactionId = null, expiration = 0, timestamp = >> >> >> >> 1245251471047, arrival = 0, brokerInTime = 124525147106 >> >> >> >> 3, brokerOutTime = 1245251471063, correlationId = , replyTo = >> null, >> >> >> >> persistent = false, type = , priority = 0, groupID = >> >> >> >> null, groupSequence = 0, targetConsumerId = null, compressed = >> >> false, >> >> >> >> userID = null, content = null, marshalledProperti >> >> >> >> es = null, dataStructure = null, redeliveryCounter = 0, size = >> 0, >> >> >> >> properties >> >> >> >> = null, readOnlyProperties = true, readOnly >> >> >> >> Body = true, droppable = false, text = > >> >> >> encoding="UTF-8"?> >> >> >> >> >> >> >> >> Opprett >> >> >> >> 1015 >> >> >> >> xxxxxxx >> >> >> >> xxxxxx >> >> >> >> >> >> >> >> }] with destination: queue.samordning.TPForholdTilArbeidskoe >> >> >> >> >> >> >> >> 17:11:20,860 ERROR [STDERR] 17.jun.2009 17:11:20 >> >> >> >> org.apache.camel.processor.Logger log >> >> >> >> SEVERE: Failed delivery for exchangeId: >> >> >> >> ID-vmutvjee1-b58/3030-1245251235079/0-0. Handled by the failure >> >> >> >> processor: >> >> >> >> Trace >> >> >> >> Interceptor[To[ref:tpforholdArbeidskoe]] >> >> >> >> >> >> >> >> 17:11:20,875 ERROR [STDERR] 17.jun.2009 17:11:20 >> >> >> >> org.apache.camel.processor.Logger process >> >> >> >> INFO: ID-vmutvjee1-b58/3030-1245251235079/2-1 -> choice(), >> >> >> Pattern:InOnly >> >> >> >> , >> >> >> >> Headers:{JMSTimestamp=1245251480860, org.apa >> >> >> >> che.camel.MultiParameterArray=false, JMSType=, >> >> >> >> org.apache.camel.RedeliveryCounter=0, JMSXGroupID=null, >> >> >> JMSReplyTo=null, >> >> >> >> JMSDestination=queue://queue.samordning.TPForholdTilArbeidskoe, >> >> >> >> JMSRedelivered=false, JMSExpiration=0, org.apache.camel. >> >> >> >> Redelivered=false, >> >> >> >> JMSMessageID=ID:vmutvjee1-b58-3023-1245251233625-0:642:1:1:1, >> >> >> >> JMSDeliveryMode=2, JMSCorrelationID=, J >> >> >> >> MSPriority=4} , BodyType:null , Body:null >> >> >> >> --------------------------------------------------- >> >> >> >> >> >> >> >> Anyone know the reason why we lose the message body? >> >> >> >> >> >> >> >> - Rune >> >> >> >> >> >> >> >> -- >> >> >> >> View this message in context: >> >> >> >> >> >> >> >> >> >> http://www.nabble.com/Message-body-lost-when-message-moved-by-exception-clause-tp24088536p24088536.html >> >> >> >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > Claus Ibsen >> >> >> > Apache Camel Committer >> >> >> > >> >> >> > Open Source Integration: http://fusesource.com >> >> >> > Blog: http://davsclaus.blogspot.com/ >> >> >> > Twitter: http://twitter.com/davsclaus >> >> >> > >> >> >> > >> >> >> >> >> >> -- >> >> >> View this message in context: >> >> >> >> >> >> http://www.nabble.com/Message-body-lost-when-message-moved-by-exception-clause-tp24088536p24088903.html >> >> >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> >> >> >> >> > >> >> > >> >> > -- >> >> > Claus Ibsen >> >> > Apache Camel Committer >> >> > >> >> > Open Source Integration: http://fusesource.com >> >> > Blog: http://davsclaus.blogspot.com/ >> >> > Twitter: http://twitter.com/davsclaus >> >> > >> >> > >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/Message-body-lost-when-message-moved-by-exception-clause-tp24088536p24092993.html >> >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> > -- >> > Claus Ibsen >> > Apache Camel Committer >> > >> > Open Source Integration: http://fusesource.com >> > Blog: http://davsclaus.blogspot.com/ >> > Twitter: http://twitter.com/davsclaus >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Message-body-lost-when-message-moved-by-exception-clause-tp24088536p24144738.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > > -- > Claus Ibsen > Apache Camel Committer > > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > > -- View this message in context: http://www.nabble.com/Message-body-lost-when-message-moved-by-exception-clause-tp24088536p24164806.html Sent from the Camel - Users mailing list archive at Nabble.com.