You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Gershaw, Geoffrey" <ge...@credit-suisse.com> on 2013/07/18 18:40:21 UTC

Hello World? Maybe not :)

Hi All,

 

I have the simplest problem that apparently I can't figure out. I've
never used direct:start as an endpoint before and I can't seem to get it
to work the way I would expect it to.

 

My config is below . I would like the route to start and print hello
world. Seems easy. What am I overlooking?

 

Thanks for your help

 

<?xml version="1.0" encoding="UTF-8"?>

<beans default-init-method="init"

            xmlns="http://www.springframework.org/schema/beans"

            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

 
xmlns:context="http://www.springframework.org/schema/context"

            xmlns:util="http://www.springframework.org/schema/util"

            xmlns:camel="http://camel.apache.org/schema/spring"

 
xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
el-spring.xsd"

            xsi:schemaLocation="

 
http://www.springframework.org/schema/beans

 
http://www.springframework.org/schema/beans/spring-beans.xsd

 
http://www.springframework.org/schema/context

 
http://www.springframework.org/schema/context/spring-context-3.0.xsd

 
http://www.springframework.org/schema/util

 
http://www.springframework.org/schema/util/spring-util-3.0.xsd

 
http://camel.apache.org/schema/spring

 
http://camel.apache.org/schema/spring/camel-spring.xsd

                                                ">

 

            <camelContext xmlns="http://camel.apache.org/schema/spring"
>

                        <dataFormats>

                        <jaxb id="myJaxb" prettyPrint="true"
contextPath="com.prasad.sample"/>

                        </dataFormats> 

                        

                        <camel:route id="loginRoute" >

                                    <camel:from uri="direct:start"/>

                                    <camel:log message="Hello World"
loggingLevel="INFO"/>                                     

                        </camel:route>                       

            </camelContext>

                        

</beans>

 

 

 

Geoffrey A Gershaw

CREDIT SUISSE

Information Technology | Credit eTrading Development, KFVB 525

7033 Louis Stephens Drive | 27560 Research Triangle Park | United States

Phone +1 919 994 6412

geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
<http://www.credit-suisse.com/> 

 



=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 


Re: Hello World? Maybe not :)

Posted by Andreas Gies <an...@wayofquality.de>.
Hmmm 

Looks good enough to me. Is there any error message to share ? Which
version of Camel are you using ?
If you are willing to post your route I can drop it in my IDE tomorrow Š.


Regards
Andreas






Am 7/18/13(29) 7:12 PM schrieb "Gershaw, Geoffrey" unter
<ge...@credit-suisse.com>:

