Hi Nitin,
thanks for you response. I took a minute and changed the way my
application uses XADisk. Now i'm using a separate XADiskFileSystem/
XASession for each thread. This turned out to work a lot better but
after a while another Exception popped up:
Exception in thread "pool-1-thread-5"
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.filesystem.workers.observers.CriticalWorkersListener.workCompleted(CriticalWorkersListener.java:
31)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:81)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.resource.spi.work.WorkException:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
... 4 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.filesystem.workers.TransactionTimeoutDetector.doWorkOnce(TransactionTimeoutDetector.java:
42)
at org.xadisk.filesystem.workers.TimedWorker.run(TimedWorker.java:42)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:75)
... 3 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at org.xadisk.filesystem.NativeSession.rollback(NativeSession.java:
934)
at
org.xadisk.filesystem.NativeSession.rollbackPrematurely(NativeSession.java:
121)
at
org.xadisk.filesystem.NativeSession.rollbackAsynchronously(NativeSession.java:
112)
at
org.xadisk.filesystem.workers.TransactionTimeoutDetector.doWorkOnce(TransactionTimeoutDetector.java:
38)
... 5 more
Caused by: java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:88)
at sun.nio.ch.FileChannelImpl.size(FileChannelImpl.java:289)
at
org.xadisk.filesystem.workers.GatheringDiskWriter.ensureLogFileCapacity(GatheringDiskWriter.java:
340)
at
org.xadisk.filesystem.workers.GatheringDiskWriter.forceWrite(GatheringDiskWriter.java:
317)
at
org.xadisk.filesystem.workers.GatheringDiskWriter.transactionCompletes(GatheringDiskWriter.java:
232)
at org.xadisk.filesystem.NativeSession.rollback(NativeSession.java:
927)
... 8 more
I re-ran my application a few times and it seems to also throw another
Exception sometimes:
Exception in thread "pool-1-thread-7"
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.filesystem.workers.observers.CriticalWorkersListener.workCompleted(CriticalWorkersListener.java:
31)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:81)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.resource.spi.work.WorkException:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
... 4 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.bridge.server.conversation.ConversationGateway.run(ConversationGateway.java:
77)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:75)
... 3 more
Caused by: java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:182)
at
org.xadisk.bridge.server.conversation.ConversationContext.updateWithConversation(ConversationContext.java:
81)
at
org.xadisk.bridge.server.conversation.ConversationGateway.run(ConversationGateway.java:
68)
... 4 more
Exception in thread "pool-1-thread-5"
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.filesystem.workers.observers.CriticalWorkersListener.workCompleted(CriticalWorkersListener.java:
31)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:81)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: javax.resource.spi.work.WorkException:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
... 4 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.filesystem.workers.TransactionTimeoutDetector.doWorkOnce(TransactionTimeoutDetector.java:
42)
at org.xadisk.filesystem.workers.TimedWorker.run(TimedWorker.java:42)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:75)
... 3 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeSession.checkIfCanContinue(NativeSession.java:
1092)
at org.xadisk.filesystem.NativeSession.rollback(NativeSession.java:
850)
at
org.xadisk.filesystem.NativeSession.rollbackPrematurely(NativeSession.java:
121)
at
org.xadisk.filesystem.NativeSession.rollbackAsynchronously(NativeSession.java:
112)
at
org.xadisk.filesystem.workers.TransactionTimeoutDetector.doWorkOnce(TransactionTimeoutDetector.java:
38)
... 5 more
Caused by: javax.resource.spi.work.WorkException:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:81)
... 3 more
Caused by:
org.xadisk.filesystem.exceptions.XASystemNoMoreAvailableException: The
XADisk instance has encoutered a critial issue and is no more
available. Such a condition is very rare. If you think you have setup
everything right for XADisk to work, please consider discussing in
XADisk forums, or raising a bug with details
at
org.xadisk.filesystem.NativeXAFileSystem.notifySystemFailure(NativeXAFileSystem.java:
488)
at
org.xadisk.bridge.server.conversation.ConversationGateway.run(ConversationGateway.java:
77)
at org.xadisk.filesystem.standalone.StandaloneWorkManager
$WorkRunnable.run(StandaloneWorkManager.java:75)
... 3 more
Caused by: java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:182)
at
org.xadisk.bridge.server.conversation.ConversationContext.updateWithConversation(ConversationContext.java:
81)
at
org.xadisk.bridge.server.conversation.ConversationGateway.run(ConversationGateway.java:
68)
... 4 more
I tried to track it down and it seems that inside the class
org.xadisk.bridge.server.conversation.ConversationGateway at line 42
'ByteBuffer buffer = ByteBuffer.allocate(1000);' a buffer is
allocated, which could be accessed beyond it's size. Of course my
assumption is based on a quick look and can be completely wrong but
1000 is roughly the amount of files/calls to XADisk inside the
transaction for each thread. Interestingly i never run into trouble
before hitting the 1000 files limit. Is there some sort of maximum
transaction size? Anything you could recommend to fix this?
Thanks in advance!
Cheers,
Daniel