Can someone help me? I want the select items to show me the data I have in the database but I get an error
jsp
<select name="perfil_" id="perfil_" required="required">
<%
String driver ="oracle.jdbc.OracleDriver";
String url = "jdb:oracle:thin:@localhost:1521:XE ";
Class.forName(driver);
String sql = "SELECT PERFIL FROM REGISTRO;";
Connection cn=DriverManager.getConnection(url);
PreparedStatement ps = cn.prepareStatement(sql);
ResultSet rs = ps.executeQuery();
while (rs.next() == true) {
%>
<option><%=rs.getString(1)%></option>
<% }
%>
error
java.sql.SQLException: invalid arguments in the call
description The server encountered an internal error that caused it not to I could fill this requirement.
exception javax.servlet.ServletException: java.sql.SQLException: invalid arguments in the call org.apache.jasper.runtime.PageContextImpl.doHandlePageException (PageContextImpl.java:909) org.apache.jasper.runtime.PageContextImpl.handlePageException (PageContextImpl.java:838) org.apache.jsp.index_jsp._jspService (index_jsp.java:180) org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) javax.servlet.http.HttpServlet.service (HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service (JspServlet.java:329) javax.servlet.http.HttpServlet.service (HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)
root cause java.sql.SQLException: invalid arguments in the call oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112) oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:146) oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:208) oracle.jdbc.driver.T4CConnection.logon (T4CConnection.java:236) oracle.jdbc.driver.PhysicalConnection. (PhysicalConnection.java:414) oracle.jdbc.driver.T4CConnection. (T4CConnection.java:165) oracle.jdbc.driver.T4CDriverExtension.getConnection (T4CDriverExtension.java:35) oracle.jdbc.driver.OracleDriver.connect (OracleDriver.java:801) java.sql.DriverManager.getConnection (DriverManager.java:664) java.sql.DriverManager.getConnection (DriverManager.java:270) org.apache.jsp.index_jsp._jspService (index_jsp.java:145) org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:70) javax.servlet.http.HttpServlet.service (HttpServlet.java:742) org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:443) org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:385) org.apache.jasper.servlet.JspServlet.service (JspServlet.java:329) javax.servlet.http.HttpServlet.service (HttpServlet.java:742) org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)
Note: The full trace of the cause of this error is found in the server's log files.