[Geoserver-users] GeoServer 2.1.1 loses connection to Oracle database?

Hi,

I’m using GeoServer 2.1.1 and I have a few Oracle datastores configured.
If I don’t use GeoServer for a while and then try to use it again, some operations do not work anymore.

Eg. the ‘Layer preview’ page and the ‘Layers’ page keep on loading.
The page containing the ‘Stores’ appears, but modifying the configuration of a store is not possible (no error, the “loading” icon just keeps running) and I don’t get a response to a WMS request.

Sometimes, I see an error in the log file (see below).
It seems to me GeoServer is not able to connect to the Oracle database anymore.
Restarting the application (actually restarting Tomcat) solves the problem.
I’ve checked the ‘validate connections’ checkbox in the configuration of the stores, but this didn’t solve the problem.
Do you have any idea how to solve this?

Best regards,
Tim VdB.

2011-08-08 16:08:47,386 ERROR [wicket.RequestCycle] - org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[http-8080-3,5,main], giving up trying to get the page for path: 13:table:filterForm:submit
org.apache.wicket.protocol.http.request.InvalidUrlException: org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[http-8080-3,5,main], giving up trying to get the page for path: 13:table:filterForm:submit
at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:262)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1310)
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.doPost(WicketServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)
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:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
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.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:23)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
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:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:394)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:406)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:185)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
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:71)
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:183)
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.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:46)
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:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.wicket.WicketRuntimeException: After 1 minute the Pagemap null is still locked by: Thread[http-8080-3,5,main], giving up trying to get the page for path: 13:table:filterForm:submit
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at oracle.net.ns.Packet.receive(Unknown Source)
at oracle.net.ns.DataPacket.receive(Unknown Source)
at oracle.net.ns.NetInputStream.getNextPacket(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.net.ns.NetInputStream.read(Unknown Source)
at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1099)
at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1070)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:478)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:790)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:830)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
at org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:658)
at org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:635)
at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1165)
at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:106)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
at org.geotools.data.jdbc.datasource.AbstractManageableDataSource.getConnection(AbstractManageableDataSource.java:45)
at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1613)
at org.geotools.jdbc.JDBCDataStore.getPrimaryKey(JDBCDataStore.java:872)
at org.geotools.jdbc.JDBCFeatureSource.(JDBCFeatureSource.java:82)
at org.geotools.jdbc.JDBCDataStore.createFeatureSource(JDBCDataStore.java:768)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:385)
at org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:350)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:335)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:670)
at org.geotools.data.store.ContentDataStore.getSchema(ContentDataStore.java:103)
at org.geoserver.catalog.ResourcePool.getFeatureType(ResourcePool.java:629)
at org.geoserver.catalog.ResourcePool.getFeatureType(ResourcePool.java:588)
at org.geoserver.catalog.impl.FeatureTypeInfoImpl.getFeatureType(FeatureTypeInfoImpl.java:86)
at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.geoserver.catalog.impl.ModificationProxy.invoke(ModificationProxy.java:144)
at $Proxy14.getFeatureType(Unknown Source)
at org.geoserver.web.CatalogIconFactory.getSpecificLayerIcon(CatalogIconFactory.java:119)
at org.geoserver.web.data.layer.LayerPage$1.getComponentForProperty(LayerPage.java:59)
at org.geoserver.web.wicket.GeoServerTablePanel$1$1.populateItem(GeoServerTablePanel.java:143)
at org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:562)
at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:131)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
at org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:151)
at org.apache.wicket.markup.repeater.AbstractPageableView.onBeforeRender(AbstractPageableView.java:121)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1753)
at org.apache.wicket.Component.onBeforeRender(Component.java:3946)
at org.apache.wicket.Component.internalBeforeRender(Component.java:1071)
at org.apache.wicket.Component.beforeRender(Component.java:1105)
at org.apache.wicket.Component.prepareForRender(Component.java:2292)
at org.apache.wicket.Component.prepareForRender(Component.java:2329)
at org.apache.wicket.ajax.AjaxRequestTarget.respondComponent(AjaxRequestTarget.java:830)
at org.apache.wicket.ajax.AjaxRequestTarget.respondComponents(AjaxRequestTarget.java:682)
at org.apache.wicket.ajax.AjaxRequestTarget.respond(AjaxRequestTarget.java:592)
at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
… 81 more

