Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 51836 invoked from network); 6 May 2010 07:03:02 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 May 2010 07:03:02 -0000 Received: (qmail 49207 invoked by uid 500); 6 May 2010 07:03:02 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 49192 invoked by uid 500); 6 May 2010 07:03:01 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 49184 invoked by uid 500); 6 May 2010 07:03:01 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 49181 invoked by uid 99); 6 May 2010 07:03:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 07:03:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 May 2010 07:02:58 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4672aO0009108 for ; Thu, 6 May 2010 07:02:37 GMT Message-ID: <15298529.1191273129356910.JavaMail.jira@thor> Date: Thu, 6 May 2010 03:02:36 -0400 (EDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-2692) Multithreading bug: getBody sporadically returns null In-Reply-To: <584727.211273035517065.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: ae95407df07c98740808b2ef9da0087c X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-2692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=59215#action_59215 ] Claus Ibsen commented on CAMEL-2692: ------------------------------------ And you do not use any 3rd party XML parser? eg you use the parser which is included in the JDK core? > Multithreading bug: getBody sporadically returns null > ----------------------------------------------------- > > Key: CAMEL-2692 > URL: https://issues.apache.org/activemq/browse/CAMEL-2692 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.3.0 > Environment: Windows 7 64 bit, JDK 1.6.0_20 > Reporter: Roland Knight > Attachments: news_20100502000001.zip > > > Note that the only workaround for this bug is to remove the parallelProcessing() call in the builder. > I have a simple route that processes a file by splitting on a tag and processing the DOM of each split message. The problem is that getBody is randomly returning null but ONLY when using the parallelProcessing feature of split. For some runs of the same XML file, the error does not occur at all (the file is about 2MB of data), others it will happen once or twice. I am currently using the latest 2.3-SNAPSHOT. > Also note, that after detecting the null, I tried calling getBody(String.class) - this also may return null. Sometimes it does return the proper XML. > Route configuration that reproduces the problem (my input XML is about 2MB with about 500 article tags): > public void configure() throws Exception { > from("file:D:/inbox") > .split(new XPathBuilder("//article")) > .parallelProcessing() // remove this line getBody below never returns null > .process(new Processor() { > public void process(Exchange exchange) throws Exception { > Message inMessage = exchange.getIn(); > org.w3c.dom.Document domDocument = inMessage.getBody(org.w3c.dom.Document.class); > if (domDocument == null) { > log("Null body"); > } else { > // process DOM here > } > } > }) > .end() > } > }); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.