oracle-databasejdbcxmltypetibco-business-works

Tibco SQL Direct Query: JDBC error reported: (SQLState = ) - "This is not a valid SQL type: 2009


I am using Tibco BW 5.14 and Oracle 19c I have Oracle table that has XMLType column. I use native oracle jdbc driver 12.1.0.2.0 for database connection.

When I run query

Select XMLTYPE_column from table 

as SQL direct activity getting the error

<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:ErrorReport xmlns:ns0 = "http://www.tibco.com/pe/EngineTypes">
    <StackTrace>Job-7000 Error in [Processes/metrics_PROD.process/SQL Direct]
"JDBC error reported: (SQLState = ) - "This is not a valid SQL type: 2009""
    at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
    at com.tibco.pe.plugin.Activity.eval(Unknown Source)
    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
    at com.tibco.pe.core.Job.a(Unknown Source)
    at com.tibco.pe.core.Job.k(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
caused by: "This is not a valid SQL type: 2009"
    at com.tibco.plugin.jdbc.JDBCCommon.sqlTypeToSmType(Unknown Source)
    at com.tibco.plugin.jdbc.JDBCCommon.sqlTypeToSmType(Unknown Source)
    at com.tibco.plugin.jdbc.JDBCGeneralActivity.evalGeneralStatement(Unknown Source)
    at com.tibco.plugin.jdbc.JDBCGeneralActivity.performDatabaseOperation(Unknown Source)
    at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
    at com.tibco.pe.plugin.Activity.eval(Unknown Source)
    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
    at com.tibco.pe.core.Job.a(Unknown Source)
    at com.tibco.pe.core.Job.k(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
    </StackTrace>
    <Msg>"JDBC error reported: (SQLState = ) - "This is not a valid SQL type: 2009""</Msg>
    <FullClass>com.tibco.plugin.jdbc.JDBCSQLException</FullClass>
    <Class>JDBCSQLException</Class>
    <ProcessStack>Processes/metrics_PROD.process/SQL Direct</ProcessStack>
    <MsgCode>BW-JDBC-100004</MsgCode>
    <Data>
        <ns1:JDBCSQLException xmlns:ns1 = "http://schemas.tibco.com/bw/plugins/jdbc/5.0/jdbcExceptions">
            <msg>"JDBC error reported: (SQLState = ) - "This is not a valid SQL type: 2009""</msg>
            <msgCode>BW-JDBC-100004</msgCode>
            <sqlState/>
            <detailStr>"This is not a valid SQL type: 2009"</detailStr>
        </ns1:JDBCSQLException>
    </Data>
</ns0:ErrorReport>

also doesn't work with Tibco oracle driver.

    <StackTrace>Job-48000 Error in [Processes/Process Definition.process/JDBC Query]
"JDBC error reported: (SQLState = HY000) - java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][Oracle]ORA-22275: invalid LOB locator specified
"
    at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
    at com.tibco.pe.plugin.Activity.eval(Unknown Source)
    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
    at com.tibco.pe.core.Job.a(Unknown Source)
    at com.tibco.pe.core.Job.k(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
caused by: java.sql.SQLException: [tibcosoftwareinc][Oracle JDBC Driver][Oracle]ORA-22275: invalid LOB locator specified

Solution

  • I resolved the problem using solution provided in I am trying to extract an XMLTYPE column from an Oracle table using JDBC and having some issues

    replaced query to

    Select EXTRACT(XMLTYPE_column,'.').getClobVal()  from table
    

    enter image description here

    Please note that CLOB tibco type can be used for inserting to XML_TYPE column using XMLType(?)

    example

    insert into EXAMPLE_TABLE (ID, XMLTYPE_COLUMN)
    values (?, XMLType(?))
    

    enter image description here