>Hi Claus,
>
>Embarrassingly, I've used camel for quite some time. Always with
>quickfixj or jms with the spring config. I never had to kick things off.
>When I look at the examples, they look like mine.
>
>Shouldn't this be it?
>
><camel:route id="loginRoute" >
>>
>>                                     <camel:from uri="direct:start"/>
>>
>>                                    <camel:log message="Hello World"
>loggingLevel="INFO"/>
>>
>>                         </camel:route>
>
>Geoffrey A Gershaw
>Credit eTrading Development
>+1 919 994 6412 (*102 6412)
>
>-----Original Message-----
>From: Claus Ibsen [mailto:claus.ibsen@gmail.com]
>Sent: Thursday, July 18, 2013 1:06 PM
>To: users@camel.apache.org
>Subject: Re: Hello World? Maybe not :)
>
>Hi
>
>I suggest to take a look at this page
>http://camel.apache.org/walk-through-an-example.html
>
>The direct component is here
>http://camel.apache.org/direct
>
>And if you just want to print hello world once or every X period then
>you can use a timer in the route
>http://camel.apache.org/timer
>
>And I suggest to try the console example as its good for learning and
>trying out Camel
>http://camel.apache.org/console-example.html
>
>The example is included in the Camel distro so you can compile and run
>it, as documented from the link above.
>
>On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey
><ge...@credit-suisse.com> wrote:
>> Hi All,
>>
>>
>>
>> I have the simplest problem that apparently I can't figure out. I've
>> never used direct:start as an endpoint before and I can't seem to get
>it
>> to work the way I would expect it to.
>>
>>
>>
>> My config is below . I would like the route to start and print hello
>> world. Seems easy. What am I overlooking?
>>
>>
>>
>> Thanks for your help
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans default-init-method="init"
>>
>>             xmlns="http://www.springframework.org/schema/beans"
>>
>>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>> xmlns:context="http://www.springframework.org/schema/context"
>>
>>             xmlns:util="http://www.springframework.org/schema/util"
>>
>>             xmlns:camel="http://camel.apache.org/schema/spring"
>>
>>
>>
>xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
>> el-spring.xsd"
>>
>>             xsi:schemaLocation="
>>
>>
>> http://www.springframework.org/schema/beans
>>
>>
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>
>>
>> http://www.springframework.org/schema/context
>>
>>
>> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>>
>>
>> http://www.springframework.org/schema/util
>>
>>
>> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>>
>>
>> http://camel.apache.org/schema/spring
>>
>>
>> http://camel.apache.org/schema/spring/camel-spring.xsd
>>
>>                                                 ">
>>
>>
>>
>>             <camelContext
>xmlns="http://camel.apache.org/schema/spring"
>>>
>>
>>                         <dataFormats>
>>
>>                         <jaxb id="myJaxb" prettyPrint="true"
>> contextPath="com.prasad.sample"/>
>>
>>                         </dataFormats>
>>
>>
>>
>>                         <camel:route id="loginRoute" >
>>
>>                                     <camel:from uri="direct:start"/>
>>
>>                                     <camel:log message="Hello World"
>> loggingLevel="INFO"/>
>>
>>                         </camel:route>
>>
>>             </camelContext>
>>
>>
>>
>> </beans>
>>
>>
>>
>>
>>
>>
>>
>> Geoffrey A Gershaw
>>
>> CREDIT SUISSE
>>
>> Information Technology | Credit eTrading Development, KFVB 525
>>
>> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United
>States
>>
>> Phone +1 919 994 6412
>>
>> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
>> <http://www.credit-suisse.com/>
>>
>>
>>
>>
>>
>>
>========================================================================
>=======
>> Please access the attached hyperlink for an important electronic
>communications disclaimer:
>> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>>
>========================================================================
>=======
>>
>
>
>
>-- 
>Claus Ibsen
>-----------------
>Red Hat, Inc.
>Email: cibsen@redhat.com
>Twitter: davsclaus
>Blog: http://davsclaus.com
>Author of Camel in Action: http://www.manning.com/ibsen
>
>
>==========================================================================
>===== 
>Please access the attached hyperlink for an important electronic
>communications disclaimer:
>http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>==========================================================================
>===== 
>



RE: Hello World? Maybe not :)

Posted by "Gershaw, Geoffrey" <ge...@credit-suisse.com>.
Hi Claus,

Embarrassingly, I've used camel for quite some time. Always with
quickfixj or jms with the spring config. I never had to kick things off.
When I look at the examples, they look like mine.

Shouldn't this be it?

<camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                    <camel:log message="Hello World"
loggingLevel="INFO"/>
>
>                         </camel:route>

Geoffrey A Gershaw
Credit eTrading Development
+1 919 994 6412 (*102 6412)

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: Thursday, July 18, 2013 1:06 PM
To: users@camel.apache.org
Subject: Re: Hello World? Maybe not :)

Hi

I suggest to take a look at this page
http://camel.apache.org/walk-through-an-example.html

The direct component is here
http://camel.apache.org/direct

And if you just want to print hello world once or every X period then
you can use a timer in the route
http://camel.apache.org/timer

And I suggest to try the console example as its good for learning and
trying out Camel
http://camel.apache.org/console-example.html

The example is included in the Camel distro so you can compile and run
it, as documented from the link above.

On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey
<ge...@credit-suisse.com> wrote:
> Hi All,
>
>
>
> I have the simplest problem that apparently I can't figure out. I've
> never used direct:start as an endpoint before and I can't seem to get
it
> to work the way I would expect it to.
>
>
>
> My config is below . I would like the route to start and print hello
> world. Seems easy. What am I overlooking?
>
>
>
> Thanks for your help
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans default-init-method="init"
>
>             xmlns="http://www.springframework.org/schema/beans"
>
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
> xmlns:context="http://www.springframework.org/schema/context"
>
>             xmlns:util="http://www.springframework.org/schema/util"
>
>             xmlns:camel="http://camel.apache.org/schema/spring"
>
>
>
xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> el-spring.xsd"
>
>             xsi:schemaLocation="
>
>
> http://www.springframework.org/schema/beans
>
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>
>
> http://www.springframework.org/schema/context
>
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>
>
> http://www.springframework.org/schema/util
>
>
> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>
>
> http://camel.apache.org/schema/spring
>
>
> http://camel.apache.org/schema/spring/camel-spring.xsd
>
>                                                 ">
>
>
>
>             <camelContext
xmlns="http://camel.apache.org/schema/spring"
>>
>
>                         <dataFormats>
>
>                         <jaxb id="myJaxb" prettyPrint="true"
> contextPath="com.prasad.sample"/>
>
>                         </dataFormats>
>
>
>
>                         <camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                     <camel:log message="Hello World"
> loggingLevel="INFO"/>
>
>                         </camel:route>
>
>             </camelContext>
>
>
>
> </beans>
>
>
>
>
>
>
>
> Geoffrey A Gershaw
>
> CREDIT SUISSE
>
> Information Technology | Credit eTrading Development, KFVB 525
>
> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United
States
>
> Phone +1 919 994 6412
>
> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> <http://www.credit-suisse.com/>
>
>
>
>
>
>
========================================================================
=======
> Please access the attached hyperlink for an important electronic
communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
========================================================================
=======
>



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


=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 


Re: Hello World? Maybe not :)

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

I suggest to take a look at this page
http://camel.apache.org/walk-through-an-example.html

The direct component is here
http://camel.apache.org/direct

And if you just want to print hello world once or every X period then
you can use a timer in the route
http://camel.apache.org/timer

And I suggest to try the console example as its good for learning and
trying out Camel
http://camel.apache.org/console-example.html

The example is included in the Camel distro so you can compile and run
it, as documented from the link above.

On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey
<ge...@credit-suisse.com> wrote:
> Hi All,
>
>
>
> I have the simplest problem that apparently I can't figure out. I've
> never used direct:start as an endpoint before and I can't seem to get it
> to work the way I would expect it to.
>
>
>
> My config is below . I would like the route to start and print hello
> world. Seems easy. What am I overlooking?
>
>
>
> Thanks for your help
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans default-init-method="init"
>
>             xmlns="http://www.springframework.org/schema/beans"
>
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
> xmlns:context="http://www.springframework.org/schema/context"
>
>             xmlns:util="http://www.springframework.org/schema/util"
>
>             xmlns:camel="http://camel.apache.org/schema/spring"
>
>
> xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> el-spring.xsd"
>
>             xsi:schemaLocation="
>
>
> http://www.springframework.org/schema/beans
>
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>
>
> http://www.springframework.org/schema/context
>
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>
>
> http://www.springframework.org/schema/util
>
>
> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>
>
> http://camel.apache.org/schema/spring
>
>
> http://camel.apache.org/schema/spring/camel-spring.xsd
>
>                                                 ">
>
>
>
>             <camelContext xmlns="http://camel.apache.org/schema/spring"
>>
>
>                         <dataFormats>
>
>                         <jaxb id="myJaxb" prettyPrint="true"
> contextPath="com.prasad.sample"/>
>
>                         </dataFormats>
>
>
>
>                         <camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                     <camel:log message="Hello World"
> loggingLevel="INFO"/>
>
>                         </camel:route>
>
>             </camelContext>
>
>
>
> </beans>
>
>
>
>
>
>
>
> Geoffrey A Gershaw
>
> CREDIT SUISSE
>
> Information Technology | Credit eTrading Development, KFVB 525
>
> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
>
> Phone +1 919 994 6412
>
> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> <http://www.credit-suisse.com/>
>
>
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ===============================================================================
>



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

RE: Hello World? Maybe not :)

Posted by AlanFoster <al...@alanfoster.me>.
It's worth noting that if you are not in the context of a test, then making
use of the "direct" component will not allow for the route to be called
externally. 

If you are calling this from a unit test, then you will be able to call your
route with a producer template for template.sendBody("direct:start", "hi");
Some more information is here about producer templates -
http://camel.apache.org/producertemplate.html

For the quickest 'hello world', you should probably make use of the timer
component to automatically invoke the camel route every few seconds :)



--
View this message in context: http://camel.465427.n5.nabble.com/Hello-World-Maybe-not-tp5735858p5735876.html
Sent from the Camel - Users mailing list archive at Nabble.com.

