You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2015/02/15 12:30:13 UTC

[jira] [Comment Edited] (SOLR-7060) NoSuchMethodError - org/apache/lucene/util/AttributeImpl

    [ https://issues.apache.org/jira/browse/SOLR-7060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14321927#comment-14321927 ] 

Uwe Schindler edited comment on SOLR-7060 at 2/15/15 11:29 AM:
---------------------------------------------------------------

Hi,
I just have seen this issue very late. In fact, Yourkit is problematic, but the same happens with many other profilers/plugins for the JVM that are not fully Java 7+ compatible. In fact the bytecode generated by Java 7's javac is interpreted in a different way in the runtime (it refers to a not really existent method): MethodHandle#invokeExact() is annotated with a special {{@PolymorphicSignature}} annotation in JDK's source code ([http://goo.gl/UXo3GR]):

bq. Invokes the method handle, allowing any caller type descriptor, but requiring an exact type match. The symbolic type descriptor at the call site of invokeExact must exactly match this method handle's type. No conversions are allowed on arguments or return values.
When this method is observed via the Core Reflection API, it will appear as a single native method, taking an object array and returning an object. If this native method is invoked directly via java.lang.reflect.Method.invoke, via JNI, or indirectly via Lookup.unreflect, it will throw an UnsupportedOperationException.

This means that the argument and return types are fully flexible and are linked at runtime only. This is related to the new java 7 invokedynamic instruction, but used in Lucene to have very fast access to TokenStream's attributes without using reflection. This could also be seen as something like a varargs implementation without array-emulation and hard types.
So I would suggest to update Yourkit or ask them for help with that.
Uwe


was (Author: thetaphi):
Hi,
I just have seen this issue very late. In fact, Yourkit is problematic, but the same happens with many other profilers/plugins for the JVM that are not fully Java 7+ compatible. In fact the bytecode generated by Java 7's javac is interpreted in a different way in the runtime (it refers to a not really existent method): MethodHandle#invokeExact() is annotated with a special {{@PolymorphicSignature}} annotation in JDK's source code ([http://goo.gl/UXo3GR]). This means that the argument and return types are fully flexible and are linked at runtime only. This is related to the new java 7 invokedynamic instruction, but used in Lucene to have very fast access to TokenStream's attributes without using reflection. This could also be seen as something like a varargs implementation without array-emulation and hard types.
So I would suggest to update Yourkit or ask them for help with that.
Uwe

> NoSuchMethodError - org/apache/lucene/util/AttributeImpl
> --------------------------------------------------------
>
>                 Key: SOLR-7060
>                 URL: https://issues.apache.org/jira/browse/SOLR-7060
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.10.2, 4.10.3
>         Environment: CentOS 6
> JDK 1.7.0_72
> Tomcat 7.0.56
>            Reporter: Rene Loitzenbauer
>
> When sending a document update to this solr instance the following error is thrown. For example just updating a single value of an existing document.
> I cannot reproduce the same thing on another machine running on CentOS7 or Windows Server 2008 or 2012.
> I can confirm that the exact same thing works on the same machine with Solr Version 4.7.0
> I found the same Exception here: https://jira.duraspace.org/browse/DS-2293 but was closed as cannot reproduce.
> Any suggestions, how to resolve or analyze this?
> {code}
>  org.apache.solr.common.SolrException; null:java.lang.RuntimeException: java.lang.NoSuchMethodError: java.lang.invoke.MethodHandle.invokeExact()Lorg/apache/lucene/util/AttributeImpl;
> 	at org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:793)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:434)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
> 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736)
> 	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1695)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> 	at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodError: java.lang.invoke.MethodHandle.invokeExact()Lorg/apache/lucene/util/AttributeImpl;
> 	at org.apache.lucene.util.AttributeFactory$DefaultAttributeFactory.createAttributeInstance(AttributeFactory.java:68)
> 	at org.apache.lucene.analysis.NumericTokenStream$NumericAttributeFactory.createAttributeInstance(NumericTokenStream.java:139)
> 	at org.apache.lucene.util.AttributeSource.addAttribute(AttributeSource.java:222)
> 	at org.apache.lucene.analysis.NumericTokenStream.<init>(NumericTokenStream.java:321)
> 	at org.apache.lucene.analysis.NumericTokenStream.<init>(NumericTokenStream.java:232)
> 	at org.apache.lucene.document.Field.tokenStream(Field.java:512)
> 	at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:611)
> 	at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:359)
> 	at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:318)
> 	at org.apache.lucene.index.DocumentsWriterPerThread.updateDocument(DocumentsWriterPerThread.java:239)
> 	at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:454)
> 	at org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1511)
> 	at org.apache.solr.update.DirectUpdateHandler2.addDoc0(DirectUpdateHandler2.java:240)
> 	at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:164)
> 	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:69)
> 	at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:926)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:1080)
> 	at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:692)
> 	at org.apache.solr.handler.loader.JavabinLoader$1.update(JavabinLoader.java:96)
> 	at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readOuterMostDocIterator(JavaBinUpdateRequestCodec.java:166)
> 	at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readIterator(JavaBinUpdateRequestCodec.java:136)
> 	at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:225)
> 	at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec$1.readNamedList(JavaBinUpdateRequestCodec.java:121)
> 	at org.apache.solr.common.util.JavaBinCodec.readVal(JavaBinCodec.java:190)
> 	at org.apache.solr.common.util.JavaBinCodec.unmarshal(JavaBinCodec.java:116)
> 	at org.apache.solr.client.solrj.request.JavaBinUpdateRequestCodec.unmarshal(JavaBinUpdateRequestCodec.java:173)
> 	at org.apache.solr.handler.loader.JavabinLoader.parseAndLoadDocs(JavabinLoader.java:106)
> 	at org.apache.solr.handler.loader.JavabinLoader.load(JavabinLoader.java:58)
> 	at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:99)
> 	at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1967)
> 	at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:777)
> 	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418)
> 	... 18 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org