You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Nibs <ni...@gmail.com> on 2013/04/24 16:03:20 UTC

recipientList not working properly

Hi am trying to some validation and then xml to xslt transformation using
recipientList.
It was working fine when i have single route.

but as my task require aggregator, splitter so i added some more
routes,after that i got error
:DefaultErrorHandler: (Logger.java:248) Failed delivery for exchangeId:
627b5bf8-ee61-4de6-b4b7-5e283b8d236b. Exhausted after delivery attempt: 1
caught: org.apache.camel.component.file.GenericFileOperationFailedException:
Cannot store file:
C:\Users\kumarini\eIntegrationXml\b49d0ba1-5ec8-47c1-9704-13e828665df5
org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file:
C:\Users\kumarini\eIntegrationXml\b49d0ba1-5ec8-47c1-9704-13e828665df5

my sample code is like that

<route id="xmlProcessing" >
            <from uri="direct:xmlPrcessing"/>
 <choice>
                <when>
                    <simple>${header.CamelFileNameOnly} contains
${properties:xml_prefix}</simple>
                    <setHeader headerName="orgnumber">
                        <xpath>eformular/forminfo/mottagare/text()</xpath>
                    </setHeader>
                    <setHeader headerName="eformname">
                        <xpath
resultType="String">eformular/forminfo/eformularnamn/text()</xpath>
                    </setHeader>
 <doTry>
                        <process ref="testProcessor" />
                       
                     
                        <setHeader headerName="xsdProcess">
                           
<simple>validator:file:C:/Users/kumarini/eIntegrationXml/xsd/ByggavillaXSD/eformular.xsd</simple>
                        </setHeader>
                        
                        <setHeader headerName="xsltProcess">
                           
<simple>xslt:C:/Users/kumarini/eIntegrationXml/xslt/ByggVilla60Mittbygge.xslt</simple>
                        </setHeader>
                          
                        <recipientList>
                            <header>xsdProcess</header>      
                        </recipientList> 
                              
                        <recipientList>
                            <header>xsltProcess</header>      
                        </recipientList> 

 <setHeader headerName="outbox">
                           
<simple>file:C:/Users/kumarini/eIntegrationXml/${header.batchID}/${header.orgnumber}/</simple>
                           
                        </setHeader>
                        <recipientList>
                            <header>outbox</header>
                        </recipientList>


it works fine when i am using <to uri=> instead of recipientList for
validation and xslt transformation.

please help me out

Thanks in advance




--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList not working properly

Posted by Nibs <ni...@gmail.com>.
its a very strange behaviour of camel don't know what went wrong
for validation 
<to uri="validator:file:C:/Users/kumarini/eIntegrationXml/xsd/abc.xsd"/>

works fine

but when i tring to do like this body become null

<setHeader headerName="xsdFilepro">
           
<simple>validator:file:C:/Users/eIntegrationXml/xsd/abc.xsd</simple>
 </setHeader>
                                       
                       
          <recipientList>
                            <header>xsdFilepro</header>
            </recipientList>       


but again when i tring to save my file using recipientList without
validation it works fine
 <setHeader headerName="outbox">
                               
<simple>file:C:/Users/eIntegrationXml/${header.batchID}/${header.orgnumber}/</simple>
                            </setHeader>
                   
                            <recipientList>
                                <header>outbox</header>
                            </recipientList>

Please help if anybody have any info about this strange behaviour of camel

Thanks in advance
           
                   



--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731532.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList not working properly

Posted by Nibs <ni...@gmail.com>.
Thanks Claus and Christian for ur suggestions.
Actually i am working on some old projects so currently i need a fix on
camel 2.4
yeah but for sure we will upgrade taht.

actually the error caused is

 Caused by: org.apache.camel.InvalidPayloadException: No body available of
type: java.io.InputStream on: Message: [Body is null]. Caused by: No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null. Exchange[Message: [Body is null]].
Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null]
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
	at
org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:115)
	at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:204)
	... 152 more
Caused by: org.apache.camel.NoTypeConversionAvailableException: No type
converter available to convert from type: null to the required type:
java.io.InputStream with value null
	at
org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:132)
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
	... 154 more 


I read this http://camel.apache.org/type-converter.html
but i am not getting how to implement in my spring dsl

Thanks in Advance



