You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "tom@hostwebase.com" <to...@hostwebase.com> on 2007/08/22 00:14:41 UTC

Some messages get lost.

Hi,

I have some error while transferring messages. Some messages are being lost
when transfering large file (more than 20 MB in size). After turning the
DEBUG on, and looking at the file named activemq.log, I see some error
messages:

////////////////////// begin //////////////////////

2007-08-21 17:35:54,315 [eckpoint worker] DEBUG JDBCPersistenceAdapter        
- Commit failed: A truncation error was encountered trying to shrink BLOB
'XX-RESOLVE-XX' to length 1048576., due to: A truncation error was
encountered trying to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
ERROR 22001: A truncation error was encountered trying to shrink BLOB
'XX-RESOLVE-XX' to length 1048576.
        at
org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
        at org.apache.derby.iapi.types.SQLBinary.checkHostVariable(Unknown
Source)
        at
org.apache.derby.exe.ac00cd0029x0114x8a29xbdbcx0000511e95650.e0(Unknown
Source)
        at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown
Source)
        at
org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown
Source)
        at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
Source)
        at
org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
        at
org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
        at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(Unknown
Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown
Source)
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:96)
        at
org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:75)
        at
org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:154)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:363)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.commitTransaction(JournalPersistenceAdapter.java:193)
        at
org.apache.activemq.store.journal.JournalMessageStore$3.execute(JournalMessageStore.java:271)
        at
org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
2007-08-21 17:35:54,317 [eckpoint Worker] ERROR JournalPersistenceAdapter     
- Failed to checkpoint a message store:
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
java.io.IOException: Not started.
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
java.io.IOException: Not started.
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:386)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:129)
        at
org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:101)
        at
org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
        at
org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
Caused by: java.io.IOException: Not started.
        at
org.apache.activemq.store.jdbc.TransactionContext.rollback(TransactionContext.java:168)
        at
org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.rollbackTransaction(JDBCPersistenceAdapter.java:368)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter.rollbackTransaction(JournalPersistenceAdapter.java:197)
        at
org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:62)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
        at
org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
        at
org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
        at
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
2007-08-21 17:35:54,318 [eckpoint Worker] DEBUG JournalPersistenceAdapter     
- Marking journal at: 296:18606132

//////////////////////end //////////////////////

Can you guys help me fixing the issues ?

I appreciate your help.

Tom

-- 
View this message in context: http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12264433
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: How to use a diferrent database for ActiveMQ instead of Derby

Posted by Bruce Snyder <br...@gmail.com>.
On 8/22/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>
> Hiram,
>
> Thanks for your help.
>
> Can you tell me more clearly how to configure ActiveMQ to use a different
> database instead of Derby ?

Please see my response to your previous message on this same topic.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

How to use a diferrent database for ActiveMQ instead of Derby

Posted by "tom@hostwebase.com" <to...@hostwebase.com>.
Hiram,

Thanks for your help.

Can you tell me more clearly how to configure ActiveMQ to use a different
database instead of Derby ?


