activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pandey <>
Subject Re: Data size bigger than max size for this type
Date Fri, 06 Apr 2007 21:51:40 GMT

I'm facing the same issue with apache-activemq-4.1.0 right now.
I have faced something simillar earlier.
looks like it's coded in Oracle driver to accept nothing greater than 4K as
a blob/byte[]/clob/char[]

below is how i fixed it (came across the solution somewhere i guess) : 

					// create an empty blob and execute the statement ... do retain the
identifier for the row
					oracle.sql.BLOB blob = oracle.sql.BLOB.empty_lob();
					ps.setBlob(4, blob);

					//use the identifier retained above to get the handle to the empty blob         
and write the blobData (>4k)
					PreparedStatement st =
					st.setInt(1, rowID);
					ResultSet rs = st.executeQuery();;
					blob = (oracle.sql.BLOB)rs.getBlob(1);
					OutputStream os = blob.getBinaryOutputStream();
					try {
					} catch (IOException e) {
						throw new SQLException("Error in writing BLOB data :

This happens only with oracle (far as i'v seen .. sybase and mysql are good
with bigger data as well).


James.Strachan wrote:
> On 3/30/07, ron55test <> wrote:
>> The column is of type blob.
>> This is what the table structure is as created by activemq:
>>    (    "ID" NUMBER(32,0) NOT NULL ENABLE,
>>         "CONTAINER" VARCHAR2(250),
>>         "MSGID_PROD" VARCHAR2(250),
>>         "MSGID_SEQ" NUMBER(32,0),
>>         "MSG" BLOB,
>>          PRIMARY KEY ("ID")
>> )
> It looks like the BLOB type is 4Gb long
> so I'm not sure thats the problem. I suspect it may be due to the  way
> in which the JDBC code works with the BLOB column type. This article
> appears to suggest that the preferred way to work with Oracle BLOBs is
> using the Blob type
> so I've patched trunk of the Oracle adapter to use this approach
> instead. Any chance you could build trunk and see if this fixes your
> issue?
> I've raised this issue to track the issue
> -- 
> James
> -------

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message