camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen" <claus.ib...@gmail.com>
Subject Re: Problem with jetty endpoint
Date Tue, 06 Jan 2009 08:01:09 GMT
On Tue, Jan 6, 2009 at 8:44 AM, Ganesh_Progress <chganeshch@gmail.com> wrote:
>
> Hi Claus,
>
> By using the below endpoint i able to run successfully without any
> exceptions in the console, but file is not  created at given destination.
> Is it a valid endpoint ? if not point me to some valid endpoints.
>
> http://localhost:8080/test
>
> e.g. from("jetty:http://localhost:8080/test")
Yeah that is the correct endpoint, for exposing a http service (= you
being the server)

If you need the reverse situation then use just http (= you being the
client calling an external web site)

Could you try replacing the file endpoint with another to see if you
get some data?
You can use a log endpoint instead that will log using commons-logger
to INFO level

<to uri="log:hello"/>

BTW Is the folder created where you expect the file to be dropped?
D:/FID_341/runtime-New_configuration/FuseFIDCamel/Jetty/in

You can try to delete it and start Camel. If the folder is created
then something is working ;)

You can also enable org.apache.camel at DEBUG level to see what is going on.



>
>
> Thanks,
> Ganesh
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> You can enable the tracer that logs how exchanges is routed in Camel.
>> It will log the payload content and the payload object type.
>> http://activemq.apache.org/camel/tracer.html
>>
>> (hint: setting trace="true" in the spring XML file).
>>
>> To be able to store as a file it should be convertible to InputStream.
>> But check out if there is any data in the first place from the jetty
>> endpoint.
>>
>> You can also send it to a log instead of a file with: to("log:hello")
>>
>>
>>
>>
>> On Mon, Jan 5, 2009 at 12:43 PM, Ganesh_Progress <chganeshch@gmail.com>
>> wrote:
>>>
>>> Hi Claus,
>>>
>>> Now i able to run the successfully without any exceptions, by adding all
>>> the
>>> needed jars specified at the maven.
>>> I have navigated to the provided destination and observed that a empty
>>> file
>>> is created with out any date.
>>>
>>> am i need to do any thing more ? to get the date.
>>>
>>> Thanks
>>> Ganesh.
>>>
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>>>
>>>> Hi
>>>>
>>>> Usually people are using maven and thus you just depend on camel-jetty
>>>> and you should get the needed .jars from maven.
>>>>
>>>> You get this missing class
>>>>> Exception: java.lang.NoClassDefFoundError:
>>>>> org/apache/commons/httpclient/HttpConnectionManager
>>>>
>>>> It's in some of the commons http client .jars
>>>> commons-httpclient v3.1 is used by camel
>>>>
>>>> You can check out the maven reports and see the needed .jars
>>>> http://activemq.apache.org/camel/maven/index.html
>>>>
>>>> http://activemq.apache.org/camel/maven/camel-http/dependencies.html
>>>> http://activemq.apache.org/camel/maven/camel-jetty/dependencies.html
>>>>
>>>>
>>>>
>>>> On Wed, Dec 31, 2008 at 9:28 AM, Ganesh_Progress <chganeshch@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I have created a camel configuration with Jetty and a file endpoint.
>>>>>
>>>>> I got the following error, when I tried to run the created the
>>>>> configuration. org.apache.camel.NoSuchEndpointException: No endpoint
>>>>> could
>>>>> be found for: jetty:http://localhost:8080/test/dump/info
>>>>> (Jetty server is running at 8080 port)
>>>>>
>>>>> Following is the Camel Configuration, for which I got the
>>>>> "NoSuchEndpointException".
>>>>>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>> xsi:schemaLocation="
>>>>> http://www.springframework.org/schema/beans
>>>>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>>>> http://activemq.apache.org/camel/schema/spring
>>>>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd"><camelContext
>>>>> id="camelroute" xmlns="http://activemq.apache.org/camel/schema/spring">
>>>>> <route xmlns="http://activemq.apache.org/camel/schema/spring">
>>>>>    <from uri="jetty:http://localhost:8080/test/dump/info"
>>>>> id="Camel_Jetty_2"/>
>>>>>    <to
>>>>> uri="file:///D:/FID_341/runtime-New_configuration/FuseFIDCamel/Jetty/in"
>>>>> id="Camel_File_4"/>
>>>>> </route>
>>>>> </camelContext></beans>
>>>>>
>>>>> I added jetty-client.jar and jetty.jar to my classpath.
>>>>> Exception: NoSuchEndpointException.
>>>>>
>>>>> I added jetty-client.jar, camel-jetty1.4.0Fuse.jar and jetty.jar to my
>>>>> classpath.
>>>>> Exception: "org.apache.camel.ResolveEndpointFailedException"
>>>>>
>>>>> I added jetty-client.jar, camel-http.jar, camel-jetty1.4.0Fuse,
>>>>> jetty.jar,
>>>>> jetty-util.jar and jetty-xbean.jar to my classpath.
>>>>> Exception: java.lang.NoClassDefFoundError:
>>>>> org/apache/commons/httpclient/HttpConnectionManager
>>>>> Am I missing some thing here? I'm Using Messaging broker 5.1.0.1,
>>>>> Apache
>>>>> Camel 1.4 and jetty-7.0.0pre5 server.
>>>>>
>>>>> Can somebody help me to overcome this issue?
>>>>>
>>>>> Regards,
>>>>> Gaensh
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Problem-with-jetty-endpoint-tp21228613s22882p21228613.html
>>>>> Sent from the Camel - Development mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> /Claus Ibsen
>>>> Apache Camel Committer
>>>> Blog: http://davsclaus.blogspot.com/
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Problem-with-jetty-endpoint-tp21228613s22882p21289627.html
>>> Sent from the Camel - Development mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>>
>> /Claus Ibsen
>> Apache Camel Committer
>> Blog: http://davsclaus.blogspot.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Problem-with-jetty-endpoint-tp21228613s22882p21306041.html
> Sent from the Camel - Development mailing list archive at Nabble.com.
>
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message