Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 490CF1106D for ; Thu, 24 Jul 2014 12:29:18 +0000 (UTC) Received: (qmail 45706 invoked by uid 500); 24 Jul 2014 12:29:17 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 45657 invoked by uid 500); 24 Jul 2014 12:29:17 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 45645 invoked by uid 99); 24 Jul 2014 12:29:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 12:29:17 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jul 2014 12:29:16 +0000 Received: by mail-ig0-f178.google.com with SMTP id uq10so2589645igb.17 for ; Thu, 24 Jul 2014 05:28:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=yatR1Aw0NGDyEsIyCGLARNRyIzh5APk+lFCNkU5515U=; b=xs+N9z87RIGm3MgBmkakNbRJ2LkRcuUqwhfuNkkwIA+liHphBYaqdkbsDuLaaSqoMv FWqTVNl+55GVa57CaGzptSHbhjNSjE9rGDzb42okvOKXbvQPfSUto37pvHRgKwowGIkB iS1Y2gUhFnyCJE+7OVnF9fFzeNZ3mOb1SqVwhhdKc+Vu8ro6kz0X//wBO06jXQCKw2Np iM6gwDPHAchYRHCOIlkBbaRbAV+4ecMa8rvM0qCZW9SeVH0GjpMvCtVOidT0zstSQfnw UoCNhtguAD8iyola91qvYiwFrri/6XtDk6YdM0aHDv3MSwhmZQHANr8Yp5svEm+nAgSf xCUQ== X-Received: by 10.50.32.73 with SMTP id g9mr39074074igi.31.1406204931059; Thu, 24 Jul 2014 05:28:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.11.67 with HTTP; Thu, 24 Jul 2014 05:28:31 -0700 (PDT) In-Reply-To: <1406204566118-5754376.post@n5.nabble.com> References: <1406204566118-5754376.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 24 Jul 2014 14:28:31 +0200 Message-ID: Subject: Re: Not able to define processor in Camel To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi should be outside On Thu, Jul 24, 2014 at 2:22 PM, nettome wrote: > Hi, > I'm new to Camel and learning it step by step. > I have a scenario where i have to process a task in a route. I'm creating a > XML file and loading the routes from it. > Below is my xml file - > > > > > > > > > > > Code to load the XML file - > > ModelCamelContext context = (ModelCamelContext) new DefaultCamelContext(); > RouteBuilder builder = null; > File fileFolder = new > File("/home/workspace/Validator/src/main/resources/com/validator/routes"); > > // load route from XML and add them to the existing camel context > RoutesDefinition routes; > > try { > > for(final File file : fileFolder.listFiles()){ > if(file.isFile()){ > InputStream in = new FileInputStream(file); > routes = context.loadRoutesDefinition(in); > context.addRouteDefinitions(routes.getRoutes()); > } > } > > context.start(); > Thread.sleep(4000); > } catch (Exception e) { > e.printStackTrace(); > } > > > > > JsonParser is a Processor and I want the route to go to the processor. But > while I'm doing the above I'm getting the following error - > > Caused by: java.lang.IllegalArgumentException: registry entry called > jsonProcessor must be specified on: process[ref:jsonProcessor] > > > there are couple of things I'm missing/not clear over here - > > 1. Is my bean definition correct? > 2. Should I create the camelContext in the XML file or the Java code > 3. Is my XML structured properly. > > Please guide. I'm stuck and not able to find much on the internet. > > thanks! > > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Not-able-to-define-processor-in-Camel-tp5754376.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- 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 hawtio: http://hawt.io/ fabric8: http://fabric8.io/