I was hoping with a quick glance over this code someone might be able to elucidate the problem I seem to be having in getting my client side to correctly invoke methods on the RMI stub.
I have set it up according to Andrew Monkhouse's design (Factory pattern) but am getting the below error whenever I try to run the client after running the server.
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\IT>java -jar c:\scjd\dist\scjd.jar
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.server.ExportException: remote object implements illegal remote interface; nested exception is:
java.lang.IllegalArgumentException: illegal remote method encountered: public abstract long suncertify.db.DB.lock(int) throws suncertify.db.exceptions.RecordNotFoundException
Exception in thread "main" java.lang.NullPointerException
All the necessary methods throw RemoteExceptions.
More information may be needed from me to clarify things, but what I'm really after is an understanding of what the general issue is here, as far as "illegal remote method" and "illegal remote interface" are concerned. They are coded as per Monkhouse's design.
The issue with the Lock method is baffling above all, since I haven't yet invoked it at all, anywhere, and it is only one of the methods in the DB interface. I can't understand why it is being singled out.
I don't want to paste large swathes of code, so if any specific information is further needed, please let me know and I will try and explain in more detail what is required.
Any general conceptual help would be most appreciated.