Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 34375 invoked from network); 6 Jan 2009 11:04:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Jan 2009 11:04:42 -0000 Received: (qmail 31334 invoked by uid 500); 6 Jan 2009 11:04:41 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 31327 invoked by uid 500); 6 Jan 2009 11:04:41 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 31316 invoked by uid 99); 6 Jan 2009 11:04:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 03:04:41 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.15 as permitted sender) Received: from [209.85.218.15] (HELO mail-bw0-f15.google.com) (209.85.218.15) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jan 2009 11:04:32 +0000 Received: by bwz8 with SMTP id 8so22625325bwz.14 for ; Tue, 06 Jan 2009 03:04:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=/zJQ1914t2muu8ZcZQ4BNoIEMXZsiwaOa4zopxr4TQs=; b=E28IczEy420KscAFrHjLfGcLd63mvfG/+JWcciFJNjRzCA9IWUfEkSU3BS+eX/Zr4R fTEo2TYzV6s+QgOlhqXHugtq5gShHmkkU+8rKR7CojSwa3X7KHunGYIJL5Yyn3C0/RLu 9JIXEbxcePd7k1GagZH3s0fWy/aD5FaRKHLao= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=B++A38dh/lSmFGyd0RE1itoMYamzYUeAYXvL2OtYca1192biSb0GML63HQcbq/fd9Z 7h8KmwDELk7q25VbotccR4dNUCD/t8q390s0Fv3PMaA2he/lkiVNVvAf2MaIvjJWffwC 0Dz4jEZq4+GsFFiu98A9Vr4yoF85nfLPM+Mvw= Received: by 10.223.110.4 with SMTP id l4mr14411940fap.47.1231239849207; Tue, 06 Jan 2009 03:04:09 -0800 (PST) Received: by 10.223.120.3 with HTTP; Tue, 6 Jan 2009 03:04:09 -0800 (PST) Message-ID: <5380c69c0901060304i63cae9edobb2dcd380f6e3f36@mail.gmail.com> Date: Tue, 6 Jan 2009 12:04:09 +0100 From: "Claus Ibsen" To: camel-dev@activemq.apache.org Subject: Re: Problem with jetty endpoint In-Reply-To: <21308378.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <21228613.post@talk.nabble.com> <5380c69c0812310110tcb1b7e2pabe9d6f9b0eb5395@mail.gmail.com> <21289627.post@talk.nabble.com> <5380c69c0901050349n424faccdhe6ba80a488c567a3@mail.gmail.com> <21306041.post@talk.nabble.com> <5380c69c0901060001n4d8d8665q77867d79ce69f647@mail.gmail.com> <21307899.post@talk.nabble.com> <5380c69c0901060228s3385dfc8i860507946efdbfce@mail.gmail.com> <21308378.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi What is the exception you get? To be able to store it as a file it much use something that is InputStream convertable. Maybe the jetty stuff isn't really that. Check using the debugging in the java code what Object type the IN message body is? You can use .convertBodyTo(String.class) etc. to force it to use String when it stores as a file .convertBodyTo(String.class) .to("file://todir"); Have you tried with a simple URI for the file, without the D: to("file://todir") On Tue, Jan 6, 2009 at 11:55 AM, Ganesh_Progress wrote: > > Yes, Using Fuse integration designer to debug. > > I tried with java DSL also but, facing the same unable to create the file at > destination. > > Java DSL code as follows, which i ran > > context.addRoutes(new RouteBuilder() { > > public void configure() > { > Processor proc = new Processor() { > public void process(Exchange e) throws Exception > { > System.out.println("Received exchange: " + > e.getIn().getBody(String.class)); > } > }; > > > from("jetty:http://localhost:8080/test").process(proc).to("file:///D:/FID_341/runtime-New_configuration/FuseMR/toDir"); > > > from("file:///D:/FID_341/runtime-New_configuration/FuseMR/toDir").process(new > Processor() > { > public void process(Exchange e) > { > System.out.println("Received exchange: " + > e.getIn()); > } > }); > > } > }); context.start(); > > Thanks > Ganesh > > > > > > Claus Ibsen-2 wrote: >> >> Hi >> >> Are you using Fuse integration designer to debug it? >> http://fusesource.com/products/fuse-integration-designer/ >> >> I didn't know you could set a breakpoint in a .xml file ;) >> >> If you get it to some java code then you can set a breakpoint in java >> code and then Eclipse should be able to dump all the debug variables. >> >> So you can create a new class that implements >> org.apache.camel.Processor and then route from jetty to that one >> >> >> >> Something like this: >> >> >> >> Then set a breakpoint in the java code in com.mycompany.MyProcossor >> and you should be able to inspect the data. >> >> >> >> >> On Tue, Jan 6, 2009 at 11:19 AM, Ganesh_Progress >> wrote: >>> >>> I deleted given destination e.g. "in" and started camel, but file is not >>> created. >>> >>> I tried with JMS endpoints and observed same. >>> >>> Further, i try to debug the camel and observed that "?" as its value at >>> from >>> URI. >>> Please find the attached screen shot for the same. >>> >>> Still am i missing something. >>> >>> >>> Claus Ibsen-2 wrote: >>>> >>>> On Tue, Jan 6, 2009 at 8:44 AM, Ganesh_Progress >>>> 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 >>>> >>>> >>>> >>>> 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 >>>>>> >>>>>> 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 >>>>>>>> >>>>>>>> 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". >>>>>>>>> >>>>>>>>> >>>>>>>> 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">>>>>>>>> id="camelroute" >>>>>>>>> xmlns="http://activemq.apache.org/camel/schema/spring"> >>>>>>>>> >>>>>>>>> >>>>>>>> id="Camel_Jetty_2"/> >>>>>>>>> >>>>>>>> uri="file:///D:/FID_341/runtime-New_configuration/FuseFIDCamel/Jetty/in" >>>>>>>>> id="Camel_File_4"/> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> 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/ >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Problem-with-jetty-endpoint-tp21228613s22882p21307899.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-tp21228613s22882p21308378.html > Sent from the Camel - Development mailing list archive at Nabble.com. > > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/