Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.6.4, 1.7.0-beta1
-
Component/s: GWC
-
Labels:None
-
Number of attachments :
Description
Hitting geoserver_csv on atlas with:
http://atlas.openplans.org:8080/geoserver_csv/gwc/truncate/?layers=topp:TotalPopulationSF3_view&_dc=1211182881312
results in:
2008-05-19 03:46:05,588 ERROR [servlet.DispatcherServlet] - Could not complete r
equest
java.lang.NullPointerException
at org.geowebcache.layer.TileLayerDispatcher.getTileLayer(TileLayerDispa
tcher.java:53)
at org.geowebcache.GeoWebCacheDispatcher.handleSeedTruncateRequest(GeoWe
bCacheDispatcher.java:284)
at org.geowebcache.GeoWebCacheDispatcher.handleTruncateRequest(GeoWebCac
heDispatcher.java:271)
at org.geowebcache.GeoWebCacheDispatcher.handleRequestInternal(GeoWebCac
heDispatcher.java:147)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(
AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.ha
ndle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(Dispatch
erServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(Dispatche
rServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(Frame
I've committed a check and error message to the repository, so at least people won't get npes in the future.
The problem was that it was configuring itself against localhost:8080/geoserver
Originally I didn't know how to find the "local URL" from the context, but I guess now that it does lazy initialization it could just get it from the first request.
Fixed on this particular instance by adding
<context-param>
<param-name>GEOSERVER_WMS_URL</param-name> <param-value>http://atlas.openplans.org:8080/geoserver_csv/wms?request=GetCapabilities</param-value>
</context-param>
to web.xml