Load data error: Database selection with invalid cursor (sm21)

hi experts,
when I execute processchar, it occur some system error:
"Database selection with invalid cursor ",
"Documentation for system log message BY 7 :
The database interface was called by a cursor (in a FETCH or CLOSE
cursor operation) that is not flagged as opened. This can occur if a
COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
opened cursors), followed by another attempt to access the cursor (for
example, the next time the loop is executed). "
the error msg occur when apply bw support package19.
data from DSO to CUBE, Transferred Recodes is not zero, but Added Recodes is zero.
Request status always yellow, process is running.
current sys info: BI7 and BW19, BASIS17,PI_BASIS17, the database is oracle10g R2.
thanks for your help.

I have solved this issue, The Oracle checkpoint not complete.
thanks,
xwu.

Similar Messages

  • Processchar occur error:  Database selection with invalid cursor (sm21)

    hi,
       when I execute processchar, it occur some system error:
    "Database selection with invalid cursor ",
    "Documentation for system log message BY 7 :
    The database interface was called by a cursor (in a FETCH or CLOSE
    cursor operation) that is not flagged as opened. This can occur if a
    COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
    opened cursors), followed by another attempt to access the cursor (for
    example, the next time the loop is executed). "
    the error msg occur when apply bw support package19.
    data from DSO to CUBE, Transferred Recodes is not zero, but Added Recodes is zero.
    Request status always yellow, process is running.
    current sys info: BI7 and BW19, BASIS17,PI_BASIS17, the database is oracle10g R2.
    thanks for your help.

    I have solved this issue , The Oracle checkpoint is not complete.
    thanks,
    xwu.

  • Database selection with invalid cursor with MaxDB database

    Hi Experts,
    I encountered the this error:
    "Database selection with invalid cursor
    The database interface was called by a cursor (in a FETCH or CLOSE
    cursor operation) that is not flagged as opened. This can occur if a
    COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
    opened cursors), followed by another attempt to access the cursor (for
    example, the next time the loop is executed)."
    We are using bw support package 19 early this month. Previously is working fine but this problem occured from the last 2 days.
    We are using MaxDB database.
    Really appreciate any speedy responds.

    Hi,
    We finally resolved the issue.
    The solution:
    We check the RFC connection test in SM59. There are connection error.
    There is an error that related J2EE_ADMIN user.
    SO we reset the J2EE_ADMIN id in SU01.
    The problem goes away.
    Many thanks

  • Database selection with Invalid Cursor error in RSDRI_INFOPROV_READ

    Hi Everyone.
    I am using RSDRI_INFOPROV_READ Function module for reading data from a multiprovider.
    Logic of the code is as following
    while <more data>
    CALL RSDRI_INFOPROV_READ reading data in E_T_DATA
    Append lines of E_T_DATA to EO_T_DATA.
    If total lines of data in EO_T_DATA > 200000
    <save EO_T_DATA in a file using GUI_DOWNLOAD>
    <clear EO_T_DATA>
    EndIF
    EndWhile.
    As soon as number of record exceed 200000 first file is saved, but after that next data call results in error.
    Error says "Database selection with invalid cursor".
    I suspect that this because of call to FM GUI_DOWNLOAD. While calling this FM after RSDRI_INFOPROV_READ causes system to commit and again the cursor is tried to open in next call casuing it to fail.
    But it is imperative for me to save data in file at regular intervals as data volume is huge.
    Any pointers in this direction will be helpful.

    Hi Everyone.
    I am using RSDRI_INFOPROV_READ Function module for reading data from a multiprovider.
    Logic of the code is as following
    while <more data>
    CALL RSDRI_INFOPROV_READ reading data in E_T_DATA
    Append lines of E_T_DATA to EO_T_DATA.
    If total lines of data in EO_T_DATA > 200000
    <save EO_T_DATA in a file using GUI_DOWNLOAD>
    <clear EO_T_DATA>
    EndIF
    EndWhile.
    As soon as number of record exceed 200000 first file is saved, but after that next data call results in error.
    Error says "Database selection with invalid cursor".
    I suspect that this because of call to FM GUI_DOWNLOAD. While calling this FM after RSDRI_INFOPROV_READ causes system to commit and again the cursor is tried to open in next call casuing it to fail.
    But it is imperative for me to save data in file at regular intervals as data volume is huge.
    Any pointers in this direction will be helpful.

  • Database selection with invalid cursor !

    hi experts,
        When  execute SAP BW processchar, it occur some system error: (sm21)
    Database selection with invalid cursor
    The database interface was called by a cursor (in a FETCH or CLOSE
    cursor operation) that is not flagged as opened. This can occur if a
    COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
    opened cursors), followed by another attempt to access the cursor (for
    example, the next time the loop is executed).
    this error occur when apply bw support package 19.
    sap notes 1118584 Solution is: Import Support Package 17 . but my support package is 19.
    how can i solve this error?
    thanks,
    xwu.

    I am only assuming things, but it might be worth to look closely if you were experiencing an ORA- error during the execution. This could have caused a rollback and thus closed the cursor. Please check the job log, the workprocess trace (dev_wX file) and the system log SM21 and ST22 as well.
    Besides that check the oracle alertlog and the usertrace destination.
    Best regards, Michael

  • Issue to load data from database to XML file. error: ODI-40768

    Hi,
    While I am trying to load data from database to XML following error is appearing.
    ODI-1228: Task TEST_XML_DATA (Integration) fails on the target XML connection MyLOCALXSD.
    Caused By: java.sql.SQLException: ODI-40768: Could not save the file <default>:C:\DATA_FILE\www.xml because a class java.io.IOException occurred and said: The filename, directory name, or volume label syntax is incorrect
         at com.sunopsis.jdbc.driver.xml.SnpsXmlFile.writeToFile(SnpsXmlFile.java:751)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlConnection.internalExecute(SnpsXmlConnection.java:769)
         at com.sunopsis.jdbc.driver.xml.SnpsXmlPreparedStatement.execute(SnpsXmlPreparedStatement.java:46)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:166)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:540)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:83)
         at java.lang.Thread.run(Thread.java:662)
    jdbc url: jdbc:snps:xml?d=C:\test_xsd.xsd&s=TESTSQL&re=employeesX&ro=true
    physical schema: TESTSQL
    Knowledge modules are:
    LKM: LKM SQL to SQL
    IKM: IKM XML Control Append
    CKM: CKM SQL
    Parameters set are:
    CREATE_XML_FILE: true
    XML_PATH:<default>:C:\DATA_FILE\www.xml
    I have tried to change the directory path but error is still there.
    Could some one please help me to resolve the issue?
    Regards,
    user1672911

    Hi,
    The trouble in "<default>:"  - if you set XML_PATH as C:\DATA_FILE\www.xml instead  <default>:C:\DATA_FILE\www.xml- it will work correctly.
    Greetings,
    Eugene

  • Could not load data from database after adding a query

    Dear all,
    I have a working crystal reports 2011 report. This report get its data from a BW 7.01 system provided by three bex queries. Everything works as expected but not I have to add a fourth query to the report then I get the following messages:
    I try to translate it because I user the german version:
    INFORMATION: In this report a stored procedure is used. Ensure that no SQL expression was added and no grouping on server side will be done.
    WARNING: Data could not be load from the database.
    WANING: Invalid argument provided. Details: The key figure structure isn't a valid field for report generation. Use instead the real keyfigures with teir units.
    Has anyone an idea what can be the reason for my issue?
    Thanks and regards!

    hi Gerrit,
    a couple of questions...
    1) are you adding all 3 queries (and then the 4th) in the same data connection or are each of these additional queries in a subreport?
    2) if all 3 queries (and then the 4th) are in the same data connection are you linking them?
    3) most importantly, if you create a brand new report off of the 4th query, is it successful?
    it's been quite a while since I've worked with bex queries but in general adding multiple queries (or stored procs or commands or combinations thereof)  to the same report is probably not a good idea. there ends up being a lot of processing happening in the crystal reports designer itself as a large virtual record set is created by the individual queries.
    -jamie

  • How to load data into html:select using Struts ?

    How to load data into <html:select> using Struts ?
    I can not load an array or collection (static or dynamic data) into drop down list control by <html:select /> Struts.
    please use:
    <html:select >
    <html:options />
    </html:select >
    Please help me. please detail it. thanks a lot.
    Message was edited by:
    tranminhman

    In order to load a collection or array of data you can use <html:select> with <html: options collection="" name=""/>
    here collection attribute refers to the Arraylist or Array of data and name is the name of the Form bean.
    Hope this helps...
    Chaitanya V

  • Error "DATABASE PROBLEMS WITH TABLE MC11VA0HDRSETUP"

    Hi Friends,
    I got the following message when am trying to delete the setup tables.
    " Error DATABASE PROBLEMS WITH TABLE MC11VA0HDRSETUP"
    Am trying to delete the setup tables for application '11', but it gives me the above error. I have gone throug similar threads but it did not solve my issue.
    Please can anyone provide a solution.
    system detials:
    R/3 release    - 4.6c
    PI                 - 2004_1_46c
    SAP_BW      - 30B
    PI_BASIS     - 2003_1_620
    Any information will be appreciated
    Thanks,
    VBR

    Hi Kishor,
    Thanks for your reply.
    I have gone through that SAP Note 456102 and it was not of much help for our issue because we are ahead of PI that is mentioned in the note.
    Can you send your email id so that i can forward the error screenshots.
    Regards,
    VBR

  • Select data from database tables with high performance

    hi all,
    how to select data from different database tables with high performance.
    im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
    hw to increase the performance.
    kindly, reply.
    thnks

    Also Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
    also Dont use select endselect.
    if possible use up to n rows claus....
    taht will limit the data base hits.
    also dont run select in siode any loops.
    i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD.

  • Need help with **** Invalid Cursor State ****

    Hi,
    can someone tell me why am i getting this error....
    //******java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    Any help is greatly appreciated.....
    Thanks in advance.
    //***********this is the output on servlet side**************//
    Starting service Tomcat-Standalone
    Apache Tomcat/4.0.3
    Starting service Tomcat-Apache
    Apache Tomcat/4.0.3
    init
    DBServlet init: Start
    DataAccessor init: Start
    Accessor init: Loading Database Driver: sun.jdbc.odbc.JdbcOdbcDriver
    DataAccessor init: Getting a connection to - jdbc:odbc:SCANODBC
    username SYSDBA
    password masterkey
    DataAccessor init: Preparing searchPolicy
    DataAccessor init: Prepared policySearch
    DataAccessor init: Prepared ssnSearch
    DataAccessor init: End
    After the myDataAccessor
    Database Connection...
    in doGet(...)
    SSSSSSSGetpolicynumber
    In GetPolicyInformation
    b05015195
    Getting Policy Informaton for = b05015195
    okay, building vector for policy
    in GetPolicyInformation for = b05015195
    starting query... policy Information
    finishing query... Policy Information
    Inside the while(next) loop
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    sun.jdbc.odbc.JdbcOdbcResultSet@4db06e
    b05015195
    policy information constructor with resultset
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3266)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:
    5398)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:326)
    at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:383)
    at viewscreenappletservlet.policyinformation.<init>(policyinformation.ja
    va:56)
    at viewscreenappletservlet.DatabaseAccessor.getPolicyInformation(Databas
    eAccessor.java:145)
    at viewscreenappletservlet.Servlet.policyDisplay(Servlet.java:108)
    at viewscreenappletservlet.Servlet.doGet(Servlet.java:91)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
    et.java:446)
    at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
    :180)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:213)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:475)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:
    2343)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatche
    rValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
    468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
    .java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
    a:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
    r.java:1012)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
    va:1107)
    at java.lang.Thread.run(Thread.java:484)
    result set closed
    1
    sending response
    Sending policy vector to applet...
    Data transmission complete.

    1) JDBC-ODBC driver is buggy
    2) Some drivers (truly speaking most of them) doesn't
    support cursors or supports them in a wrong way
    Paul

  • (Class cast Exception)Problem while loading data fro database in java class

    Dear all,
    Please help me...to solve this
    I have a database having two columns of String and Date Types.
    In my java code i was trying to load the data to a UI.
    I am successfull in loading the String type value.
    But while loading date field value,is showing Class cast Exception.
    What i am doing is Getting the values from database to a String[] array.
    So my question is how to
    get the Date field as date field itself,Then convert it to a String..Then put it in to String[] array...
    Any body please help...If any one want more clarification in question i will give......

    Hi,
    I am using GWT to display my data in a Grid.
    So it will accept a Single two dimensional String array....Here i have one as String and other as Date.
    So i was trying to get each row in a sindle dimensional array array[] then store it in a list.
    Iteration goes up to 10 rows.After i am setting it in to a list
    ie list.add(array);
    Now while returning this list i am doing this
    "return (String[][])list.toArray(new String[0][]);"
    When i tried to get the date element to String array it is showing class cast exception. When i tried with toString() method it is showing the same problem.

  • Sql loader - loading data into database problem

    Hi,
    I am facing problem in loading data using ctl file and a data file into oracle db.
    The table I am entering has the following structure:
    CREATE TABLE "ENRCO07"."TEST"
    "NAME" VARCHAR2(50 BYTE),
    "MOD_DATE" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL ENABLE
    My ctl file has structure as:
    OPTIONS (DIRECT=FALSE, ERRORS=1000)
    LOAD DATA
    APPEND
    INTO TABLE TEST
    truncate
    FIELDS TERMINATED BY ";"
    TRAILING NULLCOLS
    NAME,
    MOD_DATE DATE 'YYYYMMDDHH24MISS'
    I tried a lot with MOD_DATE format since it was showing the error null cannot be inserted and other errors were also encountered.
    My problem statement is :
    I want the default date as current_timestamp in the format "'YYYYMMDDHH24MISS" else the date that comes from the data file to be loaded into oracle db.
    I can't alter the DDL only ctl can be altered to get to the solution.
    I am new to this , kindly help.
    Thanks
    Abhinav

    Thanks for the reply but
    still the problem is
    if my data file has records as:
    abhi1;20120416151900
    abhi2;20120417151700
    abhi3;
    abhi4;20120416151900
    and the ctl as:
    OPTIONS (DIRECT=FALSE, ERRORS=1000)
    LOAD DATA
    APPEND
    INTO TABLE TEST
    truncate
    FIELDS TERMINATED BY ";"
    TRAILING NULLCOLS
    USER_NAME CHAR NULLIF (USER_NAME=BLANKS),
    MOD_DATE DATE 'YYYYMMDDHH24MISS' NULLIF (MOD_DATE=BLANKS)
    The entered data in the db is:
    abhi1     16-APR-12
    abhi2     17-APR-12
    abhi4     16-APR-12
    the data with missing date is not loaded.
    Thanks

  • SAP Add On: How to load data from database to a matrix

    I am making a payroll application add-on for SAP Business One. I have made a form using screen painter and wanted to know how one goes about loading data from a database into the matrix columns.
    My matrix has 6 columns and have called the items;
    public void DeclareColumsInMonthlyMatrix()
                SAPbouiCOM.Item oItem = null;
                // Adding the Monthlymatrix Elements
                oItem = _form.Items.Item("matMonthly");
                oMatrix = oItem.Specific;
                oColumns = oMatrix.Columns;
                oColumn = oColumns.Item("mPayYear");
                oColumn = oColumns.Item("mMonth");
                oColumn = oColumns.Item("mStartDate");
                oColumn = oColumns.Item("mEndDate");
                oColumn = oColumns.Item("mPayStatus");
                oColumn = oColumns.Item("mTaxMethod");
    I have retrieved the appropriate data from the database using LinQ to SQL and I have:
    // Populate the Monthly Period Data Grid View           
        var monthlyPeriods = Program.Kernel.Get<IMonthlyPeriodService>().GetAllMonthlyPeriods();
        monthlyPeriods = monthlyPeriods.OrderBy(x => Enum.Parse(typeof(MonthsOfAYear), x.Code, true));
    The corresponding field names in the database for the 6 columns are:
    U_Payroll_Year,
        U_Month,
        U_Starting_date,
        U_Ending_date,
        U_Pay_Process_Status,
        U_Tax_Method
    I was previously using C# .Net win forms and was using a datagrid and bindingsource which was easy by using the code
    // Populate the Monthly Period Data Grid View           
        var monthlyPeriods = Program.Kernel.Get<IMonthlyPeriodService>().GetAllMonthlyPeriods();
        monthlyPeriods = monthlyPeriods.OrderBy(x => Enum.Parse(typeof(MonthsOfAYear), x.Code, true));
        monthlyPeriodBindingSource.DataSource = monthlyPeriods.ToList();
    How do I achieve the same in SAP? How do I get the returned results from monthlyperiods to map over the appropriate columns in my matrix?

    Hi Nor,
    you could build a function which is able to generate a list of koordinates from your geometry.
    The file generated will be a character-separated list.
    This list will be generated by using a simple select statement like this:
    <font color="FFFF00">
    select obj_id, mysdo_koo2list(geometry) from my_geotable where ... ;
    </font>
    the function mysdo_koo2list(..) have to be built by you first.
    <em>create function mysdo_koo2list ( gc sdo_geometry) return varchar2 as
    line varchar2(4000);
    n number;
    ordinate number;
    begin
    line:= ''; n := 0;
    for ordinate in gc.sdo_ordinates.FIRST .. geom.sdo_ordinates.LAST
    loop
    line := line||to_char(geom.sdo_ordinates(ordinate), '9999999D999');
    if ( mod(n,2) = 1 ) then
    line := line||chr(10);
    else
    line := line||',';
    end if;
    n := n +1 ;
    -- exit when n >330;
    end loop;
    return (line);
    end;
    </em>

  • IKM File to Hive (Load Data) error

    I use Odi version 11.1.1.6 .
    I need to trasfer a csv file from Hdfs to a Hive table.
    My csv file is  located into HDFS path: /user/oracle/inboxlog
    My physical architecture is so set:
    - File :
         Dataserver:
              Name : HDFSFILE
              jdbc Driver: empty
              jdbc Url: hdfs://mynode:8020
         Physical Schema:
              Directory Schema: /user/oracle/inboxlog
              Directory WorkSchema: /user/oracle/inboxlog
              Context: HADOOP
              Logical Schema: LogicalHdfs
    - Hive:
         Dataserver:
              Name : NEW_HIVE
              jdbc Driver: org.apache.hadoop.hive.jdbc.HiveDriver
              jdbc Url: jdbc:hive://mynode:10000/default
              hive metastore uri: thrift://mynode:10000
         Physical Schema:
              Directory Schema: default
              Directory WorkSchema: default
              Context: HADOOP
              Logical Schema: NEW_HIVE_LOGICAL
    My logical architecture is so set:
    -File:
         Name: LogicalHdfs
         Context: HADOOP
         Physical Schema: HDFSFILE./user/oracle/inboxlog
    -Hive:
         Name: NEW_HIVE_LOGICAL
         Context: HADOOP
         Physical Schema: NEW_HIVE.default
    I created an interface in which I use as the source csv file and how to target a hive table.
    The source file is defined in a datastore so that:
      name: myfile.csv
      resource name : myfile.csv
      datastore type: table
      file format : delimited
      record separator: unix
      field separator: ,
      text delimited: "
    and it has 5 columns string type.
    the target hive table is definited in a datastore:
      name: mytable
      resource name : mytable
      datastore type: table
    and it has the same column of the myfile.csv
    I use for the interface the IKM file to hive (load Data) with this parameter:
      create target table: true;
      truncate :true;
      file is local: false;
      use staging table: false
    the remaining parameters are set to default.
    when I start the interface it snaps to the third step with the following error:
    org.apache.bsf.BSFException: exception from Groovy: java.sql.SQLException: Exception encountered while submitting:
    load data  inpath 'hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv' overwrite
    into table mytable
    Query returned non-zero code: 10028, cause: FAILED: SemanticException [Error 10028]: Line 1:18 Path is not legal ''hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv'': Move from: hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv to: hdfs://bdavm-ns/user/hive/warehouse/myfile is not valid. Please check that values for params "default.fs.name" and "hive.metastore.warehouse.dir" do not conflict.
      at org.codehaus.groovy.bsf.GroovyEngine.exec(GroovyEngine.java:110)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.execInBSFEngine(SnpScriptingInterpretor.java:322)
      at com.sunopsis.dwg.codeinterpretor.SnpScriptingInterpretor.exec(SnpScriptingInterpretor.java:170)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.scripting(SnpSessTaskSql.java:2472)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:47)
      at oracle.odi.runtime.agent.execution.cmd.ScriptingExecutor.execute(ScriptingExecutor.java:1)
      at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
      at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
      at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
      at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
      at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
      at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
      at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
      at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
      at java.lang.Thread.run(Thread.java:662)
    Caused by: java.sql.SQLException: Exception encountered while submitting:
    load data  inpath 'hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv' overwrite
    into table mytable
    Query returned non-zero code: 10028, cause: FAILED: SemanticException [Error 10028]: Line 1:18 Path is not legal ''hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv'': Move from: hdfs://mynode:8020/user/oracle/inboxlog/myfile.csv to: hdfs://bdavm-ns/user/hive/warehouse/mytable is not valid. Please check that values for params "default.fs.name" and "hive.metastore.warehouse.dir" do not conflict.
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:107)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:192)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:200)
      at flexUtilHive.executeQuery(Prepare_Hive_session:53)
      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 org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:246)
      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:63)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
      at Load_data_file_s_.run(Load_data_file_s_:113)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:576)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:614)
      at groovy.lang.GroovyShell.evaluate(GroovyShell.java:595)
      at org.codehaus.groovy.bsf.GroovyEngine.exec(GroovyEngine.java:108)
      ... 19 more
    any idea?

    Hi all,
    for those who are interested, I solved the problem below , it was file permissions of the loaded file.
    Hive moves the input file from its original path to its warehouse directory.
    In order to move the file, the agent needs write permissions on HDFS input directory. When I gave the permission, it was solved.
    Regards...

Maybe you are looking for

  • Album artwork not displaying on iPhone 5 iOS 6.0.2

    I recently took the plunge from Android and got myself an iPhone 5. One thing that's driving me nuts is album artwork in my music library. I have two problems not all albums will display artwork on the phone despite being present in iTunes and WMP/Me

  • Customer Number in Assignment Field while doing MIGO 453

    Hi , In the Sales Return Process , we take the Goods in by 651 Standard. When this Return Stock is being transferred to unrestricted by MIGO 453, I am not able to establish any link betwee the Original Customer & this Stock which is being transferred

  • How do I save videos from my stream to my camera roll?

    I'm trying to make an iMovie, and my friend shared a video with me on an iCloud sharing stream, but I can't figure out how to download it/ save it so I can include it in my movie. Help?

  • HP 3520 All in One Printer. Print head not moving

    Hello my Printer has a serious problem. The print head was slamming to the right side, and now it totally does not move. My printer may be past warrently or voided because it was opened up to clean up a bad ink spill inside at one point. It worked fo

  • Translating Web Dynpro Standard Components texts ?

    Hello I am testing NWDW 7.0 SP3 and i want to make a Web application in my own language (Serbian, Serbo - Croatian). I have found a lot of documentation about creating international Web Dynpro applications where developers can translate their own tex