IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

JDBC Adapter Service and large CLOBs

  • 1.  JDBC Adapter Service and large CLOBs

    Posted Tue February 08, 2005 04:47 PM

    Hi all,

    When creating an JDBC insert service to populate a CLOB column in a database, I receive the following error message when attempting to insert a string more than 4000 characters in length:

    ORA-01400: cannot insert NULL into (“schema”, “table”, “clob_column”)

    If I repeat the same test with a string less than 4000 characters in length the insert is succesful. The input field type is set to String and the JDBC type is CLOB.

    I presume this is a webMethods bug. I know that the maximum length for a column is 4000 characters in Oracle, but the same insert works in a Java service. Which is the obvious workaround.

    My question is whether this is a known bug or if I doing something wrong?

    Thanks.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 2.  RE: JDBC Adapter Service and large CLOBs

    Posted Tue February 08, 2005 05:46 PM

    Not a webMethods bug but a limitation of the Oracle driver you are using I suspect. Which version are you using?

    Oracle 8.1.x and 9i have limitations on the thin type 4 drivers fro blob and clob size. The oracle 10g driver removed the limitation. You have a lot choices for getting around this though.

    You can…Use the oracle OCI driver instead of the thin type 4 driver. You can upgrade your oracle driver to 10g. You can write a java service and stream in the clob via a stored procedure.

    markg
    http://darth.homelinux.net


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 3.  RE: JDBC Adapter Service and large CLOBs

    Posted Tue February 08, 2005 09:00 PM

    When you HAVE to insert a null into a CLOB column, instead of NULL use EMPTY_CLOB(). The SQL statement goes like this (I think you can modify the adapter service to do something similar).

      INSERT INTO SAMPLE_TABLE 
    (SMAPLE_id, 
    SAMPLE_clob) 
    VALUES      (1234, 
    EMPTY_CLOB());
    

    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 4.  RE: JDBC Adapter Service and large CLOBs

    Posted Wed February 09, 2005 09:59 AM

    I am using Oracle 9i. I will use a Java service to work around the problem. I was just wondering if it was possible with a JDBC adapter service.

    Thanks for your replies.


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 5.  RE: JDBC Adapter Service and large CLOBs

    Posted Wed February 23, 2005 01:45 PM

    Hi qwerty,

    Try using JDBC Oracle OCI driver for CLOBs greater than 4k. While configuring jdbc connection with OCI driver , give the driverType has oci8 for Oracle 8i and oci for Oracle 9i.

    Regards,
    Venkat.


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 6.  RE: JDBC Adapter Service and large CLOBs

    Posted Fri March 04, 2005 04:10 PM

    Just to confirm, switching from the “thin” driver to “oci” worked for me.

    Thanks Venkat.


    #Integration-Server-and-ESB
    #webMethods
    #Adapters-and-E-Standards


  • 7.  RE: JDBC Adapter Service and large CLOBs

    Posted Fri March 04, 2005 04:21 PM


  • 8.  RE: JDBC Adapter Service and large CLOBs

    Posted Fri March 04, 2005 07:49 PM

    Is there a way to access the JDBC adapter connection pool defined in wM from your Java code ?
    The idea is to save the work of creating and managing a JDBC pool and use what wM already (if) offers.
    Will really appreciate some help on this.
    SPG


    #webMethods
    #Adapters-and-E-Standards
    #Integration-Server-and-ESB


  • 9.  RE: JDBC Adapter Service and large CLOBs

    Posted Mon March 07, 2005 10:43 AM

    Hi shubhro,

    I don’t think this is possible. It is possible to define DB connection parameters in the WmDB package, and then access these from your Java code.


    #Adapters-and-E-Standards
    #Integration-Server-and-ESB
    #webMethods


  • 10.  RE: JDBC Adapter Service and large CLOBs

    Posted Thu February 16, 2006 09:01 PM

    I am trying to fetch data from a table which has a CLOB column. I can fetch the data from all columns correctly but the data from CLOB column comes as NULL , though I have data in it.

    Pls let me know if you have any suggestions.

    Thanks
    Vij


    #webMethods
    #Integration-Server-and-ESB
    #Adapters-and-E-Standards


  • 11.  RE: JDBC Adapter Service and large CLOBs

    Posted Thu February 16, 2006 11:17 PM

    What is the jdbc field type in your select?Is it object type?


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB


  • 12.  RE: JDBC Adapter Service and large CLOBs

    Posted Thu March 02, 2006 06:05 AM

    Hi,

    Please refer to my post:
    [url]wmusers.com

    regards,
    Sumit


    #Adapters-and-E-Standards
    #webMethods
    #Integration-Server-and-ESB