When executing in the console it happens that a "next" error that is hosted in the "while" bounce
java.sql.SQLException: Unable to perform recovery on a PLSQL statement: next at oracle.jdbc.driver.OracleResultSetImpl.next (OracleResultSetImpl.java:254) at upeu.juan.daoimp.registroimp.read (registroimp.java:45)
public registro read(int id) {
// TODO Auto-generated method stub
registro f = new registro();
try {
c = x.prepareCall("{Call pro_reg (?,?,?,?)}");
c.registerOutParameter(1, java.sql.Types.INTEGER);
c.registerOutParameter(2, java.sql.Types.VARCHAR);
c.registerOutParameter(3, java.sql.Types.INTEGER);
c.setInt(4,id);
r=c.executeQuery();
while (r.next()){
f.setId(r.getInt("cod_bus"));
f.setPlacas(r.getString("placa_bus"));
f.setViajes(r.getInt("count(*)"));
}
}catch (SQLException e){
e.printStackTrace();
}
return f;