You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by thomasg <th...@hotmail.com> on 2006/03/28 18:33:22 UTC

ClassCastException in timer thread

Hi guys,

I am experiencing the following exception on a regular basis when adding
documents to a repository. The document still gets added but it would be
good to know the cause / solution for the exception if anyone has seen it
before:

Exception in thread "Timer-1" java.lang.ClassCastException:
org.apache.lucene.store.FSIndexOutput
	at org.apache.lucene.store.Directory.createFile(Directory.java:67)
	at
org.apache.jackrabbit.core.query.lucene.FSDirectory.createFile(FSDirectory.java:161)
	at org.apache.lucene.store.Directory.createOutput(Directory.java:75)
	at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:78)
	at org.apache.lucene.index.IndexWriter$1.doBody(IndexWriter.java:263)
	at org.apache.lucene.store.Lock$With.run(Lock.java:109)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:260)
	at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:245)
	at
org.apache.jackrabbit.core.query.lucene.AbstractIndex.<init>(AbstractIndex.java:105)
	at
org.apache.jackrabbit.core.query.lucene.PersistentIndex.<init>(PersistentIndex.java:75)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.getOrCreateIndex(MultiIndex.java:484)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex$CreateIndex.execute(MultiIndex.java:1426)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.executeAndLog(MultiIndex.java:770)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.commitVolatileIndex(MultiIndex.java:811)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.flush(MultiIndex.java:690)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.checkFlush(MultiIndex.java:936)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex.access$000(MultiIndex.java:73)
	at
org.apache.jackrabbit.core.query.lucene.MultiIndex$1.run(MultiIndex.java:290)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)

Thanks, Thomas
--
View this message in context: http://www.nabble.com/ClassCastException-in-timer-thread-t1356696.html#a3633066
Sent from the Jackrabbit - Dev forum at Nabble.com.


Re: ClassCastException in timer thread

Posted by thomasg <th...@hotmail.com>.
Thanks for that, its an unusual exception in that it doesn't seem to affect
the (simple) operations that I am doing such as adding documents and
searching for words. The documents are added and searches work as expected,
just assumed it was a background thread doing something non-critical. Maybe
using this version will cause serious problems at some point in time (when
indexes get bigger / merged?). 

Just one more question, can you give any indication when Jackrabbit will
move over to lucene 1.9 or later? 

Thanks, Thomas
--
View this message in context: http://www.nabble.com/ClassCastException-in-timer-thread-t1356696.html#a3646131
Sent from the Jackrabbit - Dev forum at Nabble.com.


Re: ClassCastException in timer thread

Posted by Marcel Reutegger <ma...@gmx.net>.
It seems you are using lucene 1.9 with jackrabbit. This is currently not 
possible because there is a backward compatibility issue with the 1.9 
lucene release. You have to switch back to lucene 1.4.3.

See: http://issues.apache.org/jira/browse/JCR-352

regards
  marcel

thomasg wrote:
> Hi guys,
> 
> I am experiencing the following exception on a regular basis when adding
> documents to a repository. The document still gets added but it would be
> good to know the cause / solution for the exception if anyone has seen it
> before:
> 
> Exception in thread "Timer-1" java.lang.ClassCastException:
> org.apache.lucene.store.FSIndexOutput
> 	at org.apache.lucene.store.Directory.createFile(Directory.java:67)
> 	at
> org.apache.jackrabbit.core.query.lucene.FSDirectory.createFile(FSDirectory.java:161)
> 	at org.apache.lucene.store.Directory.createOutput(Directory.java:75)
> 	at org.apache.lucene.index.SegmentInfos.write(SegmentInfos.java:78)