• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: com.iexceed.study.HelloRemoteEJBImpl_6zix6y_IHelloRemoteEJBImpl_12120_WLStub. 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="java.naming.security.principal">weblogic</prop>
<prop key="java.naming.security.credentials">Weblogic@01</prop>
<camelContext id="camelclient" xmlns="http://camel.apache.org/schema/spring">
<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.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!