I'm getting nullpointer exception when I pass a resultset turned into vector from a bean to a servlet. I can pass the vector from the bean to a JSP page without problems. My code below. The error happens at this point "rs = (Vector)d.getQueryresult();"
One minor point, you shouldn't need to cast (Vector), because the return type of the method is a Vector.
The other thing is when you are building your query, you don't leave a space between the tablename and the WHERE clause.
If you printed the contents of the String 'q', you'd get "SELECT * FROM EmployeesWHERE userID = etc, etc...
Your try-catch-finally in your bean appears to be good, so I'd expect you would find the SQLException stack trace in your log. the 'return v' is in your finally block, so that should be ok.
What about the stack trace you do see? Can you post it?