1

I deployed GeoNetwork 2.10 to a Tomcat 7 instance, replacing the ROOT application. GeoNetwork is accessible from the command line, returning the usual HTML message requiring JavaScript. But when it is accessed with a graphical web browser it sends back the exception below. The various log files reporting exactly the same without adding any further information.

Any clues on what may be causing this exception are welcome.

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Exception raised jeeves.server.JeevesEngine.init(JeevesEngine.java:236) jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:91) javax.servlet.GenericServlet.init(GenericServlet.java:160) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:701)

root cause

java.lang.StringIndexOutOfBoundsException: String index out of range: -1 java.lang.String.substring(String.java:1949) java.lang.String.substring(String.java:1916) jeeves.monitor.MonitorManager.(MonitorManager.java:76) jeeves.server.JeevesEngine.init(JeevesEngine.java:141) jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:91) javax.servlet.GenericServlet.init(GenericServlet.java:160) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) java.lang.Thread.run(Thread.java:701)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.26 logs.

Update: Following Délawen's answer, this is now issue 443 at GitHub. For now I will leave this question marked as unanswered.

1

The problem is not related to the version of tomcat but to new changes in geoNetwork that don't expect geoNetwork to be the ROOT application. I'm not sure if there is an issue already opened, but if not, you can open it.

The fast solution will be to place geoNetwork not on the ROOT app.

As tomcat wants to work on port 8080, I usually use an apache2 redirection to a cleaner url, which means it doesn't matter which path has geoNetwork on tomcat.

This is what I use to redirect geonetwork from apache to tomcat:

<VirtualHost *:80>
    ProxyRequests Off                                                                                                               

    ServerAdmin $yourEmail                                                                                              
    ServerName $yourDomain                                                                                                      

    ProxyPreserveHost On                                                                                                            
    ProxyPass / http://$ip:8080/ retry=0                                                                                    
    ProxyPassReverse / http://$ip:8080/                                                                                     
</VirtualHost>   

Or the SSL version:

<VirtualHost *:443>
    ProxyRequests Off

    SSLEngine On
    SSLProxyEngine On 

    ServerAdmin $yourEmail
    ServerName $yourDomain

    ProxyPreserveHost On
    ProxyPass / https://$ip:8443/ retry=0
    ProxyPassReverse / https://$ip:8443/
</VirtualHost>
  • 1
    The reason I am trying to run GeoNetwork as ROOT is precisely because the ReverseProxy through Apache is not working. I get "This web page has a redirect loop" in Chromium and with Firefox most of the JS is non functional. But that is likely another issue. – Luís de Sousa Apr 9 '14 at 6:57
  • Check the update of my comment – María Arias de Reyna Domínguez Apr 9 '14 at 7:41
  • 1
    "http://$ip:8080/" is directing to the ROOT application, which we have already seen does not work. Once you get the "/geonetwork" there things just crumble. – Luís de Sousa Apr 9 '14 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.