RE: Hello World? Maybe not :)

Posted by "Gershaw, Geoffrey" <ge...@credit-suisse.com>.
Thanks for this. Its exactly what I needed. Many of the examples begin with   <camel:from uri="direct:start"/>. Therefore, I assumed that this tag worked like the Main class of a project. Kicking things off. It appears start is just another name that can be used with direct and you would need to publish to this route to get its pipeline to execute.
 

Thanks again for clarification. I was wondering why direct:start's special capabilities were not on the direct component's web page. Now I get it, it doesn't have them.

Wish this was mentioned on the direct components webpage.

Anyhow,

Thanks
Geoffrey A Gershaw
Credit eTrading Development
+1 919 994 6412 (*102 6412)


-----Original Message-----
From: Raul Kripalani [mailto:raul@evosent.com] 
Sent: Thursday, July 18, 2013 6:07 PM
To: users@camel.apache.org
Subject: Re: Hello World? Maybe not :)

Direct is used to link routes, such that one Camel route can call another
directly without resorting to any external protocols.

You want to use the Timer component instead, as you rightly noticed already.

HTH,
Raúl.

On Thu, Jul 18, 2013 at 11:37 PM, Gershaw, Geoffrey <
geoffrey.gershaw@credit-suisse.com> wrote:

> I'm running this in a standalone java app using Spring.  Its camel 2.11. I
> was under the impression from the various samples that I have seen that the
> below route should start and print Hello World without publishing a message
> to this route. Like a main class in java.  Am I wrong? I am using the timer
> component right now to do the same job.
>
> Right now, there is no error. It just keeps running, but Hello World isn't
> printed.
>
> Thanks
>
>
>
> >                         <camel:route id="loginRoute" >
> >
> >                                     <camel:from uri="direct:start"/>
> >
> >                                     <camel:log message="Hello World"
> > loggingLevel="INFO"/>
> >
> >                         </camel:route>
> >
> Geoffrey A Gershaw
> Credit eTrading Development
> +1 919 994 6412 (*102 6412)
>
>
> -----Original Message-----
> From: Raul Kripalani [mailto:raul@evosent.com]
> Sent: Thursday, July 18, 2013 2:21 PM
> To: users@camel.apache.org
> Subject: Re: Hello World? Maybe not :)
>
> Hey Geoffrey,
>
> A stacktrace would help us help you ;-)
>
> Where and how are you deploying this route? Apache ServiceMix? Tomcat,
> JBoss, etc.?
>
> And is there another Camel route or a unit test publishing to the direct
> endpoint? Bear in mind that a direct consumer doesn't listen on an external
> interface/protocol. It's rather intended for in-memory, internal
> Camel-to-Camel invocations.
>
> Thanks,
>
> *Raúl Kripalani*
> Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
> Integration specialist
> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk
>
> On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey <
> geoffrey.gershaw@credit-suisse.com> wrote:
>
> > Hi All,
> >
> >
> >
> > I have the simplest problem that apparently I can't figure out. I've
> > never used direct:start as an endpoint before and I can't seem to get it
> > to work the way I would expect it to.
> >
> >
> >
> > My config is below . I would like the route to start and print hello
> > world. Seems easy. What am I overlooking?
> >
> >
> >
> > Thanks for your help
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <beans default-init-method="init"
> >
> >             xmlns="http://www.springframework.org/schema/beans"
> >
> >             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
> >
> > xmlns:context="http://www.springframework.org/schema/context"
> >
> >             xmlns:util="http://www.springframework.org/schema/util"
> >
> >             xmlns:camel="http://camel.apache.org/schema/spring"
> >
> >
> > xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> > el-spring.xsd"
> >
> >             xsi:schemaLocation="
> >
> >
> > http://www.springframework.org/schema/beans
> >
> >
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >
> >
> > http://www.springframework.org/schema/context
> >
> >
> > http://www.springframework.org/schema/context/spring-context-3.0.xsd
> >
> >
> > http://www.springframework.org/schema/util
> >
> >
> > http://www.springframework.org/schema/util/spring-util-3.0.xsd
> >
> >
> > http://camel.apache.org/schema/spring
> >
> >
> > http://camel.apache.org/schema/spring/camel-spring.xsd
> >
> >                                                 ">
> >
> >
> >
> >             <camelContext xmlns="http://camel.apache.org/schema/spring"
> > >
> >
> >                         <dataFormats>
> >
> >                         <jaxb id="myJaxb" prettyPrint="true"
> > contextPath="com.prasad.sample"/>
> >
> >                         </dataFormats>
> >
> >
> >
> >                         <camel:route id="loginRoute" >
> >
> >                                     <camel:from uri="direct:start"/>
> >
> >                                     <camel:log message="Hello World"
> > loggingLevel="INFO"/>
> >
> >                         </camel:route>
> >
> >             </camelContext>
> >
> >
> >
> > </beans>
> >
> >
> >
> >
> >
> >
> >
> > Geoffrey A Gershaw
> >
> > CREDIT SUISSE
> >
> > Information Technology | Credit eTrading Development, KFVB 525
> >
> > 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
> >
> > Phone +1 919 994 6412
> >
> > geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> > <http://www.credit-suisse.com/>
> >
> >
> >
> >
> >
> >
> >
> ===============================================================================
> > Please access the attached hyperlink for an important electronic
> > communications disclaimer:
> > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> >
> >
> ===============================================================================
> >
> >
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ===============================================================================
>
>


