Invalid column type error while calling db function.

We are getting an exception while calling the database function which returns a Varray of objects. We are using jpub to generate the wrapper method, ran sqlj to generate the JDBC code. The environment is weblogic 5.1 EJB container with ORacle 8.1.6.0.0 database. The JDBC driver is 8.1.7 thin, sqlj version is 8.1.7. I am giving below the exception.
When the sqlj option profile=false is not set, the error is Classcast exception. Appraently the weblogic connection object can not be used to do oracle specific calls. If somebody has done similar things(creating a bean which calls the stored function with weblogic which returns the oracle object types) or know what the issue is, please let me know.
Thanks,
Vijay.
stackTrace:
java.sql.SQLException: Invalid column type
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.sql.SQLException.<init>(SQLException.java:43)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.driver.OracleStatement.get_internal_type(OracleStatement.java:4560)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:225)
at oracle.jdbc.driver.OracleCallableStatement.registerOutParameter(OracleCallableStatement.java:350)
at weblogic.jdbcbase.pool.Statement.registerOutParameter(Statement.java:438)
at sqlj.runtime.profile.ref.RTStatementJDBCCallable.registerOutParameter(RTStatementJDBCCallable.java:135)
at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.registerParameters(Compiled Code)
at sqlj.runtime.profile.ref.ParamRegProfile$ParamRegCachedStatement.getStatement(ParamRegProfile.java:101)
at sqlj.runtime.profile.ref.CachedStatementProfileWrapper.getStatement(CachedStatementProfileWrapper.java:134)
at sqlj.runtime.ExecutionContext$StatementStack.setStatement(ExecutionContext.java:995)
at sqlj.runtime.ExecutionContext.registerStatement(ExecutionContext.java:523)
at com.xpede.calculator.processor.jdbc.NewPrdGroupPkg.maincalculator(NewPrdGroupPkg.java:341)
----------------------

Weblogic essentially wrappers the Oracle JDBC driver - as you can see from the stack trace, it does not just wrapper the connection object, but also the statement object.
The SQLJ runtime does not recognize the JDBC layer anymore as an Oracle JDBC driver.
What is happening at runtime may be the following:
(1) The invalid column type likely results from SQLJ attempting to register the type as Types.OTHER (code 1111). This typecode is not supported by Oracle JDBC.
(2) The class cast exception when using Oracle objects may result from a getObject() call which returns the value in default format (such as oracle.sql.ARRAY) rather than the JPublisher-generated wrapper object.
Are you using JDK 1.2 / runtime12.zip?
In that case you can try the standard (java.sql.)SQLData interface (in JPub: -usertypes=jdbc). However, this interface will not support wrappers for VARRAYs.

Similar Messages

  • "Invalid column type" error while calling pl/sql function in AM

    Code written in AM is ...
    String MISSING_TIME_SHEET_CALL = "begin ? = missing_time_sheet(?,?,?,?); end;";
    CallableStatement timeSheetStmt = txn.createCallableStatement(MISSING_TIME_SHEET_CALL, 1);
    timeSheetStmt.registerOutParameter(1,Types.BOOLEAN);
    timeSheetStmt.registerOutParameter(4,Types.DATE);
    timeSheetStmt.registerOutParameter(5,Types.DATE);
    timeSheetStmt.setString(2,personId);
    timeSheetStmt.setDate(3,resTermRow.getLastWorkingDate().dateValue());
    timeSheetStmt.execute();
    Body of Function is
    function missing_time_sheet (p_person_id varchar2, p_last_date date, p_start_date out date, p_end_date out date)
    -- Arvind
    return boolean

    refer this article and check your code.
    http://prasanna-adf.blogspot.com/2008/11/callable-statement.html
    --Prasanna                                                                                                                                                                                                                                                       

  • JDBC/SQLJ Team - Please respond - invalid column type error

    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David

    I am getting the same error message - Invalid Column Type. I am creating a Default Context by calling Oracle.getConnection(connection) passing in an instance of my own connection class that basically delegates to the OracleConnection. We wrapped the Connection so that we could trap and recover from lost database connections.
    My environment is Solaris 2.6, Oracle 7.3.4 with Sqlj 8.0.5.
    Thanks!
    [email protected]
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by David Christopher ([email protected]):
    Hi, I have posted several messages regarding problems using SQL/J to call out a stored packaged function that returns a ref cursor, but haven't gotten one response. I have yet a new problem with it. JDBC team, please acknowledge!
    I change the way I obtain a connection to the database from using the Oracle.connect along with a properties file, to now using a DataSource connection pool. As a result, I am constantly getting a SQLException: Invalid column type error. If I change the call to the stored function to a query in the SQLJ code, it's fine. What's going on??
    A previous message I wrote stated I was constantly getting a "closed statement" error when I tried to call the next method of the iterator. I corrected this by removing the finally clause in the generated JDBC code that released the execution context.
    Again, the environment is JDK1.2.2, SQLJ 8.1.6 SDK, JDBC 8.1.6 thin, all on NT.
    Thanks
    David<HR></BLOCKQUOTE>
    null

  • ORA-00902: invalid datatype comile error while using CAST function

    Hi everyone,
    I'm getting ORA-00902: invalid datatype compilation error while using CAST function.
    open ref_cursor_list for select empName from TABLE(CAST(part_t AS partnumberlist));
    The partnumberlist and ref_cursor_list is declared in the Package spec as given below.
    TYPE ref_cursor_list IS REF CURSOR;
    TYPE partnumberlist IS TABLE OF emp.empName%TYPE;
    The error points the partnumberlist as invalid datatype in TOAD because of this i'm unable to compile the package.
    Any suggestion
    Thanks and regards
    Sathish Gopal

    Here is my code for
    package Spec
    CREATE OR REPLACE PACKAGE "HISTORICAL_COMMENTZ" AS
    TYPE prior_part_data_record IS RECORD (
    prior_part_row_id PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE,
    prior_pgm_chng_s_id PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE
    TYPE parts_list IS TABLE OF prior_part_data_record;
    --TYPE parts_list IS TABLE OF NUMBER;
    TYPE partnumberlist IS TABLE OF PGM_RPLCMNT_PART.PR_PART_ROW_S_ID%TYPE;
    TYPE partnumber_cursor IS REF CURSOR;
    TYPE comment_record IS RECORD (
    pgm_s_id                     PGM_PART_CMNT.PGM_S_ID%TYPE,
    part_row_s_id                PGM_PART_CMNT.PART_ROW_S_ID%TYPE,
    pgm_chng_s_id                PGM_PART_CMNT.PGM_CHNG_S_ID%TYPE,
    cmnt_txt                     PGM_PART_CMNT.CMNT_TXT%TYPE,
    cmnt_dt                     PGM_PART_CMNT.CMNT_DT%TYPE,
    updt_rsrc_id                PGM_PART_CMNT.UPDT_RSRC_ID%TYPE
    TYPE comment_list IS TABLE OF comment_record;
    global_pgm_s_id INTEGER := 0;
    global_part_row_s_id INTEGER := 0;
    err_num NUMBER := 999999;
    err_msg VARCHAR2 (250);
    PROCEDURE getComments (
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist out partnumber_cursor);
    END;
    Package Body
    CREATE OR REPLACE PACKAGE BODY HISTORICAL_COMMENTZ
    AS
    FUNCTION getPriorPart
    (param_prior_pgm_chng_s_id IN PGM_RPLCMNT_PART.PR_PGM_CHNG_S_ID%TYPE,
    return_prior_part_data_record IN OUT prior_part_data_record
    RETURN INTEGER
    IS
    retVal INTEGER;
    prior_part_row_id INTEGER;
    prior_pgm_chng_s_id INTEGER;
    local_prior_part_data_record prior_part_data_record;
    BEGIN
    SELECT PR_PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_prior_part_data_record
    --SELECT PR_PART_ROW_S_ID INTO retVal
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND CUR_PGM_CHNG_S_ID = param_prior_pgm_chng_s_id;
    return_prior_part_data_record := local_prior_part_data_record;
    retVal := 0;
    RETURN retVal;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    retVal := -1;
    RETURN retVal;
    END getPriorPart;
    FUNCTION getComment (found_parts_list IN parts_list, comments OUT comment_list)
    RETURN INTEGER
    IS
    CURSOR init_cursor
    IS
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    FROM PGM_PART_CMNT WHERE 1 = 2;
    retVal INTEGER;
    indexNum PLS_INTEGER;
    local_part_record prior_part_data_record;
    local_comment_record comment_record;
    local_part_row_s_id NUMBER;
    i PLS_INTEGER;
    BEGIN
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO comments;
    i := 0;
    indexNum := found_parts_list.FIRST;
    WHILE indexNum IS NOT NULL
    LOOP
    local_part_record := found_parts_list(indexnum);
    local_part_row_s_id := local_part_record.prior_part_row_id;
    SELECT PGM_S_ID,PART_ROW_S_ID,PGM_CHNG_S_ID,CMNT_TXT,CMNT_DT,UPDT_RSRC_ID
    INTO local_comment_record FROM PGM_PART_CMNT
    WHERE PGM_S_ID = global_pgm_s_id
    AND PART_ROW_S_ID = local_part_row_s_id;
    comments(i) := local_comment_record;
    i := i + 1;
    END LOOP;
    RETURN retval;
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    WHEN OTHERS
    THEN
    err_num := SQLCODE;
    err_msg := 'SQL Error ' || SUBSTR (SQLERRM, 1, 250);
    DBMS_OUTPUT.put_line ('SQLERROR = ' || err_msg);
    RETURN retval;
    END getComment;
    PROCEDURE getComments
    pgm_s_id IN NUMBER,
    part_row_s_id IN NUMBER,
    partnumber_cursorlist OUT partnumber_cursor)
    IS
    comment_recordlist comment_record;
    retPartnumberlist partnumberlist;
    found_parts_list parts_list;
    local_part_record prior_part_data_record;
    is_more_parts BOOLEAN;
    driver_chng_s_id NUMBER;
    num_parts NUMBER;
    retVal NUMBER;
    comments comment_list;
    returnPartnumberlist partnumberlist;
    iloopCounter PLS_INTEGER;
    inx1 PLS_INTEGER;
    part_t partnumberlist :=partnumberlist(100,200,300);
    CURSOR part_list_init_cursor
    IS
    SELECT PR_PART_ROW_S_ID,PR_PGM_CHNG_S_ID FROM PGM_RPLCMNT_PART WHERE 1 = 2;
    CURSOR inIt_cursor
    IS
    SELECT 0 FROM DUAL WHERE 1 = 2;
    BEGIN
    DBMS_OUTPUT.ENABLE (5000000);
    global_pgm_s_id := pgm_s_id;
    global_part_row_s_id := part_row_s_id;
    SELECT PART_ROW_S_ID AS prior_part_row_id, PR_PGM_CHNG_S_ID AS prior_pgm_chng_s_id
    INTO local_part_record
    FROM PGM_RPLCMNT_PART
    WHERE PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id AND
    CUR_PGM_CHNG_S_ID IN (SELECT MAX(CUR_PGM_CHNG_S_ID) FROM PGM_RPLCMNT_PART WHERE
    PGM_S_ID = global_pgm_s_id AND PART_ROW_S_ID = global_part_row_s_id
    GROUP BY PART_ROW_S_ID);
    OPEN part_list_init_cursor;
    FETCH part_list_init_cursor
    BULK COLLECT INTO found_parts_list;
    -- Add the existing part to the found list
    found_parts_list.EXTEND;
    found_parts_list(1) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    num_parts := 1;
    is_more_parts := TRUE;
    WHILE (is_more_parts) LOOP
    retVal := getPriorPart(driver_chng_s_id,local_part_record);
    IF (retVal != -1) THEN
    found_parts_list.EXTEND;
    num_parts := num_parts + 1;
    found_parts_list(num_parts) := local_part_record;
    driver_chng_s_id := local_part_record.prior_pgm_chng_s_id;
    ELSE
    is_more_parts := FALSE;
    END IF;
    END LOOP;
    --num_parts := getComment(found_parts_list,comments);
    OPEN init_cursor;
    FETCH init_cursor
    BULK COLLECT INTO returnPartnumberlist;
    num_parts := found_parts_list.COUNT;
    FOR iloopCounter IN 1 .. num_parts
    LOOP
    returnPartnumberlist.EXTEND;
    returnPartnumberlist(iloopCounter) := found_parts_list(iloopCounter).prior_part_row_id;
    END LOOP;
    retPartnumberlist := returnPartnumberlist;
    open
    *          partnumber_cursorlist for select PR_PART_ROW_S_ID from TABLE(CAST(retPartnumberlist AS historical_commentz.partnumberlist));*                              
    DBMS_OUTPUT.put_line('Done....!');
    EXCEPTION
    some code..............................
    END getComments;
    END HISTORICAL_COMMENTZ;
    /

  • Type error while calling function module with in FOX formula

    Hi,
    I am getting following error while calling function module from FOX Formula:
    "Types of parameter DAY_IN () and variable J_CALDAY(D) are inconsistent"
    Following is the code:
    DATA    I_CALDAY       TYPE  0CALDAY.
    DATA    N_CALDAY       TYPE  0CALDAY.
    DATA    KYF              TYPE KEYFIGURE_NAME.
    FOREACH   I_CALDAY, KYF.
       CALL FUNCTION SLS_MISC_GET_LAST_DAY_OF_MONTH
          EXPORTING
             DAY_IN  =  I_CALDAY
          IMPORTING
             LAST_DAY_OF_MONTH = N_CALDAY.
        {KYF, N_CALDAY}  =  {KYF, L_CALDAY}.
    ENDFOR.
    Import parameter DAY_IN is of type sy-datum (that inturn is data element SYDATUM of data type DATS - same as 0CALDAY). Not sure why error is being thrown. Any idea? Thanks.
    Edited by: SAP_BOY on Dec 4, 2009 5:26 PM

    Hi,
    I think It will not identify ,though you have  (data element SYDATUM of data type DATS - same as 0CALDAY).Check it out by assigning it through a variable of type D.
    Data I_CALDAY TYPE D.
    Hope it may work out.
    Regards,
    Indu

  • 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

  • Export giving "Invalid column type" error

    Hi,
    I am using Export button in my page and I provided "BICOSortedDetlsVO1" for View instance property.
    After I ran I got java.sql.SQLException: Invalid column type.
    Can any one let me know where I am doing wrong?
    Thanks,
    Subramanyam.

    Hi Nani,
    Please find below is the query for VO.
    Thanks &
    Regards,
    Subramanyam.
    SELECT XxslipaBicosSortedDtlsVlEO.ADMINISTRATION_FEE,
    XxslipaBicosSortedDtlsVlEO.ASSIGNMENT_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.BILLING_CONDITION_ID,
    XxslipaBicosSortedDtlsVlEO.BILLING_CONDITION_SET_ID,
    XxslipaBicosSortedDtlsVlEO.BILLING_CURRENCY_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_GROUP,
    XxslipaBicosSortedDtlsVlEO.BILLING_METHOD_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_METHOD_MEANING,
    XxslipaBicosSortedDtlsVlEO.BILLING_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.BILLING_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_MARKUP,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_MAXIMUM_RATE,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_PROJECT_BASE_HRS,
    XxslipaBicosSortedDtlsVlEO.COST_PLUS_UNITS_PER,
    XxslipaBicosSortedDtlsVlEO.CREATED_BY,
    XxslipaBicosSortedDtlsVlEO.CREATION_DATE,
    XxslipaBicosSortedDtlsVlEO.DESCRIPTION,
    XxslipaBicosSortedDtlsVlEO.EFFECTIVE_END_DATE,
    XxslipaBicosSortedDtlsVlEO.EFFECTIVE_START_DATE,
    XxslipaBicosSortedDtlsVlEO.EMPLOYMENT_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.ENABLED_FLAG,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_CATEGORY,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_CATEGORY_MEANING,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_ORGANIZATION,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_TYPE,
    XxslipaBicosSortedDtlsVlEO.EXPENDITURE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_LIMIT_FLAG,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_MARKUP,
    XxslipaBicosSortedDtlsVlEO.FIXED_RATE_UNITS_PER,
    XxslipaBicosSortedDtlsVlEO.FRINGE_BENEFIT_MARKUP,
    XxslipaBicosSortedDtlsVlEO.FRINGE_BENEFIT_OPERATION,
    XxslipaBicosSortedDtlsVlEO.GRADE_FAMILY,
    XxslipaBicosSortedDtlsVlEO.GRADE_PROGRESSION_LEVEL,
    XxslipaBicosSortedDtlsVlEO.GRADE_SALARY_LEVEL,
    XxslipaBicosSortedDtlsVlEO.GRADE_SALARY_REGION,
    XxslipaBicosSortedDtlsVlEO.JOB_BILL_TITLE_OVERRIDE,
    XxslipaBicosSortedDtlsVlEO.JOB_DISCIPLINE,
    XxslipaBicosSortedDtlsVlEO.LAST_APPROVAL_DATE,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATED_BY,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATE_DATE,
    XxslipaBicosSortedDtlsVlEO.LAST_UPDATE_LOGIN,
    XxslipaBicosSortedDtlsVlEO.NON_LABOR_RESOURCE,
    XxslipaBicosSortedDtlsVlEO.NORMAL_HOURS,
    XxslipaBicosSortedDtlsVlEO.ORG_ID,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_NAME,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_NUMBER,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.RESOURCE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.REVENUE_CATEGORY_CODE,
    XxslipaBicosSortedDtlsVlEO.REVENUE_CATEGORY_MEANING,
    XxslipaBicosSortedDtlsVlEO.SERVICE_TYPE_CODE,
    XxslipaBicosSortedDtlsVlEO.SERVICE_TYPE_MEANING,
    XxslipaBicosSortedDtlsVlEO.TASK_NUMBER,
    XxslipaBicosSortedDtlsVlEO.WORK_TYPE_ID,
    XxslipaBicosSortedDtlsVlEO.WORK_TYPE_NAME
    FROM XXSLIPA_BICOS_SORTED_DTLS_VL XxslipaBicosSortedDtlsVlEO

  • Error while calling a function.

    Hi,
    below is my callable statement through which am calling a function which returns the service years of a person with personid as parameter.
    But dont know why am getting an error which is returning the serviceyrs as 0.
    when i try to debug, the problem is in this statement
    System.out.println("the output1 is "+cs.getInt(1));
    is there any problem with my code.
    please look the code below
    thanks
    kumar
    OADBTransaction txn=getOADBTransaction();
    OracleCallableStatement cs = (OracleCallableStatement) txn.createCallableStatement("begin :1:=LMIG_UTILITY_PKG.GET_TOTAL_SERVICE(p_person_id => :2); end;",1);
    try
    cs.registerOutParameter(1,Types.INTEGER);
    cs.setInt(2,Integer.parseInt(pid));
    System.out.println("person id is "+pid);
    System.out.println("the output1 is "+cs.getInt(1));
    cs.execute();
    serviceyrs= cs.getInt(1);
    cs.close();
    catch(SQLException sqle)
    System.out.println("ERROR"+sqle.toString());
    System.out.println("Service years are "+serviceyrs);

    Hi, Guess u are missing the connection to the JDBC call.
    Try the following...it worked for me..
    Connection conn = this.getOADBTransaction().getJdbcConnection();
    OracleCallableStatement ocs = null;
    String param = null;
    try {       
         String stmt = "BEGIN :1 := <PkgName>.<FunctionName>(:2); end;";
         ocs = (OracleCallableStatement)conn.prepareCall(stmt);
         ocs.registerOutParameter(1, OracleTypes.CHAR);
         ocs.setString(2, <param>);
         ocs.execute();
         param = ocs.getString(1);
    } catch(SQLException se)
    {       throw OAException.wrapperException(se);    
    finally
         try {               
              ocs.close();
              return(param);
         } catch(Exception e)
              throw OAException.wrapperException(e);
    }

  • Error while calling the function which returns SQL Query!!!

    Hi,
    I have a Function which returns SQL query. I am calling this function in my APEX report region source.
    The query is dynamic SQL and its size varies based on the dynamic "where clause" condition.
    But I am not able to execute this function.It gives me the following error in APEX region source.
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Even in SQL* Plus or SQL developer also same error .
    The length of my query is more than 4000. I tried changing the variable size which holds my query in the function.
    Earlier it was
    l_query varchar2(4000)
    Now I changed to
    l_query varchar2(32767).
    Still it is throwing the same error.
    Can anybody help me to resolve this.???
    Thanks
    Alaka

    Hi Varad,
    I am already using 32k of varchar2. Then also it is not working.
    It is giving the same error. I think there is something to do with buffer size.
    My query size is not more than 4200. Even if i give 32k of varchar2 also buffer is able to hold only 3997 size of the query only.
    Error is
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    Tried CLOB also. It is not working.
    Any other solution for this.
    Thanks
    Alaka

  • INVALID ORG ID error while calling ASO_QUOTE_PUB.COPY_QUOTE() API

    Hi All
    I am using following API for creating the copy of the quote in iStore.
    API Name: ASO_QUOTE_PUB.COPY_QUOTE()
    but giving me error  as INVALID ORG ID.
    Also i am using R12 version.
    My sample code is:
    BEGIN
    select application_id,responsibility_id into l_appllication_id,l_responsibility_id
    from fnd_responsibility where responsibility_key ='IBE_CUSTOMER';
    select org_id,source_document_id,created_by into l_org_id,l_quote_Header_id,l_user_id
    from oe_order_headers_all where order_number=p_order_number;
    dbms_output.put_line('user,resp,app'||l_user_id||','||l_responsibility_id||','||l_appllication_id);
    dbms_application_info.set_client_info(l_org_id);
    begin
    MO_GLOBAL.SET_POLICY_CONTEXT('S',l_org_id);
    end;
      fnd_global.APPS_INITIALIZE (l_user_id, l_responsibility_id, l_appllication_id); --USER_ID,RESP_ID,APP_ID
    l_qte_header_rec.quote_header_id := l_quote_Header_id;
    l_qte_header_rec.last_update_date := sysdate;
    l_control_rec.last_update_date := sysdate;
    l_qte_header_rec.quote_source_code := 'Order Capture Quotes';
    l_control_rec.CALCULATE_TAX_FLAG := 'Y';
    l_control_rec.pricing_request_type := 'ASO';
    l_control_rec.header_pricing_event := 'BATCH';
    ASO_QUOTE_PUB.Copy_Quote(
    P_Api_Version_Number => 1.0,
    P_Init_Msg_List => FND_API.G_TRUE,
    P_Qte_Header_Id => l_qte_header_rec.quote_header_id,
    P_Last_Update_Date => sysdate,
    P_Copy_Only_Header => FND_API.G_FALSE,
    P_New_Version => FND_API.G_FALSE,
    P_Qte_Status_Id => 4, --> 'Draft' from aso_quote_statuses_vl
    P_Qte_Number => FND_API.G_MISS_NUM,
    X_Qte_Header_Id => lx_new_quote_id,
    X_Return_Status => lx_Return_Status,
    X_Msg_Count => lx_Msg_Count,
    X_Msg_Data => lx_Msg_Data);
    I did everything but still am getting invalid org id error.
    Please guide me..

    check this code
    Sample Code for "Copy Quote" using ASO_QUOTE_PUB [ID 811581.1]
    ApPsMaSti
    Sharing is Caring

  • Error while calling XQuery Function with xs:date type as Argument

    Hi,
    I have follwing function in my DataService .
    declare function tns:getXXXDetail($effectiveDate as xs:date,
    $cancelDate as xs:date) as element(ns26:XXXAccount)* {
              implCode
    declare function tns:testGetXXXDetail($searchCriteria as element(ns15:locateMemberXXXDetail))
                   as element(ns26:XXXAccount)* {
    for $Account in tns:getXXXDetail($searchCriteria/ns16:accountTypeDates/ns18:effectiveDate,
         $searchCriteria/ns16:accountTypeDates/ns18:cancelDate)
    return $Account
    I am trying to test the getXXXDetail() function from testGetXXXDetail .
    The searchCriteria is a complex type with date elements effectiveDate and cancelDate, both are optional
    When i test with effectiveDate,cancelDate elements present in $searchCriteria its working fine.
    When i remove these dates element i am getting follwing error
    "expected exactly one item, got 0 items" error
    Any Clue ?

    When i remove these dates element i am getting follwing error"expected exactly one item, got 0 items" error
    Sounds like your schema for these items indicates minOccurs="1" (or relies on that as the default).
    Edit the schema and change the definitions to be...
    <xs:element name="effectiveDate" minOccurs="0" ... />

  • Error while calling FM : Function parameter "PE_LFA1" is unknown

    Dear Experts,
    I am trying to call a FM in my code, but somehow I am getting the following error .Please help !
    My code is :
    DATA :  VENDOR_NO TYPE WSRS_SHVDST_RES-VENDOR_NO,
            PE_LFA2 TYPE LFA1,
            PE_ADDR2 TYPE BAPIADDR1,
            PE_ADRPRT2 TYPE WISO_ADRPRT,
            PE_RETURN2 TYPE WSRS_RETURN,
            PE_LFM2 TYPE LFM1,
            PE_LFB2 TYPE LFB1.
      DATA:
        node_vendor                         TYPE REF TO if_wd_context_node,
        elem_vendor                         TYPE REF TO if_wd_context_element,
        stru_vendor                         TYPE if_vendor_view=>element_vendor ,
        item_vendorinp                      LIKE stru_vendor-vendorinp.
    navigate from <CONTEXT> to <VENDOR> via lead selection
      node_vendor = wd_context->get_child_node( name = if_vendor_view=>wdctx_vendor ).
    get element via lead selection
      elem_vendor = node_vendor->get_element(  ).
    get single attribute
      elem_vendor->get_attribute(
        EXPORTING
          name =  `VENDORINP`
        IMPORTING
          value = item_vendorinp ).
    VENDOR_NO = item_vendorinp.
    CALL FUNCTION 'WSRS_O_VENDOR_GET_DETAIL'
    EXPORTING
    PE_LFA1 = PE_LFA2
    PE_ADDR1 = PE_ADDR2
    PE_ADRPRT = PE_ADRPRT2
    PE_RETURN =PE_RETURN2
    PE_LFM1 = PE_LFM2
    PE_LFB1 = PE_LFB2
    IMPORTING
    PI_VENDOR_NO = VENDOR_NO.
    My Error is :
    Note
    The following error text was processed in the system HE6 : Function parameter "PE_LFA1" is unknown.
    The error occurred on the application server hsdnt24s11_HE6_00 and in the work process 5 .
    The termination type was: RABAX_STATE
    The ABAP call stack was:
    Method: ONACTIONFETCH_VENDOR_DETAILS of program /1BCWDY/A8XPPCRFM5I0CTSGLFDT==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_INVOKE_EVENT_HANDLER of program /1BCWDY/A8XPPCRFM5I0CTSGLFDT==CP
    Method: INVOKE_EVENTHANDLER of program CL_WDR_DELEGATING_VIEW========CP
    Method: IF_WDR_ACTION~FIRE of program CL_WDR_ACTION=================CP
    Method: DO_HANDLE_ACTION_EVENT of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW_PHASE_MODEL=====CP
    Method: PROCESS_REQUEST of program CL_WDR_WINDOW=================CP
    Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
    Please help.

    Hi,
    I will ask this way, from where did you get list of parameters for this FM? Try using pattern to call this FM, than you will be proposed with correct interface.
    EDIT:
    After checking it in system you should switch IMPORTING and EXPORTING
    CALL FUNCTION 'WSRS_O_VENDOR_GET_DETAIL'
      EXPORTING
        PI_VENDOR_NO             = '99'
    *   PI_ACCEPT_NOTFOUND       =
    *   PI_PURCH_ORG             =
    *   PI_COMP_CODE             =
    IMPORTING
       PE_LFA1                  = lv
    *   PE_ADDR1                 =
    *   PE_ADRPRT                =
    *   PE_RETURN                =
    *   PE_LFM1                  =
    *   PE_LFB1                  =
    Best regards
    Marcin Cholewczuk
    Edited by: Marcin Cholewczuk on Apr 12, 2011 1:20 PM

  • Getting Error while calling Flex function from JavaScript

    Hi,
    I have an aspx page, which shows charts as per dropdown selection,
    I am using flex charts for flex.In aspx page, i am calling an mxml function using javascript.below is the code for javascript in aspx.
    Javascript  code in aspx page:
    <script type="text/javascript">     
    function callApp(formid) {
        try {
                var objectChart = document.getElementById("statisticsChart");
                alert(objectChart.id);               
                objectChart.myFlexFunction(formid,get('<%=HiddenDashboardWS.ClientID %>').value);
        catch (e) {
            alert(e.message);
    function getDropDownListvalue() {
        var IndexValue = $get('<%=FormDropDownList.ClientID %>').selectedIndex;
        var SelectedVal = $get('<%=FormDropDownList.ClientID %>').options[IndexValue].value;
        //  alert(SelectedVal);
        callApp(SelectedVal);
    </script>
    Html code where dropdown control is placed
    <asp:DropDownList CssClass="combo" ID="FormDropDownList" runat="server" AutoPostBack="false"></asp:DropDownList>
    <object id="statisticsChart" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
    height="220" width="680">
        <param name="src" value="../swf/DashboardStatisticChart.swf" />
        <param name="flashVars" value="" />
        <embed name="statisticsChart" src="../swf/DashboardStatisticChart.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" height="220" width="680" flashvars=""></embed>
    </object>
    Mxml code:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  backgroundColor="white" creationComplete="initApp();" >
    <mx:script>
      public function initApp():void {
    ExternalInterface.addCallback("myFlexFunction",myFunc);
      public function myFunc(s:String,wsurl:String):void {
         Formid.text = s;
         webService.wsdl = wsurl;
         Alert.show("webservice");
    //Getdata calls webservice and gets xml data    
    GetData();
    //showchart() will draw chart
                     ShowChart();
    </mx:script>
    </mx:Application>
    Above code works perfect in ie, but in firefox, it gives An error saying “chartObject.MyFlexFunction is not a function”.
    I am getting the object in javascript in all the browsers, but not the functions!
    Does anyone has worked with this?
    Any help will be highly appreciated.
    Regards,
    Nirav Patel

    Found the solution from here... http://74.125.153.132/search?q=cache:4BC9BY04B5EJ:livedocs.adobe.com/flash/8/main/00002201 .html+externalinterface.addcallback+not+working&cd=1&hl=en&ct=clnk&gl=in
    Hope it will help others...
    Regards,

  • 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();

  • Inconsistent FOTY0001: type error while  using translateFromNative

    I am getting FOTY0001: type error while using translateFromNative function in assign activity.
    This error happens only in the below scenarios:
    1. Create a BPEL process with file input adapter that accepts simple xml string as input and accepts files like input*.txt.
    2. Create a simple XSD(Fixed Length native XSD) and convert the simple string to XML using translateFromNative function and copy it into a variable.
    3. Switch off the process
    4. Put atleast 10 input*.txt files in the folder and switch on the process.
    This error doesn't happen when I put one file at time.. Even when I put multiple files, the error happens for few instances inconsitently.
    Here is our assign activity
    <assign name="Assign_1">
    <copy>
    <from variable="PlantChemMsg" part="Chemistry"
    query="/ns2:Chemistry/ns2:chemistryString"/>
    <to variable="tempChemistryString"/>
    </copy>
    <copy>
    <from expression="ora:translateFromNative(bpws:getVariableData('tempChemistryString'), 'ChemistryLegacy1.xsd', 'Root-Element')"/>
    <to variable="ChemistryOut" part="Root-Element"
    query="/ns8:Root-Element"/>
    </copy>
    </assign>
    Here is the error in group log:
    ORABPEL-09500
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "ora:translateFromNative(string(bpws:getVariableData('tempChemistryString')), 'ChemistryLegacy1.xsd', 'Root-Element')", the reason is FOTY0001: type error.
    Please verify the xpath query.
         at com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate(BPELXPathUtil.java:206)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:679)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:143)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3705)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1654)
    Any help would be appreciated. Thanks.
    -Sridhar

    James,
    Thanks & Sorry for the late reply.
    I used assign activity just because I have only one source and target element.
    This error happens even with transform activity.
    Also, all the input messages are same. So It is definitely not the issue with the input message.
    One observation I did is:
    The error doesn't occur when I use like below(Full Http url):
    ora:translateFromNative(string(bpws:getVariableData('tempChemistryString')), 'http://psc-d674943.hdq.uss.com:7777/orabpel/default/TestTranslateFromNativeError/1.0/ChemistryLegacy1.xsd
    ', 'Root-Element')
    But occurs when I use like below.
    ora:translateFromNative(string(bpws:getVariableData('tempChemistryString')), 'ChemistryLegacy1.xsd', 'Root-Element')

Maybe you are looking for

  • To increase the size of a database

    Where do I find how to increase sql database size

  • How can I take off icloud storage??

    Well I click 5gb for free by accident and now it takes off five gb and I dont want that because I have a 8gb and nowi can't download any music because I don't have any room!

  • Website Search Functionality

    Could someone please point me in the direction of a tutorial or example of how to create and implement a search box into a website. The website is HTML and am hosted on a server which permit php. I am a novice and need a good step by step guide to fo

  • Release procedure is applyaing for all doc types

    Hi all I have configured release procedure for PO only for 2 document types, i have used EKKO-BSART structure name.and in values i have given only 2 document types, but the release applying for all document types of PO, plz help how to set to apply o

  • Aligning text in a textfield

    Hi every body, I am new to java, and I would like to know if it is possible to align the text in a textfield(i.e., left or right justification). I am not using swings..., The textfield is working fine..., but I want it to be right justified since I a