Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Hi everyone The right way to do this work, was to (I was using Ubuntu 12.041) 1. define user in /etc/tomcat7/tomcat-users.xml (the same as my Ubuntu username) 2. define JAVA_HOME and JRE_HOME environment variables 3. and the most important: to define CATALINA_BASE to point to the place I wanted (/home/user/tomcat7) 4. and to use /user/share/tomcat7/bin/startup.sh and shutdown.sh procedures and NOT sudo service tomcat7 start/stop!!! after all that GEOSERVER_DATA_DIR directive also worked as expected. So all ended happily, and my test-bed is now working with Tomcat and not with Jetty anymore. Have a nice summer :) Oiva Hakala Lähettäjä: Hakala Oiva (MTT) [oiva.hak...@mtt.fi] Lähetetty: 12. kesäkuuta 2013 12:14 Vastaanottaja: Stefano Iacovella Kopio: geoserver-users Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Sorry, web.xml changes does not change anything. Although I delete the wrong data directory (using root rights) it is there again, when I start tomcat7 service. I cannon find any log file, and when I try to see the log under Geoserver, I get this... Oops, something went wrong... Sorry, something unexpected happened on the server. Here's an error report you can include in a JIRA bug reporthttp://jira.codehaus.org/browse/GEOS/ about this issue: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.geoserver.web.admin.LogPage(org.apache.wicket.PageParameters) and argument at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:65) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Sorry, web.xml changes does not change anything. Although I delete the wrong data directory (using root rights) it is there again, when I start tomcat7 service. I cannon find any log file, and when I try to see the log under Geoserver, I get this... Oops, something went wrong... Sorry, something unexpected happened on the server. Here's an error report you can include in a JIRA bug reporthttp://jira.codehaus.org/browse/GEOS/ about this issue: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.geoserver.web.admin.LogPage(org.apache.wicket.PageParameters) and argument at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:65) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at org.apache.wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:138) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74) at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72) at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
[Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Hi, Try to edit webapps/geoserver/WEB-INF/web.xml and restart. There is a commented example about giving GEOSERVER_DATA_DIR as context-param. -Jukka Rahkonen- Hakala Oiva wrote: Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Thanks Jukka. I uncommented that section, edited that param value and restarted, but no help. I have also tried to edit CATALINA_OPTS=-DGEOSERVER_DATA_DIR=/home/geoserver-data/ in /usr/share/tomcat7/bin/catalina.sh -file and restart, but it did not help either. Oiva Lähettäjä: Rahkonen Jukka [jukka.rahko...@mmmtike.fi] Lähetetty: 11. kesäkuuta 2013 11:12 Vastaanottaja: 'geoserver-users@lists.sourceforge.net' Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Hi, Try to edit webapps/geoserver/WEB-INF/web.xml and restart. There is a commented example about giving GEOSERVER_DATA_DIR as context-param. -Jukka Rahkonen- Hakala Oiva wrote: Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
I have tried all the options mentioned here: http://docs.geoserver.org/latest/en/user/datadirectory/data-dir-setting.html but without success! All they suggest to set data the directory to /var/lib/ but that is definitely NOT the path, where I want my data to be. So, could anyone tell me, are there any other options, which really work ;) Thnx, Oiva Lähettäjä: Hakala Oiva (MTT) [oiva.hak...@mtt.fi] Lähetetty: 11. kesäkuuta 2013 12:36 Vastaanottaja: 'geoserver-users@lists.sourceforge.net' Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Thanks Jukka. I uncommented that section, edited that param value and restarted, but no help. I have also tried to edit CATALINA_OPTS=-DGEOSERVER_DATA_DIR=/home/geoserver-data/ in /usr/share/tomcat7/bin/catalina.sh -file and restart, but it did not help either. Oiva Lähettäjä: Rahkonen Jukka [jukka.rahko...@mmmtike.fi] Lähetetty: 11. kesäkuuta 2013 11:12 Vastaanottaja: 'geoserver-users@lists.sourceforge.net' Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Hi, Try to edit webapps/geoserver/WEB-INF/web.xml and restart. There is a commented example about giving GEOSERVER_DATA_DIR as context-param. -Jukka Rahkonen- Hakala Oiva wrote: Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
What Jukka described DOES work and I have used it myself. I suspect you are missing something. Restart Tomcat? Reboot should not be required. Russ --- On 11 Jun 2013, at 11:42, Hakala Oiva (MTT) oiva.hak...@mtt.fi wrote: I have tried all the options mentioned here: http://docs.geoserver.org/latest/en/user/datadirectory/data-dir-setting.html but without success! All they suggest to set data the directory to /var/lib/ but that is definitely NOT the path, where I want my data to be. So, could anyone tell me, are there any other options, which really work ;) Thnx, Oiva Lähettäjä: Hakala Oiva (MTT) [oiva.hak...@mtt.fi] Lähetetty: 11. kesäkuuta 2013 12:36 Vastaanottaja: 'geoserver-users@lists.sourceforge.net' Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Thanks Jukka. I uncommented that section, edited that param value and restarted, but no help. I have also tried to edit CATALINA_OPTS=-DGEOSERVER_DATA_DIR=/home/geoserver-data/ in /usr/share/tomcat7/bin/catalina.sh -file and restart, but it did not help either. Oiva Lähettäjä: Rahkonen Jukka [jukka.rahko...@mmmtike.fi] Lähetetty: 11. kesäkuuta 2013 11:12 Vastaanottaja: 'geoserver-users@lists.sourceforge.net' Aihe: Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Hi, Try to edit webapps/geoserver/WEB-INF/web.xml and restart. There is a commented example about giving GEOSERVER_DATA_DIR as context-param. -Jukka Rahkonen- Hakala Oiva wrote: Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ?
Hi, The settings in web.xml do work for me with Tomcat 7, both for windows and Linux. Can you post the content of GeoServer log? After editing the web.xml file you may try to delete all content of work folder, inside tomcat installation folder, then start it again. Cheers, Stefano --- 41.95581N 12.52854E http://www.linkedin.com/in/stefanoiacovella http://twitter.com/#!/Iacovellas Il giorno 11/giu/2013 12:45, Hakala Oiva (MTT) oiva.hak...@mtt.fi ha scritto: I have tried all the options mentioned here: http://docs.geoserver.org/latest/en/user/datadirectory/data-dir-setting.html but without success! All they suggest to set data the directory to /var/lib/ but that is definitely NOT the path, where I want my data to be. So, could anyone tell me, are there any other options, which really work ;) Thnx, Oiva -- *Lähettäjä:* Hakala Oiva (MTT) [oiva.hak...@mtt.fi] *Lähetetty:* 11. kesäkuuta 2013 12:36 *Vastaanottaja:* 'geoserver-users@lists.sourceforge.net' *Aihe:* Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Thanks Jukka. I uncommented that section, edited that param value and restarted, but no help. I have also tried to edit CATALINA_OPTS=-DGEOSERVER_DATA_DIR=/home/geoserver-data/ in /usr/share/tomcat7/bin/catalina.sh -file and restart, but it did not help either. Oiva -- *Lähettäjä:* Rahkonen Jukka [jukka.rahko...@mmmtike.fi] *Lähetetty:* 11. kesäkuuta 2013 11:12 *Vastaanottaja:* 'geoserver-users@lists.sourceforge.net' *Aihe:* Re: [Geoserver-users] Tomcat7 and GEOSERVER_DATA_DIR ? Hi, Try to edit webapps/geoserver/WEB-INF/web.xml and restart. There is a commented example about giving GEOSERVER_DATA_DIR as context-param. -Jukka Rahkonen- Hakala Oiva wrote: Hi I just changed my test environment from Jetty-based to Tomcat7. Everything works, but how can I tell to Tomcat7, where is my data??? I have set GEOSERVER_DATA_DIR environment variable right but Tomcat7 does not care whatever I set and restart Tomcat7 Data diretory always stays the same: /var/lib/tomcat7/webapps/geoserver/data I work with Ubuntu Linux 12.04. Can anyone help, I am new with Tomcat7. Thanks, Oiva -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users