-
1. Re:
hstech Sep 13, 2001 8:35 PM (in response to shayman)Hi Shay,
I'm assuming that "Server" is your session bean, and "ServerRemote" is the remote interface to that bean.
Can you confirm:
(1) Your home interface is something likepublic interface ServerHome extends EJBHome { public ServerRemote create() throws CreateException, RemoteException; ...then any finder declarations... }
(2) Your remote interface contains:public interface ServerRemote extends EJBObject { ...your method declarations... }
(3) Your session bean contains:public class Server implements SessionBean { public void ejbCreate() throws CreateException { ...your implementation... } ...all of your other method implementations... }
Aaron. -
2. I also have this problem...
richbolen Sep 14, 2001 11:48 AM (in response to shayman)If anyone has found a solution, please post.
Thanks,
Rich -
3. Re: Re: "method return values ... must be valid for RMI/IIOP
shayman Sep 16, 2001 6:31 AM (in response to shayman)Aaron,
You understood right about the server and server remote classes.
My code is almost exactly as you showed.
The only differences are:
A. My Home is declared as:
public interface ServerHome extends TopazBizProcessHome
where TopazBizProcessHome is an empty interface that extends EJBHome
B. My Bean implementation is declared as:
public class ServerBean extends ServerImpl implements SessionBean
where ServerImpl is my implementation class. The ServerBean has the ejbCreate method like you showed here.
These are all the difference. The weird thing is this is not the only bean I have, and all look the same, but only this one is genereating this warning message.
Thanks for the help
Shay. -
4. invalid types for RMI/IIOP
adrian Sep 26, 2001 12:12 PM (in response to shayman)I have the same problem. The verifier complains about invalid types for RMI/IIOP. Is this a known JBoss problem?
thanks,
Adrian
// JBoss Log
26 Sep 2001 10:13:29 [INFO ] Verifier - Verifying file:/D:/Jboss/jboss/tmp/deploy/Default/uos.ear/ejb1002.jar
26 Sep 2001 10:13:29 [INFO ] Verifier -
Bean : UOS
Method : public abstract Uos create() throws RemoteException, CreateException
Section: 6.10.6
Warning: The method return values in the home interface must be of valid types for RMI/IIOP.
// Home Interface
public interface UosHome extends EJBHome {
public Uos create() throws RemoteException, CreateException;
}
// Remote Interface
public interface Uos extends EJBObject {
...
}
// Bean implementation
public class UosBean implements SessionBean {
public void ejbCreate() throws javax.ejb.CreateException {
...
}
} -
5. Re: invalid types for RMI/IIOP
juha Sep 26, 2001 1:15 PM (in response to shayman)> 26 Sep 2001 10:13:29 [INFO ] Verifier -
> Bean : UOS
> Method : public abstract Uos create() throws
> RemoteException, CreateException
> Section: 6.10.6
> Warning: The method return values in the home
> interface must be of valid types for RMI/IIOP.
...
> // Remote Interface
> public interface Uos extends EJBObject {
> ...
> }
The warning is generated here, ie. in the return type of the create() method, your Remote interface declaration.
Most common cause is declaring a runtime exception to be thrown from the remote method.
-- Juha -
6. Re: invalid types for RMI/IIOP
shayman Sep 30, 2001 1:13 PM (in response to shayman)Hi Juha,
I can't say I understood your answer. Does the create method throws a runtime exception, or does a method of the remote interface? I can't see in the examples any of them declaring to throw such an exception, and I know my code doesn't throw one, as it is deployed silently on Oracle OC4J.
Can you please clarify your answer?
TIA.
Shay. -
7. Re: invalid types for RMI/IIOP
adrian Sep 30, 2001 5:01 PM (in response to shayman)Thanks juha, that was the cause of the problem. One of the business methods on the remote interface erroneously declared a runtime exception (EJBException) in the throws clause. E.g.
public ServiceProductBundle getProductCodes() throws RemoteException, EJBException;
thanks,
Adrian -
8. Re: invalid types for RMI/IIOP
shayman Oct 7, 2001 4:22 AM (in response to shayman)ok, I understand the answer now, and removed all runtime exceptions from the remote interface. Still, I keep on getting the same warning.
I tried to look at the verifier's code, but didn't find a clue.
The return types, arguments and exceptions of my remote and bean are all serializable and no runtime exceptions are thrown. Where else should I look?
Shay. -
9. Re: invalid types for RMI/IIOP
hstech Oct 7, 2001 8:06 PM (in response to shayman)Hi Shay,
Just a thought, but why don't you try taking out the intermediate interface (the Topaz... interface) and extend directly from the standard J2EE interface to see if that changes anything.
Cheers,
Aaron. -
10. Re:
bedal. Oct 8, 2001 8:33 AM (in response to shayman)This message may have two reasons:
1.
you did not point 'throws RemoteException' in getters/setters of remote interface
2.
you did point 'throws EJBException' in methods of bean class. -
11. Re: Re:
hraun Oct 9, 2001 11:26 AM (in response to shayman)Hi,
I'd been getting this message for ages, but I've just fixed it.
My problem was that I was using one of my own exceptions (UnavailableTeacherException). I was declaring this exception in quite a few of the business methods in my Remote Interface. The problem seemed to be that my Exception extended EJBException instead of java.lang.Exception. Since changing the extends clause of my UnavailableTeacherException class, I no longer get this error when deploying my session bean.
Wahey.
So try looking at your exceptions and helper classes too.
Peet -
12. Re: method return values ... must be valid type for RMI/IIOP
shayman Oct 15, 2001 3:28 AM (in response to shayman)Hi All,
Thanks for all of you for the kind help. At last I managed to solve the problem. I had no problem with exceptions, but I had one member variable declared in my remote class. This was a constant which was an Integer, and this caused the problem. I've changed this to a primitive int, and now all is well.
Once again, thanks to all of you for your help.
Shay. -
13. Re: "method return values in the home interface must be vali
cheesus Feb 25, 2002 8:55 AM (in response to shayman)my problem was that I had public static final
constants in the remote interface, of type
String (was was no problem), and of type String[],
which caused the message discussed in this thread...
Switching back to a comma-separated String ;-)
solved the problem. -
14. Re: "method return values in the home interface must be vali
icanoop Oct 17, 2002 1:36 AM (in response to shayman)I am having this problem also, except none of the situations described above seem to apply to me.
Here is my remote
public interface Requirement extends EJBObject {
// The rule for this requirement.
String getRule();
void setRule(String rule);
// The human readable description of this
// This is an optional.
String getDescription();
void setDescription(String desc);
}
and here is my home
public interface RequirementHome extends EJBHome {
Requirement create(String rule) throws CreateException, RemoteException;
Collection findAll() throws FinderException,
RemoteException;
Requirement findByPrimaryKey(String pk) throws FinderException,
RemoteException;
}
I don't have any members in the interfaces, I don't throw any Exceptions in the Bean.
Any ideas?