Return-Path: Delivered-To: apmail-camel-dev-archive@www.apache.org Received: (qmail 74578 invoked from network); 4 Sep 2009 05:38:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Sep 2009 05:38:34 -0000 Received: (qmail 65477 invoked by uid 500); 4 Sep 2009 05:38:34 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 65421 invoked by uid 500); 4 Sep 2009 05:38:34 -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 65411 invoked by uid 500); 4 Sep 2009 05:38:34 -0000 Delivered-To: apmail-activemq-camel-dev@activemq.apache.org Received: (qmail 65408 invoked by uid 99); 4 Sep 2009 05:38:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 05:38:34 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 05:38:32 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3A4D9234C1E6 for ; Thu, 3 Sep 2009 22:38:12 -0700 (PDT) Message-ID: <850997771.1252042692233.JavaMail.jira@brutus> Date: Thu, 3 Sep 2009 22:38:12 -0700 (PDT) From: "Claus Ibsen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-1965) onException does not work correctly when used in a transacted route and exception is not send to the bean component called In-Reply-To: <1389330681.1251731201107.JavaMail.jira@brutus> 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-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54010#action_54010 ] Claus Ibsen commented on CAMEL-1965: ------------------------------------ Try with something else that a file to start with as Windows is a bit clunky with file IO. And does it fail *every* time with transacted + file? Try adding a 3000 before the rollback to give Windows a bit time before the rollback is performed. > onException does not work correctly when used in a transacted route and exception is not send to the bean component called > -------------------------------------------------------------------------------------------------------------------------- > > Key: CAMEL-1965 > URL: https://issues.apache.org/activemq/browse/CAMEL-1965 > Project: Apache Camel > Issue Type: Bug > Affects Versions: 2.0.0 > Reporter: Charles Moulliard > Attachments: BookService.java, springTransactionalClientDataSourceUsingTransactedOnException.xml, SpringTransactionalClientDataSourceUsingTransactedOnExceptionTest.java, transactionalClientDataSource.xml > > > Hi, > When onException is used within a transacted route, it does not work. With the following route, the onException process does not propagate information to the from endpoint (in my case : file component). So, when X3Sexception occurs, the bean component is called where record is created in an Audit table, error message is put in a reporting queue BUT the file could not be renamed and move to temp directory. In consequence, the file is reprocessed continuously !!!!! > {code} > Route > > > > > > com.xpectis.x3s.exception.X3SClientException > > > > > > java.lang.Exception > > > > {code} > {code} > Log > 16:51:12,896 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> from(file://d:/temp/data/oinp/?delay=15000&move=d%3A%2Ftemp%2Fdata%2Foinp%2Fbackup%2F%24%7Bdate%3Anow%3AyyyyMMdd%7D%2F%24%7Bfile%3Aname.noext%7D.bak&moveFailed=d%3A%2Ftemp%2Fdata%2Foinp%2Ferror%2F%2F%24%7Bdate%3Anow%3AyyyyMMdd%7D%2F%24%7Bfile%3Aname.noext%7D.error) --> ref:PROPAGATION_REQUIRED_NEW, Pattern:InOnly, Headers:{CamelFileNameOnly=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolute=true, CamelFileLength=892, CamelFileName=OINP_Example.csv, CamelFileParent=d:\temp\data\oinp, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID, ... > 16:51:12,912 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> ref:PROPAGATION_REQUIRED_NEW --> ref:PROPAGATION_REQUIRED_NEW, Pattern:InOnly, Headers:{CamelFileNameOnly=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolute=true, CamelFileLength=892, CamelFileName=OINP_Example.csv, CamelFileParent=d:\temp\data\oinp, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:12,912 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> ref:PROPAGATION_REQUIRED_NEW --> OnException, Pattern:InOnly, Headers:{CamelFileNameOnly=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolute=true, CamelFileLength=892, CamelFileName=OINP_Example.csv, CamelFileParent=d:\temp\data\oinp, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:12,928 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> OnException -->, Pattern:InOnly, Headers:{CamelFileNameOnly=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolute=true, CamelFileLength=892, CamelFileName=OINP_Example.csv, CamelFileParent=d:\temp\data\oinp, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:12,928 | INFO | 9: FileComponent | ServiceHelper | ctis.x3s.core.util.ServiceHelper 1033 | ###### processException ###### > 16:51:12,928 | INFO | 9: FileComponent | ServiceHelper | ctis.x3s.core.util.ServiceHelper 1046 | #### Exception received was null so create a dummy exception ! > 16:51:12,928 | INFO | 9: FileComponent | ServiceHelper | ctis.x3s.core.util.ServiceHelper 1054 | >>>processException AUDIT:E9998:Error:ERR > 16:51:12,975 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> --> queuingservice://x3s:reporting, Pattern:InOnly, Headers:{CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileLength=892, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, CamelBeanMethodName=null, CamelFileNameOnly=OINP_Example.csv, CamelFileAbsolute=true, CamelBeanMultiParameterArray=false, CamelFileName=OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileParent=d:\temp\data\oinp}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID, > 16:51:13,068 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> queuingservice://x3s:reporting --> ref:PROPAGATION_REQUIRED_NEW, Pattern:InOnly, Headers:{CamelFileAbsolute=true, CamelFileLength=892, CamelBeanMethodName=null, CamelFileName=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileNameOnly=OINP_Example.csv, CamelBeanMultiParameterArray=false, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileParent=d:\temp\data\oinp}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:13,068 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> ref:PROPAGATION_REQUIRED_NEW --> OnException, Pattern:InOnly, Headers:{CamelFileAbsolute=true, CamelFileLength=892, CamelBeanMethodName=null, CamelFileName=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileNameOnly=OINP_Example.csv, CamelBeanMultiParameterArray=false, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileParent=d:\temp\data\oinp}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:13,084 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> OnException --> log://com.xpectis.x3s?level=INFO&multiline=true&showCaughtException=true&showException=true&showStackTrace=true, Pattern:InOnly, Headers:{CamelFileAbsolute=true, CamelFileLength=892, CamelBeanMethodName=null, CamelFileName=OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileNameOnly=OINP_Example.csv, CamelBeanMultiParameterArray=false, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileParent=d:\temp\data\oinp}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:13,084 | INFO | 9: FileComponent | x3s | rg.apache.camel.processor.Logger 88 | Exchange[ > , BodyType:org.apache.camel.component.file.GenericFile > , Body:ORD_REF_ID,... > 16:51:13,084 | INFO | 9: FileComponent | TraceInterceptor | rg.apache.camel.processor.Logger 88 | ID-dell-charles-2415-1251709696459-0-85 >>> log://com.xpectis.x3s?level=INFO&multiline=true&showCaughtException=true&showException=true&showStackTrace=true --> Rollback, Pattern:InOnly, Headers:{CamelFileName=OINP_Example.csv, CamelBeanMethodName=null, CamelBeanMultiParameterArray=false, CamelFileParent=d:\temp\data\oinp, CamelFileNameOnly=OINP_Example.csv, CamelFileAbsolutePath=d:\temp\data\oinp\OINP_Example.csv, CamelFilePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileRelativePath=d:\temp\data\oinp\OINP_Example.csv, CamelFileLastModified=Mon Jul 27 16:33:12 CEST 2009, CamelFileAbsolute=true, CamelFileLength=892}, BodyType:org.apache.camel.component.file.GenericFile, Body:ORD_REF_ID,... > 16:51:13,100 | ERROR | 9: FileComponent | GenericFileOnCompletion | rg.apache.camel.processor.Logger 202 | org.apache.camel.RollbackExchangeException: Intended rollback on the exchange: Exchange[GenericFileMessage with file: GenericFile[d:\temp\data\oinp\OINP_Example.csv]] > 16:51:13,100 | WARN | 9: FileComponent | GenericFileOnCompletion | ent.file.GenericFileOnCompletion 142 | Rollback file strategy: org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@29e26 for file: GenericFile[d:\temp\data\oinp\OINP_Example.csv] > 16:51:13,100 | ERROR | 9: FileComponent | GenericFileOnCompletion | rg.apache.camel.processor.Logger 248 | Cannot rename file: GenericFile[d:\temp\data\oinp\OINP_Example.csv] to: GenericFile[d:\temp\data\oinp\error\\20090831\OINP_Example.error] > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot rename file: GenericFile[d:\temp\data\oinp\OINP_Example.csv] to: GenericFile[d:\temp\data\oinp\error\\20090831\OINP_Example.error] > at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.renameFile(GenericFileRenameProcessStrategy.java:96) > at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.rollback(GenericFileRenameProcessStrategy.java:61) > at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyRollback(GenericFileOnCompletion.java:145) > at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:95) > at org.apache.camel.component.file.GenericFileOnCompletion.onFailure(GenericFileOnCompletion.java:58) > at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:126) > {code} > REMARK : > - Exception object is not received by the bean component > but everything works fine if the route is defined like this > {code} > > > > com.xpectis.x3s.exception.X3SClientException > > > > > > java.lang.Exception > > > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.