Geoserver fails to render config interface
-------------------------------------------
Key: GEOS-2725
URL: http://jira.codehaus.org/browse/GEOS-2725
Project: GeoServer
Issue Type: Bug
Components: Configuration
Affects Versions: 1.7.2
Environment: Debian Lenny ppc64 with IBMJDK ibm-java-ppc-60 and tomcat 6.0.18
Reporter: Tim Sutton
Assignee: Andrea Aime
When trying to access http://myserver:8180/geoserver/config/index.do I get the error listed below. Detail account of how I setup geoserver follows after the stacktrace.
Stacktrace:
----------------------------------------------------------------
GeoServer - Exception
The following exception was thrown:
* class javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/Configuration.jsp': javax.servlet.jsp.JspException: Exception thrown by getter for property: "dataStoreErrorKeys" of bean: "GeoServer.ApplicationState"
* class javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/Configuration.jsp': javax.servlet.jsp.JspException: Exception thrown by getter for property: "dataStoreErrorKeys" of bean: "GeoServer.ApplicationState"
Details:
javax.servlet.ServletException: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/Configuration.jsp': javax.servlet.jsp.JspException: Exception thrown by getter for property: "dataStoreErrorKeys" of bean: "GeoServer.ApplicationState"
at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspService(mainLayout_jsp.java:673)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.doForward(MultipleDelegatingTilesRequestProcessor.java:346)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.processTilesDefinition(MultipleDelegatingTilesRequestProcessor.java:212)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.processForwardConfig(MultipleDelegatingTilesRequestProcessor.java:81)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.doForward(MultipleDelegatingTilesRequestProcessor.java:346)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
at org.vfny.geoserver.config.web.tiles.MultipleDelegatingTilesRequestProcessor.processForwardConfig(MultipleDelegatingTilesRequestProcessor.java:95)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:41)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:735)
Caused by: javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/Configuration.jsp': javax.servlet.jsp.JspException: Exception thrown by getter for property: "dataStoreErrorKeys" of bean: "GeoServer.ApplicationState"
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspx_meth_tiles_005finsert_005f7(mainLayout_jsp.java:1429)
at org.apache.jsp.WEB_002dINF.pages.layouts.mainLayout_jsp._jspService(mainLayout_jsp.java:644)
... 81 more
Detailed run down of GeoServer Setup procedure used:
----------------------------------------------------------------------------
I will outline notes for configuring geoserver for production useage here. For casual testing it is possible to use the geoserver binary which includes its own servlet container.
14.1. Initial Install
Note: much of this section of this document is derived from :
http://geoserver.org/display/GEOSDOC/2.6+GeoServer+in+Production+Environment
and
http://grimmeister.wordpress.com/2007/08/08/setting-up-an-open-geospatial-consortium-service-server/
but I have deviated from these where suggestions were out of date or not working for me.
14.1.1. PPC64 Debian only
On the P5 ppc64 platform the sunjdk is not supported as far as I know. IBM Supply a sun compatible jdk here:
http://www.ibm.com/developerworks/java/jdk/linux/download.html
I downloaded java SE version 6 SR3 for 32-bit iSeries/pSeries in tgz format. You need to have a login for IBM to do the download.
Note: Even though the p5 is a 54 bit machine you should install the 32bit java (as explained here: http://www.yellowdog-board.com/viewtopic.php?f=4&p=24949) because the 64 bit version I tried initially did not work.
cd /opt/
mkdir java6
cp /tmp/ibm-java-sdk-6.0-3.0-linux-ppc.tgz .
tar xfz ibm-java-sdk-6.0-3.0-linux-ppc.tgz
The sdk will be unzipped as:
/opt/java6/ibm-java-ppc-60
We will use this later in the process so that tomcat uses this rather than openjdk which is not supported by geoserver.
14.1.2. Install tomcat:
Ubuntu:
sudo apt-get install tomcat5.5 tomcat5.5-admin tomcat5.5-webapps
Now start tomcat as a daemon:
sudo /etc/init.d/tomcat5.5 start
PPC64 debian:
The tomcat5.5 debian ppc package would not work with the ibm jdk (the jsvc script wouldnt start it anyway) so I used the non packaged version of tomcat. Download from :
http://tomcat.apache.org/download-60.cgi
And I unpacked it in /opt
cd /opt
mkdir tomcat
cd tomcat
tar xvfz /tmp/apache-tomcat-6.0.18.tar.gz
Make it run on port 8180
cd /apache-tomcat-6.0.18
vim conf/server.xml
Search for 8080 and change to 8180.
14.2. Use the right jdk
Ubuntu
Edit /etc/default/tomcat5.5 and uncomment this line:
JAVA_HOME=/usr/lib/jvm/java-6-sun
Now restart tomcat:
sudo /etc/init.d/tomcat5.5 restart
Debian PPC64
or if you are on ppc64 using the jdk directions described earlier in this document, you should do:
Add the following lines to /etc/profile
export JAVA_HOME=/opt/java6/ibm-java-ppc-60/jre
export PATH=${JAVA_HOME}/bin:$PATH
14.3. Running tomcat
Tomcat should now be running on port 8180 - point your browser there to verify:
Set admin permissions for tomcat:
Ubuntu
sudo vim /etc/tomcat5.5/tomcat-users.xml
Debian PPC64
vim /opt/tomcat/apache-tomcat-6.0.18/conf/tomcat-users.xml
And make it look something like this (replace XXX with a real password)
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="tomcat"/>
<role rolename="admin"/>
<role rolename="role1"/>
<user username="timlinux" password="XXXXXX" roles="admin,manager,tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
Now restart tomcat:
Ubuntu
sudo /etc/init.d/tomcat5.5 restart
Debian ppc64
cd /opt/tomcat/apache-tomcat-6.0.18
bin/shutdown.sh
bin/startup.sh
You should now be able to log in to the status view at :
http://localhost:8180/manager/status
Use the timlinux / XXXX password defined above.
14.3.1. Install Geoserver war
Download the geoserver web archive from:
http://kent.dl.sourceforge.net/sourceforge/geoserver/geoserver-1.7.2-war.zip
Now extract the war:
unzip geoserver-1.7.2-war.zip
Now go to the tomcat manager:
http://localhost:8180/manager/html/list
And in the section 'WAR file to deploy' use the browse option to select the war file from your hard disk.
After uploading it you will be taken to a page with a list of web apps, and geoserver should be listed there as 'stopped'. Before starting it, we will first set some permissions so that it can run properly...
14.3.2. Set geoserver wep app permissions
Ubuntu
sudo vim /etc/tomcat5.5/policy.d/geoserver.policy
Now paste in the following content so that geoserver can run with less restrictive permissions:
grant codeBase "file:/var/lib/tomcat5.5/webapps/geoserver/WEB-INF/classes/-" {
permission java.security.AllPermission;
};
grant codeBase "file:/var/lib/tomcat5.5/webapps/geoserver/WEB-INF/lib/-" {
permission java.security.AllPermission;
};
Debian PPC64
vim /opt/tomcat/apache-tomcat-6.0.18/conf/catalina.policy
Now paste in the following content so that geoserver can run with less restrictive permissions:
grant codeBase "file:/opt/tomcat/apache-tomcat-6.0.18/webapps/geoserver/WEB-INF/classes/-" {
permission java.security.AllPermission;
};
grant codeBase "file:/opt/tomcat/apache-tomcat-6.0.18/webapps/geoserver/WEB-INF/lib/-" {
permission java.security.AllPermission;
};
14.3.3. Set up general tomcat permissions
Next edit the general policy file:
Ubuntu
sudo vim /etc/tomcat5.5/policy.d/04webapps.policy
Debian PPC64
vim /opt/tomcat/apache-tomcat-6.0.18/conf/catalina.policy
Both
And add near the end of this file after the precompiled JSP stanzas:
// Precompiled JSPs need access to this package.
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
// Added by Tim for Geoserver
permission java.security.AllPermission;
14.4. Test running
Now point your browser at:
http://localhost:8180/geoserver
You should see the geoserver application loading. Dont start to use it yet as we will make a few more tweaks!
14.5. Tweaking the geoserver install
14.5.1. Container tweaks
Ubuntu
Edit
/etc/default/tomcat5.5
And add the following line:
JAVA_OPTS="-Xms48m -Xmx256M -XX:SoftRefLRUPolicyMSPerMB=36000
-XX:SoftRefLRUPolicyMSPerMB=36000 -XX:MaxPermSize=128m -XX:XX:+UseParallelGC
-Djava.awt.headless=true"
Note: don't use a line break in the actual config file (write it all in one long line). The guides also suggested adding a -server option there but this did not work for me (to be investigated further).
Debian PPC64
vim bin/catalina.sh
Near the top create JAVA_OPTS and make them look like this:
JAVA_OPTS=-Xms48m \
-Xmx256M \
-XX:SoftRefLRUPolicyMSPerMB=36000 \
-XX:SoftRefLRUPolicyMSPerMB=36000 \
-XX:MaxPermSize=128m \
-XX:XX:+UseParallelGC \
-Djava.awt.headless=true \
-server
14.5.2. Server configuration tweaks
Go to:
http://localhost:8180/geoserver/config/server.do
And change 'loggin profile' to "PRODUCTION_LOGGING.properties".
Also enable gzip compression for results - in /etc/tomcat5.5/server.xml (or /opt//opt/tomcat/apache-tomcat-6.0.18/conf/server.xml on debian ppc64) , remove:
<!-- Original before Tim mods -->
<Connector port="8180" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
and replace with:
<!-- Moadified by Tim -->
<Connector port="8180" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
compression="on" compressableMimeType="text/html,text/xml,text/plain,application/xml,application/vnd.google-earth.kml+xml,application/json,application/x-javascript"
/>
Next we are going to set the geoserver datadir to /opt/geoserver_data. To do this edit:
Ubuntu
sudo vim /var/lib/tomcat5.5/webapps/geoserver/WEB-INF/web.xml
Debian PPC64
sudo vim /opt/tomcat/apache-tomcat-6.0.18/webapps/geoserver/WEB-INF/web.xml
All
And uncomment:
<!--
<context-param>
<param-name>GEOSERVER_DATA_DIR</param-name>
<param-value>C:\eclipse\workspace\geoserver_trunk\cite\confCiteWFSPostGIS</param-value>
</context-param>
-->
and modify it so it looks like this:
<context-param>
<param-name>GEOSERVER_DATA_DIR</param-name>
<param-value>/opt/geoserver_data</param-value>
</context-param>
Now create the data dir and make tomcat55 the owner:
sudo mkdir /opt/geoserver_data
sudo chown tomcat55:nogroup /opt/geoserver_data
We need to copy the scaffold data structure into the data dir. If you have an existing configuration, you can migrate it. For example before running under tomcat I was using geoserver as a standalone app to test. To migrate my data I did:
sudo cp -Ra /opt/geoserver-1.7.0-RC4/data_dir/* /opt/geoserver_data/
sudo chown -R tomcat55:nogroup /opt/geoserver_data
Now restart tomcat:
/etc/init.d/tomcat5.5 restart
14.5.3. Set your password
sudo vim /opt/geoserver_data/security/users.properties
Now change the default admin username / password - comment out this line:
#admin=geoserver,ROLE_ADMINISTRATOR
And add a new line with your desired username / pwd combo (replace XXXXXX with your preferred password):
timlinux=XXXXXXXX,ROLE_ADMINISTRATOR
Note: changes will only take effect when the user logs out and in again.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira