You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by jpalmer1026 <pa...@gmail.com> on 2011/04/04 21:10:06 UTC

Failed to create route

Hi,

I'm trying to use the camel properties component to externalize a properties
file. It looks like the properties file is getting read, but I'm getting the
following exception when the app tries to read the externalized properties:

Exception in thread "main" org.apache.camel.RuntimeCamelException:
org.apache.camel.FailedToCreateRouteException: Failed to create route
route1: Route[[From[{{file.inbox}}]] -> [Choice[[When[simple{${heade...
because of No endpoint could be found for: {{file.inbox}}, please check your
classpath contains the needed Camel component jar.

Here are the relevant code snippets from my spring-config file:


   



   
      
       
          
             ${header.CamelFileName} regex '^.*txt$'
             
             
          
          
             ${header.CamelFileName} regex '^.*xml$'
             
             
          
       
    
 

My properties file is as follows:

file.inbox=target/inbox
file.outbox=target/outbox
file.xml=target/xml

Any idea what I might be doing wrong? Thanks!



--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282517.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to create route

Posted by jpalmer1026 <pa...@gmail.com>.
Actually, I figured it out. Silly mistake on my part. I was usinginstead of 
(note the 'file' keyword before the colon).

--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282652.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to create route

Posted by jpalmer1026 <pa...@gmail.com>.
I declared my Properties component as a bean as described in my post.

--
View this message in context: http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282634.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Failed to create route

Posted by Hadrian Zbarcea <hz...@gmail.com>.
Do you have a properties placeholder [1] for your properties and/or is it at the expected location? 
<camelContext ...>
   <propertyPlaceholder id="properties" location="com/mycompany/myprop.properties"/>
</camelContext>
Hadrian

[1] http://camel.apache.org/properties.htm


On Apr 4, 2011, at 3:10 PM, jpalmer1026 wrote:

> Hi,
> 
> I'm trying to use the camel properties component to externalize a properties
> file. It looks like the properties file is getting read, but I'm getting the
> following exception when the app tries to read the externalized properties:
> 
> Exception in thread "main" org.apache.camel.RuntimeCamelException:
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route1: Route[[From[{{file.inbox}}]] -> [Choice[[When[simple{${heade...
> because of No endpoint could be found for: {{file.inbox}}, please check your
> classpath contains the needed Camel component jar.
> 
> Here are the relevant code snippets from my spring-config file:
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>             ${header.CamelFileName} regex '^.*txt$'
> 
> 
> 
> 
>             ${header.CamelFileName} regex '^.*xml$'
> 
> 
> 
> 
> 
> 
> 
> My properties file is as follows:
> 
> file.inbox=target/inbox
> file.outbox=target/outbox
> file.xml=target/xml
> 
> Any idea what I might be doing wrong? Thanks!
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Failed-to-create-route-tp4282517p4282517.html
> Sent from the Camel - Users mailing list archive at Nabble.com.