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:192.168.1.98:[7001,7001,-1,-1,-1,-1,-1]:weblogic:AdminServer [3961905123449960886S:192.168.1.98:[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" /> </bean> <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> </util:properties> <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"/> <route> <from uri="direct:start_0" /> <to uri="camelejb" /> </route> </camelContext> and the java client class which i am using is public void postRequest(){ try { String camelID = "camelejb"; Exchange exchange = null; Message msg = null; getCamelContext(); springCamelContext.start(); System.out.println("Starting camel context....."); getUriMap(); 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 { exchng.getIn().setBody(""); } }); System.out.println("Exception:" + exchange.getException()); exchange.getException().printStackTrace(); msg = exchange.getOut(); System.out.println("Message:" + msg); springCamelContext.stop(); System.out.println("Stopping Camel Context...."); } catch (Exception ex) { ex.printStackTrace(); } } EJB : @Remote 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. -- View this message in context: http://camel.465427.n5.nabble.com/Method-with-name-sayHi-not-found-on-bean-Using-apache-Camel-tp5744319.html Sent from the Camel - Users mailing list archive at Nabble.com.