-
1. Re: EJBObject sub-class is not valid RMI-IIOP type!
adrian.brock May 21, 2003 2:11 PM (in response to niranjan2202)Your Remote interface is not an RMI/IIOP type.
Read the ejb spec, it contains a link with
for the exact definition.
Regards,
Adrian -
2. Comments invited from JBoss experts.
niranjan2202 May 22, 2003 11:05 AM (in response to niranjan2202)Thanks. I discovered a solution to the problem. It is as follows:
1. In the Home set the return type of create() to EJBObject rather than the proper remote interface
2. Deploy the EJB. It will throw a series of errors relating to non-compliance with EJB spec. Probably significant messages here are those relating to the incorrect use of RemoteException i.e. you need to define them for the methods on the remote interface but not for those on the bean. The code that I was testing had lots of such errors. I corrected those and redeployed the bean. The bean deployed without errors.
3. Restore the correct return value for Home.create(), recompile and deploy. That's it.
I believe the occurance of those non-compliance errors would have led to the 'invalidation' of the remote interface class which lead JBoss to ultimately conclude that it was not a proper RMI-IIOP type.
Can anyone help me to understand the issue and comment on my interpretation of this problem?
Thanks,
Niranjan -
3. Comments invited from JBoss experts.
niranjan2202 May 22, 2003 11:07 AM (in response to niranjan2202)Thanks. I discovered a solution to the problem. It is as follows:
1. In the Home set the return type of create() to EJBObject rather than the proper remote interface
2. Deploy the EJB. It will throw a series of errors relating to non-compliance with EJB spec. Probably significant messages here are those relating to the incorrect use of RemoteException i.e. you need to define them for the methods on the remote interface but not for those on the bean. The code that I was testing had lots of such errors. I corrected those and redeployed the bean. The bean deployed without errors.
3. Restore the correct return value for Home.create(), recompile and deploy. That's it.
I believe the occurance of those non-compliance errors would have led to the 'invalidation' of the remote interface class which lead JBoss to ultimately conclude that it was not a proper RMI-IIOP type.
Can anyone help me to understand the issue and comment on my interpretation of this problem?
Thanks,
Niranjan -
4. Re: EJBObject sub-class is not valid RMI-IIOP type!
andyjeff May 23, 2003 2:08 AM (in response to niranjan2202)I too have this problem. I have a bean Basket with a Home interface having a declaration
public interface BasketHome extends EJBHome
{
public BasketRemote create()
throws RemoteException,CreateException;
}
and the Remote is declared as
public interface BasketRemote extends EJBObject
{
....
}
so the return type of BasketHome.create() is derived from an EJBObject.
The error only crops up in 3.2.* of JBoss. I didnt understand your 'solution'. If I change the return type of BasketHome.create() to a EJBObject I would then have to go through my code and cast everything from this method to (BasketRemote) !!!
Anyone care to explain the problem ? -
5. Re: EJBObject sub-class is not valid RMI-IIOP type!
andyjeff May 23, 2003 3:31 AM (in response to niranjan2202)OK,
I'll answer my own question ... it turns out the JBoss message
Method : public abstract BasketRemote create() throws RemoteException, CreateException
Section: 7.10.6
Warning: The method return values in the home interface must be of valid types for RMI/IIOP.
is a bit misleading - it does NOT refer to the Home interface!. What it was actually complaining about was that if you have a method in the Remote interface that is not derived from RemoteException then it is incorrect. Would be nice if the JBoss message was corrected to refer to the correct interface. -
6. Re: EJBObject sub-class is not valid RMI-IIOP type!
andyjeff May 23, 2003 6:46 AM (in response to niranjan2202)and I meant to say
... if you have an Exception thrown by a method in the Remote interface that is not derived from RemoteException ...
Hope thats clearer ;-) -
7. Re: EJBObject sub-class is not valid RMI-IIOP type!
adrian.brock May 23, 2003 7:39 AM (in response to niranjan2202)Post it as a bug report at
www.sf.net/projects/jboss
An simple example would most likely
get this fixed quickly.
Regards,
Adrian -
8. Re: EJBObject sub-class is not valid RMI-IIOP type!
andyjeff May 23, 2003 12:55 PM (in response to niranjan2202)OK.
Now reported in Sourceforge bug tool as bug 742459.
Thx -
9. Re: EJBObject sub-class is not valid RMI-IIOP type!
niranjan2202 May 28, 2003 1:51 AM (in response to niranjan2202)In my case the RMI-IIOP type 'psuedo-error', if I may call it so, was actually preventing the true EJB spc non-compliance errors from being displayed.
Changing the Home return type was not a permanent solution. It was just to make the validator go beyond the RMI-IIOP error.
The ejb-spec non-compliances that I discovered were also in the remote interface or the bean methods and the Home had nothing wrong in it.
The approach that I described helped me as the code that I was testing had a large number of methods and most of them with some form of EJB spec non-compliance. To go through each of them a determine the problem would have been too tedious. I would rather have JBoss report all of them to me in one go.
That is what changing the return type of Home.create() to EJBObject helped me to do.
Thanks,
Niranjan -
10. Re: EJBObject sub-class is not valid RMI-IIOP type!
jckuri Aug 18, 2003 2:41 AM (in response to niranjan2202)I had the same problem, and I corrected it by seeing well if the remote interface (the method return value in the home interface) was a valid type for RMI/IIOP.
I found that the remote interface had a mistake: one of its methods didn't throw the RemoteException, I corrected it and the warning disappeared when I redeployed my bean.
Maybe your classes don't agree with the specifications.
I hope it helps you :)