Hi Dev,
I’m trying simple helloworld sample using EJB Mediator . while I’m running
the sample I’m getting below error. can anyone guide me on this
error?(Jboss-5.1)
[2015-10-06 12:24:01,082] DEBUG - wire >> "POST /services/ejb
HTTP/1.1[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "Accept-Encoding:
gzip,deflate[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "Content-Type:
text/xml;charset=UTF-8[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "SOAPAction:
"urn:mediate"[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "Content-Length: 214[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "Host:
rajjaz-ThinkPad-T540p:8280[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "Connection: Keep-Alive[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "User-Agent:
Apache-HttpClient/4.1.1 (java 1.5)[\r][\n]"
[2015-10-06 12:24:01,083] DEBUG - wire >> "[\r][\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> "<soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/">[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " <soapenv:Header/>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " <soapenv:Body>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " <sayhello>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " <name>rajjaz</name>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " </sayhello>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> " </soapenv:Body>[\n]"
[2015-10-06 12:24:01,084] DEBUG - wire >> "</soapenv:Envelope>"
[2015-10-06 12:24:01,092] ERROR - SequenceMediator object is not an
instance of declaring class
java.lang.IllegalArgumentException: object is not an instance of declaring
class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at
org.apache.synapse.mediators.bean.BeanUtils.invokeInstanceMethod(BeanUtils.java:74)
at
org.apache.synapse.mediators.bean.enterprise.EJBMediator.mediate(EJBMediator.java:132)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:81)
at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:48)
at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:149)
at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:185)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at
org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:395)
at
org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:142)
at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[2015-10-06 12:24:01,094] INFO - LogMediator To: /services/ejb, WSAction:
urn:mediate, SOAPAction: urn:mediate, MessageID:
urn:uuid:172f58fa-9099-432e-b48d-d013c59796d5, Direction: request, MESSAGE
= Executing default 'fault' sequence, ERROR_CODE = 0, ERROR_MESSAGE =
object is not an instance of declaring class, Envelope: <?xml version='1.0'
encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<sayhello>
<name>rajjaz</name>
</sayhello>
</soapenv:Body></soapenv:Envelope>
[2015-10-06 12:24:01,094] INFO - LogMediator To: /services/ejb, WSAction:
urn:mediate, SOAPAction: urn:mediate, MessageID:
urn:uuid:172f58fa-9099-432e-b48d-d013c59796d5, Direction: request,
Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body>
<sayhello>
<name>rajjaz</name>
</sayhello>
</soapenv:Body></soapenv:Envelope>
[2015-10-06 12:24:01,095] DEBUG - wire << "HTTP/1.1 202 Accepted[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "Date: Tue, 06 Oct 2015 06:54:01
GMT[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "Transfer-Encoding:
chunked[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "Connection: Keep-Alive[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "0[\r][\n]"
[2015-10-06 12:24:01,096] DEBUG - wire << "[\r][\n]"
--
Thank you
Best Regards
*Rajjaz HM*
Associate Software Engineer
WSO2 Inc. <http://wso2.com/>
lean | enterprise | middleware
Mobile | +94752833834
Email | [email protected]
LinkedIn | Blogger | WSO2 Profile
<http://wso2.com/about/team/mohammer_rajjaz/>
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="ejb"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<property name="response" value="init" scope="default" type="STRING"/>
<ejb beanstalk="jack"
class="org.NewBeanRemote"
method="sayHello"
target="response"
jndiName="NewBean/remote">
<args>
<arg value="{//name}"/>
</args>
</ejb>
<log level="custom">
<property name="XXXXXXXXXXXXXXXX" expression="get-property('response')"/>
</log>
<payloadFactory media-type="xml">
<format>
<ejb xmlns="">
<response>$ctx.response</response>
</ejb>
</format>
<args/>
</payloadFactory>
<respond/>
</inSequence>
</target>
</proxy>
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org;
import javax.ejb.Stateless;
/**
*
* @author malaka
*/
@Stateless(name="NewBean", mappedName="ejb/NewBean")
public class NewBean implements NewBeanRemote, NewBeanLocal {
public String display(){
return "Hello JBoss";
}
public String sayHello(String name){
return "Hello " + name;
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package org;
import javax.ejb.Remote;
/**
*
* @author malaka
*/
@Remote
public interface NewBeanRemote {
public String display();
public String sayHello(String name);
}
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev