The Print Module extension was installed in GeoServer 2.27.1 (the same release).
After restarting, GeoServer created the configuration file “%GEOSERVER_DATA_DIR/printing/config.yaml”.
The next step in the installation verification is the listing of module parameters - http://localhost/geoserver/pdf/info.json.
However, it ends with error 500: Error occurred while reading configuration file %GEOSERVER_DATA_DIR\printing\config.yaml.…
We had to change yaml parsers during an upgrade and the new one is more strict! Please check the yaml file formatting. Maybe the template is out of date.
I also have this problem and don’t have a solution.
For anyone who can help, here’s part of the stack trace related to YAML:
05 Jun 19:45:40 ERROR [servlet.BaseMapServlet] - Error occurred while reading configuration file
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘mapPrinter’: Unsatisfied dependency expressed through field ‘configFactory’; nested exception is org.springframework.beans.factory.BeanCreationException:
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.mapfish.print.config.ConfigFactory] from ClassLoader [ParallelWebappClassLoader
context: geoserver
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@49097b5d
]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:485)
at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:276)
... 133 more
Caused by: java.lang.NoClassDefFoundError: com/fasterxml/jackson/dataformat/yaml/YAMLFactory
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3402)
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2504)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:467)
... 135 more
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.dataformat.yaml.YAMLFactory
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1185)
... 139 more
Yes. GeoServer version 2.27.1. Printing extension gs-printing-2.27.1.jar, print-lib-2.3.3.jar.
Java 17.0.11. Apache Tomcat 8.5.40.
The initial error message I received was the same as Romanus: 500/Internal Server Error: Error occurred while reading configuration file ‘{my_local_geoserver_datadir}/printing/config.yaml’.
Curious about this line in the stack trace:
It’s separate, because it comes with extra dependencies.
I don’t see the printing module assembly including that jar , nor its dependencies… look like it’s still referring some jyaml jar instead?
Thanks for that direction. I was able to view the info.json file after adding these jar files to the lib directory:
jackson-dataformat-yaml-2.18.2.jar (as suggested)
snakeyaml-2.3.jar (listed as dependency for above)
commons-httpclient-3.1.jar (added after receiving another “ClassNotFoundException” after adding above two files: “Caused by: java.lang.ClassNotFoundException: org.apache.commons.httpclient.MultiThreadedHttpConnectionManager”)
New to GeoServer, so unsure what (if any) next steps are. If this is a build/bundling/dependency issue, is there another bug/issue tracking forum where I should submit this?
New to GeoServer, so unsure what (if any) next steps are. If this is a build/bundling/dependency issue, is there another bug/issue tracking forum where I should submit this?