--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731508.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList not working properly

Posted by Christian Müller <ch...@gmail.com>.
Can you check whether you face this issue also with Camel 2.11.0? This is
our latest and greatest release at present.
Camel 2.4.0 was released at 15.07.2010 and is not longer supported at
Apache as Claus mentioned.

Best,
Christian


On Wed, Apr 24, 2013 at 4:59 PM, Nibs <ni...@gmail.com> wrote:

> Thanks a lot
> but i am already using
> convertBodytype=String
>
> but that didnt work
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731457.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: recipientList not working properly

Posted by Nibs <ni...@gmail.com>.
Thanks a lot
but i am already using 
convertBodytype=String

but that didnt work



--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731457.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList not working properly

Posted by Claus Ibsen <cl...@gmail.com>.
Just a note that Camel 2.4 is no longer supported. So if there is a
bug, we dont fix it and release a patch.


The cannot store error indicate on Windows there is some
FileInputStream that has not been closed, and Windows then refuses to
store/write/move/delete files or whatsoever.

You can usually work around that by using

<route>
<from ...>
<convertBodyTo type="java.lang.String"/>
...

In the top of your route so you load the content into memory, and
avoids any FileInputStream being locked or something.



On Wed, Apr 24, 2013 at 4:26 PM, Nibs <ni...@gmail.com> wrote:
> I am using camel 2.4
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731455.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: recipientList not working properly

Posted by Nibs <ni...@gmail.com>.
I am using camel 2.4



--
View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447p5731455.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: recipientList not working properly

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

What Camel version do you use?

And read this page for points what you can do first
http://camel.apache.org/support

On Wed, Apr 24, 2013 at 4:03 PM, Nibs <ni...@gmail.com> wrote:
> Hi am trying to some validation and then xml to xslt transformation using
> recipientList.
> It was working fine when i have single route.
>
> but as my task require aggregator, splitter so i added some more
> routes,after that i got error
> :DefaultErrorHandler: (Logger.java:248) Failed delivery for exchangeId:
> 627b5bf8-ee61-4de6-b4b7-5e283b8d236b. Exhausted after delivery attempt: 1
> caught: org.apache.camel.component.file.GenericFileOperationFailedException:
> Cannot store file:
> C:\Users\kumarini\eIntegrationXml\b49d0ba1-5ec8-47c1-9704-13e828665df5
> org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
> store file:
> C:\Users\kumarini\eIntegrationXml\b49d0ba1-5ec8-47c1-9704-13e828665df5
>
> my sample code is like that
>
> <route id="xmlProcessing" >
>             <from uri="direct:xmlPrcessing"/>
>  <choice>
>                 <when>
>                     <simple>${header.CamelFileNameOnly} contains
> ${properties:xml_prefix}</simple>
>                     <setHeader headerName="orgnumber">
>                         <xpath>eformular/forminfo/mottagare/text()</xpath>
>                     </setHeader>
>                     <setHeader headerName="eformname">
>                         <xpath
> resultType="String">eformular/forminfo/eformularnamn/text()</xpath>
>                     </setHeader>
>  <doTry>
>                         <process ref="testProcessor" />
>
>
>                         <setHeader headerName="xsdProcess">
>
> <simple>validator:file:C:/Users/kumarini/eIntegrationXml/xsd/ByggavillaXSD/eformular.xsd</simple>
>                         </setHeader>
>
>                         <setHeader headerName="xsltProcess">
>
> <simple>xslt:C:/Users/kumarini/eIntegrationXml/xslt/ByggVilla60Mittbygge.xslt</simple>
>                         </setHeader>
>
>                         <recipientList>
>                             <header>xsdProcess</header>
>                         </recipientList>
>
>                         <recipientList>
>                             <header>xsltProcess</header>
>                         </recipientList>
>
>  <setHeader headerName="outbox">
>
> <simple>file:C:/Users/kumarini/eIntegrationXml/${header.batchID}/${header.orgnumber}/</simple>
>
>                         </setHeader>
>                         <recipientList>
>                             <header>outbox</header>
>                         </recipientList>
>
>
> it works fine when i am using <to uri=> instead of recipientList for
> validation and xslt transformation.
>
> please help me out
>
> Thanks in advance
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/recipientList-not-working-properly-tp5731447.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen