mapfish-print icon indicating copy to clipboard operation
mapfish-print copied to clipboard

overviewMap causing NullPointerException (V2)

Open danielrobins opened this issue 8 years ago • 11 comments

Hello,

I just upgraded to version 2.1.2. Printing gave following error. [ajp-nio-8009-exec-16] ERROR h.print.servlet.BaseMapServlet - Error while generating PDF java.lang.NullPointerException

Removing overviewMap from config.yaml result in print working but then the scale from the overviewMap is incorrect. Any clue how to fix this?

danielrobins avatar Jun 23 '16 11:06 danielrobins

Do you have a stacktrace?

pvalsecc avatar Jun 23 '16 13:06 pvalsecc

@pvalsecc Here's a copy from the mapfish log:

2016-06-23 15:33:24,128 [ajp-nio-8009-exec-19] DEBUG h.print.servlet.BaseMapServlet - Using 'null' to encode Inputcontent.
2016-06-23 15:33:24,551 [ajp-nio-8009-exec-19] DEBUG h.print.servlet.BaseMapServlet - Generating PDF for spec={"pages":[{"center":[193556.55368444,406868.59095369],"mapTitle":"Mijn kaart","gemnaam":"Gemeente Boxmeer","logoURL":"https://www.gisboxmeer.nl/gisportaal/test/img/logo_boxmeer.png","scale":250,"rotation":"0","legend":true}],"dpi":"150","units":"m","srs":"EPSG:28992","layers":[{"baseURL":"https://mapproxy.gisarts.nl/service?","opacity":1,"singleTile":true,"customParams":{"MAP":"/home/gisarts/apps/gisportalen/boxmeer/map/authenticatie/i_test.map","TRANSPARENT":"FALSE"},"type":"WMS","layers":["luchtfoto_boxmeer_2015"],"format":"image/jpeg","styles":[]},{"baseURL":"https://www.gisboxmeer.nl/cgi-bin/mapserv?","opacity":0.8,"singleTile":true,"customParams":{"MAP":"/home/gisarts/apps/gisportalen/boxmeer/map/authenticatie/i_test.map","TRANSPARENT":"TRUE"},"type":"WMS","layers":["bag_adres_zoeken","bag_vbo"],"format":"image/gif","styles":[]},{"opacity":1,"customParams":{},"type":"Vector","styles":{},"styleProperty":"_style","geoJson":{"type":"FeatureCollection","features":[]},"name":null}],"legends":[{"name":"Basiskaarten","classes":[{"name":"Luchtfoto 2015","icon":"https://www.gisboxmeer.nl/gisportaal/test/img/basiskaart_luchtfoto.png"}]}],"layout":"1. Standaard (A4 liggend)"}
2016-06-23 15:33:24,551 [ajp-nio-8009-exec-19] INFO  org.mapfish.print.servlet.spec - {"pages":[{"center":[193556.55368444,406868.59095369],"mapTitle":"Mijn kaart","gemnaam":"Gemeente Boxmeer","logoURL":"https://www.gisboxmeer.nl/gisportaal/test/img/logo_boxmeer.png","scale":250,"rotation":"0","legend":true}],"dpi":"150","units":"m","srs":"EPSG:28992","layers":[{"baseURL":"https://mapproxy.gisarts.nl/service?","opacity":1,"singleTile":true,"customParams":{"MAP":"/home/gisarts/apps/gisportalen/boxmeer/map/authenticatie/i_test.map","TRANSPARENT":"FALSE"},"type":"WMS","layers":["luchtfoto_boxmeer_2015"],"format":"image/jpeg","styles":[]},{"baseURL":"https://www.gisboxmeer.nl/cgi-bin/mapserv?","opacity":0.8,"singleTile":true,"customParams":{"MAP":"/home/gisarts/apps/gisportalen/boxmeer/map/authenticatie/i_test.map","TRANSPARENT":"TRUE"},"type":"WMS","layers":["bag_adres_zoeken","bag_vbo"],"format":"image/gif","styles":[]},{"opacity":1,"customParams":{},"type":"Vector","styles":{},"styleProperty":"_style","geoJson":{"type":"FeatureCollection","features":[]},"name":null}],"legends":[{"name":"Basiskaarten","classes":[{"name":"Luchtfoto 2015","icon":"https://www.gisboxmeer.nl/gisportaal/test/img/basiskaart_luchtfoto.png"}]}],"layout":"1. Standaard (A4 liggend)"}
2016-06-23 15:33:24,552 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - app is null, setting it as default configPath: config_boxmeer_kadastraal.yaml
2016-06-23 15:33:24,552 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - Attempting to locate app config file: 'config_boxmeer_kadastraal.yaml in the webapplication.
2016-06-23 15:33:24,553 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - Unable to find config file in web application using getRealPath.  Adding a / because that is often dropped
2016-06-23 15:33:24,553 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - Loading app from: /var/lib/tomcat8/webapps/print-servlet-2.1.2/config_boxmeer_kadastraal.yaml
2016-06-23 15:33:24,554 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - Printer for config_boxmeer_kadastraal.yaml stopped
2016-06-23 15:33:24,554 [ajp-nio-8009-exec-19] INFO  h.print.servlet.BaseMapServlet - Loading configuration file: /var/lib/tomcat8/webapps/print-servlet-2.1.2/config_boxmeer_kadastraal.yaml
2016-06-23 15:33:24,591 [ajp-nio-8009-exec-19] INFO  ish.print.output.OutputFactory - OutputFormat chosen for pdf is PdfOutputFactory
2016-06-23 15:33:24,592 [ajp-nio-8009-exec-19] DEBUG h.print.servlet.BaseMapServlet - Using '/var/lib/tomcat8/work/Catalina/localhost/print-servlet-2.1.2' as temporary directory
2016-06-23 15:33:24,593 [ajp-nio-8009-exec-19] INFO  ish.print.output.OutputFactory - OutputFormat chosen for pdf is PdfOutputFactory
2016-06-23 15:33:24,690 [ajp-nio-8009-exec-19] DEBUG h.print.config.InetHostMatcher - Address not in the authorizeds: mapproxy.gisarts.nl/78.31.115.24
2016-06-23 15:33:24,691 [ajp-nio-8009-exec-19] DEBUG rg.mapfish.print.config.Config - URI [https://mapproxy.gisarts.nl/service?] accepted by: DnsHostMatcher{host='mapproxy.gisarts.nl'}
2016-06-23 15:33:27,262 [ajp-nio-8009-exec-19] DEBUG int.map.readers.WMSServiceInfo - GetCapabilities https://mapproxy.gisarts.nl/service?: WMSServerInfo{tileCacheLayers={}}
2016-06-23 15:33:27,263 [ajp-nio-8009-exec-19] DEBUG rg.mapfish.print.config.Config - URI [https://www.gisboxmeer.nl/cgi-bin/mapserv?] accepted by: LocalHostMatcher{}
2016-06-23 15:33:27,280 [ajp-nio-8009-exec-19] INFO  int.map.readers.WMSServiceInfo - Error while getting capabilities for https://www.gisboxmeer.nl/cgi-bin/mapserv?. The print module will assume it's a standard WMS.
2016-06-23 15:33:27,281 [ajp-nio-8009-exec-19] INFO  int.map.readers.WMSServiceInfo - org.mapfish.print.map.readers.ServerInfoCache.requestInfo(ServerInfoCache.java:106)
org.mapfish.print.map.readers.ServerInfoCache.getInfo(ServerInfoCache.java:51)
org.mapfish.print.map.readers.WMSServiceInfo.getInfo(WMSServiceInfo.java:65)
org.mapfish.print.map.readers.WMSMapReader.<init>(WMSMapReader.java:100)
org.mapfish.print.map.readers.WMSMapReader.<init>(WMSMapReader.java:45)
org.mapfish.print.map.readers.WMSMapReader$Factory.create(WMSMapReader.java:83)
org.mapfish.print.map.readers.MapReaderFactoryFinder.create(MapReaderFactoryFinder.java:36)
org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:120)
org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)
org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:786)
com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1765)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:882)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:877)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:866)
com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:549)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:764)
com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1765)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:882)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:877)
com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:866)
com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:549)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:764)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:889)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:837)
com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:815)
org.mapfish.print.config.layout.ColumnsBlock$1.render(ColumnsBlock.java:67)
org.mapfish.print.PDFCustomBlocks.addAbsoluteDrawer(PDFCustomBlocks.java:183)
org.mapfish.print.config.layout.ColumnsBlock.render(ColumnsBlock.java:56)
org.mapfish.print.config.layout.Page.render(Page.java:73)
org.mapfish.print.config.layout.MainPage.render(MainPage.java:63)
org.mapfish.print.config.layout.Layout.render(Layout.java:59)
org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:30)
org.mapfish.print.output.PdfOutputFactory.print(PdfOutputFactory.java:58)
org.mapfish.print.MapPrinter.print(MapPrinter.java:175)
org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:370)
org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:184)
org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:112)
javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Thread.java:745)

2016-06-23 15:33:27,281 [ajp-nio-8009-exec-19] DEBUG int.map.readers.WMSServiceInfo - GetCapabilities https://www.gisboxmeer.nl/cgi-bin/mapserv?: WMSServerInfo{tileCacheLayers={}}
2016-06-23 15:33:27,282 [ajp-nio-8009-exec-19] DEBUG rg.mapfish.print.config.Config - URI [https://www.gisboxmeer.nl/cgi-bin/mapserv?] accepted by: LocalHostMatcher{}
2016-06-23 15:33:27,377 [tilesReader187] DEBUG     org.mapfish.print.PDFUtils - loading image: https://mapproxy.gisarts.nl/service?BBOX=193522.95160110667%2C406848.52671714826%2C193590.15576777334%2C406888.65519023174&HEIGHT=948&WIDTH=1587&TRANSPARENT=FALSE&map_resolution=150&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A150&LAYERS=luchtfoto_boxmeer_2015&REQUEST=GetMap&STYLES=&DPI=150&MAP=%2Fhome%2Fgisarts%2Fapps%2Fgisportalen%2Fboxmeer%2Fmap%2Fauthenticatie%2Fi_test.map&SRS=EPSG%3A28992
2016-06-23 15:33:27,799 [tilesReader184] DEBUG     org.mapfish.print.PDFUtils - loading image: https://www.gisboxmeer.nl/cgi-bin/mapserv?BBOX=193522.95160110667%2C406848.52671714826%2C193590.15576777334%2C406888.65519023174&HEIGHT=948&WIDTH=1587&TRANSPARENT=TRUE&map_resolution=150&VERSION=1.1.1&FORMAT=image%2Fgif&SERVICE=WMS&format_options=dpi%3A150&LAYERS=bag_adres_zoeken%2Cbag_vbo&REQUEST=GetMap&STYLES=%2C&DPI=150&MAP=%2Fhome%2Fgisarts%2Fapps%2Fgisportalen%2Fboxmeer%2Fmap%2Fauthenticatie%2Fi_test.map&SRS=EPSG%3A28992
2016-06-23 15:33:28,101 [tilesReader184] DEBUG     org.mapfish.print.PDFUtils - loaded image: https://www.gisboxmeer.nl/cgi-bin/mapserv?BBOX=193522.95160110667%2C406848.52671714826%2C193590.15576777334%2C406888.65519023174&HEIGHT=948&WIDTH=1587&TRANSPARENT=TRUE&map_resolution=150&VERSION=1.1.1&FORMAT=image%2Fgif&SERVICE=WMS&format_options=dpi%3A150&LAYERS=bag_adres_zoeken%2Cbag_vbo&REQUEST=GetMap&STYLES=%2C&DPI=150&MAP=%2Fhome%2Fgisarts%2Fapps%2Fgisportalen%2Fboxmeer%2Fmap%2Fauthenticatie%2Fi_test.map&SRS=EPSG%3A28992
2016-06-23 15:33:29,008 [tilesReader187] DEBUG     org.mapfish.print.PDFUtils - loaded image: https://mapproxy.gisarts.nl/service?BBOX=193522.95160110667%2C406848.52671714826%2C193590.15576777334%2C406888.65519023174&HEIGHT=948&WIDTH=1587&TRANSPARENT=FALSE&map_resolution=150&VERSION=1.1.1&FORMAT=image%2Fjpeg&SERVICE=WMS&format_options=dpi%3A150&LAYERS=luchtfoto_boxmeer_2015&REQUEST=GetMap&STYLES=&DPI=150&MAP=%2Fhome%2Fgisarts%2Fapps%2Fgisportalen%2Fboxmeer%2Fmap%2Fauthenticatie%2Fi_test.map&SRS=EPSG%3A28992
2016-06-23 15:33:29,278 [ajp-nio-8009-exec-19] ERROR h.print.servlet.BaseMapServlet - Error while generating PDF
java.lang.NullPointerException
    at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:86)
    at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)
    at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:786)
    at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1765)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:882)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:877)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:866)
    at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:549)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:764)
    at com.itextpdf.text.pdf.ColumnText.goComposite(ColumnText.java:1765)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:882)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:877)
    at com.itextpdf.text.pdf.ColumnText.go(ColumnText.java:866)
    at com.itextpdf.text.pdf.PdfPRow.writeCells(PdfPRow.java:549)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:764)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:889)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:837)
    at com.itextpdf.text.pdf.PdfPTable.writeSelectedRows(PdfPTable.java:815)
    at org.mapfish.print.config.layout.ColumnsBlock$1.render(ColumnsBlock.java:67)
    at org.mapfish.print.PDFCustomBlocks.addAbsoluteDrawer(PDFCustomBlocks.java:183)
    at org.mapfish.print.config.layout.ColumnsBlock.render(ColumnsBlock.java:56)
    at org.mapfish.print.config.layout.Page.render(Page.java:73)
    at org.mapfish.print.config.layout.MainPage.render(MainPage.java:63)
    at org.mapfish.print.config.layout.Layout.render(Layout.java:59)
    at org.mapfish.print.output.AbstractOutputFormat.doPrint(AbstractOutputFormat.java:30)
    at org.mapfish.print.output.PdfOutputFactory.print(PdfOutputFactory.java:58)
    at org.mapfish.print.MapPrinter.print(MapPrinter.java:175)
    at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:370)
    at org.mapfish.print.servlet.MapPrinterServlet.createPDF(MapPrinterServlet.java:184)
    at org.mapfish.print.servlet.MapPrinterServlet.doPost(MapPrinterServlet.java:112)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:97)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
    at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:827)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)

