[ https://issues.apache.org/jira/browse/LUCENE-5523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uwe Schindler resolved LUCENE-5523. ----------------------------------- Resolution: Cannot Reproduce Assignee: Uwe Schindler I checked your example with Lucene 4.7 and also Lucene 4.6. In both cases, test succeeds. So you have for sure a broken classpath mixing different Lucene versions. > MemoryIndex.addField violates TokenStream contract > -------------------------------------------------- > > Key: LUCENE-5523 > URL: https://issues.apache.org/jira/browse/LUCENE-5523 > Project: Lucene - Core > Issue Type: Bug > Affects Versions: 3.6.1 > Reporter: Willem Salembier > Assignee: Uwe Schindler > > Running the example from the javadoc page generates a IllegalStateException. > http://lucene.apache.org/core/4_7_0/memory/org/apache/lucene/index/memory/MemoryIndex.html > {code} > java.lang.RuntimeException: java.lang.IllegalStateException: TokenStream > contract violation: reset()/close() call missing, reset() called multiple > times, or subclass does not call super.reset(). Please see Javadocs of > TokenStream class for more information about the correct consuming workflow. > at > org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:463) > at > org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:298) > at be.curtaincall.provisioning.SearchTest.testSearch(SearchTest.java:32) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) > at > org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) > at org.junit.runners.ParentRunner.run(ParentRunner.java:309) > at org.junit.runner.JUnitCore.run(JUnitCore.java:160) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) > Caused by: java.lang.IllegalStateException: TokenStream contract violation: > reset()/close() call missing, reset() called multiple times, or subclass does > not call super.reset(). Please see Javadocs of TokenStream class for more > information about the correct consuming workflow. > at org.apache.lucene.analysis.Tokenizer$1.read(Tokenizer.java:110) > at > org.apache.lucene.analysis.util.CharacterUtils.readFully(CharacterUtils.java:213) > at > org.apache.lucene.analysis.util.CharacterUtils$Java5CharacterUtils.fill(CharacterUtils.java:255) > at > org.apache.lucene.analysis.util.CharacterUtils.fill(CharacterUtils.java:203) > at > org.apache.lucene.analysis.util.CharTokenizer.incrementToken(CharTokenizer.java:135) > at > org.apache.lucene.index.memory.MemoryIndex.addField(MemoryIndex.java:429) > ... 28 more > {code} > Also tested in 3.7.0, but version not yet created in JIRA. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org