[Geoserver-devel] Can't start-up GeoServer trunk today, GWC issues

Hi,
trying to start up GeoServer trunk today I get the following:

04 mag 16:56:01 ERROR [mortbay.log] - Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘gwcFacade’ defined in URL [file:/home/aaime/devel/git-gs/src/gwc/target/classes/applicationContext.xml]: Cannot resolve reference to bean ‘DiskQuotaStore’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘DiskQuotaStore’ defined in URL [file:/home/aaime/devel/git-gs/src/gwc/target/classes/geowebcache-diskquota-context.xml]: Invocation of init method failed; nested exception is com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key LayerInfoImpl-3c1d9af7:1366d483c57:-7ffb.:
com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader returned null for key LayerInfoImpl-3c1d9af7:1366d483c57:-7ffb.
at com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2383)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2351)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
at org.geoserver.gwc.layer.CatalogConfiguration.getTileLayerById(CatalogConfiguration.java:267)
at org.geoserver.gwc.layer.CatalogConfiguration.getTileLayer(CatalogConfiguration.java:292)
at org.geoserver.gwc.layer.CatalogConfiguration.getTileLayer(CatalogConfiguration.java:1)
at org.geowebcache.layer.TileLayerDispatcher.getTileLayer(TileLayerDispatcher.java:97)
at org.geowebcache.diskquota.storage.TilePageCalculator.getTileSetsFor(TilePageCalculator.java:85)
at org.geowebcache.diskquota.storage.BDBQuotaStore.createLayer(BDBQuotaStore.java:257)
at org.geowebcache.diskquota.storage.BDBQuotaStore.access$700(BDBQuotaStore.java:40)
at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:224)
at org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:186)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

I’ve let maven download the latest build of GWC and rebuilt everything, but it may be
the issue is some corruption inside the data dir.

As usual solved by getting rid of GWC dependencies but… does it ring any bell?
Even if it’s corruption of some kind (maybe I abruptly closed GeoServer without giving it a
chance for a clean closing) it should not prevent startup.

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
mob: +39 339 8844549

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

On Fri, May 4, 2012 at 12:03 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

Hi,
trying to start up GeoServer trunk today I get the following:

04 mag 16:56:01 ERROR [mortbay.log] - Nested in
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'gwcFacade' defined in URL
[file:/home/aaime/devel/git-gs/src/gwc/target/classes/applicationContext.xml]:
Cannot resolve reference to bean 'DiskQuotaStore' while setting constructor
argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'DiskQuotaStore' defined in URL
[file:/home/aaime/devel/git-gs/src/gwc/target/classes/geowebcache-diskquota-context.xml]:
Invocation of init method failed; nested exception is
com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader
returned null for key LayerInfoImpl-3c1d9af7:1366d483c57:-7ffb.:
com.google.common.cache.CacheLoader$InvalidCacheLoadException: CacheLoader
returned null for key LayerInfoImpl-3c1d9af7:1366d483c57:-7ffb.
at
com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2383)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2351)
at
com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
at
com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
at
org.geoserver.gwc.layer.CatalogConfiguration.getTileLayerById(CatalogConfiguration.java:267)
at
org.geoserver.gwc.layer.CatalogConfiguration.getTileLayer(CatalogConfiguration.java:292)
at
org.geoserver.gwc.layer.CatalogConfiguration.getTileLayer(CatalogConfiguration.java:1)
at
org.geowebcache.layer.TileLayerDispatcher.getTileLayer(TileLayerDispatcher.java:97)
at
org.geowebcache.diskquota.storage.TilePageCalculator.getTileSetsFor(TilePageCalculator.java:85)
at
org.geowebcache.diskquota.storage.BDBQuotaStore.createLayer(BDBQuotaStore.java:257)
at
org.geowebcache.diskquota.storage.BDBQuotaStore.access$700(BDBQuotaStore.java:40)
at
org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:224)
at
org.geowebcache.diskquota.storage.BDBQuotaStore$StartUpInitializer.call(BDBQuotaStore.java:186)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

I've let maven download the latest build of GWC and rebuilt everything, but
it may be
the issue is some corruption inside the data dir.

As usual solved by getting rid of GWC dependencies but... does it ring any
bell?
Even if it's corruption of some kind (maybe I abruptly closed GeoServer
without giving it a
chance for a clean closing) it should not prevent startup.

It looks to me like with the move of the tile layers configuration out
of the Layer/GroupInfo metadata map, this will happen if a layer was
deleted from geoserver either with gwc disabled and then enabled or if
the layer was removed by hand by removing it from the file system,
this would happen.
It shouldn't. Wondering what'd be the right way to handle that though.
Ignore the missing tile layer and just log a message, do that but also
remove the tile layer (what happens with its cache?), somehow let it
exist in an "error" state.

In any case, as a first step, I'll make sure that such a thing doesn't
prevent start up. Though not sure that's what should really happen.
What happens if there is an error loading a normal layer or datastore
right now? Does it get ignored or breaks the startup process?

And, do you have an idea of how you got into this situation? may it be
that you had some cached layers, then removed gwc from the classpath,
the layers changed (removed some), then gwc got into the classpath
again, and hence can't find the original layer?
If so, removing the offending file(s) from /gwc-layers should fix the issue.
My concern is then what a sensible "expected behavior" would be? (I
think you might want nothing in gwc could possibly break, but being
more realistic, we have to keep gwc layers and geoserver layers in
sync, if something happens out of the normal flow of events, I agree
should be taken care of carefuly, just wonder at which point).

Cheers,
Gabriel

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
mob: +39 339 8844549

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

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.

On Fri, May 4, 2012 at 8:11 PM, Gabriel Roldan <groldan@anonymised.com> wrote:

In any case, as a first step, I’ll make sure that such a thing doesn’t

prevent start up. Though not sure that’s what should really happen.
What happens if there is an error loading a normal layer or datastore
right now? Does it get ignored or breaks the startup process?

The validators we were talking about disable it, and you get a high
level log message stating it was disabled.

And, do you have an idea of how you got into this situation? may it be
that you had some cached layers, then removed gwc from the classpath,
the layers changed (removed some), then gwc got into the classpath
again, and hence can’t find the original layer?

I haven’t removed it in a while on the dev environment, but that data
directory jumps between the stable and trunk series quite often
(one just has to wipe out global.xml, everything else seems to be compatible).
I also haven’t removed by hand layers from disk since last time I got it
working (which was no more than a few days ago).

If so, removing the offending file(s) from /gwc-layers should fix the issue.
My concern is then what a sensible “expected behavior” would be? (I
think you might want nothing in gwc could possibly break, but being
more realistic, we have to keep gwc layers and geoserver layers in
sync, if something happens out of the normal flow of events, I agree
should be taken care of carefuly, just wonder at which point).

Imho disable some functionality (caching for those layers) and eventually
remove the tile cache and make it very visible something went pear shaped.
Maybe also something in the GUI? Don’t know, whatever warns the
user, does not kill startup, and does not require bending over backwards
implementation wise would be fine to me.

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
mob: +39 339 8844549

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

http://jira.codehaus.org/browse/GEOS-5092 to the rescue

On Fri, May 4, 2012 at 3:41 PM, Andrea Aime
<andrea.aime@anonymised.com> wrote:

On Fri, May 4, 2012 at 8:11 PM, Gabriel Roldan <groldan@anonymised.com> wrote:

In any case, as a first step, I'll make sure that such a thing doesn't
prevent start up. Though not sure that's what should really happen.
What happens if there is an error loading a normal layer or datastore
right now? Does it get ignored or breaks the startup process?

The validators we were talking about disable it, and you get a high
level log message stating it was disabled.

And, do you have an idea of how you got into this situation? may it be
that you had some cached layers, then removed gwc from the classpath,
the layers changed (removed some), then gwc got into the classpath
again, and hence can't find the original layer?

I haven't removed it in a while on the dev environment, but that data
directory jumps between the stable and trunk series quite often
(one just has to wipe out global.xml, everything else seems to be
compatible).
I also haven't removed by hand layers from disk since last time I got it
working (which was no more than a few days ago).

If so, removing the offending file(s) from /gwc-layers should fix the
issue.
My concern is then what a sensible "expected behavior" would be? (I
think you might want nothing in gwc could possibly break, but being
more realistic, we have to keep gwc layers and geoserver layers in
sync, if something happens out of the normal flow of events, I agree
should be taken care of carefuly, just wonder at which point).

Imho disable some functionality (caching for those layers) and eventually
remove the tile cache and make it very visible something went pear shaped.
Maybe also something in the GUI? Don't know, whatever warns the
user, does not kill startup, and does not require bending over backwards
implementation wise would be fine to me.

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
mob: +39 339 8844549

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

--
Gabriel Roldan
OpenGeo - http://opengeo.org
Expert service straight from the developers.