[Geoserver-users] What alternatives exist for dynamic styling?

I'm working on the Open Aviation Map project.
We're using Geoserver for styling via SDL.
There are several places one wants the map to scale it's detail level based
on the zoom level.

Take elevation contour lines. When zoomed in it makes sense to show
contour lines for maybe every 50th metres, but when zoomed out,
maybe just for every 300-500 metres.
I understand that it would be possible to hard code all this using
max scale denominator but this would be extremely tedious and wery
prone to error. Does there exist any smarter way. I guess I'm looking for
some way to do basic calculations in the style based on the scale
denominator
and by that calculate the values i want height curves for. Maybe SLD is the
wrong
way to do this altogether?

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/What-alternatives-exist-for-dynamic-styling-tp5025446.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

actually, you have the scale denominator as an environment variable in SLD, see: you can use it for example in the following way: <ogc:Function name=“env”> ogc:Literalwms_scale_denominator</ogc:Literal> ogc:Literal500000</ogc:Literal> </ogc:Function> where the second value is a fallback / default value

···

On 03/01/13 14:30, lysgaard wrote:

I'm working on the Open Aviation Map project. 
We're using Geoserver for styling via SDL. 
There are several places one wants the map to scale it's detail level based 
on the zoom level. 

Take elevation contour lines. When zoomed in it makes sense to show 
contour lines for maybe every 50th metres, but when zoomed out, 
maybe just for every 300-500 metres. 
I understand that it would be possible to hard code all this using 
max scale denominator but this would be extremely tedious and wery 
prone to error. Does there exist any smarter way. I guess I'm looking for 
some way to do basic calculations in the style based on the scale
denominator 
and by that calculate the values i want height curves for. Maybe SLD is the
wrong 
way to do this altogether?

http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html

http://docs.geoserver.org/stable/en/user/community/css/index.html

I suggest that you consider the CSS community extension (disclaimer: I am the author.) A major design goal for this module is to expose all SLD functionality, but it uses a much more compact notation making complex styles easier to read and write. With this, you could write the style you described like so:

[@scale > 100000] [modulo(elevation, 500) == 0] { stroke: black; }

[@scale < 100000] [modulo(elevation, 50) == 0] { stroke: black; }

This will generate an SLD (literally; the CSS files are converted to SLD files on disk) which uses Min/MaxScaleDenominator elements to select which rendering to use. You can also combine selectors with a comma to share the same styling properties for multiple selectors.

[@scale > 100000] [modulo(elevation, 500) == 0],
[@scale < 100000] [modulo(elevation, 50) == 0] { stroke: black; }

Note how you only specify the stroke once, ensuring that any dash, opacity, etc. properties will be consistent for the different cases.

···

On Thu, Jan 3, 2013 at 8:38 AM, Ákos Maróy <akos@anonymised.com> wrote:

On 03/01/13 14:30, lysgaard wrote:

I'm working on the Open Aviation Map project. 
We're using Geoserver for styling via SDL. 
There are several places one wants the map to scale it's detail level based 
on the zoom level. 

Take elevation contour lines. When zoomed in it makes sense to show 
contour lines for maybe every 50th metres, but when zoomed out, 
maybe just for every 300-500 metres. 
I understand that it would be possible to hard code all this using 
max scale denominator but this would be extremely tedious and wery 
prone to error. Does there exist any smarter way. I guess I'm looking for 
some way to do basic calculations in the style based on the scale
denominator 
and by that calculate the values i want height curves for. Maybe SLD is the
wrong 
way to do this altogether?

actually, you have the scale denominator as an environment variable in SLD, see: http://docs.geoserver.org/stable/en/user/styling/sld-extensions/substitution.html

you can use it for example in the following way:

<ogc:Function name=“env”>
ogc:Literalwms_scale_denominator</ogc:Literal>
ogc:Literal500000</ogc:Literal>
</ogc:Function>

where the second value is a fallback / default value


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnmore_122712


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks. I tried installing the CSS extension but now my geoserver instance
wont start anymore.
I'm using geoserver stable 2.2.2 and used the 2.2.x version of the CSS
extension.
I also tried removing the files from the extension with no success.

I only get the standard jetty "SERVICE UNAVAILABLE"
Here is the full log:

David Winslow-5 wrote

