[Geoserver-users] GeoServer Printing Module

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell

Hi Jerome,
have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,
Mauro Bartolomeoli

···

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.
The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.
You can try to get them from an older geoserver version or I can send you them privately.
Please, let me know if this could your issue.

Regards,
Mauro Bartolomeoli

···

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

On Mon, Oct 28, 2013 at 9:20 AM, Mauro Bartolomeoli <
mauro.bartolomeoli@anonymised.com> wrote:

Hi Jerome, from the exception you get, it seems some java class is missing
from your deploy. If you are using one of the latest GeoServer versions,
2.4.0 or 2.4.1, your problem could be that a couple of jars are missing
from Geoserver WEB-INF/lib, because xerces dependency has been removed from
Geoserver but the printing plugin still depends on it.

Mauro, to fix this issue it should be just a matter of adding a dependency
on xerces in the community/release/pom.xml,
and then add a *xerces* filter to catch those two extra jars.
We indeed have a ticket already: http://jira.codehaus.org/browse/GEOS-6072

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com…] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com…>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com84…]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com47…
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


HI Jerome,
I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.
The logs should hopefully indicate what is happening.
Cheers
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

Jonathan,

Thank you very much for your reply. I will turn the logs up to Geotools_developer level. I have been checking the logs but have not found the problem yet.

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]
Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com
Cc: Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com547…>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@…5547…>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]
Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com
Cc: Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com7…>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com84…]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com47…
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

···

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Hi Jerome,
Your logs appear to be suggesting you’re outputting in PNG format. Specifically the list line:

About to write png image

Might be worth investigating if you are actually requesting PDF too. In the interim it’s probably worth trying the imagemagick thing.
Regards,
Jonathan

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

···

On 29 October 2013 13:13, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

Jonathan,

Thanks for your reply. I have been looking at my layer definitions, and it appears the vector layers are displayed in PNG format. However, the features on the vector layers are selected from a WMS layer (which also displays in PNG format), and the WMS layers print fine. That part is a little confusing. I will check into image magick.

Thanks,

Jerome

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com4942…]
Sent: Tuesday, October 29, 2013 9:37 AM
To: jawendell@anonymised.com
Cc: Jesse Eichar; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

Your logs appear to be suggesting you’re outputting in PNG format. Specifically the list line:

About to write png image

Might be worth investigating if you are actually requesting PDF too. In the interim it’s probably worth trying the imagemagick thing.

Regards,

Jonathan

On 29 October 2013 13:13, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

···

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Jesse,

Thanks for your reply. Yes, the OSM and WMS layers are printing fine. I have some base layers from servers using the REST API that give the same error.

I will check on the imageio extension.

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:49 AM
To: jawendell
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@anonymised.com.> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com…5547…> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@…84…] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com.5547…
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Jesse,

It appears the imageio extension is installed based on the following files being in the WEB-INF/lib directory:

Are there other files that should be installed?

Thanks,

Jerome

From: Jerome A. Wendell [mailto:jawendell@anonymised.com]
Sent: Tuesday, October 29, 2013 9:55 AM
To: ‘Jesse Eichar’
Cc: ‘Mauro Bartolomeoli’; ‘GeoServer Mailing List List’
Subject: Re: [Geoserver-users] GeoServer Printing Module

Jesse,

Thanks for your reply. Yes, the OSM and WMS layers are printing fine. I have some base layers from servers using the REST API that give the same error.

I will check on the imageio extension.

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:49 AM
To: jawendell
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Those are not actually the jars you need. Those are to allow some geotools plugins to use Image-io. There are 2 ways to have image io installed.

  1. Software emulation. In this case you need the imageio jars in your WEB-INF/lib folder. I can’t remember exactly which at the moment something like jai_imagio.jar or something
  2. Java extension is installed. This you can see by looking in /lib/ext

You can write a little program to see if you have it installed. Something like:

for (String name : javax.imageio.ImageIO.getReaderFormatNames()) {
System.out.println(name);
}

Jesse

image001.png

···

On Tue, Oct 29, 2013 at 5:19 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

It appears the imageio extension is installed based on the following files being in the WEB-INF/lib directory:

Are there other files that should be installed?

Thanks,

Jerome

From: Jerome A. Wendell [mailto:jawendell@anonymised.com]
Sent: Tuesday, October 29, 2013 9:55 AM
To: ‘Jesse Eichar’

Cc: ‘Mauro Bartolomeoli’; ‘GeoServer Mailing List List’
Subject: Re: [Geoserver-users] GeoServer Printing Module

Jesse,

Thanks for your reply. Yes, the OSM and WMS layers are printing fine. I have some base layers from servers using the REST API that give the same error.

I will check on the imageio extension.

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:49 AM
To: jawendell
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Jesse,

Thanks for your reply. I apologize for the continued questions, but I am still trying to find out what is causing my problem. The following files are in the /lib/ext directory:

Are these the correct files, or should there be others?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com…]
Sent: Tuesday, October 29, 2013 2:12 PM
To: jawendell@anonymised.com
Cc: Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Those are not actually the jars you need. Those are to allow some geotools plugins to use Image-io. There are 2 ways to have image io installed.

  1. Software emulation. In this case you need the imageio jars in your WEB-INF/lib folder. I can’t remember exactly which at the moment something like jai_imagio.jar or something

  2. Java extension is installed. This you can see by looking in /lib/ext

You can write a little program to see if you have it installed. Something like:

for (String name : javax.imageio.ImageIO.getReaderFormatNames()) {

System.out.println(name);

}

Jesse

On Tue, Oct 29, 2013 at 5:19 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

It appears the imageio extension is installed based on the following files being in the WEB-INF/lib directory:

Are there other files that should be installed?

Thanks,

Jerome

From: Jerome A. Wendell [mailto:jawendell@anonymised.com]
Sent: Tuesday, October 29, 2013 9:55 AM
To: ‘Jesse Eichar’

Cc: ‘Mauro Bartolomeoli’; ‘GeoServer Mailing List List’
Subject: Re: [Geoserver-users] GeoServer Printing Module

Jesse,

Thanks for your reply. Yes, the OSM and WMS layers are printing fine. I have some base layers from servers using the REST API that give the same error.

I will check on the imageio extension.

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:49 AM
To: jawendell
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@…5547…> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com…5547…> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@…84…] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com.5547…
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

The layers that I can’t get to print are layers that I have added to my map using OpenLayers 2.12. The vector layer has objects that were read from a WMS layer using WFS and reading the protocol using a filter. The REST API layers that I can’t get to print are from other servers, and the layers display fine in my map and have been put into the config.yaml file as accepted hosts. Does any of this affect whether or not the layer will print?

The error that I get in both situations is below:

2013-10-29 15:22:19,475 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 15:22:19,475 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 15:22:19,475 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 15:22:19,476 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 15:22:19,476 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 15:22:19,476 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 15:22:19,476 DEBUG [org.geotools.image] - About to write png image

I tried running the little program below, but could not get it to work. I am not enough of a programmer to know why. I am not sure where to find the imageio extension that I need.

Thanks,

Jerome

From: Jerome A. Wendell [mailto:jawendell@anonymised.com]
Sent: Tuesday, October 29, 2013 2:22 PM
To: ‘Jesse Eichar’
Cc: ‘Mauro Bartolomeoli’; ‘GeoServer Mailing List List’
Subject: RE: [Geoserver-users] GeoServer Printing Module

Jesse,

Thanks for your reply. I apologize for the continued questions, but I am still trying to find out what is causing my problem. The following files are in the /lib/ext directory:

Are these the correct files, or should there be others?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com…]
Sent: Tuesday, October 29, 2013 2:12 PM
To: jawendell@anonymised.com
Cc: Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Those are not actually the jars you need. Those are to allow some geotools plugins to use Image-io. There are 2 ways to have image io installed.

  1. Software emulation. In this case you need the imageio jars in your WEB-INF/lib folder. I can’t remember exactly which at the moment something like jai_imagio.jar or something

  2. Java extension is installed. This you can see by looking in /lib/ext

You can write a little program to see if you have it installed. Something like:

for (String name : javax.imageio.ImageIO.getReaderFormatNames()) {

System.out.println(name);

}

Jesse

On Tue, Oct 29, 2013 at 5:19 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

It appears the imageio extension is installed based on the following files being in the WEB-INF/lib directory:

Are there other files that should be installed?

Thanks,

Jerome

From: Jerome A. Wendell [mailto:jawendell@anonymised.com]
Sent: Tuesday, October 29, 2013 9:55 AM
To: ‘Jesse Eichar’

Cc: ‘Mauro Bartolomeoli’; ‘GeoServer Mailing List List’
Subject: Re: [Geoserver-users] GeoServer Printing Module

Jesse,

Thanks for your reply. Yes, the OSM and WMS layers are printing fine. I have some base layers from servers using the REST API that give the same error.

I will check on the imageio extension.

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com.]
Sent: Tuesday, October 29, 2013 9:49 AM
To: jawendell
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

For PDF you don’t need imagemagick.

I looked to quickly at the logs you gave. Those aren’t issues with vector or png output. It looks like it is the internals of JAVA.IO

I assume there are layers other than just the vector layer? Are they printing correctly?

Maybe try getting the vectors as svg?

Also make sure that you have java’s imageio extension installed.

Jesse

On Tue, Oct 29, 2013 at 2:13 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jesse,

Thanks for your reply. Actually I am trying to print to a PDF file. Does that still require image magick?

Thanks,

Jerome

From: Jesse Eichar [mailto:jesse.eichar@anonymised.com]
Sent: Tuesday, October 29, 2013 9:09 AM
To: jawendell@anonymised.com
Cc: Jonathan Moules; Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

If you are trying to write to a PNG you need to install image magick and use the print war that is configured to use image magick:

http://www.mapfish.org/doc/print/installation.html#with-image-output-line

Jesse

On Tue, Oct 29, 2013 at 2:04 PM, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Jonathan,

Thanks for the suggestion. The following was written to the logs when I tried to print with the vector layer:

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Encoded input image for png writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Getting a writer

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Unable to use Native ImageIO PNG writer.

2013-10-29 08:57:13,425 DEBUG [org.geotools.image] - Using ImageIO Writer with SPI: com.sun.imageio.plugins.png.PNGImageWriterSpi

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Setting write parameters for this writer

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - Writer is NOT native

2013-10-29 08:57:13,426 DEBUG [org.geotools.image] - About to write png image

It appears the required writer is not present. Is this something that I can download from another web site?

Thanks,

Jerome Wendell

From: Jonathan Moules [mailto:jonathanmoules@anonymised.com]

Sent: Tuesday, October 29, 2013 8:44 AM
To: jawendell@anonymised.com

Cc: Mauro Bartolomeoli; GeoServer Mailing List List

Subject: Re: [Geoserver-users] GeoServer Printing Module

HI Jerome,

I’m using a standalone MapFish Print deployment, but the vector should work just fine if the WMS/OSM is. Have a look in your logs; you may want to turn them up to Geotools_developer level.

The logs should hopefully indicate what is happening.

Cheers

Jonathan

On 28 October 2013 12:38, Jerome A. Wendell <jawendell@anonymised.com> wrote:

Mauro,

Thank you very much for your reply. I found the two files in the MapFish repository, and have placed them in the WEB-INF/lib directory. The printing plugin seems to be working fine now for OSM and WMS layers, but when I try to print vector layers overlaid on the map, the process immediately aborts. Do I need to do something different in order to be able to print vector layers?

Thanks for your help,

Jerome Wendell

From: maurobartolomeoli@anonymised.com [mailto:maurobartolomeoli@anonymised.com] On Behalf Of Mauro Bartolomeoli
Sent: Monday, October 28, 2013 4:21 AM

