Originally posted by ZhiYuan Lin:
thank you for your reply!
why?
o , there is a close () in my Interface ,so ..
maybe u are right it is unuseful.but why it throw NullPointerException? why can't close the database file with remote clients?
ah, I dont have that close in my interface, but I made it available nonetheless, anyhat, just because your instructions say you must provide this method doesn't mean you must actually close the database when the client exits.
my remote clients will get a message telling them other clients may still be active, so their request to shut down is effectively ignored.
as for why it throws a NullPointer, you'll have to show me the line number in your code where it happens for me to give you feedback on that, the code you provided doesn't say much, and one class makes a call to super but doesn't extend any other class, and the method tearDown is not in Object so instead of trying figure out whats going I'd rather you post the line number the error occurs and the code at that line.