Skip to content

Instantly share code, notes, and snippets.

@hchiorean
hchiorean / gist:3163929
Created July 23, 2012 14:32
Scheduled Thread Pool exec
"modeshape-stats-779-thread-1" prio=6 tid=0x000000000c94b000 nid=0x17ac waiting on condition [0x000000001952f000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000c2454f80> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:196)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2025)
at java.util.concurrent.DelayQueue.take(DelayQueue.java:164)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:609)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:602)
@hchiorean
hchiorean / gist:2966287
Created June 21, 2012 15:07
ISPN persistent
ISPN configuration
-------------------------
<namedCache name="persistentRepository">
<transaction
transactionManagerLookupClass="org.infinispan.transaction.lookup.GenericTransactionManagerLookup"
transactionMode="TRANSACTIONAL"
lockingMode="OPTIMISTIC"/>
<loaders
passivation="false"
shared="false"
17:52:24,733 INFO [stdout] (MSC service thread 1-4) Sequencer changes: Put at '' the 'sequencing' field value '{ "sequencers" : { "cnd-sequencer" : { "pathExpressions" : [ "default:/files(//*.cnd[*])/jcr:content[@jcr:data] => other:/derived/nodetypes/$1" ] , "classloader" : "org.modeshape.sequencer.cnd" , "classname" : "cnd" } } }
17:52:24,735 INFO [stdout] (MSC service thread 1-4) Put at 'sequencing' the 'sequencers' field value '{ "cnd-sequencer" : { "pathExpressions" : [ "default:/files(//*.cnd[*])/jcr:content[@jcr:data] => other:/derived/nodetypes/$1" ] , "classloader" : "org.modeshape.sequencer.cnd" , "classname" : "cnd" } }
17:52:24,737 INFO [stdout] (MSC service thread 1-4) Put at 'sequencing.sequencers' the 'cnd-sequencer' field value '{ "pathExpressions" : [ "default:/files(//*.cnd[*])/jcr:content[@jcr:data] => other:/derived/nodetypes/$1" ] , "classloader" : "org.modeshape.sequencer.cnd" , "classname" : "cnd" }
17:52:24,739 INFO [stdout] (MSC service thread 1-8) Sequencer changes: Put at '' the
@hchiorean
hchiorean / gist:2959367
Created June 20, 2012 11:02
ISPN not serializable
13:59:37,003 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (http--127.0.0.1-8080-1) ISPN000136: Execution error: org.infinispan.marshall.NotSerializableException: org.infinispan.schematic.document.Binary
Caused by: an exception which occurred:
in object org.infinispan.schematic.internal.SchematicEntryLiteral@45aee222
in object org.infinispan.container.entries.ImmortalCacheEntry@9d605cfa
in object org.infinispan.loaders.bucket.Bucket@5334f6e8
13:59:37,006 ERROR [org.infinispan.transaction.TransactionCoordinator] (http--127.0.0.1-8080-1) ISPN000097: Error while processing 1PC PrepareCommand: org.infinispan.marshall.NotSerializableException: org.infinispan.schematic.document.Binary
Caused by: an exception which occurred:
in object org.infinispan.schematic.internal.SchematicEntryLiteral@45aee222
in object org.infinispan.container.entries.ImmortalCacheEntry@9d605cfa
@hchiorean
hchiorean / gist:2948875
Created June 18, 2012 15:18
ISPN cfg failure
avax.jcr.RepositoryException: Error while starting 'sample' repository: com.ctc.wstx.exc.WstxIOException: Stream closed
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:578)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:535)
at org.modeshape.jcr.JcrRepository.login(JcrRepository.java:146)
at org.modeshape.test.integration.RepositoryProvider.loginAndLogout(RepositoryProvider.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
@hchiorean
hchiorean / gist:2050066
Created March 16, 2012 13:30
Deadlock indexing
2012-03-16 14:41:27
Full thread dump Java HotSpot(TM) 64-Bit Server VM (20.4-b02 mixed mode):
"RMI TCP Connection(2)-10.36.112.19" daemon prio=6 tid=0x0000000008089800 nid=0x3d08 runnable [0x000000000b33f000]
java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
@hchiorean
hchiorean / gist:1869571
Created February 20, 2012 14:58
federated
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:mode="http://www.modeshape.org/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
<!--
Define the JCR repositories
-->
<mode:repositories>
<mode:repository jcr:name="My repository" mode:source="federated">
<mode:options jcr:primaryType="mode:options">
<mode:option jcr:name="systemSourceName" mode:value="system@inmemory1"/>
<mode:option jcr:name="jaasLoginConfigName" mode:value="modeshape-jcr"/>
Temporary directory for tests: D:\Work\hchiorean.modeshape\modeshape-jcr-redux\target
15:25:21,504 ERROR Error during background garbage collection: null
java.lang.NullPointerException
at org.modeshape.jcr.value.binary.FileSystemBinaryStore.removeFilesOlderThan(FileSystemBinaryStore.java:332)
at org.modeshape.jcr.value.binary.FileSystemBinaryStore.removeValuesUnusedLongerThan(FileSystemBinaryStore.java:323)
at org.modeshape.jcr.JcrRepository$RunningState.cleanUpBinaryValues(JcrRepository.java:1359)
at org.modeshape.jcr.JcrRepository.cleanUp(JcrRepository.java:788)
at org.modeshape.jcr.JcrEngine$GarbageCollectionTask.run(JcrEngine.java:136)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
@hchiorean
hchiorean / gist:1497624
Created December 19, 2011 15:15
binary IOex
rg.modeshape.jcr.value.binary.BinaryStoreException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
at org.modeshape.jcr.value.binary.FileSystemBinaryStore.moveFileExclusively(FileSystemBinaryStore.java:184)
at org.modeshape.jcr.value.binary.FileSystemBinaryStore.storeValue(FileSystemBinaryStore.java:122)
at org.modeshape.jcr.value.binary.FileSystemBinaryStoreTest.storeAndCheck(FileSystemBinaryStoreTest.java:257)
at org.modeshape.jcr.value.binary.FileSystemBinaryStoreTest.storeAndCheck(FileSystemBinaryStoreTest.java:246)
at org.modeshape.jcr.value.binary.FileSystemBinaryStoreTest.shouldStoreMultipleBinariesInStore(FileSystemBinaryStoreTest.java:127)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveC
@hchiorean
hchiorean / gist:1481433
Created December 15, 2011 15:13
RepositoryConnectionPool multithreaded
final RepositoryConnectionPool pool = new RepositoryConnectionPool(source);
int clientsCount = pool.getMaximumPoolSize();
final Random rnd = new Random();
ExecutorService executorService = Executors.newCachedThreadPool();
for (int i = 0; i < clientsCount * 3; i++) {
executorService.submit(new Callable<RepositoryConnection>() {
public RepositoryConnection call() throws Exception {