On Thu, Aug 11, 2011 at 11:20 AM, <Tim.VanderBorght@anonymised.com.4168…> wrote:

Hi,

I’m using GeoServer 2.1.1 and I have a few Oracle datastores configured.
If I don’t use GeoServer for a while and then try to use it again, some operations do not work anymore.

Your Oracle must be configured in a connection pool hostile way, it is probably killing the
connections after a while they are not used.
Enable the connection validation flag in the store configuration, that should solve the issue
with a little performance penalty

Cheers
Andrea

Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf


I've got similar problem with Geoserver 2.2.11.
After server restart (Geoserver and Oracle as well) Geoserver looses
connection with database store (it's not Enabled anymore). In order to fix
that I have to enter the store settings and check Enabled checkbox.

How can I set up Geoserver to reconnect with store automatically?

Greetz

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/GeoServer-2-1-1-loses-connection-to-Oracle-database-tp6675657p6710984.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

On Mon, Aug 22, 2011 at 12:39 PM, denu <mwi@anonymised.com> wrote:

I've got similar problem with Geoserver 2.2.11.
After server restart (Geoserver and Oracle as well) Geoserver looses
connection with database store (it's not Enabled anymore). In order to fix
that I have to enter the store settings and check Enabled checkbox.

How can I set up Geoserver to reconnect with store automatically?

At the moment there is no way, we'll need to make extensive changes
to the code to have GeoServer re-attempt connections and handle
failing datastore without crashing during GetCapabilities requests.

I think this has been in the list of things to do for a while, it's just
not trivial so people are waiting for funding to sponsor the changes.

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

in the meantime you could maybe try something creative with the REST api and reset the store if a problem is detected by some kind of polling.. maybe the act of polling will convince the connection to stay up.

-i

-----Message d'origine-----
De : Andrea Aime [mailto:andrea.aime@anonymised.com]
Envoyé : Monday, 22 August 2011 2:32 PM
À : denu
Cc : geoserver-users@lists.sourceforge.net
Objet : Re: [Geoserver-users] GeoServer 2.1.1 loses connection to Oracle database?

On Mon, Aug 22, 2011 at 12:39 PM, denu <mwi@anonymised.com> wrote:

I've got similar problem with Geoserver 2.2.11.
After server restart (Geoserver and Oracle as well) Geoserver looses
connection with database store (it's not Enabled anymore). In order to
fix that I have to enter the store settings and check Enabled checkbox.

How can I set up Geoserver to reconnect with store automatically?

At the moment there is no way, we'll need to make extensive changes to the code to have GeoServer re-attempt connections and handle failing datastore without crashing during GetCapabilities requests.

I think this has been in the list of things to do for a while, it's just not trivial so people are waiting for funding to sponsor the changes.

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model configuration take the hassle out of deploying and managing Subversion and the tools developers use with it. Learn more about uberSVN and get a free download at: http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Mon, Aug 22, 2011 at 4:24 PM, Ivan Price <Ivan.Price@anonymised.com> wrote:

in the meantime you could maybe try something creative with the REST api and reset the store if a problem is detected by some kind of polling.. maybe the act of polling will convince the connection to stay up.

If the store starts up fine, does not get disabled, all you have to do is to
setup the connection validation in the store config.

Another story is having the database be unreachable during startup, the
store is going to be marked as disabled and there reset that is going to send it
back to enabled status.

What you can do is to use REST to reconfigure it as enabled, once you
know the database is reachable

Cheers
Andrea

--
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy

phone: +39 0584 962313
fax: +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------