=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 


Re: Hello World? Maybe not :)

Posted by Raul Kripalani <ra...@evosent.com>.
Direct is used to link routes, such that one Camel route can call another
directly without resorting to any external protocols.

You want to use the Timer component instead, as you rightly noticed already.

HTH,
Raúl.

On Thu, Jul 18, 2013 at 11:37 PM, Gershaw, Geoffrey <
geoffrey.gershaw@credit-suisse.com> wrote:

> I'm running this in a standalone java app using Spring.  Its camel 2.11. I
> was under the impression from the various samples that I have seen that the
> below route should start and print Hello World without publishing a message
> to this route. Like a main class in java.  Am I wrong? I am using the timer
> component right now to do the same job.
>
> Right now, there is no error. It just keeps running, but Hello World isn't
> printed.
>
> Thanks
>
>
>
> >                         <camel:route id="loginRoute" >
> >
> >                                     <camel:from uri="direct:start"/>
> >
> >                                     <camel:log message="Hello World"
> > loggingLevel="INFO"/>
> >
> >                         </camel:route>
> >
> Geoffrey A Gershaw
> Credit eTrading Development
> +1 919 994 6412 (*102 6412)
>
>
> -----Original Message-----
> From: Raul Kripalani [mailto:raul@evosent.com]
> Sent: Thursday, July 18, 2013 2:21 PM
> To: users@camel.apache.org
> Subject: Re: Hello World? Maybe not :)
>
> Hey Geoffrey,
>
> A stacktrace would help us help you ;-)
>
> Where and how are you deploying this route? Apache ServiceMix? Tomcat,
> JBoss, etc.?
>
> And is there another Camel route or a unit test publishing to the direct
> endpoint? Bear in mind that a direct consumer doesn't listen on an external
> interface/protocol. It's rather intended for in-memory, internal
> Camel-to-Camel invocations.
>
> Thanks,
>
> *Raúl Kripalani*
> Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
> Integration specialist
> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
> http://blog.raulkr.net | twitter: @raulvk
>
> On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey <
> geoffrey.gershaw@credit-suisse.com> wrote:
>
> > Hi All,
> >
> >
> >
> > I have the simplest problem that apparently I can't figure out. I've
> > never used direct:start as an endpoint before and I can't seem to get it
> > to work the way I would expect it to.
> >
> >
> >
> > My config is below . I would like the route to start and print hello
> > world. Seems easy. What am I overlooking?
> >
> >
> >
> > Thanks for your help
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <beans default-init-method="init"
> >
> >             xmlns="http://www.springframework.org/schema/beans"
> >
> >             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
> >
> > xmlns:context="http://www.springframework.org/schema/context"
> >
> >             xmlns:util="http://www.springframework.org/schema/util"
> >
> >             xmlns:camel="http://camel.apache.org/schema/spring"
> >
> >
> > xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> > el-spring.xsd"
> >
> >             xsi:schemaLocation="
> >
> >
> > http://www.springframework.org/schema/beans
> >
> >
> > http://www.springframework.org/schema/beans/spring-beans.xsd
> >
> >
> > http://www.springframework.org/schema/context
> >
> >
> > http://www.springframework.org/schema/context/spring-context-3.0.xsd
> >
> >
> > http://www.springframework.org/schema/util
> >
> >
> > http://www.springframework.org/schema/util/spring-util-3.0.xsd
> >
> >
> > http://camel.apache.org/schema/spring
> >
> >
> > http://camel.apache.org/schema/spring/camel-spring.xsd
> >
> >                                                 ">
> >
> >
> >
> >             <camelContext xmlns="http://camel.apache.org/schema/spring"
> > >
> >
> >                         <dataFormats>
> >
> >                         <jaxb id="myJaxb" prettyPrint="true"
> > contextPath="com.prasad.sample"/>
> >
> >                         </dataFormats>
> >
> >
> >
> >                         <camel:route id="loginRoute" >
> >
> >                                     <camel:from uri="direct:start"/>
> >
> >                                     <camel:log message="Hello World"
> > loggingLevel="INFO"/>
> >
> >                         </camel:route>
> >
> >             </camelContext>
> >
> >
> >
> > </beans>
> >
> >
> >
> >
> >
> >
> >
> > Geoffrey A Gershaw
> >
> > CREDIT SUISSE
> >
> > Information Technology | Credit eTrading Development, KFVB 525
> >
> > 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
> >
> > Phone +1 919 994 6412
> >
> > geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> > <http://www.credit-suisse.com/>
> >
> >
> >
> >
> >
> >
> >
> ===============================================================================
> > Please access the attached hyperlink for an important electronic
> > communications disclaimer:
> > http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> >
> >
> ===============================================================================
> >
> >
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ===============================================================================
>
>

