Hi all,

Been playing around with the backup-restore community module (great job Alessio 
& co on it BTW). I'm trying to use it in an environment that doesn't include 
embedded GWC and running into a slight issue:

> Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: 
> No bean named 'gwcGeoServervConfigPersister' available
>       at 
> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:275)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
>  ~[spring-beans-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1081)
>  ~[spring-context-4.3.6.RELEASE.jar:4.3.6.RELEASE]
>       at 
> org.geoserver.platform.GeoServerExtensions.getBean(GeoServerExtensions.java:238)
>  ~[gs-platform-2.10-20170209.132836-1205.jar:2.10-SNAPSHOT]
>       at 
> org.geoserver.platform.GeoServerExtensions.bean(GeoServerExtensions.java:293) 
> ~[gs-platform-2.10-20170209.132836-1205.jar:2.10-SNAPSHOT]
>       at 
> org.geoserver.platform.GeoServerExtensions.bean(GeoServerExtensions.java:284) 
> ~[gs-platform-2.10-20170209.132836-1205.jar:2.10-SNAPSHOT]
>       at 
> org.geoserver.backuprestore.tasklet.CatalogBackupRestoreTasklet.hardRestore(CatalogBackupRestoreTasklet.java:415)
>  ~[gs-backup-restore-core-2.10-20170209.133347-845.jar:2.10-SNAPSHOT]
>       at 
> org.geoserver.backuprestore.tasklet.CatalogBackupRestoreTasklet.doRestore(CatalogBackupRestoreTasklet.java:290)
>  ~[gs-backup-restore-core-2.10-20170209.133347-845.jar:2.10-SNAPSHOT]
>       ... 5 common frames omitted

but looking at the code it seems like the intent was for this to actually work 
without GWC available? There is a null check at that point in the code for the 
gwcGeoServervConfigPersister, it just seems to fail because an exception is 
thrown instead.

> // Restore GWC Configuration bits
> if (GeoServerExtensions.bean("gwcGeoServervConfigPersister") != null) {
>     restoreGWCSettings(sourceRestoreFolder, dd.get(Paths.BASE));

Would there be any objection to adding a catch block for 
NoBeanDefinitionFoundException? The only issue I see there is that it would 
mean that the fact that GWC restore failed in that specific instance. Maybe 
there would be a better way to do it?

Cheers,
Devon


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to