aspose file tools*
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 8 in Action this week in the Java 8 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
Author

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

Arthanarisamy Annamalai
Greenhorn

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: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. Will be really grateful from heart because i am already in soup.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Method with name: sayHi not found on bean - Using apache Camel
 
Similar Threads
Camel ,consuming REST services and displaying output
try to solve cmp exception over weblogic8.1
servicemix 4.3.2 camel cxf producer to cxf-nmr consumer Not Working
Example for JMS sender - receiver
(Camel-spring ) BeanDefinitionStoreException