Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 69596 invoked from network); 6 Jul 2010 12:09:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Jul 2010 12:09:26 -0000 Received: (qmail 82042 invoked by uid 500); 6 Jul 2010 12:09:26 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 81868 invoked by uid 500); 6 Jul 2010 12:09:24 -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 81860 invoked by uid 99); 6 Jul 2010 12:09:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 12:09:23 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cmoulliard@gmail.com designates 209.85.161.45 as permitted sender) Received: from [209.85.161.45] (HELO mail-fx0-f45.google.com) (209.85.161.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 12:09:17 +0000 Received: by fxm5 with SMTP id 5so650600fxm.32 for ; Tue, 06 Jul 2010 05:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=2xKkcAu5gDaqP59kqvi4zu3tKJnUmQCkXDSAAHCp2PA=; b=I5Ul/sqDnfSqbz5is6z7OHaMKDINIatZYC2XiyFnBieAuEomRkp66JCnxUtUaXk5vt gybICV5lhFQuIH/O9CbKkv8ci6EhS6lFQJ12Y29Pw4CN13HqeTMYnA6bqJXztoZ27ynb Q+tlIlh891Z4AgGiRQTcwbTkqtWYq3dtyEOFU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=YVVoGu0Ni1sqjbuErex/BsLXrnhDyGlhZiucjy6mLnXOCLqTXAX5X78EXMA6UeQn/+ AJEq8n5+Fy+ePAKFS8HWuOME5ADn0Al1pkc7xHfxego3APXA6bMc7epb5InWB9UmgSCn vp1dse+aHHxxwO/kwBzQqpEiQ5HOcCg23gHOc= MIME-Version: 1.0 Received: by 10.223.111.69 with SMTP id r5mr4063020fap.82.1278418076891; Tue, 06 Jul 2010 05:07:56 -0700 (PDT) Received: by 10.223.105.200 with HTTP; Tue, 6 Jul 2010 05:07:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 Jul 2010 14:07:56 +0200 Message-ID: Subject: Re: File component behavior From: Charles Moulliard To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org How have you configured the jms component of camel () ? Kind regards, Charles Moulliard Senior Enterprise Architect (J2EE, .NET, SOA) Apache Camel - ServiceMix Committer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Blog : http://cmoulliard.blogspot.com | Twitter : http://twitter.com/cmoul= liard Linkedin : http://www.linkedin.com/in/charlesmoulliard | Skype: cmoulliard On Tue, Jul 6, 2010 at 2:02 PM, Bruno Dusausoy wrote: > Hi, > > I'm new to both Camel and EIP so maybe my question/problem is dumb ;). > > I have a route defined in Spring as this : > > =A0 =A0 > > =A0 =A0 class=3D"be.ucm.career.quarterly.upload.UploadBean"/> > > =A0 =A0 > =A0 =A0 =A0 =A0foo.bar > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 > =A0 =A0 > > The implementation of "uploadBean" : > > public class UploadBean { > > =A0 =A0 =A0 =A0@Handler > =A0 =A0 =A0 =A0public String upload(@XPath("configuration/loopCount/text(= )")String > chunkSize) { > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0System.out.println("Chunk size is : " + ch= unkSize); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return "FOO_123"; > =A0 =A0 =A0 =A0} > } > > When launching the project with "mvn camel:run", I get this : > > [...] > // INFO output > [...] > Chunk size is : 100 > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > Using Persistence Adapter: AMQPersistenceAdapter(activemq-data\localhost) > [src/data?delay=3D30000&noop=3Dtrue] AMQPersistenceAdapter =A0 =A0 =A0 = =A0 =A0INFO > AMQStore starting using directory: activemq-data\localhost > [src/data?delay=3D30000&noop=3Dtrue] KahaStore =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0INFO =A0Kaha > Store using data directory activemq-data\localhost\kr-store\state > [src/data?delay=3D30000&noop=3Dtrue] AMQPersistenceAdapter =A0 =A0 =A0 = =A0 =A0INFO > Active data files: [1] > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > ActiveMQ 5.2.0 JMS Message Broker (localhost) is starting > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO =A0For > help or more information please see: http://activemq.apache.org/ > [ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 JMX connector] ManagementContext =A0 = =A0 =A0 =A0 =A0 =A0 =A0INFO =A0JMX > consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxr= mi > [src/data?delay=3D30000&noop=3Dtrue] KahaStore =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0INFO =A0Kaha > Store using data directory activemq-data\localhost\kr-store\data > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > ActiveMQ JMS Message Broker (localhost, > ID:100WCTI150-2821-1278413932666-0:0) started > [src/data?delay=3D30000&noop=3Dtrue] TransportConnector =A0 =A0 =A0 =A0 = =A0 =A0 INFO > Connector vm://localhost Started > [src/data?delay=3D30000&noop=3Dtrue] TransportConnector =A0 =A0 =A0 =A0 = =A0 =A0 INFO > Connector vm://localhost Stopped > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > ActiveMQ Message Broker (localhost, ID:100WCTI150-2821-1278413932666-0:0) > is shutting down > [src/data?delay=3D30000&noop=3Dtrue] BrokerService =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0INFO > ActiveMQ JMS Message Broker (localhost, > ID:100WCTI150-2821-1278413932666-0:0) stopped > [Fatal Error] output.txt:1:1: Content is not allowed in prolog. > [Fatal Error] :1:1: Content is not allowed in prolog. > [src/data?delay=3D30000&noop=3Dtrue] DefaultErrorHandler =A0 =A0 =A0 =A0 = =A0 =A0ERROR > Failed delivery for exchangeId: b109fe1a-964e-4c70-91b0-bba46fb77766. > Exhausted after delivery attempt: 1 caught: > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > configuration/loopCount/text(). Reason: > javax.xml.xpath.XPathExpressionException > org.apache.camel.builder.xml.InvalidXPathExpression: Invalid xpath: > configuration/loopCount/text(). Reason: > javax.xml.xpath.XPathExpressionException > [...] > // STACK TRACE > [src/data?delay=3D30000&noop=3Dtrue] GenericFileOnCompletion =A0 =A0 =A0 = =A0WARN > Rollback file strategy: > org.apache.camel.component.file.strategy.GenericFileNoOpProcessStrategy@b= 9237a > for file: GenericFile[output.txt] > > I'm wondering why I get this message, since the XPath is correct : you ca= n > see the output of the method called on the bean at the beginning the > aforementioned snippet. > Moreover, I don't know where did the file component get this "output.txt" > file... :-/ > > The input.xml file is quite simple : > > > > =A0 =A0100 > > > Can someone tell me what I'm doing wrong ? > > Regards. > -- > Bruno Dusausoy > YP5 Software > -- > Pensez environnement : limitez l'impression de ce mail. > Please don't print this e-mail unless you really need to. >