First it is necessary to know if what you need is to recover one or several values, if you need several then you must add the values of the result in a list but the following form:
while(rs.next()){ list.add(rs.getString("name")); }
And if you only need to retrieve a single value which is what I assume you want to do, you should limit your result to a by placing at the end of your query Limit 1
And you could put your assignment like this:
x = (rs.getString("name") != null) ? rs.getString("name") : "None";
In its error it says that parameter 5 has not been specified and that is true because you are only sending 4
Well, according to the code that you have shown, you are calling a store procedure that recive apparently 5 parameters and you are only sending 4 and that is why it is possibly giving you the error in the console