lysgaard@anonymised.com:~/oam/geoserver/geoserver-2.2.2$ ./bin/startup.sh
GEOSERVER_HOME environment variable not found, using current
directory. If not set then running this script from other
directories will not work in the future.
GEOSERVER DATA DIR is
/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir
1 [main] INFO org.mortbay.log - Logging to
org.slf4j.impl.SimpleLogger@anonymised.com via org.mortbay.log.Slf4jLog
240 [main] WARN org.mortbay.log - Deprecated configuration used for
/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps
268 [main] INFO org.mortbay.log - jetty-6.1.8
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
1354 [main] INFO /geoserver - Initializing Spring root
WebApplicationContext
03 Jan 19:40:39 WARN [config.CustomEditorConfigurer] - Passing
PropertyEditor instances into CustomEditorConfigurer is deprecated: use
PropertyEditorRegistrars or PropertyEditor class names instead. Offending
key [org.geotools.util.Version; offending editor instance:
org.geoserver.platform.util.VersionPropertyEditor@anonymised.com
Jan 3, 2013 7:40:39 PM org.geoserver.platform.GeoServerExtensions
checkContext
SEVERE: Extension lookup occured, but ApplicationContext is unset.
03 Jan 19:40:39 ERROR [geoserver.global] -
----------------------------------
- GEOSERVER_DATA_DIR:
/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir
----------------------------------
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'tiger_roads'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'poly_landmarks'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'restricted'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'rain'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'grass'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'simple_streams'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'cite_lakes'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'polygon'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'simple_roads'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'line'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'pophatch'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'green'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'poi'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'point'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'capitals'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'raster'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'burg'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'population'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'giant_polygon'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'dem'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded default workspace OAM
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'sde'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'tiger'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'it.geosolutions'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'cite'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'topp'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'nurc'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'OAM'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_navaids'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_labels'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_forests'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_countorlines'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_waters'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_runways'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_cities'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_city_markers'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_airspaces'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_peaks'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_hillshade'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style 'oam_roads'
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace 'sf'
03 Jan 19:40:40 INFO [org.geoserver] - Loaded store 'nyc', enabled
03 Jan 19:40:40 INFO [org.geoserver] - Loaded data store 'nyc'
03 Jan 19:40:40 WARN [referencing.factory] - Axis elements found in a wkt
definition, the force longitude first axis order hint might not be
respected:
PROJCS["WGS84 / Simple Mercator", GEOGCS["WGS 84", DATUM["WGS_1984",
SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0],
UNIT["degree", 0.017453292519943295]], PROJECTION["Mercator_1SP_Google"],
PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0],
PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0],
PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["x", EAST],
AXIS["y", NORTH], AUTHORITY["EPSG","54004"]]
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'poi', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'nyc'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'poi'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'tiger_roads',
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'nyc'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'tiger_roads'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'poly_landmarks', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'nyc'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'poly_landmarks'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'giant_polygon', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'nyc'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'giant_polygon'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store 'states_shapefile',
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded data store
'states_shapefile'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'states',
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'states_shapefile'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'states'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store 'taz_shapes', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded data store 'taz_shapes'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'tasmania_roads', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'taz_shapes'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'tasmania_roads'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'tasmania_cities', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'taz_shapes'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'tasmania_cities'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
'tasmania_water_bodies', enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type 'taz_shapes'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer
'tasmania_state_boundaries'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store 'img_sample2',
disabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage store 'img_sample2'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage 'Pk50095', disabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage 'img_sample2'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer 'Pk50095'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store 'arcGridSample',
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage store
'arcGridSample'
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage 'Arc_Sample',
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage 'arcGridSample'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer 'Arc_Sample'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store 'worldImageSample',
enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store
'worldImageSample'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage 'Img_Sample',
enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage 'worldImageSample'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer 'Img_Sample'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store 'mosaic', enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store 'mosaic'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage 'mosaic', enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage 'mosaic'
03 Jan 19:40:42 WARN [imagemosaic.catalog] -
BBOXFilterExtractor::extractBasicProperties(): passed typename is null,
using: mosaic
03 Jan 19:40:42 WARN [imagemosaic.Utils] - Unable to find sample image for
path
/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir/coverages/mosaic_sample/sample_image
03 Jan 19:40:42 WARN [gce.imagemosaic] - Unable to find sample image for
path
file:/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir/coverages/mosaic_sample/mosaic.shp
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer 'mosaic'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store 'oam_elev', enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store 'oam_elev'
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage 'oam_hillshade',
enabled
ureCatalog' while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'accessRulesDao' defined in URL
[jar:file:/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps/geoserver/WEB-INF/lib/main-2.2.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:/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps/geoserver/WEB-INF/lib/main-2.2.2.jar!/applicationContext.xml]:
Initialization of bean failed; nested exception is
java.lang.RuntimeException: java.lang.IllegalArgumentException: Resource
must be part of a store
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
        at
org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
        at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
        at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
        at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
        at
org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
        at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
        at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
        at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
        at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
        at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
        at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
        at
org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
        at org.mortbay.jetty.Server.doStart(Server.java:222)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
        at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.mortbay.start.Main.invokeMain(Main.java:183)
        at org.mortbay.start.Main.start(Main.java:497)
        at org.mortbay.start.Main.main(Main.java:115)
7172 [main] INFO org.mortbay.log - Opened
/home/lysgaard/oam/geoserver/geoserver-2.2.2/logs/2013_01_03.request.log
7186 [main] INFO org.mortbay.log - Started
SelectChannelConnector@anonymised.com:8080
^C17382 [Shutdown] INFO org.mortbay.log - Shutdown hook executing
17384 [Shutdown] INFO /geoserver - Closing Spring root
WebApplicationContext
java.lang.NoSuchMethodError:
org.apache.commons.logging.LogFactory.release(Ljava/lang/ClassLoader;)V
        at
org.geoserver.GeoserverInitStartupListener.contextDestroyed(GeoserverInitStartupListener.java:302)
        at
org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:574)
        at
org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:485)
        at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
        at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
        at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
        at org.mortbay.jetty.Server.doStop(Server.java:281)
        at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
        at
org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)
18132 [Shutdown] INFO org.mortbay.log - Shutdown hook complete

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/What-alternatives-exist-for-dynamic-styling-tp5025446p5025528.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Well, I normally do not install the CSS plugin (instead I build GeoServer from sources with the plugin built in) but I just tried it and it seems to work all right on my machine. The error message seems to indicate a configuration problem:

java.lang.RuntimeException: java.lang.IllegalArgumentException: Resource
must be part of a store

That is, there is a resource (configured in a featuretype.xml or coverage.xml file under workspaces) which doesn’t correspond to any configured store. Unfortunately the error message does not provide any diagnostic information about which resource is not part of a store, but I think you could review these xml files and verify that they all contain elements and that the id for those elements is also the id of some store in the server.

If you use a clean datadir (such as the one included in the geoserver ZIP) does the problem persist?

···

On Thu, Jan 3, 2013 at 1:49 PM, lysgaard <morten@anonymised.com> wrote:

Thanks. I tried installing the CSS extension but now my geoserver instance
wont start anymore.
I’m using geoserver stable 2.2.2 and used the 2.2.x version of the CSS
extension.
I also tried removing the files from the extension with no success.

I only get the standard jetty “SERVICE UNAVAILABLE”
Here is the full log:

David Winslow-5 wrote

lysgaard@anonymised.com:~/oam/geoserver/geoserver-2.2.2$ ./bin/startup.sh
GEOSERVER_HOME environment variable not found, using current
directory. If not set then running this script from other
directories will not work in the future.
GEOSERVER DATA DIR is
/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir
1 [main] INFO org.mortbay.log - Logging to
org.slf4j.impl.SimpleLogger@anonymised.com via org.mortbay.log.Slf4jLog
240 [main] WARN org.mortbay.log - Deprecated configuration used for
/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps
268 [main] INFO org.mortbay.log - jetty-6.1.8
log4j:WARN File option not set for appender [geoserverlogfile].
log4j:WARN Are you using FileAppender instead of ConsoleAppender?
1354 [main] INFO /geoserver - Initializing Spring root
WebApplicationContext
03 Jan 19:40:39 WARN [config.CustomEditorConfigurer] - Passing
PropertyEditor instances into CustomEditorConfigurer is deprecated: use
PropertyEditorRegistrars or PropertyEditor class names instead. Offending
key [org.geotools.util.Version; offending editor instance:
org.geoserver.platform.util.VersionPropertyEditor@anonymised.com
Jan 3, 2013 7:40:39 PM org.geoserver.platform.GeoServerExtensions
checkContext
SEVERE: Extension lookup occured, but ApplicationContext is unset.
03 Jan 19:40:39 ERROR [geoserver.global] -

  • GEOSERVER_DATA_DIR:
    /home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir

03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘tiger_roads’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘poly_landmarks’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘restricted’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘rain’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘grass’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘simple_streams’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘cite_lakes’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘polygon’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘simple_roads’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘line’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘pophatch’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘green’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘poi’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘point’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘capitals’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘raster’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘burg’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘population’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘giant_polygon’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘dem’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded default workspace OAM
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘sde’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘tiger’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘it.geosolutions’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘cite’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘topp’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘nurc’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘OAM’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_navaids’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_labels’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_forests’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_countorlines’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_waters’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_runways’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_cities’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_city_markers’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_airspaces’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_peaks’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_hillshade’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded style ‘oam_roads’
03 Jan 19:40:39 INFO [org.geoserver] - Loaded workspace ‘sf’
03 Jan 19:40:40 INFO [org.geoserver] - Loaded store ‘nyc’, enabled
03 Jan 19:40:40 INFO [org.geoserver] - Loaded data store ‘nyc’
03 Jan 19:40:40 WARN [referencing.factory] - Axis elements found in a wkt
definition, the force longitude first axis order hint might not be
respected:
PROJCS[“WGS84 / Simple Mercator”, GEOGCS[“WGS 84”, DATUM[“WGS_1984”,
SPHEROID[“WGS_1984”, 6378137.0, 298.257223563]], PRIMEM[“Greenwich”, 0.0],
UNIT[“degree”, 0.017453292519943295]], PROJECTION[“Mercator_1SP_Google”],
PARAMETER[“latitude_of_origin”, 0.0], PARAMETER[“central_meridian”, 0.0],
PARAMETER[“scale_factor”, 1.0], PARAMETER[“false_easting”, 0.0],
PARAMETER[“false_northing”, 0.0], UNIT[“m”, 1.0], AXIS[“x”, EAST],
AXIS[“y”, NORTH], AUTHORITY[“EPSG”,“54004”]]
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘poi’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘nyc’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘poi’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘tiger_roads’,
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘nyc’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘tiger_roads’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘poly_landmarks’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘nyc’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘poly_landmarks’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘giant_polygon’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘nyc’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘giant_polygon’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store ‘states_shapefile’,
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded data store
‘states_shapefile’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘states’,
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘states_shapefile’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘states’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store ‘taz_shapes’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded data store ‘taz_shapes’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘tasmania_roads’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘taz_shapes’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘tasmania_roads’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘tasmania_cities’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘taz_shapes’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘tasmania_cities’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type
‘tasmania_water_bodies’, enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded feature type ‘taz_shapes’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer
‘tasmania_state_boundaries’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store ‘img_sample2’,
disabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage store ‘img_sample2’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage ‘Pk50095’, disabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage ‘img_sample2’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded layer ‘Pk50095’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded store ‘arcGridSample’,
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage store
‘arcGridSample’
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage ‘Arc_Sample’,
enabled
03 Jan 19:40:41 INFO [org.geoserver] - Loaded coverage ‘arcGridSample’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer ‘Arc_Sample’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store ‘worldImageSample’,
enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store
‘worldImageSample’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage ‘Img_Sample’,
enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage ‘worldImageSample’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer ‘Img_Sample’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store ‘mosaic’, enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store ‘mosaic’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage ‘mosaic’, enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage ‘mosaic’
03 Jan 19:40:42 WARN [imagemosaic.catalog] -
BBOXFilterExtractor::extractBasicProperties(): passed typename is null,
using: mosaic
03 Jan 19:40:42 WARN [imagemosaic.Utils] - Unable to find sample image for
path
/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir/coverages/mosaic_sample/sample_image
03 Jan 19:40:42 WARN [gce.imagemosaic] - Unable to find sample image for
path
file:/home/lysgaard/oam/geoserver/geoserver-2.2.2/data_dir/coverages/mosaic_sample/mosaic.shp
03 Jan 19:40:42 INFO [org.geoserver] - Loaded layer ‘mosaic’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded store ‘oam_elev’, enabled
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage store ‘oam_elev’
03 Jan 19:40:42 INFO [org.geoserver] - Loaded coverage ‘oam_hillshade’,
enabled
ureCatalog’ while setting constructor argument; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name ‘accessRulesDao’ defined in URL
[jar:file:/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps/geoserver/WEB-INF/lib/main-2.2.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:/home/lysgaard/oam/geoserver/geoserver-2.2.2/webapps/geoserver/WEB-INF/lib/main-2.2.2.jar!/applicationContext.xml]:
Initialization of bean failed; nested exception is
java.lang.RuntimeException: java.lang.IllegalArgumentException: Resource
must be part of a store
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at
org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:630)
at
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:148)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1035)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:939)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at
org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at
org.geoserver.platform.GeoServerContextLoaderListener.contextInitialized(GeoServerContextLoaderListener.java:18)
at
org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:540)
at
org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:510)
at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
at
org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:977)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.mortbay.start.Main.invokeMain(Main.java:183)
at org.mortbay.start.Main.start(Main.java:497)
at org.mortbay.start.Main.main(Main.java:115)
7172 [main] INFO org.mortbay.log - Opened
/home/lysgaard/oam/geoserver/geoserver-2.2.2/logs/2013_01_03.request.log
7186 [main] INFO org.mortbay.log - Started
SelectChannelConnector@anonymised.com:8080
^C17382 [Shutdown] INFO org.mortbay.log - Shutdown hook executing
17384 [Shutdown] INFO /geoserver - Closing Spring root
WebApplicationContext
java.lang.NoSuchMethodError:
org.apache.commons.logging.LogFactory.release(Ljava/lang/ClassLoader;)V
at
org.geoserver.GeoserverInitStartupListener.contextDestroyed(GeoserverInitStartupListener.java:302)
at
org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:574)
at
org.mortbay.jetty.webapp.WebAppContext.doStop(WebAppContext.java:485)
at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
at
org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
at
org.mortbay.jetty.handler.HandlerCollection.doStop(HandlerCollection.java:169)
at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
at
org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142)
at org.mortbay.jetty.Server.doStop(Server.java:281)
at
org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:64)
at
org.mortbay.jetty.Server$ShutdownHookThread.run(Server.java:559)
18132 [Shutdown] INFO org.mortbay.log - Shutdown hook complete


View this message in context: http://osgeo-org.1560.n6.nabble.com/What-alternatives-exist-for-dynamic-styling-tp5025446p5025528.html

Sent from the GeoServer - User mailing list archive at Nabble.com.


Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnmore_122712


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

No, @scale doesn’t work in expressions. But you can indeed use WMS_SCALE_DENOMINATOR and any other environment variable. In fact, all filter functions are accessible.

This XML:

<ogc:Function name=“env”>
ogc:Literalwms_scale_denominator</ogc:Literal>
ogc:Literal500000</ogc:Literal>
</ogc:Function>

is the same as this CQL (with brackets so you can copy into the CSS):

[env(‘wms_scale_denominator’, 500000)] .

So you could write:

  • {
    fill: lightgrey;
    stroke: black;
    mark: symbol(square);
    mark-size: [env(‘wms_scale_denominator’, 500000) * 0.3)];
    }
···

On Thu, Jan 3, 2013 at 2:58 PM, Morten Olsen Lysgaard <morten@anonymised.com> wrote:

The plugin works great. Is there any way to use the @scale variable
for calculating the size of something. Lets say i want the size of a mark
to be a function of the current scale. Something in the lines of:

  • {
    fill: lightgrey;
    stroke: black;
    mark: symbol(square);
    mark-size: [@scale*0.3]m; // mark size always 3 centimetres large
    }

Or would it be possible to use the variable Ákos mentioned,
WMS_SCALE_DENOMINATOR?

This may seem a little contrieved but it’s just to make the example simple.
Thanks for the help.

On Thu, Jan 3, 2013 at 8:30 PM, Morten Olsen Lysgaard
<morten@anonymised.com> wrote:

On Thu, Jan 3, 2013 at 8:10 PM, David Winslow <dwinslow@anonymised.com> wrote:

Well, I normally do not install the CSS plugin (instead I build GeoServer
from sources with the plugin built in) but I just tried it and it seems to
work all right on my machine. The error message seems to indicate a
configuration problem:

java.lang.RuntimeException: java.lang.IllegalArgumentException: Resource
must be part of a store

That is, there is a resource (configured in a featuretype.xml or
coverage.xml file under workspaces) which doesn’t correspond to any
configured store. Unfortunately the error message does not provide any
diagnostic information about which resource is not part of a store, but I
think you could review these xml files and verify that they all contain
elements and that the id for those elements is also the id of some
store in the server.

You where right. With the above info i found a stay file lying in the
configuration
that was referencing an non existing store. Don’t understand how it
got there though
because i deleted it, but that’s another problem. Now geoserver is
back up running
and the CSS plugin is working. Thanks. I’ll report back on my progress :slight_smile: