Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: OAS + JServlets + BLOBS

Re: OAS + JServlets + BLOBS

From: Hyper B Orean <hyper.b.orean_at_autonomous.org>
Date: 2000/04/12
Message-ID: <38f45810@news>#1/1

Andreas

We are having the same type of problem with writing CLOBS in OAS 4.0.8.1 on NT with a Jservlet. We can *read* CLOB from database OK but can't write the CLOB .. we get error message saying to effect, we didn't lock the table before writing the CLOB data. This appears to only occur if we try to commit or close the transaction, or flush or close the output or input streams to the LOB.

Oracle support previsouly told us to use the oci jdbc driver but we've never made this successfully work; the oci8 driver can't seem to find the TNSNAMES.ORA even tho' we've added the necesarry entry to the registry etc, and OAS (plus SQLPLUS etc) itself can see the entry in the TNSNAMES.ORA. But, Oracle support said that the thin driver wouldn't support reading either which is untrue, as it seems to work ok.

CLOBs and BLOBs are quite different from handling VARCHARs and other data types; to write you have to insert table with empty clob and then retrieve a handle (the clob pointer) and then get its outputstream and stream the bytes into this outputstream. well at least in theory; because this is where we have the problem with the complaining about the record locking. have you looked at the examples in the Oracle 8i Java developer's Guide (found on technet)? I am going to get our DBA to tell us more about record locking tomorrow, in case there's some SQL we can use to overcome the problem; otherwise if you have had success these past two weeks since you posted your message please do share. ;-)

regs
hbo

Andreas Geppert <geppert_at_ifi.unizh.ch> wrote in message news:38E45363.91AE8DA1_at_ifi.unizh.ch...
> Has anybody experience in writing (and running!) Jservlets reading lobs
> (blobs) from an
> Oracle8 database via OAS (on Solaris)? We have tried to do that in a
> servlet, but it seems
> that Oracle's JDBC-driver can't handle blobs (or even long varchars).
> Apparently, the
> servlet never makes it beyond the executeQuery-call.
>
> Any help is highly appreciated!
> --Andy
>
> -----------------------------------------------------------
> Andreas Geppert
>
> Email: geppert_at_ifi.unizh.ch or geppert_at_acm.org
> Web: http://www.ifi.unizh.ch/~geppert/
> Phone: +41-1-635 4576
> Fax: +41-1-635 6809
> Mail: Institut f. Informatik
> Universitaet Zuerich
> Winterthurerstr. 190
> CH-8057 Zuerich
> Switzerland
> -----------------------------------------------------------
>
>
Received on Wed Apr 12 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US