This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Method with name: sayHi not found on bean - Using apache Camel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Method with name: sayHi not found on bean - Using apache Camel" Watch "Method with name: sayHi not found on bean - Using apache Camel" New topic

Method with name: sayHi not found on bean - Using apache Camel

Arthanarisamy Annamalai

Joined: Dec 04, 2013
Posts: 1
I am using apache camel to communicate to a remote EJB which is deployed in Weblogic Server 12c. when i invoke remote EJB it throws me the below exception org.apache.camel.component.bean.MethodNotFoundException: Method with name: sayHi not found on bean: ClusterableRemoteRef(3961905123449960886S:[7001,7001,-1,-1,-1,-1,-1]:weblogic:AdminServer [3961905123449960886S:[7001,7001,-1,-1,-1,-1,-1]:weblogic:AdminServer/394])/394 of type: Exchange[Message: [Body is null]]

My Came-context.xml file is as below

<bean id="ejb" class="org.apache.camel.component.ejb.EjbComponent">
<property name="properties" ref="jndiProperties" />
<util:properties id="jndiProperties">
<prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
<prop key="java.naming.provider.url">t3://IPADDRESS:PORT</prop>
<prop key="">weblogic</prop>
<prop key="">Weblogic@01</prop>
<camelContext id="camelclient" xmlns="">
<template id="template" />

<endpoint id="camelejb" uri="ejb:EJBRemoteModule-1_0-SNAPSHOTEJBRemoteModule-1_0-SNAPSHOT_jarHelloRemoteEJBImpl_IHelloRemoteEJB?method=sayHi"/>

<from uri="direct:start_0" />
<to uri="camelejb" />
and the java client class which i am using is

public void postRequest(){
try {
String camelID = "camelejb";
Exchange exchange = null;
Message msg = null;
System.out.println("Starting camel context.....");
ProducerTemplate template = springCamelContext.createProducerTemplate();
System.out.println("camelejb::::::" + getUriMap().get("camelejb"));
exchange = template.request(getUriMap().get(camelID), new Processor() {

public void process(Exchange exchng) throws Exception {
System.out.println("Exception:" + exchange.getException());
msg = exchange.getOut();

System.out.println("Message:" + msg);
System.out.println("Stopping Camel Context....");
} catch (Exception ex) {


public interface IHelloRemoteEJB {

public void sayHello(String name);

public void sayHi();
Having no clue why this error is thrown when the method is available in my EJB. Will be really grateful from heart because i am already in soup.
I agree. Here's the link:
subject: Method with name: sayHi not found on bean - Using apache Camel
It's not a secret anymore!