how to Insert XML Data in the CLOB Filed in DB Table

Hi!

i am getting the Document to the flow service ,i convert to xmldata using documentToString flow service i need to insert this xml data in tha CLOB Filed of DB table,i have create the insertORDER_TRANSFER_REQUEST Adapter service,given inputfiledtype is java.lang.string Name XMLSErviceOrder to the CLOB ColumnType

i called the this adapter service in the flow service passing xml data to the CLOB filed

i am getting below error while inserting

[ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service COLTOrderSubmission.common.adapter.services:insertServiceOrderORDER_TRANSFER_REQUEST.
[ADA.1.316] Cannot execute the SQL statement “INSERT INTO ORDER_TRANSFER_REQUEST(ORDERNUMBER, ORDERITEMNUMBER, XMLSERVICEORDER, PROCESSSTATUS, ORDERTYPE, SERVICETYPE, INSERTEDDATE, MODIFYDATE, ERROR) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)”. "
(72000/1461) ORA-01461: can bind a LONG value only for insert into a LONG column
"
ORA-01461: can bind a LONG value only for insert into a LONG column

can anybody help me to insert the XML Data in CLOB filed…

One of the other columns is an Oracle long data type and you are not mapping a long value to it. Nothing to do with your XML string and CLOB as far as I can tell.

Suggest getting the SQL statement to work in the SQL editor of your choice then working with the JDBC adapter service to make it do the same.

Mark

Hi Mark Carlson !

Thanx for reply,i have tried to insert the other fileds without mapping XML Data String to the CLOB filed of DB Table,all recods are inserted suceessfully,if i map the XML Data String to the CLOB Filed of DB Table ,given above Error…

My database is oracle 9i,in connection OtherProperties Given deriverType=Thin
any body help to insert the XML Data In CLOB Filed of DB Table,XML data is Dynamic Generated in flow service calling insert Adapter service to insert the Data. below is the Error Occured while insertion

 com.wm.pkg.art.error.DetailedServiceException: [ART.117.4002] Adapter Runtime (Adapter Service): Unable to invoke adapter service COLTOrderSubmission.common.adapter.services:insertServiceOrderORDER_TRANSFER_REQUEST.
[ADA.1.316] Cannot execute the SQL statement "INSERT INTO  ORDER_TRANSFER_REQUEST(ORDERNUMBER, ORDERITEMNUMBER, XMLSERVICEORDER, PROCESSSTATUS, ORDERTYPE, SERVICETYPE, INSERTEDDATE, MODIFYDATE, ERROR) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)". "
(72000/1461) ORA-01461: can bind a LONG value only for insert into a LONG column
"
ORA-01461: can bind a LONG value only for insert into a LONG column

    at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:125)
    at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:116)
    at com.wm.pkg.art.error.DetailedServiceException.create(DetailedServiceException.java:103)
    at com.wm.pkg.art.ns.AdapterServiceNode.invokeService(AdapterServiceNode.java:649)
    at com.wm.pkg.art.ns.ARTNSService.baseInvoke(ARTNSService.java:47)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:351)
    at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:153)
    at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
    at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:577)
    at com.wm.lang.flow.FlowState.stepIncremental(FlowState.java:491)
    at com.wm.lang.flow.FlowState.invoke(FlowState.java:373)
    at wm.server.flowimpl.stepFlow(flowimpl.java:183)
    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:324)
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:294)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:351)
    at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
    at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:167)
    at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:204)
    at com.wm.util.pool.PooledThread.run(PooledThread.java:105)
    at java.lang.Thread.run(Thread.java:534)

try setting driverType=oci is supported for inserting bluck CLOB objects to DB.

Also check this thread.

http://wmusers.com/forum/showthread.php?t=11329&highlight=clob

HTH
RMG

thanx for reply rmg,got the solution by replacing oracle 10g classess12.jar drivers in integration\lib\jars,i can inert now more than 4 kb vth Thin drivers only for oracle 9i database …