Re: Hello World? Maybe not :)

Posted by Andreas Gies <an...@wayofquality.de>.
Hi, 

Perhaps it's with posting your test as well ?

Best regards
Andreas



Am 7/18/13(29) 11:37 PM schrieb "Gershaw, Geoffrey" unter
<ge...@credit-suisse.com>:

>I'm running this in a standalone java app using Spring.  Its camel 2.11.
>I was under the impression from the various samples that I have seen that
>the below route should start and print Hello World without publishing a
>message to this route. Like a main class in java.  Am I wrong? I am using
>the timer component right now to do the same job.
>
>Right now, there is no error. It just keeps running, but Hello World
>isn't printed.
>
>Thanks
>
>
>
>>                         <camel:route id="loginRoute" >
>>
>>                                     <camel:from uri="direct:start"/>
>>
>>                                     <camel:log message="Hello World"
>> loggingLevel="INFO"/>
>>
>>                         </camel:route>
>>
>Geoffrey A Gershaw
>Credit eTrading Development
>+1 919 994 6412 (*102 6412)
>
>
>-----Original Message-----
>From: Raul Kripalani [mailto:raul@evosent.com]
>Sent: Thursday, July 18, 2013 2:21 PM
>To: users@camel.apache.org
>Subject: Re: Hello World? Maybe not :)
>
>Hey Geoffrey,
>
>A stacktrace would help us help you ;-)
>
>Where and how are you deploying this route? Apache ServiceMix? Tomcat,
>JBoss, etc.?
>
>And is there another Camel route or a unit test publishing to the direct
>endpoint? Bear in mind that a direct consumer doesn't listen on an
>external
>interface/protocol. It's rather intended for in-memory, internal
>Camel-to-Camel invocations.
>
>Thanks,
>
>*Raúl Kripalani*
>Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
>Integration specialist
>http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
>http://blog.raulkr.net | twitter: @raulvk
>
>On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey <
>geoffrey.gershaw@credit-suisse.com> wrote:
>
>> Hi All,
>>
>>
>>
>> I have the simplest problem that apparently I can't figure out. I've
>> never used direct:start as an endpoint before and I can't seem to get it
>> to work the way I would expect it to.
>>
>>
>>
>> My config is below . I would like the route to start and print hello
>> world. Seems easy. What am I overlooking?
>>
>>
>>
>> Thanks for your help
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <beans default-init-method="init"
>>
>>             xmlns="http://www.springframework.org/schema/beans"
>>
>>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>
>>
>> xmlns:context="http://www.springframework.org/schema/context"
>>
>>             xmlns:util="http://www.springframework.org/schema/util"
>>
>>             xmlns:camel="http://camel.apache.org/schema/spring"
>>
>>
>> xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
>> el-spring.xsd"
>>
>>             xsi:schemaLocation="
>>
>>
>> http://www.springframework.org/schema/beans
>>
>>
>> http://www.springframework.org/schema/beans/spring-beans.xsd
>>
>>
>> http://www.springframework.org/schema/context
>>
>>
>> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>>
>>
>> http://www.springframework.org/schema/util
>>
>>
>> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>>
>>
>> http://camel.apache.org/schema/spring
>>
>>
>> http://camel.apache.org/schema/spring/camel-spring.xsd
>>
>>                                                 ">
>>
>>
>>
>>             <camelContext xmlns="http://camel.apache.org/schema/spring"
>> >
>>
>>                         <dataFormats>
>>
>>                         <jaxb id="myJaxb" prettyPrint="true"
>> contextPath="com.prasad.sample"/>
>>
>>                         </dataFormats>
>>
>>
>>
>>                         <camel:route id="loginRoute" >
>>
>>                                     <camel:from uri="direct:start"/>
>>
>>                                     <camel:log message="Hello World"
>> loggingLevel="INFO"/>
>>
>>                         </camel:route>
>>
>>             </camelContext>
>>
>>
>>
>> </beans>
>>
>>
>>
>>
>>
>>
>>
>> Geoffrey A Gershaw
>>
>> CREDIT SUISSE
>>
>> Information Technology | Credit eTrading Development, KFVB 525
>>
>> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
>>
>> Phone +1 919 994 6412
>>
>> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
>> <http://www.credit-suisse.com/>
>>
>>
>>
>>
>>
>>
>> 
>>=========================================================================
>>======
>> Please access the attached hyperlink for an important electronic
>> communications disclaimer:
>> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>>
>> 
>>=========================================================================
>>======
>>
>>
>
>
>==========================================================================
>===== 
>Please access the attached hyperlink for an important electronic
>communications disclaimer:
>http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>==========================================================================
>===== 
>



RE: Hello World? Maybe not :)

Posted by "Gershaw, Geoffrey" <ge...@credit-suisse.com>.
I'm running this in a standalone java app using Spring.  Its camel 2.11. I was under the impression from the various samples that I have seen that the below route should start and print Hello World without publishing a message to this route. Like a main class in java.  Am I wrong? I am using the timer component right now to do the same job.

Right now, there is no error. It just keeps running, but Hello World isn't printed.

Thanks



>                         <camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                     <camel:log message="Hello World"
> loggingLevel="INFO"/>
>
>                         </camel:route>
>
Geoffrey A Gershaw
Credit eTrading Development
+1 919 994 6412 (*102 6412)


-----Original Message-----
From: Raul Kripalani [mailto:raul@evosent.com] 
Sent: Thursday, July 18, 2013 2:21 PM
To: users@camel.apache.org
Subject: Re: Hello World? Maybe not :)

Hey Geoffrey,

A stacktrace would help us help you ;-)

Where and how are you deploying this route? Apache ServiceMix? Tomcat,
JBoss, etc.?

And is there another Camel route or a unit test publishing to the direct
endpoint? Bear in mind that a direct consumer doesn't listen on an external
interface/protocol. It's rather intended for in-memory, internal
Camel-to-Camel invocations.

Thanks,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey <
geoffrey.gershaw@credit-suisse.com> wrote:

