What version of Camel do you use? If possible try with latest release as the camel-cdi component has been refactored.
On Fri, Apr 29, 2016 at 10:54 AM, ravi narayanan <geekstuf...@gmail.com> wrote: > Hi, > > Still iam getting warning when i use bean ref > > > warn message > > 10:48:07,147 WARN [org.apache.camel.util.ObjectHelper] > (http-/127.0.0.1:8080-11) Cannot find class: A1_Sync_Con_RQRequestReceived > > > <bean ref="Audit" > method="logAuditMessage(${body},'A1_Sync_Con_RQ Request Received :')" /> > > java method: > public void logAuditMessage(BihMessage body,String message) > { > String Header = BihMessageHandler.prepareBihHeader(body); > BIHLogger logger=new BIHLogger(); > logger.logBIHAuditMessage(message + > Header,Level.INFO,"C:\\Logfiles\\Audit.log"); > } > > > Regards, > Ravi > > On Thu, Apr 28, 2016 at 8:04 PM, ravi narayanan <geekstuf...@gmail.com> > wrote: > >> Hi John, >> I have tried it and getting the same error... >> >> >> On Thursday, 28 April 2016, John D. Ament <johndam...@apache.org> wrote: >> >>> You should quote the string when passing it in, e.g. >>> >>> <bean ref="Audit" >>> >>> method="logAuditMessage(${body},'A1_Sync_Con_RQ Request Received :')" /> >>> >>> Then it will be passed in as the second argument as a string. >>> >>> On Thu, Apr 28, 2016 at 11:48 AM ravi21588 <ravi21...@gmail.com> wrote: >>> >>> > Hi All, >>> > >>> > Iam getting below warn when i call the bean ref in camel route >>> > >>> > >>> > 17:44:18,385 WARN [org.apache.camel.util.ObjectHelper] >>> > (http-/127.0.0.1:8080-18) Cannot find class: >>> A1_Sync_Con_RQRequestReceived >>> > >>> > <bean ref="Audit" >>> > >>> > method="logAuditMessage(${body},A1_Sync_Con_RQ Request Received :)" /> >>> > >>> > >>> > Java class: >>> > >>> > package com.example.switchyard.a1.sync.consumer.rq; >>> > >>> > import javax.enterprise.context.ApplicationScoped; >>> > import javax.inject.Named; >>> > >>> > import org.apache.log4j.Level; >>> > >>> > import com.agcs.bih.message.model.v2.BihMessage; >>> > import com.agcs.bih.message.v2.BIHLogger; >>> > import com.agcs.bih.message.v2.BihMessageHandler; >>> > >>> > @Named("Audit") >>> > @ApplicationScoped >>> > public class Audit { >>> > >>> > public void logAuditMessage(BihMessage body,String message) >>> > { >>> > String Header = >>> BihMessageHandler.prepareBihHeader(body); >>> > BIHLogger logger=new BIHLogger(); >>> > logger.logBIHAuditMessage(message + >>> > Header,Level.INFO,"C:\\Logfiles\\Audit.log"); >>> > } >>> > >>> > } >>> > >>> > >>> > Can you please tell me what might be issue. >>> > >>> > >>> > >>> > -- >>> > View this message in context: >>> > >>> http://camel.465427.n5.nabble.com/warning-while-calling-Bean-ref-in-camel-route-tp5781911.html >>> > Sent from the Camel - Users mailing list archive at Nabble.com. >>> > >>> >> -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2