Hi all,
I'm attempting to write a small python script that will enable all of my
layers. To do this, I'm making a call to the REST API through curl, like so:
curl -v -u username:password -XPUT -H "Content-type: text/xml" -d
"<layer><defaultStyle><name>layer_name_here</name></defaultStyle><enabled>true</enabled></layer>"
"http://localhost:8080/geoserver/rest/layers/layer_name_here"
This isn't enabling the layer as I thought it would. I've tried various
combinations of inserting the workspace before the layer name, but nothing
seems to be working. Curl is always giving back an HTTP 200 (OK), which you'd
think means that it successfully enabled the layer. I've ramped up the logging
to show almost absolutely everything, and I noticed the following:
19 Nov 17:15:37 DEBUG [catalog.impl] - Warning, some code is setting the
LayerInfo name, but that will be ignored
19 Nov 17:15:37 DEBUG [catalog.impl] - Warning, some code is setting the
LayerInfo enabled flag, but that will be ignored
19 Nov 17:15:37 DEBUG [catalog.impl] - Warning, some code is setting the
LayerInfo advertised flag, but that will be ignored
19 Nov 17:15:37 DEBUG [gwc.layer] - Handling modify event for
LayerInfoImpl[layer_name_here, resource:CoverageInfoImpl[layer_name_here]]
19 Nov 17:15:37 DEBUG [geoserver.config] - Persisted $Proxy33 to global.xml
19 Nov 17:15:37 DEBUG [geoserver.config] - Persisting layer layer_name_here
19 Nov 17:15:37 DEBUG [geoserver.config] - Persisted
org.geoserver.catalog.impl.LayerInfoImpl to
workspaces/Workspace_here/layer_name_here/layer.xml
19 Nov 17:15:37 INFO [catalog.rest] - PUT layer layer_name_here
19 Nov 17:15:37 DEBUG [org.geoserver] - Thread 557 releasing the lock in mode
WRITE
19 Nov 17:15:37 DEBUG [filter.GeoServerSecurityContextPersistenceFilter$1] -
SecurityContextHolder now cleared, as request processing completed
It seems like it may be very closely related to this problem:
http://sourceforge.net/p/geoserver/mailman/message/30703372/ Has anyone seen
this before, or have any idea how to go about fixing it? Does this essentially
mean that I'll have to crawl the file system and manually edit each xml file?
- Joel
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users