aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes overridden method does not throw RemoteException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "overridden method does not throw RemoteException" Watch "overridden method does not throw RemoteException" New topic
Author

overridden method does not throw RemoteException

ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
I have defined the public methods of Data class in a DataInterface. I have also defined a RemoteDataInterface which extends DataInterface and Remote. These methods throws Remote Exceptions .
I have made DataServer class implements RemoteDataInterface. When I compile DataServer , I get the following exception
xyz() method in DataServer cannot implement xyz() in DataInterface;overridden method doesnot throw java.rmi.RemoteException .
Where am I going wrong ?
-- Ravindra


SCJP, SCJD, SCWCD, SCBCD, SCEA
Kalichar Rangantittu
Ranch Hand

Joined: Jan 15, 2002
Posts: 240
If I am not mistaken, your DataInterface must be defined to throw RemoteException also.
DataInterface -- Methods throw RemoteException
RemoteDataInterface extends Remote , methods throw RemoteException.
RemoteDataInterfaceImpl- methods need not throw RemoteException.


Never be satisfied with anything less than the best and you will surely pass the test...
ravi janap
Ranch Hand

Joined: Nov 04, 2000
Posts: 389
Hi
I have made my Data class to implement the Data interface which I use in local mode so I can't make the methods in DataInterface to throw RemoteException
Thanks
-- Ravi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: overridden method does not throw RemoteException
 
Similar Threads
Basic Design
Atlast i have come with some design. (critics are invited)
Need you comment on my final review
Too Simple?
Final check before upload