> Hi All,
>
>
>
> I have the simplest problem that apparently I can't figure out. I've
> never used direct:start as an endpoint before and I can't seem to get it
> to work the way I would expect it to.
>
>
>
> My config is below . I would like the route to start and print hello
> world. Seems easy. What am I overlooking?
>
>
>
> Thanks for your help
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans default-init-method="init"
>
>             xmlns="http://www.springframework.org/schema/beans"
>
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
> xmlns:context="http://www.springframework.org/schema/context"
>
>             xmlns:util="http://www.springframework.org/schema/util"
>
>             xmlns:camel="http://camel.apache.org/schema/spring"
>
>
> xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> el-spring.xsd"
>
>             xsi:schemaLocation="
>
>
> http://www.springframework.org/schema/beans
>
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>
>
> http://www.springframework.org/schema/context
>
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>
>
> http://www.springframework.org/schema/util
>
>
> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>
>
> http://camel.apache.org/schema/spring
>
>
> http://camel.apache.org/schema/spring/camel-spring.xsd
>
>                                                 ">
>
>
>
>             <camelContext xmlns="http://camel.apache.org/schema/spring"
> >
>
>                         <dataFormats>
>
>                         <jaxb id="myJaxb" prettyPrint="true"
> contextPath="com.prasad.sample"/>
>
>                         </dataFormats>
>
>
>
>                         <camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                     <camel:log message="Hello World"
> loggingLevel="INFO"/>
>
>                         </camel:route>
>
>             </camelContext>
>
>
>
> </beans>
>
>
>
>
>
>
>
> Geoffrey A Gershaw
>
> CREDIT SUISSE
>
> Information Technology | Credit eTrading Development, KFVB 525
>
> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
>
> Phone +1 919 994 6412
>
> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> <http://www.credit-suisse.com/>
>
>
>
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ===============================================================================
>
>


=============================================================================== 
Please access the attached hyperlink for an important electronic communications disclaimer: 
http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
=============================================================================== 


Re: Hello World? Maybe not :)

Posted by Raul Kripalani <ra...@evosent.com>.
Hey Geoffrey,

A stacktrace would help us help you ;-)

Where and how are you deploying this route? Apache ServiceMix? Tomcat,
JBoss, etc.?

And is there another Camel route or a unit test publishing to the direct
endpoint? Bear in mind that a direct consumer doesn't listen on an external
interface/protocol. It's rather intended for in-memory, internal
Camel-to-Camel invocations.

Thanks,

*Raúl Kripalani*
Apache Camel PMC Member & Committer | Enterprise Architect, Open Source
Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk

On Thu, Jul 18, 2013 at 6:40 PM, Gershaw, Geoffrey <
geoffrey.gershaw@credit-suisse.com> wrote:

> Hi All,
>
>
>
> I have the simplest problem that apparently I can't figure out. I've
> never used direct:start as an endpoint before and I can't seem to get it
> to work the way I would expect it to.
>
>
>
> My config is below . I would like the route to start and print hello
> world. Seems easy. What am I overlooking?
>
>
>
> Thanks for your help
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <beans default-init-method="init"
>
>             xmlns="http://www.springframework.org/schema/beans"
>
>             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
>
> xmlns:context="http://www.springframework.org/schema/context"
>
>             xmlns:util="http://www.springframework.org/schema/util"
>
>             xmlns:camel="http://camel.apache.org/schema/spring"
>
>
> xsi:noNamespaceSchemaLocation="http://camel.apache.org/schema/spring/cam
> el-spring.xsd"
>
>             xsi:schemaLocation="
>
>
> http://www.springframework.org/schema/beans
>
>
> http://www.springframework.org/schema/beans/spring-beans.xsd
>
>
> http://www.springframework.org/schema/context
>
>
> http://www.springframework.org/schema/context/spring-context-3.0.xsd
>
>
> http://www.springframework.org/schema/util
>
>
> http://www.springframework.org/schema/util/spring-util-3.0.xsd
>
>
> http://camel.apache.org/schema/spring
>
>
> http://camel.apache.org/schema/spring/camel-spring.xsd
>
>                                                 ">
>
>
>
>             <camelContext xmlns="http://camel.apache.org/schema/spring"
> >
>
>                         <dataFormats>
>
>                         <jaxb id="myJaxb" prettyPrint="true"
> contextPath="com.prasad.sample"/>
>
>                         </dataFormats>
>
>
>
>                         <camel:route id="loginRoute" >
>
>                                     <camel:from uri="direct:start"/>
>
>                                     <camel:log message="Hello World"
> loggingLevel="INFO"/>
>
>                         </camel:route>
>
>             </camelContext>
>
>
>
> </beans>
>
>
>
>
>
>
>
> Geoffrey A Gershaw
>
> CREDIT SUISSE
>
> Information Technology | Credit eTrading Development, KFVB 525
>
> 7033 Louis Stephens Drive | 27560 Research Triangle Park | United States
>
> Phone +1 919 994 6412
>
> geoffrey.gershaw@credit-suisse.com | www.credit-suisse.com
> <http://www.credit-suisse.com/>
>
>
>
>
>
>
> ===============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ===============================================================================
>
>