Error in return of Vector method

Hi people, I have a problem if a program in runtime: i call a method in a client class named JRSimpleClient and then occur a message of error: NUllPOinterException . let see the server class:

the kind of return is Vector

Vector<Object> myVector =new Vector<Object>(1000);

.

.

.

public Vector getCompleteResult(int id, String searchString)throws

RemoteException, SQLException{

jrc[id].performSearch(searchString);

while (myVector.toString() !=" ")

{

result= jrc[id].getNextRow();

myVector.add(result) ;

}

return myVector;

}

so the performSearch and nextRow return a query (in database client.mdb)

the client class just call the method above

servlet.getCompleteResult(id,search);

if anyone help me i 'll be thankfull.

[1201 byte] By [alexmonassa] at [2007-11-26 12:18:02]
# 1
Hi, It means your vector does not contain any value. Please use myVector.size() and let me know if it contains any data.bye for nowsat
AnanSmriti at 2007-7-7 14:56:26 > top of Java-index,Archived Forums,Socket Programming...
# 2

> while (myVector.toString() != " ")

This is one of the strangest termination conditions I have ever seen. Are you seriously expecting one space as the only result of the query? Re-examine this.

> It means your vector does not contain any value.

Why would that cause an NPE?

@OP: can you provide the complete stack trace? Is the NPE happening directly in your client, or is it being thrown to you from the server?

ejp at 2007-7-7 14:56:26 > top of Java-index,Archived Forums,Socket Programming...