-
1. Re: Is this is bug with JBoss 3.0!!!
juha Nov 7, 2002 7:37 AM (in response to muradhak)show your code
-
2. Re: Is this is bug with JBoss 3.0!!!
muradhak Nov 8, 2002 12:41 AM (in response to muradhak)HI Juha,
Following is the code snippets for the above scenarios:
1. Vector Problem
=================
Bean Code:
public Vector ejbFindAllCollectorsByType(int type,String filter, String sort) throws RemoteException, FinderException,ObjectNotFoundException
{
/* code*/
return //Vector;
}
Remote code:
public Vector findAllCollectorsByType(int type,String filter, String sort) throws RemoteException, FinderException,ObjectNotFoundException;
When a call is meade to this method JBoss says:
java.lang.ClassCastException:java.util.ArrayList
But when the return type was changed to ArrayList, the problem got solved. I checked throughly that in the bean implementation not a single ref. is made to ArrayList.
2. IllegalArguementException
============================
Bean Code:
public Command localExecute(Command cmd) throws RemoteException
{
/* code */
}
ClientCode:
AsynCommand cmd = new AsynCommand();
<bean_ref>.localExcute(cmd);
The AsynCommand class directly Implements the Command interface.
But JBoss says:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: wrong number of arguments; nested exception is:
java.lang.IllegalArgumentException: wrong number of arguments
Thnkas for your previous help. I cnaged the method signatures to match precisely the home, remote and bean implementation.
Cheers
Muraly -
3. Re: Is this is bug with JBoss 3.0!!!
juha Nov 8, 2002 2:28 AM (in response to muradhak)You must use java.util.Collection as your return type from multi-object finders.
-
4. Re: Is this is bug with JBoss 3.0!!!
muradhak Nov 8, 2002 4:47 AM (in response to muradhak)Hi,
Fine...
I'll do that....
Any Suggetions about the illegal arguement exception.
Cheers
Muraly -
5. Re: Is this is bug with JBoss 3.0!!!
juha Nov 9, 2002 3:30 AM (in response to muradhak)show the full stack trace
-
6. Re: Is this is bug with JBoss 3.0!!!
dyao73 Jan 22, 2003 4:33 PM (in response to muradhak)Hi,
I'm having the same issue on getting the illegal arguement exception when the remote interface has a parent class as one argument while I'm passing a subclass.
java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(S
tatelessSessionContainer.java:660)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
ke(CachedConnectionInterceptor.java:186)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(Stat
elessSessionInstanceInterceptor.java:77)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
rceptor.java:107)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
torCMT.java:178)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:6
0)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.
java:130)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContai
ner.java:313)
at org.jboss.ejb.Container.invoke(Container.java:712)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:
382)
at sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:536)
Any suggestions?
Thanks in advance!