To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome, from the exception you get, it seems some java class is missing from your deploy. If you are using one of the latest GeoServer versions, 2.4.0 or 2.4.1, your problem could be that a couple of jars are missing from Geoserver WEB-INF/lib, because xerces dependency has been removed from Geoserver but the printing plugin still depends on it.

The two jars are xml-api-xerces-2.7.1.jar and xercesImpl-2.7.1.jar.

You can try to get them from an older geoserver version or I can send you them privately.

Please, let me know if this could your issue.

Regards,

Mauro Bartolomeoli

2013/10/26 Jerome A. Wendell <jawendell@anonymised.com>

Mauro,

Thanks for your reply, I appreciate it. I followed those instructions to install the plugin. The config.yaml file was created and I can retrieve a list of printing parameters from http://localhost:8080/geoserver/pdf/info.json. When I open the sample page in those instructions, I can read the information at the top of the page and there is a link to the source code, but there is no map. GeoServer is running at http://localhost:8080/geoserver/. I failed to mention in my original post that I have also installed GeoExt (I followed the instruction on the GeoExt web site at http://geoext.org/tutorials/quickstart.html.) and Ext JS (I also made the changes recommeneded for IIS on the http://www.sencha.com web site at this link). So my current configuration on a Windows server is:

OpenLayers 2.12, GeoServer 2.4.0, GeoExt 1.1 and Ext JS 3.4.1

By reading on the GeoExt web site I concluded that I need to install GeoExt and Ext JS. I am currently loading the printCapabilities using the following script tag:

I am using the following code to print the map:

// The printProvider that connects us to the print service

printProvider = new GeoExt.data.PrintProvider({

method: “GET”, // “POST” recommended for production use

capabilities: printCapabilities, // from the info.json script in the html

customParams: {

mapTitle: “Printing Demo”,

comment: “This is a map printed from GeoExt.”

}

});

var laycenter = map.getCenter();

var layzoom = map.getZoom();

printPage = new GeoExt.data.PrintPage({

printProvider: printProvider

});

mapPanel = new GeoExt.MapPanel({

region: “center”,

map: map,

center: laycenter,

zoom: layzoom

});

// A MapPanel with a “Print…” button

new Ext.Panel({

renderTo: “Map”,

layout: “border”,

width: 1060,

height: 785,

items: mapPanel,

bbar: [“->”, {

text: “Print”,

handler: function(){

printPage.fit(mapPanel, true);

printProvider.print(mapPanel, printPage);

}

}]

});

The map is an OpenLayers map that has several layers, and I have tried printing it with just an OSM layer, and I get the following error:

2013-10-26 11:16:37,428 ERROR [servlet.BaseMapServlet] - Error while generating PDF

java.lang.NoClassDefFoundError: Could not initialize class org.mapfish.print.map.renderers.TileRenderer

at org.mapfish.print.map.readers.HTTPMapReader.render(HTTPMapReader.java:81)

at org.mapfish.print.map.MapChunkDrawer.renderImpl(MapChunkDrawer.java:162)

at org.mapfish.print.ChunkDrawer.render(ChunkDrawer.java:55)

at org.mapfish.print.ChunkDrawer.tableLayout(ChunkDrawer.java:49)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfPRow.writeCells(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.PdfPTable.writeSelectedRows(Unknown Source)

at com.lowagie.text.pdf.ColumnText.goComposite(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.ColumnText.go(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.addPTable(Unknown Source)

at com.lowagie.text.pdf.PdfDocument.add(Unknown Source)

at com.lowagie.text.Document.add(Unknown Source)

at org.mapfish.print.config.layout.Page$1.add(Page.java:67)

at org.mapfish.print.config.layout.MapBlock.render(MapBlock.java:66)

at org.mapfish.print.config.layout.Page.render(Page.java:65)

at org.mapfish.print.config.layout.MainPage.render(MainPage.java:62)

at org.mapfish.print.config.layout.Layout.render(Layout.java:59)

at org.mapfish.print.MapPrinter.print(MapPrinter.java:144)

at org.mapfish.print.servlet.MapPrinterServlet.doCreatePDFFile(MapPrinterServlet.java:275)

at org.mapfish.print.servlet.MapPrinterServlet.createAndGetPDF(MapPrinterServlet.java:130)

at org.mapfish.print.servlet.MapPrinterServlet.doGet(MapPrinterServlet.java:68)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)

at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)

at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)

