File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes SQLException: ORA-01008 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "SQLException: ORA-01008" Watch "SQLException: ORA-01008" New topic

SQLException: ORA-01008

cris abanades

Joined: Aug 30, 2001
Posts: 10
I'm using Weblogic 6.1 and when I'm going to connect to the database throws this exception:
java.sql.SQLException: ORA-01008: not all variables bound
at oracle.jdbc.dbaccess.DBError.throwSqlException(
at oracle.jdbc.ttc7.TTIoer.processError(
at oracle.jdbc.ttc7.Oall7.receive(
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(
at oracle.jdbc.driver.OracleStatement.executeQuery(
at weblogic.jdbc.pool.Statement.executeQuery(
at weblogic.jdbc.rmi.internal.StatementImpl.executeQuery(
at weblogic.jdbc.rmi.SerialStatement.executeQuery(
at src.ges_dbc.User.exists(
at src.servlet.mainServlet.redireccion(
at src.servlet.mainServlet.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(
at weblogic.servlet.internal.ServletRequestImpl.execute(
at weblogic.kernel.ExecuteThread.execute(
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

sounds like you may not have set all your variables in a prepareStatement:
If you have a query with 2 ?'s like "select id, name from emp where age = ? and address = ?" and you only set one ? then not all variables will be bound. So check to make sure that substitution variables have been substituted (setString(), setInt() etc) for all your ? in your query
subject: SQLException: ORA-01008
It's not a secret anymore!