[GeoNetwork-users] Problem printing from map preview in geonetwork 2.10.4

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to
http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
  at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
  at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
  at org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
  at org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
  at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
  at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
  at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
  at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
  at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
  at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
  at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
  at org.json.JSONObject.<init>(JSONObject.java:180)
  at org.json.JSONObject.<init>(JSONObject.java:403)
  at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
  ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4 locally
and didn't get it.

Have you change the print-config.yalm file for any customisation of the map
print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net/&gt; for
details. _________________________Jose GarcíaGeoCat bvVeenderweg 136721 WD
BennekomThe Netherlandshttp://GeoCat.net/>*

Hi Jose,

I wasn't even aware of print-config.yaml until you mentioned it, so it
definitely hasn't been changed from whatever the default is when it's
installed. Is there any documentation on the parameters? This happens to me
on 3 different geonetwork 2.10.4 installations- one is a clean install and
two are upgrades. I can't see any error in the log files when I try and
print.

Jo

On Mon, Jan 26, 2015 at 2:51 PM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4
locally and didn't get it.

Have you change the print-config.yalm file for any customisation of the
map print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

Hi Jo

I'm testing locally, so probably that makes the difference with your
installations.

For the print is used MapFish print (see in
http://www.mapfish.org/doc/print/)

Check also in Firebug or in the Chrome console the XHR requests, before the
create.json is issued an info.json request, verify if that request is fine
or has any error.

Regards,
Jose García

On Mon, Jan 26, 2015 at 4:06 PM, Jo Cook <jocook@anonymised.com> wrote:

Hi Jose,

I wasn't even aware of print-config.yaml until you mentioned it, so it
definitely hasn't been changed from whatever the default is when it's
installed. Is there any documentation on the parameters? This happens to me
on 3 different geonetwork 2.10.4 installations- one is a clean install and
two are upgrades. I can't see any error in the log files when I try and
print.

Jo

On Mon, Jan 26, 2015 at 2:51 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4
locally and didn't get it.

Have you change the print-config.yalm file for any customisation of the
map print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take
a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net/&gt; for
details. _________________________Jose GarcíaGeoCat bvVeenderweg 136721 WD
BennekomThe Netherlandshttp://GeoCat.net/>*

Hi Jose,

I can only see the create.json request, no info.json request. I've run the
json through jsonlint.com and it validates fine- here's an example of it. I
don't know if you can see anything wrong with this:
{
    "pages": [
        {
            "center": [
                560849.67733698,
                195867.64746988
            ],
            "scale": 50000,
            "rotation": "0"
        }
    ],
    "dpi": "127",
    "units": "m",
    "srs": "EPSG:27700",
    "layers": [
        {
            "baseURL": "
http://t0.ads.astuntechnology.com/astuntechnology/osopen/service&quot;,
            "opacity": 1,
            "singleTile": false,
            "customParams": {},
            "type": "WMS",
            "layers": [
                "osopen"
            ],
            "format": "image/png",
            "styles":
        },
        {
            "opacity": 1,
            "customParams": {},
            "type": "Vector",
            "styles": {},
            "styleProperty": "_style",
            "geoJson": {
                "type": "FeatureCollection",
                "features":
            },
            "name": "Feature info"
        },
        {
            "baseURL": "
http://essex.astuntechnology.com/getows.ashx?mapsource=Essex/Inspire_Brentwood&service=WMS&version=1.1.1&request=GetCapabilities&
",
            "opacity": 1,
            "singleTile": true,
            "customParams": {
                "TRANSPARENT": "TRUE",
                "LANGUAGE": "eng"
            },
            "type": "WMS",
            "layers": [
                "air_quality_management_areas"
            ],
            "format": "image/png",
            "styles":
        }
    ],
    "layout": "A4 portrait"
}

Thanks

Jo

On Mon, Jan 26, 2015 at 3:42 PM, Jose Garcia <jose.garcia@anonymised.com> wrote:

Hi Jo

I'm testing locally, so probably that makes the difference with your
installations.

For the print is used MapFish print (see in
http://www.mapfish.org/doc/print/)

Check also in Firebug or in the Chrome console the XHR requests, before
the create.json is issued an info.json request, verify if that request is
fine or has any error.

Regards,
Jose García

On Mon, Jan 26, 2015 at 4:06 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Jose,

I wasn't even aware of print-config.yaml until you mentioned it, so it
definitely hasn't been changed from whatever the default is when it's
installed. Is there any documentation on the parameters? This happens to me
on 3 different geonetwork 2.10.4 installations- one is a clean install and
two are upgrades. I can't see any error in the log files when I try and
print.

Jo

On Mon, Jan 26, 2015 at 2:51 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4
locally and didn't get it.

Have you change the print-config.yalm file for any customisation of the
map print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more.
Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

Hi Jose,

I've figured out what the problem is- it's expecting something dynamic (eg
entered by the user) for the comment, but I don't have anywhere to add a
comment. If I turn that into a static string in print-config.yaml then it
works fine.

So -where should I be able to add a comment to the map?

Thanks

Jo

On Mon, Jan 26, 2015 at 3:53 PM, Jo Cook <jocook@anonymised.com> wrote:

Hi Jose,

I can only see the create.json request, no info.json request. I've run the
json through jsonlint.com and it validates fine- here's an example of it.
I don't know if you can see anything wrong with this:
{
    "pages": [
        {
            "center": [
                560849.67733698,
                195867.64746988
            ],
            "scale": 50000,
            "rotation": "0"
        }
    ],
    "dpi": "127",
    "units": "m",
    "srs": "EPSG:27700",
    "layers": [
        {
            "baseURL": "
http://t0.ads.astuntechnology.com/astuntechnology/osopen/service&quot;,
            "opacity": 1,
            "singleTile": false,
            "customParams": {},
            "type": "WMS",
            "layers": [
                "osopen"
            ],
            "format": "image/png",
            "styles":
        },
        {
            "opacity": 1,
            "customParams": {},
            "type": "Vector",
            "styles": {},
            "styleProperty": "_style",
            "geoJson": {
                "type": "FeatureCollection",
                "features":
            },
            "name": "Feature info"
        },
        {
            "baseURL": "
http://essex.astuntechnology.com/getows.ashx?mapsource=Essex/Inspire_Brentwood&service=WMS&version=1.1.1&request=GetCapabilities&
",
            "opacity": 1,
            "singleTile": true,
            "customParams": {
                "TRANSPARENT": "TRUE",
                "LANGUAGE": "eng"
            },
            "type": "WMS",
            "layers": [
                "air_quality_management_areas"
            ],
            "format": "image/png",
            "styles":
        }
    ],
    "layout": "A4 portrait"
}

Thanks

Jo

On Mon, Jan 26, 2015 at 3:42 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I'm testing locally, so probably that makes the difference with your
installations.

For the print is used MapFish print (see in
http://www.mapfish.org/doc/print/)

Check also in Firebug or in the Chrome console the XHR requests, before
the create.json is issued an info.json request, verify if that request is
fine or has any error.

Regards,
Jose García

On Mon, Jan 26, 2015 at 4:06 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Jose,

I wasn't even aware of print-config.yaml until you mentioned it, so it
definitely hasn't been changed from whatever the default is when it's
installed. Is there any documentation on the parameters? This happens to me
on 3 different geonetwork 2.10.4 installations- one is a clean install and
two are upgrades. I can't see any error in the log files when I try and
print.

Jo

On Mon, Jan 26, 2015 at 2:51 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4
locally and didn't get it.

Have you change the print-config.yalm file for any customisation of the
map print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error
It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT
no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media,
is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more.
Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and
metadata on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

Hi Jo

In the right panel of the map, there's an accordion component for the layer
list, legend and print. That form contains a comment field, that can be
left empty.

From where are you printing?

Regards,
Jose García

On Mon, Jan 26, 2015 at 5:56 PM, Jo Cook <jocook@anonymised.com> wrote:

Hi Jose,

I've figured out what the problem is- it's expecting something dynamic (eg
entered by the user) for the comment, but I don't have anywhere to add a
comment. If I turn that into a static string in print-config.yaml then it
works fine.

So -where should I be able to add a comment to the map?

Thanks

Jo

On Mon, Jan 26, 2015 at 3:53 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Jose,

I can only see the create.json request, no info.json request. I've run
the json through jsonlint.com and it validates fine- here's an example
of it. I don't know if you can see anything wrong with this:
{
    "pages": [
        {
            "center": [
                560849.67733698,
                195867.64746988
            ],
            "scale": 50000,
            "rotation": "0"
        }
    ],
    "dpi": "127",
    "units": "m",
    "srs": "EPSG:27700",
    "layers": [
        {
            "baseURL": "
http://t0.ads.astuntechnology.com/astuntechnology/osopen/service&quot;,
            "opacity": 1,
            "singleTile": false,
            "customParams": {},
            "type": "WMS",
            "layers": [
                "osopen"
            ],
            "format": "image/png",
            "styles":
        },
        {
            "opacity": 1,
            "customParams": {},
            "type": "Vector",
            "styles": {},
            "styleProperty": "_style",
            "geoJson": {
                "type": "FeatureCollection",
                "features":
            },
            "name": "Feature info"
        },
        {
            "baseURL": "
http://essex.astuntechnology.com/getows.ashx?mapsource=Essex/Inspire_Brentwood&service=WMS&version=1.1.1&request=GetCapabilities&
",
            "opacity": 1,
            "singleTile": true,
            "customParams": {
                "TRANSPARENT": "TRUE",
                "LANGUAGE": "eng"
            },
            "type": "WMS",
            "layers": [
                "air_quality_management_areas"
            ],
            "format": "image/png",
            "styles":
        }
    ],
    "layout": "A4 portrait"
}

Thanks

Jo

On Mon, Jan 26, 2015 at 3:42 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I'm testing locally, so probably that makes the difference with your
installations.

For the print is used MapFish print (see in
http://www.mapfish.org/doc/print/)

Check also in Firebug or in the Chrome console the XHR requests, before
the create.json is issued an info.json request, verify if that request is
fine or has any error.

Regards,
Jose García

On Mon, Jan 26, 2015 at 4:06 PM, Jo Cook <jocook@anonymised.com>
wrote:

Hi Jose,

I wasn't even aware of print-config.yaml until you mentioned it, so it
definitely hasn't been changed from whatever the default is when it's
installed. Is there any documentation on the parameters? This happens to me
on 3 different geonetwork 2.10.4 installations- one is a clean install and
two are upgrades. I can't see any error in the log files when I try and
print.

Jo

On Mon, Jan 26, 2015 at 2:51 PM, Jose Garcia <jose.garcia@anonymised.com>
wrote:

Hi Jo

I think is related to some configuration issue. I tried with 2.10.4
locally and didn't get it.

Have you change the print-config.yalm file for any customisation of
the map print?

Please check the log file if provides some detail information.

Regards,
Jose García

On Mon, Jan 26, 2015 at 11:17 AM, Jo Cook <jocook@anonymised.com>
wrote:

Hi,

Printing from the map viewer in geonetwork throws up an error: "Error
It
was not possible to print, try later".

Firebug tells me there's an error with the POST request to

http://mygeonetworkurl/pdf/create.json?url=%2Fgeonetwork%2Fpdf%2Fcreate.json

When I open the response in a fresh browser tab I get the following:

Error while generating PDF:
java.lang.RuntimeException: Cannot parse the spec file
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:145)
        at
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:277)
        at
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:152)
        at
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:90)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
        at
javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.WebappMetricsFilter.doFilter(WebappMetricsFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.fao.geonet.monitor.webapp.MetricsRegistryInitializerFilter.doFilter(MetricsRegistryInitializerFilter.java:31)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        at
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
        at
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:178)
        at
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:155)
        at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
        at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
        at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:701)
Caused by: org.json.JSONException: A JSONObject text must begin with
'{' at character 0
        at org.json.JSONTokener.syntaxError(JSONTokener.java:496)
        at org.json.JSONObject.<init>(JSONObject.java:180)
        at org.json.JSONObject.<init>(JSONObject.java:403)
        at org.mapfish.print.MapPrinter.parseSpec(MapPrinter.java:143)
        ... 39 more

Is this a configuration problem or a bug?

Thanks

Jo

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT
no.
864201149.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media,
is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more.
Take a
look and join the conversation now.
http://goparallel.sourceforge.net/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and
metadata on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata
on GeoServer and GeoNetwork. Visit http://geocat.net
<http://geocat.net/&gt; for details. _________________________Jose
GarcíaGeoCat bvVeenderweg 136721 WD BennekomThe
Netherlandshttp://GeoCat.net/>*

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey,
KT18 7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--
*Jo Cook*
Astun Technology Ltd, The Coach House, 17 West Street, Epsom, Surrey, KT18
7RL, UK
t:+44 7930 524 155
iShare - Data integration and publishing platform
<http://www.isharemaps.com/&gt;

*****************************************

Company registration no. 5410695. Registered in England and Wales.
Registered office: 120 Manor Green Road, Epsom, Surrey, KT19 8LN VAT no.
864201149.

--

*GeoCat Bridge for ArcGIS allows instant publishing of data and metadata on
GeoServer and GeoNetwork. Visit http://geocat.net/&gt; for
details. _________________________Jose GarcíaGeoCat bvVeenderweg 136721 WD
BennekomThe Netherlandshttp://GeoCat.net/>*