clarin-eric / VLO

Virtual Language Observatory
GNU General Public License v3.0
14 stars 6 forks source link

"Internal error" for record page of certain records #133

Closed twagoo closed 6 years ago

twagoo commented 6 years ago

Search for duelme in the VLO and select the result named "Dutch Electronic Lexicon of Multiword Expressions". The resulting page just shows 'internal error' . The VLO log shows the following stack trace:

2018-02-01 10:12:31,827 ERROR [eu.clarin.cmdi.vlo.service.solr.impl.SolrDaoImpl#fireQuery:85] - Error getting data:
org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/vlo-index: no field name specified in query and no default specified via 'df' param
    at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:626)
    at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:253)
    at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:242)
    at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:178)
    at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:942)
    at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:957)
    at eu.clarin.cmdi.vlo.service.solr.impl.SolrDaoImpl.fireQuery(SolrDaoImpl.java:81)
    at eu.clarin.cmdi.vlo.service.solr.impl.SearchResultsDaoImpl.getDocuments(SearchResultsDaoImpl.java:39)
    at eu.clarin.cmdi.vlo.service.solr.impl.SimilarDocumentsServiceImpl.getDocuments(SimilarDocumentsServiceImpl.java:48)
    at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:508)
    at com.sun.proxy.$Proxy51.getDocuments(Unknown Source)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel$1.load(SimilarDocumentsPanel.java:61)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel$1.load(SimilarDocumentsPanel.java:56)
    at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:135)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel.onConfigure(SimilarDocumentsPanel.java:84)
    at org.apache.wicket.Component.configure(Component.java:1056)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:941)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:274)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Page.onBeforeRender(Page.java:801)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
    at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
    at org.apache.wicket.Component.render(Component.java:2325)
    at org.apache.wicket.Page.renderPage(Page.java:1018)
    at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
    at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
    at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
    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:218)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
2018-02-01 10:12:31,829 ERROR [org.apache.wicket.DefaultExceptionMapper#mapUnexpectedExceptions:170] - Unexpected error occurred
org.apache.wicket.WicketRuntimeException: Error attaching this container for rendering: [RecordDetailsPanel [Component id = panel]]
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1837)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.extensions.markup.html.tabs.TabbedPanel.onBeforeRender(TabbedPanel.java:274)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    at org.apache.wicket.Component.onBeforeRender(Component.java:3916)
    at org.apache.wicket.Page.onBeforeRender(Page.java:801)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:950)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.Component.internalPrepareForRender(Component.java:2236)
    at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
    at org.apache.wicket.Component.render(Component.java:2325)
    at org.apache.wicket.Page.renderPage(Page.java:1018)
    at org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:124)
    at org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:236)
    at org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
    at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
    at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
    at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
    at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
    at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
    at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
    at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
    at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
    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:218)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
    at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/vlo-index: no field name specified in query and no default specified via 'df' param
    at eu.clarin.cmdi.vlo.service.solr.impl.SolrDaoImpl.fireQuery(SolrDaoImpl.java:86)
    at eu.clarin.cmdi.vlo.service.solr.impl.SearchResultsDaoImpl.getDocuments(SearchResultsDaoImpl.java:39)
    at eu.clarin.cmdi.vlo.service.solr.impl.SimilarDocumentsServiceImpl.getDocuments(SimilarDocumentsServiceImpl.java:48)
    at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:508)
    at com.sun.proxy.$Proxy51.getDocuments(Unknown Source)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel$1.load(SimilarDocumentsPanel.java:61)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel$1.load(SimilarDocumentsPanel.java:56)
    at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:135)
    at eu.clarin.cmdi.vlo.wicket.panels.record.SimilarDocumentsPanel.onConfigure(SimilarDocumentsPanel.java:84)
    at org.apache.wicket.Component.configure(Component.java:1056)
    at org.apache.wicket.Component.internalBeforeRender(Component.java:941)
    at org.apache.wicket.Component.beforeRender(Component.java:1018)
    at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1825)
    ... 45 more
Caused by: org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException: Error from server at http://localhost:8983/solr/vlo-index: no field name specified in query and no default specified via 'df' param
    at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod(HttpSolrClient.java:626)
    at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:253)
    at org.apache.solr.client.solrj.impl.HttpSolrClient.request(HttpSolrClient.java:242)
    at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:178)
    at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:942)
    at org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:957)
    at eu.clarin.cmdi.vlo.service.solr.impl.SolrDaoImpl.fireQuery(SolrDaoImpl.java:81)
    ... 60 more
teckart commented 6 years ago

I can't reproduce this bug on my testing machine (which uses slightly different versions of the Webapp and Solr). Could you identify the "underlying" file for that record? Seems to be 'Instituut_voor_Nederlandse_Lexicologie_INL_Metadata_Repository/DuELME.xml', but just to be sure...

twagoo commented 6 years ago

@teckart https://vlo.clarin.eu/data/clarin/results/cmdi/Instituut_voor_Nederlandse_Lexicologie_INL_Metadata_Repository/DuELME.xml

teckart commented 6 years ago

This is a funny one. I could reproduce this behaviour once, when using the current master branch (bcd59a3) and reverting the removal of parameter "mm" in solrconfig.xml (i.e. basically using vlo-4.3.2) on a clean install + import. However, I couldn't reproduce this behaviour, using the same procedure after removing "mm" from solrconfig again.

twagoo commented 6 years ago

@teckart using Docker or not? In case of Docker it may be needed to remove the provisioning volume for Solr home, otherwise previous configurations may persist (depending on your exact setup).

twagoo commented 6 years ago

I can reproduce this with e.g. the following: http://alpha-vlo.clarin.eu/solr/vlo-index/mlt?q=id:CLARIN%20Centres/CombiLex.xml

vs

The problem seems to be in the query factory for similar documents. The ID is escaped, but spaces appear (not sure if this is desirable but that would be a different issue) which break the query. I will look into a solution and implement it in SolrDocumentQueryFactoryImpl.

Quotation seems to be a solution

twagoo commented 6 years ago

I'll shortly be testing this on alpha as 4.3.4-RC1, hope to be able to deploy this today in the scheduled maintenance slot (2pm CET).

Test case: only search result for "CDROM Middelnederlands"

twagoo commented 6 years ago

Note: VLO 4.3.4 has been deployed to production