You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when trying the current git-version either as gui or from cmd-line, I'll end up with the following error when trying to publish to geoserver:
[info] Loading project definition from /home/geoserver/mapnik2geotools/project
[info] Set current project to mn2gt (in build file:/home/geoserver/mapnik2geotools/)
> run-main me.winslow.d.mn2gt.Driver /home/geoserver/mapnik/my_osm.xml --rest http://localhost:8090/geoserver/rest --datadir /home/geoserver/geoserver-2.1.4/data_dir/
[error] java.lang.IllegalArgumentException: requirement failed: 2
[error] at scala.Predef$.require(Predef.scala:157)
[error] at me.winslow.d.mn2gt.Mapnik2GeoTools$.rulesFor(Mapnik2GeoTools.scala:213)
[error] at me.winslow.d.mn2gt.driver.PublishToGeoServer.run(driver.scala:177)
[error] at me.winslow.d.mn2gt.Driver$$anonfun$main$1.apply(CommandLine.scala:60)
[error] at me.winslow.d.mn2gt.Driver$$anonfun$main$1.apply(CommandLine.scala:59)
[error] at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59)
[error] at scala.collection.immutable.List.foreach(List.scala:45)
[error] at me.winslow.d.mn2gt.Driver$.main(CommandLine.scala:59)
[error] at me.winslow.d.mn2gt.Driver.main(CommandLine.scala)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:616)
[error] at scala.tools.nsc.util.ScalaClassLoader$$anonfun$run$1.apply(ScalaClassLoader.scala:78)
[error] at scala.tools.nsc.util.ScalaClassLoader$class.asContext(ScalaClassLoader.scala:24)
[error] at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.asContext(ScalaClassLoader.scala:88)
[error] at scala.tools.nsc.util.ScalaClassLoader$class.run(ScalaClassLoader.scala:78)
[error] at scala.tools.nsc.util.ScalaClassLoader$URLClassLoader.run(ScalaClassLoader.scala:101)
[error] at scala.tools.nsc.ObjectRunner$.run(ObjectRunner.scala:33)
[error] at scala.tools.nsc.ObjectRunner$.runAndCatch(ObjectRunner.scala:40)
[error] at scala.tools.nsc.MainGenericRunner.runTarget$1(MainGenericRunner.scala:56)
[error] at scala.tools.nsc.MainGenericRunner.process(MainGenericRunner.scala:80)
[error] at scala.tools.nsc.MainGenericRunner$.main(MainGenericRunner.scala:89)
[error] at scala.tools.nsc.MainGenericRunner.main(MainGenericRunner.scala)
java.lang.RuntimeException: Nonzero exit code returned from runner: 1
at scala.sys.package$.error(package.scala:27)
[error] {file:/home/geoserver/mapnik2geotools/}default-b690ce/compile:run-main: Nonzero exit code returned from runner: 1
[error] Total time: 2 s, completed Aug 10, 2012 12:25:48 PM
I've also tried the pre-compiled jar but also this did not work properly - at least it published some SLDs but then somehow seems to get stuck with:
Exception in thread "Thread-9" java.lang.AssertionError: assertion failed: POST http://localhost:8090/geoserver/rest/styles?name=roads-text-ref failed
with message ; was trying to send
<StyledLayerDescriptor version="1.0.0" xmlns:xlink="http://www.w3.org/1999/xlin
k" xmlns:ogc="http://www.opengis.net/ogc" xmlns="http://www.opengis.net/sld">
<NamedLayer>
<Name>roads-text-ref</Name>
<UserStyle>
<Name>roads-text-ref</Name>
<FeatureTypeStyle>
<Rule><Filter xmlns="http://www.opengis.net/ogc"><!--Unparsed filter - (
([highway]='motorway') and ([length]<=6))--><!--[1.39] failure: string matching
regex `\d+' expected but `=' found
(([highway]='motorway') and ([length]<=6))
^--></Filter><MaxScaleDenominator>100000</
MaxScaleDenominator><TextSymbolizer>
<Label>
at scala.Predef$.assert(Predef.scala:103)
at scala.Predef$Ensuring.ensuring(Predef.scala:164)
at me.winslow.d.mn2gt.driver.GeoServerConnection.post(geoserver.scala:144)
at me.winslow.d.mn2gt.driver.GeoServerConnection.addStyle(geoserver.scala:167)
at me.winslow.d.mn2gt.driver.GeoServerConnection.setStyle(geoserver.scala:184)
at me.winslow.d.mn2gt.driver.PublishToGeoServer.writeStyle(driver.scala:245)
at me.winslow.d.mn2gt.driver.PublishToGeoServer$$anonfun$run$3.apply(driver.scala:196)
at me.winslow.d.mn2gt.driver.PublishToGeoServer$$anonfun$run$3.apply(driver.scala:195)
at scala.collection.Iterator$class.foreach(Iterator.scala:652)
at scala.collection.LinearSeqLike$$anon$1.foreach(LinearSeqLike.scala:50)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:73)
at scala.xml.NodeSeq.foreach(NodeSeq.scala:43)
at me.winslow.d.mn2gt.driver.PublishToGeoServer.run(driver.scala:195)
at me.winslow.d.mn2gt.GUI$$anonfun$startup$8$$anonfun$apply$16$$anonfun$apply$1.apply$mcV$sp(GUI.scala:293)
at me.winslow.d.mn2gt.GUI$$anonfun$startup$8$$anonfun$apply$16$$anonfun$apply$1.apply(GUI.scala:292)
at me.winslow.d.mn2gt.GUI$$anonfun$startup$8$$anonfun$apply$16$$anonfun$apply$1.apply(GUI.scala:292)
at scala.actors.Futures$$anonfun$1.apply(Future.scala:127)
at scala.actors.Futures$$anonfun$1.apply(Future.scala:127)
at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:93)
at scala.actors.FutureActor$$anonfun$act$1.apply(Future.scala:93)
at scala.actors.Reactor$class.seq(Reactor.scala:280)
at scala.actors.FutureActor.seq(Future.scala:55)
at scala.actors.Reactor$$anon$3.andThen(Reactor.scala:258)
at scala.actors.FutureActor.act(Future.scala:94)
at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
at scala.actors.Reactor$$anonfun$dostart$1.apply(Reactor.scala:222)
at scala.actors.ReactorTask.run(ReactorTask.scala:33)
at scala.actors.threadpool.ThreadPoolExecutor.runWorker(Unknown Source)
at scala.actors.threadpool.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
How should I work around this?
The text was updated successfully, but these errors were encountered:
Mapnik2GeoTools tries to support different versions of Mapnik differently by inspecting the version attribute on the Map element in XML. We don't have explicit support for versions after 0.7.1, and the code explicitly rejects files that declare a major version greater than zero. I'm about to commit a change that clarifies the error message in this case. However, you have a couple of options to actually get things working. The quick way would be to remove the version attribute from your map file. If you're a coder and willing to chip in, fixing up the version inspection would be awesome too - just take a look at https://github.com/dwins/mapnik2geotools/blob/master/src/main/scala/Mapnik2GeoTools.scala#L212 .
The second is just a bug in the parser for mapnik filter expressions. I apparently never encountered a style with a <= filter before! I am fixing that one too, so you can just "git pull" and try running the SLD-only conversion again.
Hi there,
when trying the current git-version either as gui or from cmd-line, I'll end up with the following error when trying to publish to geoserver:
I've also tried the pre-compiled jar but also this did not work properly - at least it published some SLDs but then somehow seems to get stuck with:
How should I work around this?
The text was updated successfully, but these errors were encountered: