java.lang.IllegalArgumentException: Field must have either TokenStream, String, Reader or Number value; got stored,indexed,tokenized<product:>

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Strange exception in Elasticsearch 1.4.3
    via by Angel Cross,
  • freebsd dxr howto · GitHub
    via by Unknown author,
  • I have a Phrase entity with multiple Tags. {code:title=Phrase.java|borderStyle=solid} @ManyToMany(fetch = FetchType.LAZY) @JoinTable(name = "phrase_tag", joinColumns = @JoinColumn(name = "phrase_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "tag_id", referencedColumnName = "id")) @IndexedEmbedded(includeEmbeddedObjectId = false) public Set<Tag> getTags() { return tags; } {code} The only indexed field in Tag is iid: {code:title=Tag.java|borderStyle=solid} @Transient @Facet(forField = "iid") @Field(name = "iid", index = Index.YES, analyze = Analyze.NO) public Long getIndexingId(){ return getId(); } {code} Adding a {{@Facet}} annotation to mapping results in the following exception while indexing: {code} org.hibernate.search.exception.impl.LogErrorHandler - HSEARCH000058: HSEARCH000183: Unable to index instance of type com.phrask.model.phrase.Phrase while batch indexing: id=33, hashCode=33 java.lang.IllegalArgumentException: DocValuesField "tags.iid" appears more than once in this document (only one value is allowed per field) at org.apache.lucene.index.NumericDocValuesWriter.addValue(NumericDocValuesWriter.java:54) at org.apache.lucene.index.DefaultIndexingChain.indexDocValue(DefaultIndexingChain.java:438) at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:392) at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318) at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:241) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:465) at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1526) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1252) at org.hibernate.search.backend.impl.lucene.works.AddWorkExecutor.performWork(AddWorkExecutor.java:54) at org.hibernate.search.backend.impl.lucene.LuceneBackendTaskStreamer.doWork(LuceneBackendTaskStreamer.java:53) at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueProcessor.applyStreamWork(LuceneBackendQueueProcessor.java:76) at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performStreamOperation(DirectoryBasedIndexManager.java:107) at org.hibernate.search.backend.impl.StreamingOperationExecutorSelector$AddSelectionExecutor.performStreamOperation(StreamingOperationExecutorSelector.java:106) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.sendWorkToShards(DefaultBatchBackend.java:62) at org.hibernate.search.backend.impl.batch.DefaultBatchBackend.enqueueAsyncWork(DefaultBatchBackend.java:48) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.index(IdentifierConsumerDocumentProducer.java:263) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.indexAllQueue(IdentifierConsumerDocumentProducer.java:192) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadList(IdentifierConsumerDocumentProducer.java:169) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.loadAllFromQueue(IdentifierConsumerDocumentProducer.java:135) at org.hibernate.search.batchindexing.impl.IdentifierConsumerDocumentProducer.run(IdentifierConsumerDocumentProducer.java:108) at org.hibernate.search.batchindexing.impl.OptionallyWrapInJTATransaction.runWithErrorHandler(OptionallyWrapInJTATransaction.java:104) at org.hibernate.search.batchindexing.impl.ErrorHandledRunnable.run(ErrorHandledRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) {code} Removing {{@Facet}} annotation removes the exception along with ability for faceting on tag Ids. I didn't find any evidence that faceting over multi value fields is deprecated in {{5.3.0.Final}} so it makes me think that it's a bug.
    via by Ashot Golovenko,
    • java.lang.IllegalArgumentException: Field must have either TokenStream, String, Reader or Number value; got stored,indexed,tokenized<product:> at org.apache.lucene.document.Field.tokenStream(Field.java:555) at org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:103) at org.apache.lucene.index.DocFieldProcessor.processDocument(DocFieldProcessor.java:248) at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:253) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:455) at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1534) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1204) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1185) at org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.buildIndex(CpeMemoryIndex.java:214) at org.owasp.dependencycheck.data.cpe.CpeMemoryIndex.open(CpeMemoryIndex.java:119) at org.owasp.dependencycheck.analyzer.CPEAnalyzer.open(CPEAnalyzer.java:159) at org.owasp.dependencycheck.analyzer.CPEAnalyzer.initialize(CPEAnalyzer.java:133) at org.owasp.dependencycheck.Engine.initializeAnalyzer(Engine.java:442) at org.owasp.dependencycheck.maven.MavenEngine.initializeAnalyzer(MavenEngine.java:137) at org.owasp.dependencycheck.Engine.analyzeDependencies(Engine.java:380) at org.owasp.dependencycheck.maven.MavenEngine.analyzeDependencies(MavenEngine.java:95) at org.owasp.dependencycheck.maven.AggregateMojo.generateDataFile(AggregateMojo.java:314) at org.owasp.dependencycheck.maven.AggregateMojo.generateDataFile(AggregateMojo.java:291) at org.owasp.dependencycheck.maven.AggregateMojo.runCheck(AggregateMojo.java:75) at org.owasp.dependencycheck.maven.BaseDependencyCheckMojo.execute(BaseDependencyCheckMojo.java:423) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152) at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238) at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:185) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.maven.Maven3Builder.call(Maven3Builder.java:136) at hudson.maven.Maven3Builder.call(Maven3Builder.java:71) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    tyson925
    tyson9253 times, last one,
    Unknown visitor1 times, last one,