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 E91CD18543 for ; Wed, 22 Jul 2015 16:54:28 +0000 (UTC) Received: (qmail 17008 invoked by uid 500); 22 Jul 2015 16:54:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 16962 invoked by uid 500); 22 Jul 2015 16:54:12 -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 16950 invoked by uid 99); 22 Jul 2015 16:54:12 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jul 2015 16:54:12 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 02FC31A7670 for ; Wed, 22 Jul 2015 16:54:12 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.213 X-Spam-Level: * X-Spam-Status: No, score=1.213 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id rxlHKPn5qX6S for ; Wed, 22 Jul 2015 16:53:59 +0000 (UTC) Received: from mail-ig0-f172.google.com (mail-ig0-f172.google.com [209.85.213.172]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id DC29A26429 for ; Wed, 22 Jul 2015 16:53:58 +0000 (UTC) Received: by igbij6 with SMTP id ij6so141796340igb.1 for ; Wed, 22 Jul 2015 09:53:13 -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=/7RSpq/dFuniMNegnyx9iHi/PQ9eWNVhMm+LFt0AD3k=; b=RRqbFTXRNEjnBLTF6tOI+ZVkueB+fez9aPAWSLb89MVoDN9CS3sG0wewfAivHsabKQ 1TOvqmMvb2wMPeFN9Gn8GHteF6w9Wz1TZPOPPRtyd77ZmlNai/bFntJKmoQ4lTfgqLBc omc86pWuJXNYy2XhLvMb5caEyLSDHNGUdCqF3l0wZiw2FNJFBeix5NJrIu1adCTC5F0Q 8Q33nZYSCJmo9Mg6O3rv3ESyplkJyoUqKSP+097JMqjpHkYQd7fLP7s69cNPwgMSvSWf NH/aLp0Xtqb9EiTXBbC44mdGDabGy07f6oJrTHfZyOFCJj0Uc1WQWUBq9FgQWCNFj0CU l3Dw== X-Received: by 10.107.137.13 with SMTP id l13mr6063763iod.159.1437583993335; Wed, 22 Jul 2015 09:53:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.76.201 with HTTP; Wed, 22 Jul 2015 09:52:53 -0700 (PDT) In-Reply-To: <1437582647500-5769752.post@n5.nabble.com> References: <1437582647500-5769752.post@n5.nabble.com> From: Claus Ibsen Date: Wed, 22 Jul 2015 18:52:53 +0200 Message-ID: Subject: Re: issue with @UriParam To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Your setter/getter is now correct java standard naming. It should be setPassword etc On Wed, Jul 22, 2015 at 6:30 PM, mayur_bm wrote: > Hi, > i have built an custom component, whose endpoint implementation is as below: > > @UriEndpoint(scheme = "sapper") > public class PersistenceEndpoint > extends DefaultEndpoint { > > @UriParam > protected String user = ""; > > @UriParam > protected String password = ""; > > public PersistenceEndpoint() { > // TODO Auto-generated constructor stub > } > > public PersistenceEndpoint(String uri, PersistenceComponent component) { > > // TODO Auto-generated constructor stub > super(uri, component); > } > > public PersistenceEndpoint(String uri, CamelContext camelContext, > PersistenceComponent component) { > // TODO Auto-generated constructor stub > super(uri, component); > > } > > @ManagedAttribute(description = "user") > public String getuser() { > return user; > } > > @ManagedAttribute(description = "user") > public void setuser(String user) { > this.user = user; > } > > @ManagedAttribute(description = "password") > public String getpassword() { > return password; > } > > @ManagedAttribute(description = "password") > public void setpassword(String password) { > this.password = password; > } > > @Override > public Producer createProducer() > throws Exception { > // TODO Auto-generated method stub > return new PersistenceProducer(this); > } > > @Override > public Consumer createConsumer(Processor processor) > throws Exception { > // TODO Auto-generated method stub > return null; > } > > @Override > public boolean isSingleton() { > // TODO Auto-generated method stub > return true; > } > > when i try to call my custome component, iam getting below error: > > Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to > resolve endpoint: > sapper://com.test.camel.component.persistence.PersistenceComponent?password=sql&user=DBA > due to: Failed to resolve endpoint: > sapper://com.test.camel.component.persistence.PersistenceComponent?password=sql&user=DBA > due to: There are 2 parameters that couldn't be set on the endpoint. Check > the uri if the parameters are spelt correctly and that they are properties > of the endpoint. Unknown parameters=[{password=sql, user=DBA}] > at > org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:547) > at > org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:72) > at > org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:202) > at > org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:107) > at > org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:113) > at > org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61) > at > org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55) > at > org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500) > at > org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213) > at > org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:942) > ... 19 more > > > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/issue-with-UriParam-tp5769752.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2