at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)

at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)

at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:27)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:74)

at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:45)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:49)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:53)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.geoserver.security.filter.GeoServerBasicAuthenticationFilter.doFilter(GeoServerBasicAuthenticationFilter.java:82)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:68)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:52)

at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:72)

at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:91)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)

at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:134)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:75)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:47)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:43)

at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)

at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)

at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)

at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)

at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)

at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

at org.mortbay.jetty.Server.handle(Server.java:324)

at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)

at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)

at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)

at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)

at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)

at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)

When I try to print the map with a vector layer overlaid on the OSM layer, the GET print.pdf?spec . . . is immediately aborted. I have also tried it with POST and get the same result. When I try printing the map with a WMS layer overlaid on the OSM map, I get the same java.lang.NoClassDefFoundError as listed above.

I have edited the config.yaml file to include the required hosts to print the map by adding to the hosts section:

  • !dnsMatch

host: www.mydomain.com

  • !dnsMatch

host: a.tile.openstreetmap.org

It seems like something is missing in my configuration, but I have followed the instructions on each web site. I have been researching the error on the web, but have not found anything that resolved the problem.

If you have any questions or need more information, please let me know. I apologize for the long post, but I wanted to supply as many details as I could.

I appreciate any help or suggestions that you care to give.

Thanks,

Jerome Wendell

From: Mauro Bartolomeoli [mailto:maurobartolomeoli@anonymised.com]
Sent: Saturday, October 26, 2013 3:48 AM
To: jawendell@anonymised.com
Cc: GeoServer Mailing List List
Subject: Re: [Geoserver-users] GeoServer Printing Module

Hi Jerome,

have you followed the instructions you can find here (http://docs.geoserver.org/stable/en/user/community/printing/) to install the plugin?

What kind of errors are you getting, in detail?

Regards,

Mauro Bartolomeoli

2013/10/25 Jerome A. Wendell <jawendell@anonymised.com>

This may seem like a silly question, but once I have installed the GeoServer printing module and have confirmed that it is installed correctly, should everything be ready for me to print using the documentation and examples at the following link:

http://geoext.org/search.html?q=print

I have tried some of the examples and continue to get various errors. Just trying to make sure that I am not missing something.

Thanks,

Jerome Wendell


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Dott. Mauro Bartolomeoli

@mauro_bart

Senior Software Engineer

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

http://www.geo-solutions.it

http://twitter.com/geosolutions_it



October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk


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

Sorry to take so long to respond. I am in switzerland so I imagine I work at different hours from you.

I have attached a class file (and the source code) for you that lists the formats your image-io install supports. Run it as follows:

java -classpath . ListFormats

It should give output like:

BMP
bmp
jpg
JPG
wbmp
jpeg
png
PNG
JPEG
WBMP
GIF
gif

This only checks the configuration of your default java. to get a more accurate view of what mapfish print has access to you need to change to:

java -classpath .:<path_to_all_jars_in_WEB-INF/lib> ListFormats

For example:

java -classpath .:WEB-INF/lib/imageio-ext.jar:WEB-INF/lib/mapfish-print.jar ListFormats

You will want to add all the jars in the WEB-INF/lib directory to get a complete picture.

If the first or the second list PNG or png then it should be configured correctly and your problem lays elsewhere.

The logging is configured in the WEB-INF/classes/log4j.properties file. You can change DEBUG to TRACE to possibly get more information.

Also try log4j.rootLogger=DEBUG, R

Feel free to post the full log somewhere so I can look at the full log.

Jesse

image002.png

image001.png

ListFormats.class (587 Bytes)

ListFormats.java (200 Bytes)

···