Hi,
You may want to delete layers with REST or my editing the XML files way but the management interface is also supposed to work. What kind of error you receive? Tell also some more info about Geoserver version and the problematic layers. Can’t you even remove topp:states by using the GUI?
-Jukka Rahkonen-
···
Garey Mills wrote:
When I try to remove a layer through the management interface, I am getting a server error and the layer is not removed. After an upgrade, these layers are causing other problems, so how can I remove them without going through the management interface?
Garey Mills
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
Just wanted to clarify that editing the xml files directly should be strongly discouraged. Not only can it lead to corrupting of configuration due to a mistake but those config files are subject to change across major versions, and we don’t really publish those changes very clearly (again, because we don’t recommend editing the files in place). If the rest api doesn’t cover your use case then perhaps it’s the only option, but it is definitely a “use at own risk” one.
···
On Tue, Aug 26, 2014 at 10:48 PM, Rahkonen Jukka (Tike) <jukka.rahkonen@anonymised.com6…> wrote:
Hi,
You may want to delete layers with REST or my editing the XML files way but the management interface is also supposed to work. What kind of error you receive? Tell also some more info about Geoserver version and the problematic layers. Can’t you even remove topp:states by using the GUI?
-Jukka Rahkonen-
Garey Mills wrote:
When I try to remove a layer through the management interface, I am getting a server error and the layer is not removed. After an upgrade, these layers are causing other problems, so how can I remove them without going through the management interface?
Garey Mills
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Justin Deoliveira
VP Engineering | Boundless
jdeolive@anonymised.com
@boundlessgeo

I proceeded by moving offending directories out of data/workspaces/. At a certain point it was clear that was not going to work so I moved them back in again. Now, I cannot start Geoserver and I am getting errors like these:
2014-08-27 08:23:06,203 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GWCGeoServerRESTConfigurationProvider’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-gwc-2.5.2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean ‘catalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.lang.ClassCastException: com.sun.proxy.$Proxy105 cannot be cast to org.geoserver.catalog.DataStoreInfo
At this point I think I need to rebuild my data directory. Are there instructions somewhere on how to go about doing that?
Thanks;
···
On Wed, Aug 27, 2014 at 6:36 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Just wanted to clarify that editing the xml files directly should be strongly discouraged. Not only can it lead to corrupting of configuration due to a mistake but those config files are subject to change across major versions, and we don’t really publish those changes very clearly (again, because we don’t recommend editing the files in place). If the rest api doesn’t cover your use case then perhaps it’s the only option, but it is definitely a “use at own risk” one.
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
On Tue, Aug 26, 2014 at 10:48 PM, Rahkonen Jukka (Tike) <jukka.rahkonen@anonymised.com> wrote:
Hi,
You may want to delete layers with REST or my editing the XML files way but the management interface is also supposed to work. What kind of error you receive? Tell also some more info about Geoserver version and the problematic layers. Can’t you even remove topp:states by using the GUI?
-Jukka Rahkonen-
Garey Mills wrote:
When I try to remove a layer through the management interface, I am getting a server error and the layer is not removed. After an upgrade, these layers are causing other problems, so how can I remove them without going through the management interface?
Garey Mills
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Justin Deoliveira
VP Engineering | Boundless
jdeolive@anonymised.com
@boundlessgeo

This is unfortunately what can happen when the configuration files are touched directly. There is no way to rebuild the data directory other than manually recreating workspaces/layers/etc… with the admin ui or the rest api. I would remove the offending workspace directory and start over.
···
On Wed, Aug 27, 2014 at 9:28 AM, Garey Mills <gmills@anonymised.com> wrote:
I proceeded by moving offending directories out of data/workspaces/. At a certain point it was clear that was not going to work so I moved them back in again. Now, I cannot start Geoserver and I am getting errors like these:
2014-08-27 08:23:06,203 ERROR [context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘GWCGeoServerRESTConfigurationProvider’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-gwc-2.5.2.jar!/geowebcache-geoserver-context.xml]: Cannot resolve reference to bean ‘catalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘localWorkspaceCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘advertisedCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘advertisedCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Cannot resolve reference to bean ‘secureCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessRulesDao’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationSecurityContext.xml]: Cannot resolve reference to bean ‘rawCatalog’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘rawCatalog’ defined in URL [jar:file:/opt/apache-tomcat-7.0.55/webapps/geoserver/WEB-INF/lib/gs-main-2.5.2.jar!/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: java.lang.ClassCastException: com.sun.proxy.$Proxy105 cannot be cast to org.geoserver.catalog.DataStoreInfo
At this point I think I need to rebuild my data directory. Are there instructions somewhere on how to go about doing that?
Thanks;
–
Justin Deoliveira
VP Engineering | Boundless
jdeolive@anonymised.com
@boundlessgeo

On Wed, Aug 27, 2014 at 6:36 AM, Justin Deoliveira <jdeolive@anonymised.com> wrote:
Just wanted to clarify that editing the xml files directly should be strongly discouraged. Not only can it lead to corrupting of configuration due to a mistake but those config files are subject to change across major versions, and we don’t really publish those changes very clearly (again, because we don’t recommend editing the files in place). If the rest api doesn’t cover your use case then perhaps it’s the only option, but it is definitely a “use at own risk” one.
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
On Tue, Aug 26, 2014 at 10:48 PM, Rahkonen Jukka (Tike) <jukka.rahkonen@anonymised.com> wrote:
Hi,
You may want to delete layers with REST or my editing the XML files way but the management interface is also supposed to work. What kind of error you receive? Tell also some more info about Geoserver version and the problematic layers. Can’t you even remove topp:states by using the GUI?
-Jukka Rahkonen-
Garey Mills wrote:
When I try to remove a layer through the management interface, I am getting a server error and the layer is not removed. After an upgrade, these layers are causing other problems, so how can I remove them without going through the management interface?
Garey Mills
–
Generate messages about directories that cannot be
read, files that cannot be opened … rather than being silent …
(from man du
)
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
–
Justin Deoliveira
VP Engineering | Boundless
jdeolive@anonymised.com
@boundlessgeo