Hiram Chirino wrote:
> 
> Looks like dery is not supporting messages that are that large.  You
> might want to against another external SQL databases like postgres or
> mysql.
> 
> On 8/21/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>>
>> Hi,
>>
>> I have some error while transferring messages. Some messages are being
>> lost
>> when transfering large file (more than 20 MB in size). After turning the
>> DEBUG on, and looking at the file named activemq.log, I see some error
>> messages:
>>
>> ////////////////////// begin //////////////////////
>>
>> 2007-08-21 17:35:54,315 [eckpoint worker] DEBUG JDBCPersistenceAdapter
>> - Commit failed: A truncation error was encountered trying to shrink BLOB
>> 'XX-RESOLVE-XX' to length 1048576., due to: A truncation error was
>> encountered trying to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
>> ERROR 22001: A truncation error was encountered trying to shrink BLOB
>> 'XX-RESOLVE-XX' to length 1048576.
>>         at
>> org.apache.derby.iapi.error.StandardException.newException(Unknown
>> Source)
>>         at
>> org.apache.derby.iapi.types.SQLBinary.checkHostVariable(Unknown
>> Source)
>>         at
>> org.apache.derby.exe.ac00cd0029x0114x8a29xbdbcx0000511e95650.e0(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown
>> Source)
>>         at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
>> Source)
>>         at
>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(Unknown
>> Source)
>>         at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown
>> Source)
>>         at
>> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:96)
>>         at
>> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:75)
>>         at
>> org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:154)
>>         at
>> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:363)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter.commitTransaction(JournalPersistenceAdapter.java:193)
>>         at
>> org.apache.activemq.store.journal.JournalMessageStore$3.execute(JournalMessageStore.java:271)
>>         at
>> org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
>>         at
>> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
>>         at
>> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>         at java.lang.Thread.run(Thread.java:595)
>> 2007-08-21 17:35:54,317 [eckpoint Worker] ERROR JournalPersistenceAdapter
>> - Failed to checkpoint a message store:
>> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
>> java.io.IOException: Not started.
>> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
>> java.io.IOException: Not started.
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:386)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:129)
>>         at
>> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:101)
>>         at
>> org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
>>         at
>> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
>> Caused by: java.io.IOException: Not started.
>>         at
>> org.apache.activemq.store.jdbc.TransactionContext.rollback(TransactionContext.java:168)
>>         at
>> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.rollbackTransaction(JDBCPersistenceAdapter.java:368)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter.rollbackTransaction(JournalPersistenceAdapter.java:197)
>>         at
>> org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:62)
>>         at
>> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
>>         at
>> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
>>         at
>> org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>>         at
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>>         at java.lang.Thread.run(Thread.java:595)
>> 2007-08-21 17:35:54,318 [eckpoint Worker] DEBUG JournalPersistenceAdapter
>> - Marking journal at: 296:18606132
>>
>> //////////////////////end //////////////////////
>>
>> Can you guys help me fixing the issues ?
>>
>> I appreciate your help.
>>
>> Tom
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12264433
>> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Regards,
> Hiram
> 
> Blog: http://hiramchirino.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12280072
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: Some messages get lost.

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Looks like dery is not supporting messages that are that large.  You
might want to against another external SQL databases like postgres or
mysql.

On 8/21/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>
> Hi,
>
> I have some error while transferring messages. Some messages are being lost
> when transfering large file (more than 20 MB in size). After turning the
> DEBUG on, and looking at the file named activemq.log, I see some error
> messages:
>
> ////////////////////// begin //////////////////////
>
> 2007-08-21 17:35:54,315 [eckpoint worker] DEBUG JDBCPersistenceAdapter
> - Commit failed: A truncation error was encountered trying to shrink BLOB
> 'XX-RESOLVE-XX' to length 1048576., due to: A truncation error was
> encountered trying to shrink BLOB 'XX-RESOLVE-XX' to length 1048576.
> ERROR 22001: A truncation error was encountered trying to shrink BLOB
> 'XX-RESOLVE-XX' to length 1048576.
>         at
> org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
>         at org.apache.derby.iapi.types.SQLBinary.checkHostVariable(Unknown
> Source)
>         at
> org.apache.derby.exe.ac00cd0029x0114x8a29xbdbcx0000511e95650.e0(Unknown
> Source)
>         at org.apache.derby.impl.services.reflect.DirectCall.invoke(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.execute.RowResultSet.getNextRowCore(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.execute.NormalizeResultSet.getNextRowCore(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.execute.DMLWriteResultSet.getNextRowCore(Unknown
> Source)
>         at org.apache.derby.impl.sql.execute.InsertResultSet.open(Unknown
> Source)
>         at
> org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
>         at
> org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
>         at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeBatchElement(Unknown
> Source)
>         at org.apache.derby.impl.jdbc.EmbedStatement.executeBatch(Unknown
> Source)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:96)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.executeBatch(TransactionContext.java:75)
>         at
> org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:154)
>         at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:363)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.commitTransaction(JournalPersistenceAdapter.java:193)
>         at
> org.apache.activemq.store.journal.JournalMessageStore$3.execute(JournalMessageStore.java:271)
>         at
> org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:44)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> 2007-08-21 17:35:54,317 [eckpoint Worker] ERROR JournalPersistenceAdapter
> - Failed to checkpoint a message store:
> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
> java.io.IOException: Not started.
> edu.emory.mathcs.backport.java.util.concurrent.ExecutionException:
> java.io.IOException: Not started.
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.getResult(FutureTask.java:299)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureTask.java:118)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.doCheckpoint(JournalPersistenceAdapter.java:386)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$2.iterate(JournalPersistenceAdapter.java:129)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:101)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner.access$000(DedicatedTaskRunner.java:25)
>         at
> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:39)
> Caused by: java.io.IOException: Not started.
>         at
> org.apache.activemq.store.jdbc.TransactionContext.rollback(TransactionContext.java:168)
>         at
> org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.rollbackTransaction(JDBCPersistenceAdapter.java:368)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter.rollbackTransaction(JournalPersistenceAdapter.java:197)
>         at
> org.apache.activemq.util.TransactionTemplate.run(TransactionTemplate.java:62)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:247)
>         at
> org.apache.activemq.store.journal.JournalMessageStore.checkpoint(JournalMessageStore.java:221)
>         at
> org.apache.activemq.store.journal.JournalPersistenceAdapter$4.call(JournalPersistenceAdapter.java:356)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>         at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>         at java.lang.Thread.run(Thread.java:595)
> 2007-08-21 17:35:54,318 [eckpoint Worker] DEBUG JournalPersistenceAdapter
> - Marking journal at: 296:18606132
>
> //////////////////////end //////////////////////
>
> Can you guys help me fixing the issues ?
>
> I appreciate your help.
>
> Tom
>
> --
> View this message in context: http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12264433
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: A truncation error was encountered trying to shrink BLOB

Posted by "tom@hostwebase.com" <to...@hostwebase.com>.
Hi Bruce,

Thanks a lot. It works now.

Have a nice day.


bsnyder wrote:
> 
> On 8/22/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>>
>>
>> Hi,
>>
>> Let me explain my question more clearly. About the following error:
>>
>>  ERROR 22001: A truncation error was encountered trying to shrink BLOB
>> 'XX-RESOLVE-XX' to length 1048576.
>>
>>   Is there any way we can modify ActiveMQ or Derby database so that we
>> don't
>> have data truncate problem ?
>>
>> Thanks a lot.
> 
> It would appear to me that the error indicates that the message size
> has exceeded the size limit of a BLOB field in Derby. The best thing
> to do is point ActiveMQ at a different database entirely, i.e.,
> substitute another database for Derby can handle a larger BLOB size
> such as MySQL or PostreSQL as Hiram suggested previously. There are
> some docs on this here:
> 
> http://activemq.apache.org/jdbc-support.html
> 
> The process of changing the ActiveMQ configuration is pretty simple
> because the default configuration in conf/activemq.xml provides data
> sources for both MySQL and PostgreSQL. All you have to do is uncomment
> the one you want and then refer to it by name in the
> persistenceAdapter element. There's even a commented out example of
> this as well, so just comment out the journaledJDBC element for Derby
> and uncomment the one for PostgreSQL. Then uncomment the PostreSQL
> datasource and point it to your local PostgreSQL database. Just make
> sure that the database is started up and accessible before starting
> ActiveMQ.
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.org/
> Apache ServiceMix - http://servicemix.org/
> Apache Geronimo - http://geronimo.apache.org/
> Castor - http://castor.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12282875
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


Re: A truncation error was encountered trying to shrink BLOB

Posted by Bruce Snyder <br...@gmail.com>.
On 8/22/07, tom@hostwebase.com <to...@hostwebase.com> wrote:
>
>
> Hi,
>
> Let me explain my question more clearly. About the following error:
>
>  ERROR 22001: A truncation error was encountered trying to shrink BLOB
> 'XX-RESOLVE-XX' to length 1048576.
>
>   Is there any way we can modify ActiveMQ or Derby database so that we don't
> have data truncate problem ?
>
> Thanks a lot.

It would appear to me that the error indicates that the message size
has exceeded the size limit of a BLOB field in Derby. The best thing
to do is point ActiveMQ at a different database entirely, i.e.,
substitute another database for Derby can handle a larger BLOB size
such as MySQL or PostreSQL as Hiram suggested previously. There are
some docs on this here:

http://activemq.apache.org/jdbc-support.html

The process of changing the ActiveMQ configuration is pretty simple
because the default configuration in conf/activemq.xml provides data
sources for both MySQL and PostgreSQL. All you have to do is uncomment
the one you want and then refer to it by name in the
persistenceAdapter element. There's even a commented out example of
this as well, so just comment out the journaledJDBC element for Derby
and uncomment the one for PostgreSQL. Then uncomment the PostreSQL
datasource and point it to your local PostgreSQL database. Just make
sure that the database is started up and accessible before starting
ActiveMQ.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Apache Geronimo - http://geronimo.apache.org/
Castor - http://castor.org/

A truncation error was encountered trying to shrink BLOB

Posted by "tom@hostwebase.com" <to...@hostwebase.com>.

Hi,

Let me explain my question more clearly. About the following error:

 ERROR 22001: A truncation error was encountered trying to shrink BLOB
'XX-RESOLVE-XX' to length 1048576. 

  Is there any way we can modify ActiveMQ or Derby database so that we don't
have data truncate problem ?

Thanks a lot.

-- 
View this message in context: http://www.nabble.com/Some-messages-get-lost.-tf4308194s2354.html#a12279969
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.