Open jermnelson opened 4 years ago
@eichmann Here is a specific example where the error 500 happens when using parentheses in the query...
$ curl -L -D - -H 'Accept: application/n-triples' 'http://services.ld4l.org/ld4l_services/geonames_batch.jsp?query=Hague%20%28Netherlands%29&entity=AP&maxRecords=8&startRecord=1&lang=en'
HTTP/1.1 500
Date: Mon, 23 Mar 2020 15:55:34 GMT
Server: Apache/2.4.33 (Unix) PHP/7.1.16 LibreSSL/2.2.7
Content-Type: text/html;charset=utf-8
Content-Language: en
Content-Length: 2833
Set-Cookie: JSESSIONID=2CB4E1C7F4A4F91B61E26F43F58C9E27;path=/ld4l_services;HttpOnly
Connection: close
<!DOCTYPE html><html><head><title>Apache Tomcat/9.0.0.M9 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 500 - java.lang.NullPointerException</h1><div class="line"></div><p><b>type</b> Exception report</p><p><b>message</b> <u>java.lang.NullPointerException</u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b></p><pre>org.apache.jasper.JasperException: java.lang.NullPointerException
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:481)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
edu.uiowa.tagUtil.filter.BlankLineFilter.doFilter(BlankLineFilter.java:55)
</pre><p><b>root cause</b></p><pre>java.lang.NullPointerException
edu.uiowa.lucene.LuceneCount.doStartTag(LuceneCount.java:27)
org.apache.jsp.geonames_005fbatch_jsp._jspx_meth_lucene_005fcount_005f0(geonames_005fbatch_jsp.java:1536)
org.apache.jsp.geonames_005fbatch_jsp._jspx_meth_lucene_005fsearch_005f0(geonames_005fbatch_jsp.java:1505)
org.apache.jsp.geonames_005fbatch_jsp._jspService(geonames_005fbatch_jsp.java:206)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
edu.uiowa.tagUtil.filter.BlankLineFilter.doFilter(BlankLineFilter.java:55)
</pre><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/9.0.0.M9 logs.</u></p><hr class="line"><h3>Apache Tomcat/9.0.0.M9</h3></body></html>
@fculpepper commented on Fri Jan 24 2020
What went wrong? When trying to add the LOC geo name Boston (Mass.) to my instance record, the lookup returned the error: NetworkError when attempting to fetch resource What did you expect to happen? I expect the lookups to recognize parentheses and parentheses.
@jermnelson commented on Fri Jan 24 2020
QA is returning a 500 error code, running this query directly https://lookup.ld4l.org/authorities/search/linked_data/locnames_ld4l_cache?q=Boston%20%28Mass&maxRecords=8&lang=en&context=true&response_header=true&startRecord=1 causes an error.