FAQ
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.

Search Discussions

  • Hadrian Zbarcea at Apr 4, 2011 at 8:00 pm
    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.
  • Jpalmer1026 at Apr 4, 2011 at 8:09 pm
    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.
  • Jpalmer1026 at Apr 4, 2011 at 8:16 pm
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedApr 4, '11 at 7:10p
activeApr 4, '11 at 8:16p
posts4
users2
websitecamel.apache.org

2 users in discussion

Jpalmer1026: 3 posts Hadrian Zbarcea: 1 post

People

Translate

site design / logo © 2022 Grokbase