• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting errors during rmic. pls help

 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i created a
class NewException extends RemoteException {}
Then in my interface methods iam throwing
public method1() throws NewException , DatabaseException{}
When i compile everything gets compiled but rmic is giving the error. iam struck pls help.
*** ERROR ****
D:\Developer\scjd\starting>rmic -d serverImpl
error: suncertify.DataInterface is not a valid remote interface: method java.lang.String
getData()[] must throw java.rmi.RemoteException.
**************************************8
i have a common interface shared by Data class & serverImpl class. For server side i need to throw RemoteException, thats why i created "NewException". When i say
method1() throws Exception{}
everything works fine. but throwing generic exception is not a good design thats why i creared application defined exception.
someone pls throw some lights on exception handling.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am by no means an expert on RMI but if my understnading of rmic is correct, it determines which methods are remotely callable by "throws RemoteException" so wouldn't recoignize your NewException even though it extends RemoteException.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic