Hello to all,
I don't understand my error... If someone could help me it would be
fantastic... thanks.
I invoke an EJB (which works perfectly alone) and I always have the same
error:
25250 [SocketListener0-1] ERROR
org.codehaus.xfire.handler.DefaultFaultHandler - Fault occurred!
java.lang.IllegalArgumentException: object is not an instance of
declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at max.EJBInvoker.invoke(EJBInvoker.java:72)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.sendMessage(
ServiceInvocationHandler.java:271)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler$1.run(Servic
eInvocationHandler.java:84)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.execute(Serv
iceInvocationHandler.java:132)
at
org.codehaus.xfire.service.binding.ServiceInvocationHandler.invoke(Servi
ceInvocationHandler.java:107)
at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31)
at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.j
ava:64)
at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.jav
a:38)
at
org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireSer
vletController.java:301)
at
org.codehaus.xfire.transport.http.XFireServletController.doService(XFire
ServletController.java:130)
at
org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:
116)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:427)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:65
4)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:556)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1563)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1515)
at org.mortbay.http.HttpServer.service(HttpServer.java:956)
at
org.mortbay.http.HttpConnection.service(HttpConnection.java:814)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:981)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:831)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244
)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
I use this to declare my EJB:
Remote
public interface Interface {
public ACKVO countryGetbyName(Connection connection, String
request ) throws NotLoggedInException, java.rmi.RemoteException;
}
Interface Connection:
public interface Connection extends Serializable,Cloneable
{
public byte[] getUserId();
public Object clone();
public void setUserName(String userName);
public String getUserName();
public String getId();
public int getPingInterval();
public void setPingInterval(int pingInterval);
}
Config:
ObjectServiceFactory serviceFactory = new ObjectServiceFactory();
Service service = serviceFactory.create(service.class);
service.setInvoker(new EJBInvoker("serviceHome"));
XFire xfire = XFireFactory.newInstance().getXFire();
xfire.getServiceRegistry().register(service);
This email was sent to you by Reuters, the global news and information company.
To find out more about Reuters visit www.about.reuters.com
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of Reuters
Limited.
Reuters Limited is part of the Reuters Group of companies, of which Reuters
Group PLC is the ultimate parent company.
Reuters Group PLC - Registered office address: The Reuters Building, South
Colonnade, Canary Wharf, London E14 5EP, United Kingdom
Registered No: 3296375
Registered in England and Wales