Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchMethodError: org.apache.solr.search.DocList.matches()I on ListRecords #16

Open
mobleyt opened this issue Mar 5, 2018 · 6 comments
Assignees

Comments

@mobleyt
Copy link

mobleyt commented Mar 5, 2018

Hi, I'm getting oai4solr set up on a Solr 7 instance (which might be the problem), and I'm having an issue with ListRecords requests failing. All the basic verb requests seems to be working fine, including GetIdentifier for single record responses. However, ListRecords requests with the packaged oai_dc and solr metadataPrefix formats provide the following. I'm not sure why that 'I' is coming after matches() in the stacktrace, but I'm also not a Java guy necessarily. Thanks.

org.apache.solr.search.DocList.matches()I,trace=java.lang.NoSuchMethodError: org.apache.solr.search.DocList.matches()I at org.socialhistoryservices.api.oai.OAIRequestHandler.buildQuery(OAIRequestHandler.java:216) at org.socialhistoryservices.api.oai.OAIRequestHandler.handleRequestBody(OAIRequestHandler.java:130) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:177) at org.apache.solr.core.SolrCore.execute(SolrCore.java:2503) at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:710) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:516) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134) at org.eclipse.jetty.server.Server.handle(Server.java:534) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108) at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148) at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589) at java.lang.Thread.run(Thread.java:748

@lwo
Copy link
Member

lwo commented Mar 6, 2018

Thanks for the report. It may be an API change, so I think I better try it out in the compiler for Solr 7.x...

@lwo lwo self-assigned this Mar 6, 2018
@lwo
Copy link
Member

lwo commented Mar 8, 2018

Yes, a small change it seems:

Wrong 5th argument type. Found: 'long', required: 'int' less...

And the getSource and getVersion methods no longer exist.... there may be more API changes. To make the plugin agreeable for Solr 7.x I will make a corresponding branch with the required upgrades.

@kazooo
Copy link
Contributor

kazooo commented Dec 16, 2018

Hello, I'm interested in how soon there will be a version of plugin for Solr 7.x and if it will be at all, thanks.

@lwo
Copy link
Member

lwo commented Dec 19, 2018

Hello Xermak00. Nothing is planned as yet. Hence I would not say no to a pull request.

@mobleyt
Copy link
Author

mobleyt commented Jul 10, 2019

Just as a FYI, dropping the @Override from getSource and getVersion and casting docList.matches() as int allowed me to recompile and get things going again on Solr 7.

At org.socialhistoryservices.api.oai.OAIRequestHandler.buildQuery(OAIRequestHandler.java:216):
(int) docList.matches()

I'm sure there's a more correct way to do that of course.

@lwo
Copy link
Member

lwo commented Jul 11, 2019

Thanks, I'll find some time to try this out and if it passes testing I'll put it in for 7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants