Bug #3728
closedCan't run advanced search in default skin
0%
Description
I did get a lot farther with the rc7 source distribution. I was able to install it on linux and get through the configuration dialogs okay. This time the database configuration correctly identified the metacat version as 1.8.0 (well, almost correctly, since the actual version was 1.8.1) and succeeded in upgrading the database to version 1.9.0.
I installed and tested the 'default' skin. The simple search form seems to work well, and so do the browse terms. However, the default skin's Advanced Search form appears to be broken. There is a problem with the wrong metacat URL being specified. Notice in the following error message how the 'knb' context is missing from the URL. Instead of:
http://scoria.lternet.edu:8080//metacat
the correct URL should have been:
http://scoria.lternet.edu:8080/knb/metacat
Here is the full error message from the Tomcat logs:
Starting query...
Failed to send data to metacat 3 times: http://scoria.lternet.edu:8080//metacat
metacaturl: http://scoria.lternet.edu:8080//metacat
General exception:
http://scoria.lternet.edu:8080//metacat
edu.ucsb.nceas.metacat.client.MetacatInaccessibleException: http://scoria.lternet.edu:8080//metacat
at edu.ucsb.nceas.metacat.client.MetacatClient.query(MetacatClient.java:314)
at edu.ucsb.nceas.metacat.client.MetacatClient.query(MetacatClient.java:283)
at edu.ucsb.nceas.metacat.advancedsearch.AdvancedSearch.runQuery(AdvancedSearch.java:913)
at edu.ucsb.nceas.metacat.advancedsearch.AdvancedSearch.executeAdvancedSearch(AdvancedSearch.java:696)
at edu.ucsb.nceas.metacat.advancedsearch.AdvancedSearchServlet.doPost(AdvancedSearchServlet.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:691)
at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:661)
at org.apache.jsp.style.skins.default_.advancedsearchforward_jsp._jspService(advancedsearchforward_jsp.java:90)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)
To reproduce this problem, install the 'default' skin, click on the 'Advanced Search' link, and try any type of advanced search.
I originally developed the Advanced Search code, but I haven't had a chance yet to look at what is causing the bug in the metacat URL.
Updated by Michael Daigle almost 16 years ago
Note, the comments originally added were from Duane C
Updated by Michael Daigle almost 16 years ago
The AdvancedSearchServlet was caching the system context before the configuration utility was run. If the user went directly to metacat after configuration, the context would be blank. If metacat was restarted, it would work.
Changed AdvancedSearchServlet to get the metacat url from SystemUtil at search time.