Oracle DB Query Generating Invalid Column Index error

Dear All,
Apologies for a question on this rather basic error but I don't understand why i'm experiencing the behaviour described.
The piece of code below connects to a database, runs a query, then attempts to display the contents of the resultset. I understand from other posts on the topic that the query I am executing (INSERT INTO table VALUES (...)) as in the comments below needs to have autocommit disabled to allow me to access the resultset without the transaction closing.
  public void runQuery(String query) throws Exception {   Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection(database, username, password); con.setAutoCommit(false); Statement st = con.createStatement();         ResultSet rs = st.executeQuery (query);         // "select * from user_tables"         // "INSERT INTO BH VALUES ('','2.25','Dark Red','Samsonite','4987638762')"         while (rs.next()) {         System.out.print (rs.getString(1)); // Exception thrown here     }         con.commit(); st.close();   con.close();   }
I have removed try {} catch {} error handling for clarity.
I am receiving the invalid column index error from the indicated line, which clearly suggest column 1 doesn't exist, however if i run the same query in another tool, something like the following is returned:
Rows Affected
1
The query is being received by the database as the row ends up in the table intact, so I am clearly missing something about how to access the resultset correctly.
I am guessing that I am either misusing/misunderstanding the autocommit option or that the resultset is different to what I am expecting...
Can someone please shed a little light?
Many thanks!
George

Ok, I've done a little more digging, and i've come to the conclusion that an INSERT query doesn't return a resultset (or returns an empty one)
Could someone with a little more knowledge confirm this as I've had little luck finding an explicit yes or no from the web!
Many Thanks in advance...

Similar Messages

  • 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

  • Invalid column Index error - While consuming Calculation view via Native SQL

    Hi Experts,
    I am trying to consume a Calculation view (sql script one) , which has input parameters, via Native SQL in a ABAP program .
    Code snippet for the same would be as follows , Upon execution, it throws an error "Invalid Column Index (8) error " . Can anyone help what could be the issue here ?
    Thanks in Advance,
    Suma
    REPORT ZTEST_HANA2.
    *Report to consume Calculation view (script based) from ABAP
    PARAMETERS: ip_docnr type BELNR_D,
                ip_gjahr type GJAHR,
                ip_bukrs type BUKRS,
                ip_blgr type FAGL_RLDNR.
       DATA: LO_SQL_STMT TYPE REF TO CL_SQL_STATEMENT,
              LO_CONN     TYPE REF TO CL_SQL_CONNECTION,
              LO_RESULT   TYPE REF TO CL_SQL_RESULT_SET,
              LV_SQL      TYPE STRING,
              LR_DATA     TYPE REF TO DATA.
        DATA: LX_SQL_EXC           TYPE REF TO CX_SQL_EXCEPTION,
              LT_SEPMAPPS_CLSDINV  TYPE TABLE OF SEPMAPPS_CLSDINV,
              LV_TEXT              TYPE STRING.
        TRY.
    lv_sql = |SELECT * FROM "_SYS_BIC"."DEMO-ABAP/CA_GET_FI_DATA" | &&
                     |WITH PARAMETERS ('placeholder'= ('$$p_DOCNR$$','{ ip_docnr }'),| &&
                      |'placeholder'=('$$p_GJAHR$$','{ ip_gjahr }')| &&
                      |,'placeholder'= ('$$S_BUKRS$$','{ ip_bukrs }')| &&
                      |,'placeholder'= ('$$p_base_ledger$$','{ ip_blgr }') )| .
             LO_CONN = CL_SQL_CONNECTION=>GET_CONNECTION( ).
             "Create an SQL statement to be executed via the connection
              LO_SQL_STMT = LO_CONN->CREATE_STATEMENT( ).
             "Execute the native SQL query
             LO_RESULT = LO_SQL_STMT->EXECUTE_QUERY( LV_SQL ).
             "Read the result into the internal table lt_sepmapps_clsdinv
             GET REFERENCE OF LT_SEPMAPPS_CLSDINV INTO LR_DATA.
             LO_RESULT->SET_PARAM_TABLE( LR_DATA ).
             LO_RESULT->NEXT_PACKAGE( ).
             LO_RESULT->CLOSE( ).
             LO_CONN->CLOSE( ).
        CATCH CX_SQL_EXCEPTION INTO LX_SQL_EXC.
             LV_TEXT = LX_SQL_EXC->GET_TEXT( ).
             MESSAGE LV_TEXT TYPE 'E'.
        ENDTRY.

    Hi Suma,
    Post the SQL you success run directly on Studio together with error message (even if is the Invalid column index error).
    Check there if the parameters case is working properly... Is it really this confusing options:
    p_GJAHR
    S_BUKRS
    p_base_ledger
    Why not all lower or all upper? Anyhow you must test and find which option works according your modeling
    Regards, Fernando Da Rós

  • Invalid Column Index Error

    Hi all,
    I am trying to create a new report using
    1. Crystal Report XI
    2. Oracle 9i
    3. A stored Procedure
    4. JDBC connection.
    But i could not do it.
    Invalid Column index error is coming.
    Can anyone help.
    Thanks
    Saravanakumar.

    I know this is an old thread but I too am getting a column index error accessing an Oracle 10g database stored procedure using Crystal Reports XI, using the New Report wizard to select the stored procedure.  It prompts me for the sp parameters; I select "set to null" and click OK and get
    Failed to retrieve data from the database. Details:  SQL Exception: [SQL State:] null [Error message:] Invalid Column Index [Database vendor code 17003]
    I can run the procedure and get data just fine with no errors using PL/SQL.

  • Invalid column index error in sql developer

    Hi,
    I was trying to create stored procedures, functions and packages in sql developer which is connected to Oracle 11g. My instructor is able to execute all of them without any errors in 10g. However, when I try to execute them, I get- "Invalid column index error". Any suggestions on how to rectify this error?

    Hi,
    That is probably an
    ORA-17003: Invalid column index
    Which is a JDBC error. Is Java/JDBC somehow involved?
    If not, could you please post one of the failing statements?
    Regards
    Peter

  • Java.sql.SQLException: Invalid column index error While getClob()

    I have code which works fine in Iplanet or stand alone Java program using WLS Connection Pool, But not from the the WLS servlet.
    This uses 9.1 Oracle JDBC Thin Driver
    Code snippet:
    cstmt.setString(1, servicename);
    cstmt.setString(2, params);
    String resultXmlString = null;
    cstmt.registerOutParameter(3,java.sql.Types.CLOB);
    cstmt.execute();
    Clob clob = cstmt.getClob(3);
    int val;
    long size = clob.length();
    StringBuffer full_text = new StringBuffer();
    if (clob != null)
    java.io.Reader clobReader = clob.getCharacterStream();
    while((val = clobReader.read()) > 0)
    full_text.append((char) val);
    resultXmlString = full_text.toString();

    I have code which works fine in Iplanet or stand alone Java program using WLS Connection Pool, But not from the the WLS servlet.
    This uses 9.1 Oracle JDBC Thin Driver
    Code snippet:
    cstmt.setString(1, servicename);
    cstmt.setString(2, params);
    String resultXmlString = null;
    cstmt.registerOutParameter(3,java.sql.Types.CLOB);
    cstmt.execute();
    Clob clob = cstmt.getClob(3);
    int val;
    long size = clob.length();
    StringBuffer full_text = new StringBuffer();
    if (clob != null)
    java.io.Reader clobReader = clob.getCharacterStream();
    while((val = clobReader.read()) > 0)
    full_text.append((char) val);
    resultXmlString = full_text.toString();

  • 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

  • Invalid column index problem

    Dear all.
    does anyone know what cause invalid column index error ??
    am using adf 11.1.2.0.0, it's happened to me twice, every time i recreate the view object (VO) nad everything become fine !!!
    this is the first stack (in the first vo)
    java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1464)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:107)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1322)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2439)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3842)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2378)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6005)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5834)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3568)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3423)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2173)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5115)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2935)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2791)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3032)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2797)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1255)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1413)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1319)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1304)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7083)
         at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBinding(DCJboDataControl.java:1301)
         at oracle.adf.model.binding.DCIteratorBinding.doExecuteQuery(DCIteratorBinding.java:2238)
         at oracle.adf.model.binding.DCIteratorBinding.executeQuery(DCIteratorBinding.java:2199)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:948)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2168)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1535)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:965)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:346)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Invalid column index
    java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getBytes(OracleResultSetImpl.java:1464)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)
         at oracle.jbo.domain.Number$1facClass.createDatum(Number.java:107)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(OracleSQLBuilderImpl.java:1322)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2439)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3842)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2378)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6005)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5834)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3568)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3423)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2173)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5115)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2935)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2791)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3032)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2797)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1255)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:1413)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMode(ViewRowSetImpl.java:1319)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:1304)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:7083)
         at oracle.adf.model.bc4j.DCJboDataControl.executeIteratorBinding(DCJboDataControl.java:1301)
         at oracle.adf.model.binding.DCIteratorBinding.doExecuteQuery(DCIteratorBinding.java:2238)
         at oracle.adf.model.binding.DCIteratorBinding.executeQuery(DCIteratorBinding.java:2199)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:948)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2168)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:731)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:402)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:185)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1535)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:965)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:346)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
    the second on (on the different view and different jspx)
    java.sql.SQLException: Invalid column index
         at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:2824)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getString(Unknown Source)
         at oracle.jbo.common.StringTypeSQLNativeImpl.getDataFromResultSet(JboTypeMapEntries.java:509)
         at oracle.jbo.server.AttributeDefImpl.loadFromResultSet(AttributeDefImpl.java:2426)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:3842)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:2378)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:6005)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5834)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3568)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:3423)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:2173)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:5115)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2935)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2791)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:3032)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:2797)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1255)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1078)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2774)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2751)
         at oracle.jbo.server.ViewRowSetIteratorImpl.first(ViewRowSetIteratorImpl.java:1580)
         at oracle.jbo.server.ViewRowSetImpl.first(ViewRowSetImpl.java:3546)
         at oracle.jbo.server.ViewObjectImpl.first(ViewObjectImpl.java:10157)
         at oracle.adf.model.binding.DCIteratorBinding.internalGetCurrentRowInBinding(DCIteratorBinding.java:2317)
         at oracle.jbo.uicli.binding.JUIteratorBinding.internalGetCurrentRowInBinding(JUIteratorBinding.java:526)
         at oracle.adf.model.binding.DCIteratorBinding.getCurrentRow(DCIteratorBinding.java:2262)
         at oracle.adf.model.binding.DCControlBinding.getCurrentRow(DCControlBinding.java:387)
         at oracle.jbo.uicli.binding.JUControlBinding.getCurrentRow(JUControlBinding.java:98)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.getRow(JUCtrlValueBinding.java:4197)
         at oracle.jbo.common.AttributeHintsMap.internalGet(AttributeHintsMap.java:56)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.internalGet(JUCtrlValueBinding.java:4184)
         at oracle.jbo.common.JboAbstractMap.get(JboAbstractMap.java:54)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHintObject(JUCtrlValueBinding.java:2215)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHint(JUCtrlValueBinding.java:2204)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getLabel(JUCtrlValueBinding.java:2044)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.internalGet(JUCtrlValueBinding.java:4130)
         at oracle.jbo.common.JboAbstractMap.get(JboAbstractMap.java:54)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getValue(ValueRenderer.java:184)
         at oracle.adfinternal.view.faces.renderkit.rich.ValueRenderer.getConvertedString(ValueRenderer.java:145)
         at oracle.adfinternal.view.faces.renderkit.rich.OutputLabelRenderer.encodeAll(OutputLabelRenderer.java:104)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._encodeAllChildren(PanelBoxRenderer.java:1518)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer._renderContentRow(PanelBoxRenderer.java:1440)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelBoxRenderer.encodeAll(PanelBoxRenderer.java:381)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:606)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:623)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:493)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:913)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
         at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    thanks in advance

    We occasionally get this problem in 11.1.1.4.0 after the following general sequence of events:
    a) we create a new transient attribute in the EO
    b) we include the EO transient attribute in the VO
    c) we modify the EO transient attribute in some specific way (maybe adding a Groovy expressions)
    At this point the VO attribute gets out of sync with the EO attribute and by implication the VO query that hits & returns from the database doesn't match the number of VO attributes.
    While I can't pin point the exact problem for you, we hit this regularly enough that our team knows the solution is to drop the VO attribute and recreate it by importing the EO attribute into the VO again. This resyncs the VO correctly and we don't get this error.
    CM.

  • SQL Exception: Invalid column index while calling stored proc from CO.java

    Hello all,
    I am getting a "SQL Exception: Invalid column index" error while calling stored proc from CO.java
    # I am trying to call this proc from controller instead of AM
    # PL/SQL Proc has 4 IN params and 1 Out param.
    Code I am using is pasted below
    ==============================================
              OAApplicationModule am = (OAApplicationModule)oapagecontext.getApplicationModule(oawebbean);
    OADBTransaction txn = (OADBTransaction)am.getOADBTransaction();
    OracleCallableStatement cs = null;
    cs = (OracleCallableStatement)txn.createCallableStatement("begin MY_PACKAGE.SEND_EMAIL_ON_PASSWORD_CHANGE(:1, :2, :3, :4, :5); end;", 1);
         try
    cs.registerOutParameter(5, Types.VARCHAR, 0, 2000);
                        cs.setString(1, "[email protected]");
                             cs.setString(2, s10);
    //Debug
    System.out.println(s10);
                             cs.setString (3, "p_subject " );
                             cs.setString (4, "clob_html_message - WPTEST" );
                   outParamValue = cs.getString(1);
    cs.executeQuery();
    txn.commit();
    catch(SQLException ex)
    throw new OAException("SQL Exception: "+ex.getMessage());
    =========================================
    Can you help please.
    Thanks,
    Vinod

    You may refer below URL
    http://oracleanil.blogspot.com/2009/04/itemqueryvoxml.html
    Thanks
    AJ

  • Oracle.jbo.SQLStmtException & java.sql.SQLException: Invalid column index

    Hi,
    I am using Jdeveloper 10.1.2.3 and created a ADFBC JSP struts application. I have an entity based viewobject which we have modified, enhance over the years. Some where along this way a bug was introduced in the viewobject that has the following exception
    JBO-30003: The application pool (pkgEmpContExp.amEmpContExpSnLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.SQLStmtException, msg=JBO-27122: SQL error during statement preparation. Statement: SELECT statement here
    ## Detail 0 ##oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation
    ## Detail 0 ##java.sql.SQLException: Invalid column index
    The viewobject query on its own has no indexes. It does have a lot of transient attributes which are populated with Preparestatements and callablestatements.
    If you want I can give the whole stacktrace.
    This always occurs after we insert into this table and we click on another link. If we clear the browser cache, it works properly.
    Can anyone please guide me in resolving this issue.
    Thanks in advance

    Hi,
    any chance the database table has been changed with the change not being reflected in the ADF BC model?
    Frank

  • Oracle Invalid Column Name Error in JSP

    I was wondering if anyone could provide some help. I am new to JSP, Beans and Oracle and I am getting a java.sql.SQLException: ORA-00904: invalid column name error when I run the JSP below. The Java Bean's code it is referencing is also included and this bean is just storing information from the server from a previous login page.
    Eventually I need to display more columns from the database using this JSP, but since I can even get this one working, I am at a loss!
    PLEASE HELP!!!!
    I have even tried to replace the beans reference in the sql with just a login and password I know exists in the database! Same error... Help!
    I am running Tomcat and Oracle 9i!
    <!--
    Assign-->
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sql = "SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='login' AND studentinfo.password='pswd';";
    try { // execute the query
    //SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='s40079703' AND studentinfo.password='p4007swd'
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sql);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("system.teaching.code") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>
    package BeanAs2;
    import java.util.*;
    public class Bean5b {
         // all variables must not be public in a bean
    private String Studentlogin;
    private String password;
    public String getStudentlogin() {
    return this.Studentlogin;
    public String getpassword() {
    return this.password;
         public void setStudentlogin(String login) {
              this.Studentlogin = login;
         public void setpassword(String pswd) {
              this.password = pswd;

    Hi
    Thanks for your reply, I should of looked at my code before I copied over. The field should of been "studentinfo.familyname" which I was calling, I have just been changing so much code in this to try and see what the problem is, I didnt fix this before I copied this over.... trust me, I have tried everything........ Hence when I correctly called the "concatination the login name and password to the query properly" as you pointed out, I got rid of the error, BUT now it returning NO DATA????? (the table is populated - I have checked this!!!!)
    The table I am trying to get information from sits under a schema called system. It has the following columns;
    STUDENTID NUMBER 8
    FAMILYNAME VARHCAR 60
    GIVENNAME VARCHAR 60
    USERNAME VARCHAR 9
    PASSWORD VHARCHAR 60
    The database is called globaldb. My computer is called Midas2
    Whats more, the query works in Oracle sql*plus!!! Returning the relevent data!!!
    Actually here is the code for the JSP, with all the changes and none of the mistakes of my previous post...........,
    Pleaes help!!!
    <html>
    <head>
    <title>Student Signon on page</title>
    </head>
    <body bgcolor="#FDF5E6">
    <h1 align="center">>Student Signon on page</h1>
    <%@ page import="java.sql.*" %>
    <%@ page import="BeanAs2.Bean5b" %>
    <%
    String driverClassString = "oracle.jdbc.driver.OracleDriver";
    String driverConnectString;
    driverConnectString = "jdbc:oracle:thin:@midas2:1521:globaldb";
    String user = "system";
    String passwd = "manager";
    %>
    <jsp:useBean id="Bean5b" class="BeanAs2.Bean5b" />
    <jsp getProperty id = "Bean5b" property = "login" />
    <jsp getProperty id = "Bean5b" property = "pswd" />
    <%
    Connection connection = null;
    try {
    Class.forName(driverClassString);
    connection = DriverManager.getConnection(driverConnectString, user, passwd);
    catch (Exception e) {
    out.println("Cannot close connect to database!"+e);
    if (connection != null) {
    String login =Bean5b.getpassword();
    String pswd =Bean5b.getStudentlogin();
    String sqlQuery;
    sqlQuery = ("SELECT studentinfo.familyname FROM STUDENTINFO WHERE studentinfo.username='" + login + "' AND studentinfo.password='" + pswd + "'"); %>
    <% try { // execute the query
    Statement stmt = connection.createStatement();
    ResultSet rst;
    rst = stmt.executeQuery(sqlQuery);
    // Fetch the query result, and dispaly them in a table
    while (rst.next()) {
    %>
    <tr>
    <td> <%= rst.getString("studentinfo.familyname") %> </td>
    </tr>
    <%
    stmt.close();
    connection.close();
    } catch(Exception e) {
         out.println("Cannot fetch data from database!"+e);
    %>
    </body></html>

  • 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?

  • Java.sql.SQLException: Invalid column index Query: while using ROWNUM

    hi ,
    i am getting the invalid column index query error while executing following query .i m able to run it properly without using rownum but when i append rownum i m getting error.i m using apache queryrunner for execution of query.
    java.sql.SQLException: Invalid column index Query: select * from (
    SELECT
    TO_CHAR(A.REQ_FOR_RATING_ID) RFQID,
    TO_CHAR(F.COV_PLAN_ID) COVPLANID,
    B.FIRM_NAME FIRMNAME,
    B.PRIMARY_ZIP_CD ZIP,
    A.PRODUCR_CD PRODUCERCD,
    A.PRODUCR_NAME PRODUCER,
    H.COV_NAME COVDESP,
    C.SALE_OFFC_CD SALEOFFCCD,
    C.USR_OFFC_NAME USROFFC,
    C.USR_NAME USR,
    C.USR_REP_CD USRREPCD,
    to_char((SELECT TO_CHAR(COUNT(EMP_NBR)) COUNT FROM ROSTR_DATA WHERE ROSTR_ID = F.ROSTR_ID)) AS count,
    TO_CHAR(B.SIC_CD) SICCD,
    F.INDSTRY_TYPE_IND INDTYPEIND,
    TO_CHAR(F.MANL_SIC_FCTR_NBR) MANSICFACTOR,
    TO_CHAR(F.UW_OVERD_SIC_FCTR_NBR) UWOVERDSICFACTOR,
    TO_CHAR(G.AREA_FCTR_NBR) STRAREAFACTOR,
    G.COV_ID COVID,
    F.PLAN_APPRVL_STATUS_CD PLANAPPRVLCD,
    F.PLAN_PROGRS_STATUS_CD PLANPROGRESSSTATUSCD ,
    F.PLAN_SALE_ASSMNT_CD PLANSALEASSMTCD,
    F.CREATD_DT CREATEDDT,
    NVL(to_char(F.PLAN_RELSED_DT),' ') PLANRELSEDDT,
    TO_CHAR(F.PLAN_RELSED_BY_ID) PLANRELSEDBYID,
    TO_CHAR(F.PROPOSD_EFF_DT) PROPOSDEFFECTIVEDT,
    TO_CHAR(A.GRACE_PERIOD_NBR) GRACEPERIOD,
    A.RNWL_15_MONTH_IND FIFTEENMONTHRNWLIND ,
    I.CO_DESC_TXT COMPANYNAME ,
    NVL(to_char(F.PLAN_APPRVL_DT),' ') approvedDt,
                   (Select U.USR_NAME from USR_DETL U WHERE U.USR_ID = F.PLAN_RELSED_BY_ID) as planRelsedByName,
    (Select U.USR_NAME from USR_DETL U WHERE U.USR_ID = F.PLAN_APPRVR_ID) as approvedByName,
    '' createdByName,
    ROWNUM rnum
    FROM
    REQ_FOR_RATING A,
    FIRM B,
    USR_DETL C,          
    SALE_OFFICE D,
    QUOTE_SCENRIO E,
    QUOTE_COV G,
    COV_PLAN F,
    COV_LKUP H,      
    CO_LKUP I
    WHERE
    A.FIRM_ID = B.FIRM_ID AND
    A.SALE_REP_ID = C.USR_ID AND
    C.SALE_OFFC_CD = D.SALE_OFFC_CD AND
    A.REQ_FOR_RATING_ID=E.REQ_FOR_RATING_ID AND
    E.QUOTE_SCENRIO_ID=G.QUOTE_SCENRIO_ID AND
    G.QUOTE_COV_ID=F.QUOTE_COV_ID AND      
    G.COV_ID=H.COV_ID AND
    I.CO_CD = F.CO_CD AND
    TO_CHAR(F.CREATD_DT,'YYYYMMDD') > TO_CHAR(TO_DATE('07/16/2007', 'MM/DD/YYYY HH24:MI:SS'),'YYYYMMDD') AND
    TO_CHAR(F.CREATD_DT,'YYYYMMDD') < TO_CHAR(TO_DATE('10/16/2007', 'MM/DD/YYYY HH24:MI:SS'),'YYYYMMDD')
    and rownum <=?) where rnum >=? Parameters: [07/15/2007 00:00:00, 10/15/2007 23:59:59, 1117, 1]

    That's a SQL fault, not a JDBC/Java fault.

  • BI publisher error-Invalid column index

    Hi,
    I am trying to view the report by configuring the bursting.
    My query doesn't give any errors if I run in the DB but getting 'Invald Column Index' Error in the BI Publisher.
    Can any one help me, what is going wrong?
    Thanks
    Suneetha
    Edited by: 932044 on 31-Aug-2012 04:15

    Hi,
    I can say It could be the problemof parameters. If you are passing parameters,plz check where you have given parametersnames correctrly in report or not
    like misplacing ':' of parameters or leaving spaces before or after ':'
    Thanks.

  • Invalid Column Index

    I have created a readonly view object using sql query. Then i used that VO as a LOV for an attribute in another ViewObject. Now when i open that lov at run time and searches record without giving any criteria, all records are found and when i select one of the record and presses OK, it assigns value to attribute as i want, but when i open that LOV and searches record by giving some criteria in that LOV, again correct result records are found but when i select one of the record and presses OK, i get "SQL Error during statement preparation" with cause invalid column index. Strange thing is that value is also assigned to attribute. Kindly help me. For reference query is given below which i have tested is absolutely correct.
    Query:
    SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD'
    ORDER BY name
    On second or you can say parent VO, i have organizationID field and i used LOV to select organization from VO given above. Second last query is the one on which it gives error.
    For Help, i also have logged queries which ADf generates are logged below:
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( (NAME LIKE ( ? || '%') ) ) ) ORDER BY name
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( (NAME LIKE ( ? || '%') ) ) ) ORDER BY name
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( (NAME LIKE ( ? || '%') ) ) ) ORDER BY name
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( (NAME LIKE ( ? || '%') ) ) ) ORDER BY name
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( ( (NAME LIKE ( ? || '%') ) ) ) AND ( ( (ID = ? ) ) AND ( ( (NAME LIKE ( ? || '%') ) ) ) ) ) ORDER BY name
    Query:SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT ORDER BY name

    Well I enabled -Djbo.debugoutput=console and got detailed log but could not find it useful from it. For reference i am copying part of log below. I don't know why ADf is generating wrong queries.
    ct 29, 2009 1:36:43 AM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ADF: Adding the following JSF error message: Invalid column index
    6225] internal_vco_def_3243_0 ViewRowSetImpl.execute caused params to be "un"changed
    [6226] Column count: 5
    [6227] internal_vco_def_3243_1 ViewRowSetImpl.execute caused params to be "un"changed
    [6228] Column count: 5
    [6229] internal_vco_def_3243_2 ViewRowSetImpl.execute caused params to be "un"changed
    [6230] Column count: 5
    [6231] internal_vco_def_3243_3 ViewRowSetImpl.execute caused params to be "un"changed
    [6232] Column count: 5
    [6233] internal_vco_def_3243_4 ViewRowSetImpl.execute caused params to be "un"changed
    [6234] Column count: 5
    [6235] internal_vco_def_3243_5 ViewRowSetImpl.execute caused params to be "un"changed
    [6236] Column count: 5
    [6237] internal_vco_def_3243_6 ViewRowSetImpl.execute caused params to be "un"changed
    [6238] Column count: 5
    [6239] internal_vco_def_3243_7 ViewRowSetImpl.execute caused params to be "un"changed
    [6240] Column count: 5
    [6241] internal_vco_def_3243_8 ViewRowSetImpl.execute caused params to be "un"changed
    [6242] Column count: 5
    [6243] internal_vco_def_3243_9 ViewRowSetImpl.execute caused params to be "un"changed
    [6244] Column count: 5
    [6245] internal_vco_def_3243_10 ViewRowSetImpl.execute caused params to be "un"changed
    [6246] Column count: 5
    [6247] internal_vco_def_3243_11 ViewRowSetImpl.execute caused params to be "un"changed
    [6248] Column count: 5
    [6249] internal_vco_def_3243_13 ViewRowSetImpl.execute caused params to be "un"changed
    [6250] Column count: 5
    [6251] internal_vco_def_3243_14 ViewRowSetImpl.execute caused params to be "un"changed
    [6252] Column count: 5
    [6253] LOCALVIEW_USAGE_RequisitionModule_RequisitionVO1___ImplicitViewCriteria___ShipmentTypeVO1_6 ViewRowSetImpl.execute caused params to be "un"changed
    [6254] internal_vco_def_3243_16 ViewRowSetImpl.execute caused params to be "un"changed
    [6255] Column count: 5
    [6256] internal_vco_def_3243_17 ViewRowSetImpl.execute caused params to be "un"changed
    [6257] Column count: 5
    [6258] internal_vco_def_3243_18 ViewRowSetImpl.execute caused params to be "un"changed
    [6259] Column count: 5
    [6260] internal_vco_def_3243_19 ViewRowSetImpl.execute caused params to be "un"changed
    [6261] Column count: 5
    [6262] internal_vco_def_3243_20 ViewRowSetImpl.execute caused params to be "un"changed
    [6263] Column count: 5
    [6264] internal_vco_def_3243_21 ViewRowSetImpl.execute caused params to be "un"changed
    [6265] Column count: 5
    [6266] internal_vco_def_3243_22 ViewRowSetImpl.execute caused params to be "un"changed
    [6267] Column count: 5
    Oct 29, 2009 1:36:43 AM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ADF: Adding the following JSF error message: SQL error during statement preparation. Statement: SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( ( (NAME LIKE ( ? || '%') ) ) ) AND ( ( (ID = ? ) ) AND ( ( (NAME LIKE ( ? || '%') ) ) ) ) ) ORDER BY name
    oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT o.id,o.name FROM SA_ORGANIZATIONS o,SA_ORGANIZATION_STRUCTURES s,SA_ORGANIZATION_TYPES t WHERE o.id = s.organization_id AND t.id = s.organization_type_id AND t.description = 'STEWARD') QRSLT WHERE ( ( ( (NAME LIKE ( ? || '%') ) ) ) AND ( ( (ID = ? ) ) AND ( ( (NAME LIKE ( ? || '%') ) ) ) ) ) ORDER BY name
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1072)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:815)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:5892)
         at com.snflwr.model.extension.MyViewObjectImpl.executeQueryForCollection(MyViewObjectImpl.java:14)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:1021)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:889)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2734)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2711)
    [6268] variableIterator variables passivated >>> TrackQueryPerformed def

Maybe you are looking for

  • Error while creating table 'EDISEGMENT' entry

    Hi i have this error when i try to activate transfer rules for some objects in BI, i find some tips for solve this issue, and i know that a good way to solve this is delete entries for the data source not only on ROOSGEN, but also on EDISEGMENT and E

  • HP Officejet Pro 8500 Wireless Won't Scan Under Snow Leopard

    After installing Snow Leopard, my new HP Officejet Pro Wireless 8500 all-in-one printer won't scan. It delivers the following error message: "No Scan Options - refer to device documentation". Also, when I attempted to check and adjust scan settings u

  • Usb 2.problem on ms-6830 kt3 ultra aru v1.0

    I have a strange problem with my kt3 ms06830 ultra aru v1.0 When i connect a usb 2.0 hd bracket to the d-bracket (usb 2.0 highspeed bracket) It runs slow as hell my config windows xp pro sp2 amd 2100xp ms-6380 v1.0 hd 2 x 80 striped (raid) 512 mb mem

  • Currency display problem in Report using WBS Element

    Hi Experts, PCS report displying different values aginest same WBS elements, in different currency. Report painter tool has been used. Requirement is  to display entered currency in the report. i.e the currency which is entered in selection screen. R

  • Defer Panel Updates not working for XY graph

    I am using an XY Graph in Labview 8.2.  I am making a lot of color changes and want to improve execution time by defering the panel updates while changing the colors.  I set the VI/Panel/DeferPanelUpdates to true and do the updates.  I can see the ot