Hi,
We're using H2 as database for JBoss Messaging and sometimes we're
having this problem, that seems to end in an OutOfMemoryException:
Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:218)
at
org.h2.store.fs.FileObjectDiskMapped.seek(FileObjectDiskMapped.java:
126)
at org.h2.store.FileStore.seek(FileStore.java:302)
at org.h2.store.PageStore.readPage(PageStore.java:971)
at org.h2.store.PageStore.getPage(PageStore.java:486)
at org.h2.store.PageStore.getFreeList(PageStore.java:801)
at org.h2.store.PageStore.allocatePage(PageStore.java:867)
at org.h2.store.PageStore.allocatePage(PageStore.java:855)
at org.h2.index.PageDataLeaf.split(PageDataLeaf.java:352)
at org.h2.index.PageDataNode.addRowTry(PageDataNode.java:153)
at org.h2.index.PageDataIndex.addTry(PageDataIndex.java:153)
at org.h2.index.PageDataIndex.add(PageDataIndex.java:126)
at org.h2.table.TableData.addRow(TableData.java:130)
This stack is from H2 1.2.128, but this error also happened in 1.2.135
(the stack wasn't exactly the same, but the error was the same). I've
looked to the code and found this in
org.h2.store.fs.FileObjectDiskMapped.seek():
public void seek(long pos) {
mapped.position((int) pos);
}
Then I looked to java.nio.Buffer.position() and found this in the
first two lines:
if ((paramInt > this.limit) || (paramInt < 0))
throw new IllegalArgumentException();
So I think that FileObjectDiskMapped.seek(long pos) is receiving a
parameter bigger than Integer.MAX_VALUE and the cast creates a
negative integer that causes the error to be thrown. But I couldn't
understand why that is happening. I hope you can help us with that.
I'll copy here the full stack.
Thanks!
Caused by: java.lang.IllegalArgumentException
at java.nio.Buffer.position(Buffer.java:218)
at
org.h2.store.fs.FileObjectDiskMapped.seek(FileObjectDiskMapped.java:
126)
at org.h2.store.FileStore.seek(FileStore.java:302)
at org.h2.store.PageStore.readPage(PageStore.java:971)
at org.h2.store.PageStore.getPage(PageStore.java:486)
at org.h2.store.PageStore.getFreeList(PageStore.java:801)
at org.h2.store.PageStore.allocatePage(PageStore.java:867)
at org.h2.store.PageStore.allocatePage(PageStore.java:855)
at org.h2.index.PageDataLeaf.split(PageDataLeaf.java:352)
at org.h2.index.PageDataNode.addRowTry(PageDataNode.java:153)
at org.h2.index.PageDataIndex.addTry(PageDataIndex.java:153)
at org.h2.index.PageDataIndex.add(PageDataIndex.java:126)
at org.h2.table.TableData.addRow(TableData.java:130)
... 103 more
2010-05-19 10:18:22,283 WARN
[org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-8080-2)
Trying again after a pause
2010-05-19 10:18:22,743 WARN
[org.jboss.messaging.core.impl.JDBCSupport] (http-0.0.0.0-8080-2)
SQLException caught, SQLState HY000 code:50000- assuming deadlock
detected, try:25
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.IllegalArgumentException"; SQL statement:
INSERT INTO JBM_MSG_REF_GNQ (CHANNEL_ID, MESSAGE_ID, TRANSACTION_ID,
STATE, ORD, PAGE_ORD, DELIVERY_COUNT, SCHED_DELIVERY) VALUES
(?, ?, ?, ?, ?, ?, ?, ?) [50000-128]
at org.h2.message.Message.getSQLException(Message.java:110)
at org.h2.message.Message.convert(Message.java:287)
at org.h2.table.TableData.addRow(TableData.java:149)
at org.h2.command.dml.Insert.insertRows(Insert.java:120)
at org.h2.command.dml.Insert.update(Insert.java:82)
at
org.h2.command.CommandContainer.update(CommandContainer.java:71)
at org.h2.command.Command.executeUpdate(Command.java:199)
at
org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:
143)
at
org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:
129)
at
org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeUpdate(CachedPreparedStatement.java:
96)
at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:
365)
at org.jboss.messaging.core.impl.JDBCPersistenceManager
$1HandleBeforeCommit1PCRunner.doTransaction(JDBCPersistenceManager.java:
1765)
at org.jboss.messaging.core.impl.JDBCSupport
$JDBCTxRunner2.execute(JDBCSupport.java:474)
at org.jboss.messaging.core.impl.JDBCSupport
$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:512)
at
org.jboss.messaging.core.impl.JDBCPersistenceManager.handleBeforeCommit1PC(JDBCPersistenceManager.java:
1863)
at org.jboss.messaging.core.impl.JDBCPersistenceManager
$TransactionCallback.beforeCommit(JDBCPersistenceManager.java:2974)
at
org.jboss.messaging.core.impl.tx.Transaction.commit(Transaction.java:
208)
at
org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendTransaction(ServerConnectionEndpoint.java:
490)
at org.jboss.jms.server.endpoint.advised.ConnectionAdvised.org
$jboss$jms$server$endpoint$advised$ConnectionAdvised$sendTransaction
$aop(ConnectionAdvised.java:101)
at org.jboss.jms.server.endpoint.advised.ConnectionAdvised
$sendTransaction_N3268650789275322226.invokeTarget(ConnectionAdvised
$sendTransaction_N3268650789275322226.java)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
111)
at
org.jboss.jms.server.container.SecurityAspect.handleSendTransaction(SecurityAspect.java:
195)
at sun.reflect.GeneratedMethodAccessor331.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:
122)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:
105)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.server.endpoint.advised.ConnectionAdvised.sendTransaction(ConnectionAdvised.java)
at
org.jboss.jms.wireformat.ConnectionSendTransactionRequest.serverInvoke(ConnectionSendTransactionRequest.java:
82)
at
org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:
143)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:
897)
at
org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:
106)
at org.jboss.remoting.Client.invoke(Client.java:1917)
at org.jboss.remoting.Client.invoke(Client.java:768)
at org.jboss.remoting.Client.invoke(Client.java:756)
at
org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:
189)
at
org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:
160)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.org
$jboss$jms$client$delegate$ClientConnectionDelegate$sendTransaction
$aop(ClientConnectionDelegate.java:221)
at org.jboss.jms.client.delegate.ClientConnectionDelegate
$sendTransaction_N3268650789275322226.invokeTarget(ClientConnectionDelegate
$sendTransaction_N3268650789275322226.j
ava)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
111)
at
org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:
92)
at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:
86)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:
170)
at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:
86)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.client.delegate.ClientConnectionDelegate.sendTransaction(ClientConnectionDelegate.java)
at
org.jboss.jms.tx.ResourceManager.commitLocal(ResourceManager.java:206)
at
org.jboss.jms.client.container.SessionAspect.handleCommit(SessionAspect.java:
582)
at
org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleCommit_18957272.invoke(SessionAspect_z_handleCommit_18957272.java)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:
170)
at
org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:
86)
at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:
102)
at
org.jboss.jms.client.delegate.ClientSessionDelegate.commit(ClientSessionDelegate.java)
at org.jboss.jms.client.JBossSession.commit(JBossSession.java:
164)
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.