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 20:13:53 UTC

How to use a diferrent database for ActiveMQ instead of Derby

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: 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/