Java.sql.SQLException: Invalid argument(s) in call: setRowBufferAt

I have created a custom tag that does inserts. While it works on most every other table that I have dealt with, I keep getting this error for a particular table. I have created another table on an entirely different database, but get the same error.
Is anyone familiar with this error? I'm running Oracle 8.1.7.0.0
Thanks in advance,
Jim

Bug 1548205 Fixed: 9011
JDBC
Inserting into an empty Updateable Resultset causes an
SQLException:
java.sql.SQLException: Invalid argument(s) in call: setRowBufferAt

Similar Messages

  • Java.sql.SQLException: invalid arguments in call

    Hi
    I am getting the following exception
    java.sql.SQLException: invalid arguments in call
    Please send me a soln.
    Thanks in advance

    I had to switch the classes12.jar file that I was using with Tomcat to the one that came packaged with JDeveloper. Thanks for the quick reponse though.

  • Insert error SQLException: Invalid argument(s) in call:

    The following exception is produced because resultSet.next() was
    called on an empty resultSet why ??
    Driver = Oracle 8.1.7 thin (current version 8/30/01) for NT.
    Thanks
    try
         m_resultSet = m_statement.executeQuery("SELECT
    CODE_DECODE.* FROM CODE_DECODE WHERE 0 = 1");
         // NOTE If this statement is not called the code works
    fine.
         while( m_resultSet.next())
              // Does nothing as the resultset is empty
         // NOTE If the above statement is not called the code
    works fine
         // Insert a row
         m_resultSet.moveToInsertRow();
         m_resultSet.updateObject
    ("CODE_DECODE.CODE_DECODE_ID",new Double(100000001d));
         // Next statement causes the exception
         m_resultSet.insertRow();
    catch(Exception e)
    e.printStackTrace();
    gives the following stack trace
    java.sql.SQLException: Invalid argument(s) in call:
    setRowBufferAt
         at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:168)
         at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:210)
         at oracle.jdbc.driver.UpdatableResultSet.setRowBufferAt
    (UpdatableResultSet.java:1803)
         at oracle.jdbc.driver.UpdatableResultSet.setRowBufferAt
    (UpdatableResultSet.java:1785)
         at oracle.jdbc.driver.UpdatableResultSet.updateObject
    (UpdatableResultSet.java:1574)
         at oracle.jdbc.driver.OracleResultSet.updateObject
    (OracleResultSet.java:2787)
         at com.aceva.tool.toolbox.dbtool.JDBCAdapter.insertRow
    (JDBCAdapter.java:440)
         at com.aceva.tool.toolbox.dbtool.DBToolPanel.doInsert
    (DBToolPanel.java:289)
         at
    com.aceva.tool.toolbox.dbtool.DBToolPanel$4.actionPerformed
    (DBToolPanel.java:102)
         at javax.swing.AbstractButton.fireActionPerformed
    (AbstractButton.java:1450)
         at
    javax.swing.AbstractButton$ForwardActionEvents.actionPerformed
    (AbstractButton.java:1504)
         at javax.swing.DefaultButtonModel.fireActionPerformed
    (DefaultButtonModel.java:378)
         at javax.swing.DefaultButtonModel.setPressed
    (DefaultButtonModel.java:250)
         at
    javax.swing.plaf.basic.BasicButtonListener.mouseReleased
    (BasicButtonListener.java:216)
         at java.awt.Component.processMouseEvent
    (Component.java:3717)
         at java.awt.Component.processEvent(Component.java:3546)
         at java.awt.Container.processEvent(Container.java:1164)
         at java.awt.Component.dispatchEventImpl
    (Component.java:2595)
         at java.awt.Container.dispatchEventImpl
    (Container.java:1213)
         at java.awt.Component.dispatchEvent(Component.java:2499)
         at java.awt.LightweightDispatcher.retargetMouseEvent
    (Container.java:2451)
         at java.awt.LightweightDispatcher.processMouseEvent
    (Container.java:2216)
         at java.awt.LightweightDispatcher.dispatchEvent
    (Container.java:2125)
         at java.awt.Container.dispatchEventImpl
    (Container.java:1200)
         at java.awt.Window.dispatchEventImpl(Window.java:912)
         at java.awt.Component.dispatchEvent(Component.java:2499)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
         at java.awt.EventDispatchThread.pumpOneEvent
    (EventDispatchThread.java:103)
         at java.awt.EventDispatchThread.pumpEvents
    (EventDispatchThread.java:93)
         at java.awt.EventDispatchThread.run
    (EventDispatchThread.java:84)

    The stack trace was:
    06/09/06 09:02:52 java.sql.SQLException: Invalid argument(s) in call
    06/09/06 09:02:52 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBErro
    r.java:189)
    06/09/06 09:02:52 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBErro
    r.java:231)
    06/09/06 09:02:52 at oracle.jdbc.dbaccess.DBError.throwSqlException(DBErro
    r.java:294)
    06/09/06 09:02:52 at oracle.sql.CLOB.createTemporary(CLOB.java:527)
    After that I change a code little bit:
    clob = oracle.sql.CLOB.createTemporary(c, true, 1);
    Ant it pass through, but it fails with CastException. Then I upgraded JDBC driver, because I'm using Java 1.4
    So, now I have this kind of error:
    at oracle.jdbc.driver.OracleConnection.physicalConnectionWithin(OracleConnection.java:5174)
         at oracle.sql.CLOB.createTemporary(CLOB.java:1009)
         at oracle.sql.CLOB.createTemporary(CLOB.java:956)
         at my.pack.db.impl.ImportDatabaseDAO_JDBC.execute(ImportDatabaseDAO_JDBC.java:68)
    It fails when I'm creating temporaryClob:
    clob = oracle.sql.CLOB.createTemporary(c, true, 1);
    The problem occurs, because my connection driver is:
    com.evermind.sql.OrclCMTConnection and it can't be converted into oracle.jdbc.driver.OracleConnection.
    It is datasource config:
    <data-source location="jdbc/oooDS"
         class="com.evermind.sql.DriverManagerDataSource"
         password="iate"
         xa-location="jdbc/xa/oooXADS"
         connection-driver="oracle.jdbc.driver.OracleDriver"
         username="ooo"
         url="jdbc:oracle:thin:@192.168.45.14:1526:ooo"
         inactivity-timeout="30"
         name="oooDS"
         ejb-location="jdbc/oooDS"
         pooled-location="jdbc/oooPoolDS"
         min-connections="3"
         max-connections="200"/>
    Could you advise, how can I convert my Connection class?

  • Invalid argument(s) in call: SetRowBufferAt

    The following exception is produced because resultSet.next() was
    called on an empty resultSet why ??
    Driver = Oracle 8.1.7 thin (current version 8/30/01) for NT.
    Thanks
    try
    m_resultSet = m_statement.executeQuery("SELECT
    CODE_DECODE.* FROM CODE_DECODE WHERE 0 = 1");
    // NOTE If this statement is not called the code works
    fine.
    while( m_resultSet.next())
    // Does nothing as the resultset is empty
    // NOTE If the above statement is not called the code
    works fine
    // Insert a row
    m_resultSet.moveToInsertRow();
    m_resultSet.updateObject
    ("CODE_DECODE.CODE_DECODE_ID",new Double(100000001d));
    // Next statement causes the exception
    m_resultSet.insertRow();
    catch(Exception e)
    e.printStackTrace();
    gives the following stack trace
    java.sql.SQLException: Invalid argument(s) in call:
    setRowBufferAt
    at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException
    (DBError.java:210)
    at oracle.jdbc.driver.UpdatableResultSet.setRowBufferAt
    (UpdatableResultSet.java:1803)
    at oracle.jdbc.driver.UpdatableResultSet.setRowBufferAt
    (UpdatableResultSet.java:1785)
    at oracle.jdbc.driver.UpdatableResultSet.updateObject
    (UpdatableResultSet.java:1574)
    at oracle.jdbc.driver.OracleResultSet.updateObject
    (OracleResultSet.java:2787)

    Hi, same problem with insert.
    A path exist for Oracle database jdbc support.
    see this link for doc.
    http://jpsunf01.oracle.co.jp/PATCH/PSR/IBM_RS6000/90PATCHSETS/90130_64/README.html#JDBC
    No way to find the patch file !!!!!
    See you ...

  • Java.sql.SQLException: Invalid column index: prepare_for_new_get

    I wrote a small test jsp which gets a DB connection using Oracle 816 type
    4 JDBC driver.
    I have a procedure in the database defined as
    SQL> desc one
    PROCEDURE one
    Argument Name Type In/Out Default?
    ID NUMBER IN/OUT
    My jsp code does the following...
    sqltext="{ call one(?) }";
    CallableStatement cstmt = con.prepareCall(sqltext);
    cstmt.setInt(1, 23);
    cstmt.execute();
    System.err.println("cstmt.getInt(1) = " + cstmt.getInt(1));
    /* Exception thrown here */
    java.sql.SQLException: Invalid column index: prepare_for_new_get
    at oracle.jdbc.dbaccess.DBError.check_error(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.prepare_for_new_get(Compiled
    Code)
    at oracle.jdbc.driver.OracleStatement.getLongValue(Compiled Code)
    at oracle.jdbc.driver.OracleStatement.getIntValue(Compiled Code)
    at oracle.jdbc.driver.OracleCallableStatement.getInt(Compiled Code)
    at com.altro.es.jsp._testproc._jspService(Compiled Code)
    at weblogic.servlet.jsp.JspBase.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at weblogic.servlet.JSPServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Compiled
    Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
    at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
    at weblogic.t3.srvr.ExecuteThread.run(Compiled Code)
    Does anyone know the why the exception is thrown?
    Thanks in advance!!
    Tejash
    null

    Register the parameter, bcoz u declared it
    as IN OUT type.
    cstmt.registerOutParameter(1,Types.INTEGER).
    ATB
    MOHANE

  • *URGENT HELP REQUIRED* java.sql.SQLException: Invalid Oracle URL specifed

    Hi all,
    In the middle of the last week for my final year project and having to convert to an Oracle database due to compatibility problems with university Tomcat Server and MS Access. I'm having trouble connecting to the Oracle database and would appreciate some help please.
    Running on Windows 98 in the lab here, and the Oracle 9i, release 9.2.0.2.0, J2SDK1.4.0, Classes12.zip installed OK.
    Code for connection looks like this inside the constructor of my class:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    cardSaleConnexion = DriverManager.getConnection("jdbc:oracle:[email protected]:1521:sid","user_name","pwdt");
    System.out.println("Connection Successful ");
    And I'm getting the following error when calling the constructor in a driver program:
    java.sql.SQLException: Invalid Oracle URL specified
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:188)
         at java.sql.DriverManager.getConnection(DriverManager.java:512)
         at java.sql.DriverManager.getConnection(DriverManager.java:171)
         at CardSale.<init>(CardSale.java:30)
         at Driver.main(Driver.java:11)
    Exception in thread "main"
    Please reply on a very urgent basis.
    Kind regards,
    Peter

    Try ojdbc14.jar as the JDBC driver instead of classes12.zip.
    Refer:
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html
    http://docs.sun.com/source/817-5603-10/index.html
    Database Driver
    This section describes the known database driver issues and associated solutions.
    ID      Summary
    4700531      On Solaris, an ORACLE JDBC driver error occurs.
         This new Java Database Connectivity (JDBC) driver is for Oracle (R) working with JDK1.4. The problem is caused by a combination of the Oracle 9.1 database and ojdbc14.jar. Applying the patch will fix the problem on Solaris 32-bit machine, running an Oracle 9.0.1.3 database.
         Solution
         Obtain and apply the patch to your server from the Oracle Web site for Bug 2199718. Perform the following steps:
         1.��Go to the Oracle web site.
         2.��Click the 'patches' button.
         3.��Type 2199718 in the patch number field.
         4.��Click the 32-bit Solaris OS patch.Go to Metalink.oracle.com.
         5.��Click patches.
         6.��Under patch number, enter 2199718.
         7.��Click the 32 bit Solaris OS patch.
    4707531      On Solaris, accessing an Oracle 9.1 database with an Oracle 9.2 Client may cause data corruption.
         If you use an Oracle (R) 9.2 client to access an Oracle 9.1 database, data corruption might occur when a number column follows a timestamp column.
         The problem might be caused by using the ojdbc14.jar file with an Oracle 9.1 database. Applying the patch might assist in addressing the situation on Solaris 32-bit machines, running an Oracle 9.1 database. This JDBC driver is for Oracle working with JDK1.4.
         Solution
         Obtain the patch that Oracle might make available from the Oracle web site for Bug 2199718 and apply it to your server.
    Regards,
    Pankaj D.

  • Java.sql.SQLException: invalid name pattern:schema.file_import_nestedtable

    Hi all,
    I am trying to insert an array in nested table to another table. I have a nested table by the name 'file_import_nestedTable'.
    code for object 'file_import_obj'
    CREATE OR REPLACE TYPE file_import_obj AS OBJECT
    column_1 datatype,
    column_2 datatype,
    column_n datatype
    and for nested table 'file_import_nestedTable'
    CREATE OR REPLACE TYPE file_import_nestedTable as TABLE OF file_import_obj
    I have a package in place and it is valid.
    The problem started when I tried to use the weblogic pool connection to call the procedure. But this was overcome by using the Oracle connection i.e another pool and not the weblogic's own connection pool.
    But now I'm facing this exception when I try to use the ArrayDescriptor.
    java.sql.SQLException: invalid name pattern: PFEP.file_import_nestedTable
    Here is my code...
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:ANSD","user","password");
    // its throwing exception here.
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("file_import_nestedTable",connection);
    ARRAY arr1 = new ARRAY(desc,connection,strArrHeaderBodyData);
    OracleCallableStatement call[i]Long postings are being truncated to ~1 kB at this time.

    Hi all,
    I am trying to insert an array in nested table to another table. I have a nested table by the name 'file_import_nestedTable'.
    code for object 'file_import_obj'
    CREATE OR REPLACE TYPE file_import_obj AS OBJECT
    column_1 datatype,
    column_2 datatype,
    column_n datatype
    and for nested table 'file_import_nestedTable'
    CREATE OR REPLACE TYPE file_import_nestedTable as TABLE OF file_import_obj
    I have a package in place and it is valid.
    The problem started when I tried to use the weblogic pool connection to call the procedure. But this was overcome by using the Oracle connection i.e another pool and not the weblogic's own connection pool.
    But now I'm facing this exception when I try to use the ArrayDescriptor.
    java.sql.SQLException: invalid name pattern: PFEP.file_import_nestedTable
    Here is my code...
    Class.forName("oracle.jdbc.driver.OracleDriver");
    connection = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:ANSD","user","password");
    // its throwing exception here.
    ArrayDescriptor desc = ArrayDescriptor.createDescriptor("file_import_nestedTable",connection);
    ARRAY arr1 = new ARRAY(desc,connection,strArrHeaderBodyData);
    OracleCallableStatement call[i]Long postings are being truncated to ~1 kB at this time.

  • Java.sql.SQLException: invalid name pattern : SCOTT.QUERYARRAY

    exception in Callable Statement : java.sql.SQLException: invalid name pattern: SCOTT.QUERYARRAY
    Below is the java code snippet :
    String[] arr=new String[2];
    arr[0]="select sysdate from dual";
    arr[1]="select sysdate+1 from dual";
    oracle.jdbc.driver.OracleCallableStatement oraCall = (oracle.jdbc.driver.OracleCallableStatement)con.prepareCall("{call arrayTest(?,?)}");
    oracle.sql.ArrayDescriptor descrip = oracle.sql.ArrayDescriptor.createDescriptor("QUERYARRAY",con);
    oraCall.registerOutParameter(2,oracle.jdbc.OracleTypes.ARRAY,"QUERYARRAY");
    oracle.sql.ARRAY a = new oracle.sql.ARRAY(descrip,con,arr);
    oraCall.setARRAY(1,a);
    oraCall.execute();
    where "QUERYARRAY" is an array type created in oracle as
    create or replace TYPE QUERYARRAY is VARRAY(20) OF VARCHAR2(500);
    my procedure is :
    create or replace procedure arrayTest(array_in IN QUERYARRAY,array_out OUT QUERYARRAY)
    is
    begin
         for i in 1..array_in.count
         loop
         dbms_output.put_line('Query '||i||array_in(i));
         end loop;
    end;     
    The Exception is thrown at
    oracle.sql.ArrayDescriptor descrip =
    oracle.sql.ArrayDescriptor.createDescriptor("QUERYARRAY",con);
    oraCall.registerOutParameter(2,oracle.jdbc.OracleTypes.ARRAY,"QUERYARRAY");
    Please do let me know how to resolve the issue.
    thanks in advance....

    Has anyone found a solution to this??? I have the same problem. I seems to be a permissions problem since JDBC driver tries to access the types in my schema and not the owner of the types.

  • Java.sql.SQLException: invalid number of in_out_binds in IOV

    We're upgrading our platform from WL 4.51 SP14 to WL 6.0 SP2., Sun Solaris 2.6
    and JDK 1.3.1.
    We use oracle thin driver 8.1.6 (Type 4) for connecting to ORACLE database. We're
    encountering the following error message while executing a stored procedure. This
    error occurs very intermittently. I've looked at one of the news group threads
    and I've noticed that someone referring to patch CR04274_60.jar which had addressed
    this kind of a problem. Pl let advise us if that is correct or not. If true, pl
    let's know how we can get hold of this patch.
    ===================================================
    java.sql.SQLException: invalid number of in_out_binds in IOV
    ====================================================
    Thanks
    Ravi Garikipati

    You are hitting a bug 11672797 (more detail: http://java.net/jira/browse/ADFEMG-83).
    As a workaround you have to change the data type to oracle.jbo.domain.Number in your EO or VO if they VO is not based on a EO.
    Timo

  • Java.sql.SQLException: Invalid cursor position on saving

    Dear all
    I'm having a problem with saving components on a JSF page. The page is plit in two parts:
    1. Save report details, which are being saved correctly. Here is the code
    public String btnSaveReport_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            System.out.println("Saving the report ... forsi");
            int seqNumber = SequenceNumber.getNextSequenceNo("TB_REPORTS");
            getSessionBean1().setReportFK(seqNumber);
            String reportId = "REP_" + ((String)tfReportName.getText()).replace(' ', '_').trim();
            System.out.println("ReportFK in btnSaveReport: " + getSessionBean1().getReportFK());
            //SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");
            System.out.println("Start Date: " + calRepStartDate.getSelectedDate());
            //error(calRepStartDate.getValue().toString());
            //System.out.println("getvalue" + calRepStartDate.getValue());
            try {
                rk = tb_reportsDataProvider.appendRow();
                tb_reportsDataProvider.setCursorRow(rk);
                System.out.println("Setting Values ...");
                tb_reportsDataProvider.setValue("REP_PK", new Integer(seqNumber));
                tb_reportsDataProvider.setValue("REP_ID", reportId);
                tb_reportsDataProvider.setValue("REP_ACTIVE", "Y");
                tb_reportsDataProvider.setValue("REP_SESSION_FK", new Integer(getSessionBean1().getSessionId()));
                tb_reportsDataProvider.setValue("REP_NAME", (String)tfReportName.getText());
                tb_reportsDataProvider.setValue("REP_START_DATE", new java.sql.Date(calRepStartDate.getSelectedDate().getTime()));
                tb_reportsDataProvider.setValue("REP_END_DATE", new java.sql.Date(calRepEndDate.getSelectedDate().getTime()));
                System.out.println("Committing Changes ...");
                tb_reportsDataProvider.commitChanges();
                System.out.println("Refreshing Row ...");
                tb_reportsDataProvider.getCachedRowSet().refreshRow();
                getSessionBean1().getTb_reportsRowSet().refreshRow();           
    //            tb_reportsDataProvider.refresh();
    //            System.out.println("Refreshing Row ...");
    //            tb_reportsDataProvider.setCursorRow(tb_reportsDataProvider.findFirst("REP_PK",new Integer(seqNumber)));
                info("Report Data Saved Successfully!");
            } catch (SQLException sqle) {
                /* error("Cannot update report (SQLException): " +
                        reportId +
                        " : " + sqle.getMessage()); */
                log("Cannot update report (SQLException): " +
                        reportId +
                        " : " + sqle);
                info("Could not save report: " + sqle.getMessage());
                sqle.printStackTrace();
            //tfReportName.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //tfReportName.setValueBinding("text", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_NAME']}"));
            // calRepStartDate.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //calRepStartDate.setValueBinding("selectedDate", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_START_DATE']}"));
            //calRepEndDate.setValueBinding("sourceData", getApplication().
            //    createValueBinding("#{newReport.tb_reportsDataProvider}"));
            //calRepEndDate.setValueBinding("selectedDate", getApplication().createValueBinding            ("#{newReport.tb_reportsDataProvider.value['REP_END_DATE']}"));
            info("Report Name: " + tb_reportsDataProvider.getValue("REP_NAME"));
            tfReportName.validate(this.getFacesContext());
            calRepStartDate.validate(this.getFacesContext());
            calRepEndDate.validate(this.getFacesContext());
            tfReportName.setDisabled(true);
            calRepStartDate.setDisabled(true);
            calRepEndDate.setDisabled(true);
            btnNewQuery.setDisabled(false);
            btnSaveReport.setDisabled(true);
            return null;
        }The problem is that the reportFK is losing its value when I submit the page the second time! I am trying to get the value from the provider or from the rowset, but none work. Here is the code I am trying ...
    public String btnSaveQuery_action() {
            // TODO: Process the button click action. Return value is a navigation
            // case name where null will return to the same page.
            int seqNumber  = 0;
            // Save the query header details to the database  
            try {
                // Start with the query - needed for the link table
                seqNumber = SequenceNumber.getNextSequenceNo("TB_QUERY");
                String queryId = "QRY_" + ((String)tfQueryName.getText()).replace(' ', '_').trim();
                tb_queryDataProvider.setCursorRow(queryRowKey);
                tb_queryDataProvider.setValue("QRY_PK", new BigDecimal(seqNumber));
                tb_queryDataProvider.setValue("QRY_CODE", queryId);
                tb_queryDataProvider.setValue("QRY_NAME", (String)tfQueryName.getText());
                tb_queryDataProvider.setValue("QRY_ACTIVE", "Y");
                tb_queryDataProvider.setValue("QRY_SESS_FK", new BigDecimal(getSessionBean1().getSessionId()));
                System.out.println("Committing Changes ...");
                tb_queryDataProvider.commitChanges();
                System.out.println("Refreshing Row ...");
                tb_queryDataProvider.setCursorRow(tb_queryDataProvider.findFirst("QRY_PK",new Integer(seqNumber)));
                getSessionBean1().getTb_queryRowSet().refreshRow();
                info("Query Data Saved Successfully!");
            } catch (Exception ex) {
                error("Error while saving query: " + ex.getMessage());
                log("Error while saving query" + ex);
                ex.printStackTrace();
            // Now save the link
            try {
                // Start with the query - needed for the link table
                String sql = "INSERT INTO TB_LINK_REPORT_QUERY ( " +
                   "LRQ_PK, LRQ_REP_FK, LRQ_QRY_FK, " +
                   "LRQ_TYPE, LRQ_START_DATE, LRQ_END_DATE, " +
                   "LRQ_ACTIVE, LRQ_SESS_FK) " +
                   "VALUES (?,?,?,?,?,?,?,?)";
                System.out.println("Trying to do the link");
                int linkSeqNumber = SequenceNumber.getNextSequenceNo("TB_LINK_REPORT_QUERY");           
                PreparedStatement pstmt = DBConnection.getConnection().prepareStatement(sql);
                if (getSessionBean1().getReportFK() == -1 || getSessionBean1().getReportFK() == 0)
                    System.out.println("reportFK = -1 or 0!!! Trying from provider.");
                    System.out.println("Report PK is: " + getSessionBean1().getTb_reportsRowSet().getBigDecimal("REP_PK"));
                    getSessionBean1().setReportFK(((Integer)tb_reportsDataProvider.getValue("REP_PK")).intValue());
                System.out.println("Report Foreign Key: " + getSessionBean1().getReportFK());
                System.out.println("Query Foreign Key: " + seqNumber);
                pstmt.setInt(1, linkSeqNumber);
                pstmt.setInt(2, getSessionBean1().getReportFK());
                pstmt.setInt(3, seqNumber);
                pstmt.setString(4, (String)dropDownQueryType.getSelected());
                pstmt.setDate(5, new java.sql.Date(calendarQueryStartDate.getSelectedDate().getTime()));
                pstmt.setDate(6, new java.sql.Date(calendarQueryEnd.getSelectedDate().getTime()));
                pstmt.setString(7, "Y");
                pstmt.setInt(8, getSessionBean1().getSessionId());
                System.out.println("Committing Changes for Link ...");
                pstmt.executeUpdate();
                DBConnection.getConnection().commit();
                System.out.println("Refreshing Row in link ...");
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        1, new Integer(linkSeqNumber));
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        2, new Integer(getSessionBean1().getReportFK()));
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        3, calendarQueryStartDate.getSelectedDate());
                getSessionBean1().getTb_link_report_queryRowSet().setObject(
                        4, calendarQueryEnd.getSelectedDate());
                tb_link_report_queryDataProvider.refresh();
                info("Link Data Saved Successfully!");
            } catch (Exception ex) {
                error("Error while saving query: " + ex.getMessage());
                log("Error while saving link: " + ex);
                ex.printStackTrace();
            return null;
        }The part saving the query with the provider is working correctly. But the part with the link is not working at all (the part with the PreparedStatement). The fact is that the PreparedStatement cannot be executed because I am getting the error at the line
    System.out.println("Report PK is: " + getSessionBean1().getTb_reportsRowSet().getBigDecimal("REP_PK"));Can anyone help please?
    Thanks and Regards
    Joseph

    guys if any of you have an idea just post it. It would be of great help for me. I can't figure out my mistake and its been 2days already and still i am stuck with my problem.
    It displays the table but there is an error "java.sql.SQLException: Invalid cursor position" so i cannot put the counter to the session.

  • Java.sql.SQLException: Invalid column index in database adapter

    I have a query that works fine if I run the sql in a JDeveloper SQL editor, but I get a "java.sql.SQLException: Invalid column index" error if I paste it in a database adapter. If I put this query in the adapter:
    select <column>
      from <table>
       where <column> in (select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1)I get the error. But if I just put the sub query in the adapter as:
    select
        trim( substr (txt,
              instr (txt, ',', 1, level  ) + 1,
              instr (txt, ',', 1, level+1)
                 - instr (txt, ',', 1, level) -1 ) )
          as token
        from (select ','||#bindVariable||',' txt
                from dual)
      connect by level <=
         length(#bindVariable)-length(replace(#bindVariable,',',''))+1the error goes away. Does anyone know what might be causing this?
    Thanks in advance

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • How to use : bind character in DB adapter Select Query SOA11g. Getting Error code :17003 .java.sql.SQLException: Invalid column index error

    Hi All,
    The Actual query to perform is below.
    SELECT name,number from emp  WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE  1 END = 1;
    I have tried in DB adapter like below as a parameter for :1 as #vInputParam
    SELECT name,number from emp  WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE  1 END = 1;
    Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
    Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
    Can someone help me on this please?
    Thanks,
    Hari

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • 500 Internal Server Error - java.sql.SQLException: Invalid column index

    500 Internal Server Error
    java.sql.SQLException: Invalid column index     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:174)     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:239)     at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:851)     at com.stardeveloper.servlets.db.InsertServlet.doPost(InsertServlet.java:88)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)     at java.lang.Thread.run(Thread.java:534)
    This is the connection part of the java code
         // connecting to database
              Connection con = null;
              Statement stmt = null;
              ResultSet rs = null;
              PreparedStatement ps = null;
              try {
                   Class.forName("oracle.jdbc.driver.OracleDriver");
              con=DriverManager.getConnection("host:port:sid, userName, password");
                   String sql;
              sql = "INSERT INTO USERSS(user_id, username) VALUES (?,?)";
                   ps = con.prepareStatement(sql);
                   stmt = con.createStatement();
                   // inserting records
                   if(proceed) {
                        ps.setString(1, user_id);
                        ps.setString(2, username);
                        ps.executeUpdate();
    desc userss;
    Name Null? Type
    USER_ID NOT NULL NUMBER(5)
    USERNAME VARCHAR2(15)
    Index_Name table_name
    USERSS_PK1 USERSS
    when I try to insert values, it is inserting, but at the end I am getting the above error. I am using JDeveloper 10g and database [Oracle9i Enterprise Edition Release 9.2.0.7.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production]

    I suggest you should alter the JDBC Driver and select one for Oracle 9i.
    Which version is your JDev10g?

  • What may be the cause of this error java.sql.SQLException: invalid sql type passed to callable statement in iplanet ussing JNDI

     

    Hi,
    The possibilities can be of various reasons, with the sql statements,
    xml descriptors, data sources, improper drivers anything. To crack down
    the solution, kindly let me know the error messages and what exactly are
    you trying to accomplish.
    Thanks & Regards
    Raj
    manimaran t wrote:
    what may be the cause of this error java.sql.SQLException: invalid sql
    type passed to callable statement in iplanet ussing JNDI
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Java.sql.SQLException: Invalid precision value. Cannot be less than zero

    Hi,
    In my portlet application have several jsf tables which bind to several oracle tables. I have tested the portlet in pluto and tried to deploy it on liferay. However, I get an exception stating:
    java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    What could this exception mean? Has anyone else encountered this?
    Marc
    P.S. The trace is shown below:
    Feb 6, 2007 12:34:56 AM org.apache.catalina.core.ApplicationDispatcher invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.RuntimeException: java.sql.SQLException: Invalid precision value. Cann
    ot be less than zero
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(Cach
    edRowSetDataProvider.java:343)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(Ca
    chedRowSetDataProvider.java:300)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(Cache
    dRowSetDataProvider.java:624)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowKeys(TableRowGroup.
    java:806)
    at com.sun.rave.web.ui.component.TableRowGroup.getFilteredRowKeys(TableR
    owGroup.java:429)
    at com.sun.rave.web.ui.component.TableRowGroup.getRowCount(TableRowGroup
    .java:749)
    at com.sun.rave.web.ui.component.Table.getRowCount(Table.java:307)
    at com.sun.rave.web.ui.renderer.TableRenderer.renderTitle(TableRenderer.
    java:400)
    at com.sun.rave.web.ui.renderer.TableRenderer.encodeBegin(TableRenderer.
    java:123)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.jav
    a:683)

    I've dug deeper into this problem and am able reproduce the error in the Pluto server. To reproduce this error, I modified my Oracle jdbc driver from the JSC embedded driver (smoracle.jar) to the Oracle native driver (ojdbc14.jar). Now, I am getting the exception in my Sun Application Server:
    What is the difference between ojdbc14.jar and smoracle.jar that could cause this problem? What can I do so that I can fix this problem for ojdbc14.jar?
    Thanks,
    Marc
    P.S.
    The problem is with the clob column (DOR_NOTE_TX). The stack trace is:
    [#|2007-02-06T09:00:53.663-0800|INFO|sun-appserver-pe8.2|javax.enterprise.system.stream.out|_ThreadID=16;|
    Reader executing query ps=0 SELECT DOR_NOTE_DT, DOR_NOTE_TX FROM DOR.DOR_NOTE_DATA WHERE DOR_NOTE_CD='SECURITY' AND TO_CHAR(DOR_Note_Dt, 'mm/dd/yyyy') = '02/05/2007'
    No Params|#]
    [#|2007-02-06T09:00:53.679-0800|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|
    java.sql.SQLException: Invalid precision value. Cannot be less than zero
    Message was edited by:
    marcnikko

Maybe you are looking for