danielrobins avatar Jun 23 '16 13:06 danielrobins

I am having the same issue. no since in providing my stack trace since it matches exactly with the previous one listed. I have seen this in MapFish 2.1 as well as the new 2.2 version.

chrismeteu avatar Oct 17 '16 17:10 chrismeteu

I am having the same issue. It use to work 100% in my older Geoserver Instance (2.2.4). But just installed the latest stable Geoserver (2.10.2), and suddenly my Mapfish does not work anymore. I have the following in my config.yaml (part of the file):

      items:
         - !map
           condition: !indexPage
           width: 3120
           height: 1950
         - !map
           condition: indexPage
           width: 3120
           height: 1950
           absoluteX: 124
           absoluteY: 2125
           overviewMap: 1

This does not work as I get the NullPointerException. If I comment out "overviewMap: 1" I do not get the error, but then again it does not generate the PDF correctly.

1Map avatar Mar 23 '17 17:03 1Map

@chrismeteu Did you resolve this issue?

1Map avatar Mar 28 '17 11:03 1Map

No. We've decided to not use mapfish and to make our own print api instead. Too many limitations for our needs. 

Sent from my T-Mobile 4G LTE Device -------- Original message --------From: Schalk Grobbelaar [email protected] Date: 3/28/17 6:52 AM (GMT-06:00) To: mapfish/mapfish-print [email protected] Cc: chrismeteu [email protected], Mention [email protected] Subject: Re: [mapfish/mapfish-print] overviewMap causing NullPointerException   (V2) (#430) @chrismeteu Did you resolve this issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/mapfish/mapfish-print","title":"mapfish/mapfish-print","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/mapfish/mapfish-print"}},"updates":{"snippets":[{"icon":"PERSON","message":"@1Map in #430: @chrismeteu Did you resolve this issue?"}],"action":{"name":"View Issue","url":"https://github.com/mapfish/mapfish-print/issues/430#issuecomment-289745704"}}}

chrismeteu avatar Mar 29 '17 02:03 chrismeteu

anyone solve this error?

rgdamalerio avatar Mar 05 '18 01:03 rgdamalerio

The classes at the top of that stacktrace have all been refactored out of existence. My guess is that this NPE is gone in newer versions of the print.

pvalsecc avatar Mar 07 '18 13:03 pvalsecc

I have the same error. Any news about this?

JakobMiksch avatar Jul 17 '18 10:07 JakobMiksch

@JakobMiksch, what version did you try?

pvalsecc avatar Jul 24 '18 06:07 pvalsecc

I had the same kind of error using MapFish Print as Tomcat servlet (print.war) in a pretty recent MapFish Print v2 version: https://github.com/mapfish/mapfish-print-v2/releases/tag/release%2F2.3.0

For me it was solved changing name to null in the below line in

src\main\java\org\mapfish\print\map\MapChunkDrawer.java

    mainTransformer = context.getLayout().getMainPage().getMap(name).createTransformer(context, params);

->

    mainTransformer = context.getLayout().getMainPage().getMap(null).createTransformer(context, params);

After that rebuild the servlet. I used:

mvn clean mvn compile install war:war After that replace the print.war in tomcat/webapps

RinkeHeida avatar May 03 '24 12:05 RinkeHeida