Long --- clob conversion ...(oracle 8i)
Can anyone tell me how to load data (by PLSQL procedure) from a long datatype (up than 32k) from one table into another table which contains a clob datatype? .
I use Oracle 8i.
Thanks.
It can be done using UPDATEXML.
SQL> with rec as (
Select Xmltype(
2 3 ' <ADDRESSES>
4 <ADDRESS>
5 <TYPE>Ship To</TYPE>
6 <SWADDRESS1>ABC 5</SWADDRESS1>
7 <SWADDRESS2/>
8 <SWADDRESS3/>
9 <SWADDRESS4/>
10 <SWADDRESS5/>
11 <SWCITY>AA</SWCITY>
12 <SWCOUNTY/>
13 <SWCOUNTRY>22</SWCOUNTRY>
14 <SWPROVINCE>.</SWPROVINCE>
15 <SWMAILSTOP/>
16 <SWNOTE/>
17 <SWPOBOX/>
18 <SWSTATE>.</SWSTATE>
19 <SWZIP>50197</SWZIP>
20 <SWDEFAULT/>
21 <SWSTREETNUM/>
22 </ADDRESS>
23 </ADDRESSES>') xml
24 From Dual)
25 select updatexml (xml,'//SWCOUNTRY/text()','INDIA') new_xml from rec;
NEW_XML
<ADDRESSES>
<ADDRESS>
<TYPE>Ship To</TYPE>
<SWADDRESS1>ABC 5</SWADDRESS1>
<SWADDRESS2/>
<SWADDRESS3/>
<SWADDRESS4/>
<SWADDRESS5/>
<SWCITY>AA</SWCITY>
<SWCOUNTY/>
<SWCOUNTRY>INDIA</SWCOUNTRY>
<SWPROVINCE>.</SWPROVINCE>
<SWMAILSTOP/>
<SWNOTE/>
<SWPOBOX/>
<SWSTATE>.</SWSTATE>
<SWZIP>50197</SWZIP>
<SWDEFAULT/>
<SWSTREETNUM/>
</ADDRESS>
</ADDRESSES>
SQL>But I am not sure whether UPDATEXML function is available in Oracle 8i .
Similar Messages
-
PROBLEM DESCRIPTION :
When I try to read a clob from Oracle, I receive "ORA-03120: two-task
conversion routine: integer overflow" Error.
This error occurs only for CLOB Type and only if I try to connect to
Oracle using WebLogic JDriver/Oracle POOL.
IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
connection to ORacle with out any problem.
Below Please find the JAVA CODE for Both Working and NON Working .
Created a Connection Pool as:
Name: MyJDBCConnectionPool
URL : jdbc:weblogic:oracle
DIRVER:weblogic.jdbc.oci.Driver
NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
Driver myDriver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection mconn =
myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
Driver myDriver =
(Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection mconn =
myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
ERROR MESSAGE:
ORA-03120: two-task conversion routine: integer overflow
I appreciate your help on this problem.PROBLEM DESCRIPTION :
When I try to read a clob from Oracle, I receive "ORA-03120: two-task
conversion routine: integer overflow" Error.
This error occurs only for CLOB Type and only if I try to connect to
Oracle using WebLogic JDriver/Oracle POOL.
IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
connection to ORacle with out any problem.
Below Please find the JAVA CODE for Both Working and NON Working .
Created a Connection Pool as:
Name: MyJDBCConnectionPool
URL : jdbc:weblogic:oracle
DIRVER:weblogic.jdbc.oci.Driver
NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
Driver myDriver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection mconn =
myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
Driver myDriver =
(Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection mconn =
myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
ERROR MESSAGE:
ORA-03120: two-task conversion routine: integer overflow
I appreciate your help on this problem. -
PJC to input formatted text into a long/clob field
Hi,
Is there a PJC that can be used to stored formatted text into a LONG/CLOB column in the database (Something similar to the Message field while posting a new thread in this forum). I am using Oracle Forms 10G (9.0.4)
I would also like to print this formatted text using Oracle Reports 10G (9.0.4).
Thx in Advance
Best Rgds
RamdasHello<br><br>
Have a look at this new forum, and particulary this article that shows how to create an editable styled text area.<br><br>
Francois -
How can I get the content of clob in oracle db?
In jsp,if I want to get the characters from CLOB column in ORACLE DataBase,what should I do?
I am waiting for the answer hurrily.Thank you!import these two classes:
import oracle.sql.CLOB;
import oracle.jdbc.driver.OracleResultSet;To retrieve the clob, use
ResultSet rs;
get the rs from database
int i = 1; // this is the column Index in the rs
CLOB cl = ((OracleResultSet)rs).getCLOB(i);
int len = (int)cl.length();
String str = cl.getSubString(1,len); -
Streaming data to LONG columns in Oracle 7.3.2.3.0
I am trying to stream data to a LONG column. I'm using Oracle
Server 7.3.2.3.0 on AIX and JDBC driver 8.0.4 on Windows NT 4
SP5.
I include sample tables/programs at the end, but here's the
summary of what's happening:
I'm creating a byte array of length 2500. If I use
setAsciiStream I get the following exception when I execute the
prepared statement:
java.sql.SQLException: Data size bigger than max size for this
type
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.ttc7.TTCItem.setArrayData(TTCItem.java)
at oracle.jdbc.driver.OraclePreparedStatement.setItem
(OraclePreparedStat
ement.java)
at
oracle.jdbc.driver.OraclePreparedStatement.setAsciiStream
(OraclePrepa
redStatement.java)
at TestOracle.main(TestOracle.java:26)
If I use setBinaryStream I get this exception:
java.sql.SQLException: ORA-01461: can bind a LONG value only for
insert into a LONG column
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7
(TTC7Protocol.java)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch
(TTC7Protocol.java)
at oracle.jdbc.driver.OracleStatement.doExecuteOther
(OracleStatement.jav
a)
at oracle.jdbc.driver.OracleStatement.doExecuteWithBatch
(OracleStatement
.java)
at oracle.jdbc.driver.OracleStatement.doExecute
(OracleStatement.java)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout
(OracleStateme
nt.java)
at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate
(OraclePrepar
edStatement.java)
at oracle.jdbc.driver.OraclePreparedStatement.execute
(OraclePreparedStat
ement.java)
at TestOracle.main(TestOracle.java:27)
My Oracle7 manual states that LONG columns can store 2GB of text.
I tried the above with LONG RAW columns and it worked fine.
Can anyone explain why I get this error? I've tried it with
different sizes and when the data is <2000 bytes it works fine
for LONG columns.
My table is simple:
create table TestLongs (key INTEGER PRIMARY KEY, data LONG);
My Java code is also very simple:
public class TestOracle
public static void main(String[] args)
Connection con = null;
PreparedStatement pstmt = null;
try
Class.forName("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection(
"jdbc:oracle:thin:@itchy:1526:test",
"System", "<OMITTED>");
byte[] data = new byte[2500];
for (int i=0; i< 2500; i++)
data[i] = 53;
String sql = "INSERT INTO TestLongs (key, data)
VALUES(1, ?)";
pstmt = con.prepareStatement(sql);
ByteArrayInputStream bis = new ByteArrayInputStream
(data);
pstmt.setAsciiStream(1, bis, data.length);
pstmt.execute();
catch (SQLException e)
System.err.println("An error occurred with the
database: " + e);
e.printStackTrace();
catch (Exception e)
System.err.println("Oracle JDBC driver not found." +
e);
e.printStackTrace();
finally
try
if (pstmt != null)
pstmt.close();
if (con != null)
con.close();
catch (SQLException e)
System.err.println("Unable to close
statement/connection.");
nullRobert Greig (guest) wrote:
: I am trying to stream data to a LONG column. I'm using Oracle
: Server 7.3.2.3.0 on AIX and JDBC driver 8.0.4 on Windows NT 4
: SP5.
I tried it with the old 7.3.x JDBC driver and it works fine. I
also noticed after further testing that it sometimes worked
with the 8.0.4 driver. Looks like a bug in the 8.0.4 driver or
some wacky incompatibility.
null -
Converting Varchar into Clob in Oracle 8i
Hi All,
Kindly tell me how can we convert a varchar variable into a Clob in Oracle 8i inside a stored procedure. I searched alot on the net, we have a To_Clob function available from 9i but doesn't exist in 8i. There was also talk about using dbms_lob, but i dont know how to use that to convert it.
Kindly provide me with the details of how to do this as I am just starting out with Oracle.
Thanks in Advance,
Sajid.Hi,
You can use the dbms_lob.to_clob() function(In oracle8i).
In oracle 9i it is not required.
Thanks & Regards
venkata -
From the research i've done, it seems that there are two ways to access CLOBs in Oracle 8i: InputStream or Reader.
The InputStream method uses byte streams and the Reader uses character streams.
Is that correct? I haven't been able to determine the pros/cons of the two approaches. Can anyone shed some light on this for me?Jack Shirazi claims in his book, "Java Performance Tuning", that in most situations Readers provide better performance than InputStreams.
Read the section, "From Raw I/O to Smokin' I/O", in Chapter 8 for details. -
Insert CLOB into oracle under weblogic
Situation: running my servlet under weblogic, want to insert more than 4000 characters into CLOB of oracle 8.1.7
Problem: cannot be done by using code which is able to do it under tomcat
i use this code in tomcat:
import java.sql.*;
import oracle.sql.CLOB;
import oracle.jdbc.driver.OracleResultSet;
con.setAutoCommit(false);
Statement stmt = con.createStatement();
rs = stmt.executeQuery("SELECT clob_field FROM table where rid=id FOR UPDATE");
rs.next();
CLOB clob = ((OracleResultSet)rs).getCLOB(1);
Writer writer = clob.getCharacterOutputStream();
writer.write(dataString);
writer.close()l
con.commit();
con.setAutoCommit(true);
stmt.close();
after that i know that i can't use API of oracle when i'm using weblogic (e.g. oracle.sql.CLOB)
and i find this code from other user:
import weblogic.jdbc.vendor.oracle.OracleThinClob;
import java.io.*;
import java.sql.*;
PreparedStatement stmt = con.prepareStatement ( "INSERT INTO database VALUES ( ?, EMPTY_CLOB() )" );
stmt.setInt ( 1, 1 );
// inserts a new entry with an empty clob object
stmt.executeUpdate ();
if ( stmt != null )
stmt.close();
// retrieves CLOB-Object
stmt = con.prepareStatement ( "SELECT clob_field FROM database WHERE id=?" );
stmt.setInt ( 1, 1 );
ResultSet rs = stmt.executeQuery ( );
if ( rs.next() )
Clob cl = rs.getClob(1);
Writer clobWriter = ((OracleThinClob)cl).getCharacterOutputStream();
// Open the sample file as a stream for insertion into the Clob column
File testFile = new File ( "file.txt" );
FileReader testReader = new FileReader ( testFile );
// buffer to hold data to being written to the clob.
char[] cBuffer = new char[((OracleThinClob)cl).getBufferSize()];
// Read data from file, write it to clob
int iRead = 0;
while( (iRead= testReader.read(cBuffer)) != -1 )
clobWriter.write( cBuffer, 0, iRead);
testReader.close();
clobWriter.close();
if ( rs != null )
rs.close();
if ( stmt != null )
stmt.close();
// update clob-data in database
stmt = con.prepareStatement ( "UPDATE database SET clob_field = ? WHERE id = ?" );
stmt.setClob ( 1, cl );
stmt.setInt ( 2, 1 );
stmt.executeUpdate();
it throws java.lang.ClassCastException: oracle.sql.CLOB
but i haven't imported or used any API from oracle.........
please help
thankshi,
unfortunatly, you can't do this with welbogic6.1 because it 'manage' itself oracle librairies (weblogic.jar),
here is the way i solved the pb for BLOB :
i replaced :
BLOB blob = ((OracleResultSet)rs).getBLOB(1);
by
weblogic.jdbc.rmi.SerialOracleBlob cast1 =(weblogic.jdbc.rmi.SerialOracleBlob)rs.getBlob("myBlob");
weblogic.jdbc.rmi.internal.OracleTBlobImpl cast2 =(weblogic.jdbc.rmi.internal.OracleTBlobImpl)cast1.getTheRealBlob();
BLOB myBlob = (oracle.sql.BLOB)cast2.getTheRealBlob();
it is the same for clob (i suppose ^_^)
hope this helps !
Badr. -
CLOB with Oracle 9i throwing ORA-21608
Hi,
I'm using Oracle OCI driver for my 9.2.0.5 database on Solaris. (classes12.jar). It is throwing the following exception when I'm trying to create a temporary CLOB that I intend to pass to my Stored procedure.
CallableStatement stmt;
oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(conn, false, oracle.sql.CLOB.DURATION_CALL);
newClob.putString(1,jpCpBasicCAScr.ca_memorandum);
stmt.setClob(6, newClob);
It is throwing this exception in the createTemporary call.
java.sql.SQLException: ORA-21608: duration is invalid for this function
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2355)
at oracle.jdbc.oci8.OCIDBAccess.createTemporaryLob(OCIDBAccess.java:3666)
at oracle.sql.LobDBAccessImpl.createTemporaryClob(LobDBAccessImpl.java:755)
at oracle.sql.CLOB.createTemporary(CLOB.java:1011)
at oracle.sql.CLOB.createTemporary(CLOB.java:956)
I cannot use Oracle Thin driver as was mentioned in these forums earlier. Please give me a solution for OCI driver itself.
Thanks
Varma
[email protected]Maybe that feature requires that you upgrade your JDBC driver to JVM 1.4, using ojdbc14.jar.
If not, you're hosed. -
I wish to migrate records of a col. FILETYPE (LONG RAW) of existing table to col. DOCTYPE (CLOB) of a new table.
But the function to_lob() is unable to carry out the required migration. The Error message is : " Inconsistent Data Types expected - binary .... ".
Moreover LONG RAW to BLOB conversion works fine from a simple INSERT statement but the same fails when insertion is done using a CURSOR.
Can u guyz help me in doing the same !
Oracle Version used - 9i
Regards,
Chinmay <Infocker>You can transfer data from
LONG to CLOB
LONG RAW to BLOB only..
In Oracle9i -- there is a very cool "alter table t modify long_col CLOB" to do
this as well....
you could convert a clob to a blob, or a blob to a clob using utl_raw.cast_to_varchar2/raw and doing it 32k at a time. -
Hi,
We are using VB Components from ASP to read/write data to CLOBS. The trouble is, we are having problems with text over 4k. We get the following error trying to insert text > 4k using the latest Oracle ODBC driver:
Ora-01704: String Literal too long.
I have looked through other postings related to this, and it seems that a solution may be to prepare/bind the statement. I was hoping that someone may have an example of doing this in VB, the code we use at the moment to insert data looks like this:
' Create the ADO objects
Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = sConnect
cmd.CommandText = strSQL
cmd.CommandType = adCmdText
' Execute the query without returning a recordset
cmd.Execute , , adExecuteNoRecords
Can anyone shed some light, and will we need to change the way that we read the data from the CLOBS also (we currently just use a tyical "Select X from Y" statement and assign the recordset to values like this:
sText = rs("A_CLOB_COL")
Thanks in advance,
RHi,
You will find ODP samples at http://otn.oracle.com/sample_code/tech/windows/odpnet/content.html
For any questions pertaining to ODP please use the appropriate discussion forum - ODP.NET
Sujatha.
http://otn.oracle.com/sample_code/content.html -
Using CLOBs in oracle Report Builder
I want to select all the data in a CLOB column using SQL Navigator by just doing
select entry_note
from chartentries;
just as you say in your example by it just gives me back a result of (ORACLOB).
If I do
select to_char(entry_note)
from chartentries;
I get this error.
If I do
select dbms_lob.substr(entry_note,4000,1)
from chartentries
I get this (there’s more up to 32000 characters in a clob) and these weird squares which I think are CR (carriage returns) or LF (line feeds). I don’t want to see those characters and I would like to retrieve the entire CLOB in one swoop without doing data manipulations of substringing.
Using the same data in Oracle Report Builder, I want to select all the data in a CLOB column into a field in a Paper report layout but I keep getting errors, ora-6502, and I've found out that I am restricted to 4000 characters and in Report 9i it looks like the largest field you can have is 4000 characters. My CLOB information can be up to 32000 characters long or longer and I do not want to substring out 4000 characters at a time into separate fields. In Crystal reports there is no problem just selecting the clob in a simple query and it is there in one shot. I would have thought by now that Oracle would have changed its development tools to be able to handle Clobs simply without any manipulation. Does anyone know how to do this in Report builder? I just have a simple query:
select entry_datetime,
to_char(replace((entry_note),chr(13))) as entry_note
from chartentries
where patient_id = 49741
Another thing I want to do, is call this Oracle report from a PL/SQL block passing several parameters to the report and also call a Crystal report from a PL/SQL block passing several parameters to the report. Does anyone know what the commands are?What I had to do is create a query using query builder. This works fine; it's when trying to add the column to an existing query is where the data inconstancy error occurs. One thing you have to keep in mind is it will only work using the query builder in conjunction with the report wizard; I am not sure why. To incorporate the comments into an existing frame you will have to cut the frame created by the wizards and copy it into the existing frame. Otherwise the column name will not show in the source list of the property Inspector.
Good Luck -
String Literal too long / CLOB Issue
I have a table with a "Clob" column called Message. This is where I store the message of an email. We have an internal email app. What is happening is I can't insert anything bigger then around 3990 or something around there. In my procedure I have the parameter coming in as clob and I use a TO_CHAR() around the table column and my parameter or my procedure gives me this error
PL/SQL: ORA-00932: inconsistent datatypes: expected - got CLOB
But when it runs and I put in a 9000 character message it says
Oracle.DataAccess.Client.OracleException was unhandled by user code
Message="ORA-01704: string literal too long
I'm using C# with
Oracle.DataAccess.Client.OracleConnection to create my oracle connection and Oracle 10g.
I'm calling this procedure from my app. By doing this am I causing it to only hold 4000 characters?
Here is a scaled down version of my code on just that column
CREATE OR REPLACE PROCEDURE EMAILINS (
P_MSG IN CLOB
AS
varT VARCHAR2(10000);
varSQL VARCHAR2(20000);
varTemp NUMBER;
BEGIN
-- SEE IF STRING EXISTS
SELECT 1 INTO varTemp
FROM tblEmail
WHERE TO_CHAR(MESSAGE) = P_MSG
EXCEPTION
WHEN TOO_MANY_ROWS THEN
varSQL := varT||CHR(10)||'***Multiple Rows Exist in Table tblEmail***';
DBMS_OUTPUT.PUT_LINE(varSQL);
WHEN NO_DATA_FOUND THEN
varT := P_MSG;
varSQL := 'INSERT INTO TBL_EMAIL( MESSAGE)'||CHR(10);
varSQL := varSQL || 'VALUES (tblEmail_SEQ.NEXTVAL,'||varT||')';
EXECUTE IMMEDIATE varSQL;
END EMAILINS;In the first place, you don't need (and surely don't want) dynamic SQL to do the insert. Replace
varT := P_MSG;
varSQL := 'INSERT INTO TBL_EMAIL( MESSAGE)'||CHR(10);
varSQL := varSQL || 'VALUES (tblEmail_SEQ.NEXTVAL,'||varT||')';
EXECUTE IMMEDIATE varSQL;with the simpler
INSERT INTO tbl_email( <<primary key column>>, message )
VALUES( tblEmail_Seq.nextval, p_msg );Secondly, you want to use the DBMS_LOB.COMPARE function to determine whether the contents of the LOBs match. So replace
SELECT 1
INTO varTemp
FROM tblEmail
WHERE TO_CHAR(MESSAGE) = P_MSG with
SELECT 1
INTO varTemp
FROM tblEmail
WHERE dbms_lob.compare( message, p_msg ) = 0Of course, it is going to be relatively expensive to run this query every time you insert a new message unless the table is always going to be very small, which seems unlikely. It also doesn't prevent duplicate entries if there are multiple threads executing at the same time.
Justin -
Hi,
We are having a d/b with oracle 7.0 having a column LONG RAW. Client Signatures are stored in the form of Tiff in this column. We are now trying to extract the same and write it in the file system of a different server.
We are encountering a peculiar problem. For certain cases the conversion and writing part goes of smoothly, but for some cases we are getting an ORACLE error ORA-1460 conversion error while using UTL_RAW.CAST_TO_VARCHAR2 .
This does not happen for all cases, please help us solve the sameHi,
We are having a d/b with oracle 7.0 having a column LONG RAW. Client Signatures are stored in the form of Tiff in this column. We are now trying to extract the same and write it in the file system of a different server.
We are encountering a peculiar problem. For certain cases the conversion and writing part goes of smoothly, but for some cases we are getting an ORACLE error ORA-1460 conversion error while using UTL_RAW.CAST_TO_VARCHAR2 .
This does not happen for all cases, please help us solve the same -
Platform: Win2k, Ora9i, Toplink9i, OCI driver, jdk1.3.1_01
I'm having trouble with storing long strings using Toplink. I'm using a LONG column, and the text is getting truncated from around 8000 characters to about 5600.
While trying to figure out what was going on, I discovered a warning from Oracle saying that LONGs should not be used, instead a CLOB was appropriate (why does the Toplink SchemaManager generate LONGs then?). So I thought I'd try the experiment again with CLOBs. I dropped the schema and recreated it, using CLOB NULL everywhere I'd used LONG NULL before.
Unfortunately, when I run the same code on the CLOBized schema, I get the error below. Does anyone have any idea how to get either LONGs or CLOBs to do the job I need?
Thanks,
Bryn
p.s. Sorry if this (or something very like it) gets posted twice, the forums server seems to have dropped my session between previewing and posting so I had to redo it.
EXCEPTION [TOPLINK-4002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exception
s.DatabaseException
EXCEPTION DESCRIPTION: java.sql.SQLException: ORA-03124: two-task internal error
INTERNAL EXCEPTION: java.sql.SQLException: ORA-03124: two-task internal error
ERROR CODE: 3124
at oracle.toplink.exceptions.DatabaseException.sqlException(Unknown Sour
ce)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirect
NoSelect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSele
ct(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(U
nknown Source)
at oracle.toplink.publicinterface.UnitOfWork.executeCall(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall
(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.executeCall
(Unknown Source)
at oracle.toplink.internal.queryframework.CallQueryMechanism.insertObjec
t(Unknown Source)
at oracle.toplink.internal.queryframework.StatementQueryMechanism.insert
Object(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertO
bjectForWrite(Unknown Source)
at oracle.toplink.queryframework.InsertObjectQuery.executeCommit(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.perform
UserDefinedWrite(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.perform
UserDefinedInsert(Unknown Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.insertO
bjectForWrite(Unknown Source)
at oracle.toplink.queryframework.WriteObjectQuery.executeCommit(Unknown
Source)
at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.execute
Write(Unknown Source)
at oracle.toplink.queryframework.WriteObjectQuery.execute(Unknown Source
at oracle.toplink.queryframework.DatabaseQuery.execute(Unknown Source)
at oracle.toplink.publicinterface.Session.internalExecuteQuery(Unknown S
ource)
at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(Unknow
n Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.publicinterface.Session.executeQuery(Unknown Source)
at oracle.toplink.internal.sessions.CommitManager.commitAllObjects(Unkno
wn Source)
at oracle.toplink.publicinterface.Session.writeAllObjects(Unknown Source
at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(Unknown So
urce)
at oracle.toplink.publicinterface.UnitOfWork.commitRootUnitOfWork(Unknow
n Source)
at oracle.toplink.publicinterface.UnitOfWork.commit(Unknown Source)Using the Oracle8Platform instead of OraclePlatform will tell TopLink to generate CLOBs instead of LONGs and BLOBs instead of LONG RAWs.
As for the error, I have never seen this error before. Your best bet is probably to contact Oracle database support.
Peter Krogh
Maybe you are looking for
-
using FREETALK® Connect•Me with skype offer, I have a telephon number with skype and no landline connection (only broadband). My question is this: Can I receive call (to my skype number) and call without landline connection only using skype account w
-
Problem in LSMW using IDOC in convert data step
Hi, I am getting a Run-time error in CONVERT DATA step of LSMW using IDOC. The error diplayed is a syntax error. I am not able to figure out the error. Anybody having idea about this, please help me... The data is read successfully. Edited by: majual
-
Select List not updated by htmldb_collection
I used the Collection Showcase as a template to do a collection, When I edit a collection Record from a populated form that contains a select list. when I changed the value in the select list and processed htmldb_collection.update_member API, the rep
-
PDF Ink Limit change on Export From ID
Hi I am having an issue where ink limits on an exported PDF do not match the limits in PS and ID. I am using a Europe ISO Coated FOGRA27 working space in all applications with colour managment policies set to "Off". Iink limits in ID are fine (max of
-
Matching folders between iPhone and Email on desktop
I have a mobile me account on my iPhone, as well as of course email at home on my MacBook via the 'mail' app. 1) is it possible to see the same folders (and content) on my iPhone as I can see on my MacBook, and 2) If my MacBook has a sam filter and i