|
Issue Type:
|
Bug
|
Affects Versions:
|
2.2.3
|
Assignee:
|
Andrea Aime
|
Components:
|
Community modules
|
Created:
|
28/Jan/13 6:19 AM
|
Description:
|
I might be doing something incredibly stupid here, it’s hard to tell because YAML isn’t very error-tolerant.
Anyway, if I have either of the following in my config.yaml file, it’ll work:
url: ‘file://${configDir}/logo_v8_sphere.svg’
url: ‘${configDir}/logo_v8_sphere.svg’
This also works with PDF’s (for background image).
However, if I try and do that with a PNG or JPEG file that is in the exact location I get one of two errors. If prefixed with “file” I get:
28 Jan 12:11:13 ERROR [org.mapfish.print.servlet.BaseMapServlet] - Error while generating PDF
java.lang.IllegalStateException: unsupported protocol: ‘file’
at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149)
at org.apache.commons.httpclient.protocol.Protocol.getProtocol(Protocol.java:117)
at org.apache.commons.httpclient.HttpHost.<init>(HttpHost.java:107)
at org.apache.commons.httpclient.HttpMethodBase.setURI(HttpMethodBase.java:280)
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
at org.mapfish.print.PDFUtils.getImageDirect(PDFUtils.java:101)
at org.mapfish.print.PDFUtils.getImage(PDFUtils.java:62)
at org.mapfish.print.PDFUtils.createImage(PDFUtils.java:383)
at org.mapfish.print.PDFUtils.createImageChunk(PDFUtils.java:376)
if not prefixed with file, I get:
28 Jan 12:17:30 ERROR [org.mapfish.print.servlet.BaseMapServlet] - Error while generating PDF
java.lang.IllegalStateException: unsupported protocol: ‘d’
at org.apache.commons.httpclient.protocol.Protocol.lazyRegisterProtocol(Protocol.java:149)
at org.apache.commons.httpclient.protocol.Protocol.getProtocol(Protocol.java:117)
at org.apache.commons.httpclient.HttpHost.<init>(HttpHost.java:107)
at org.apache.commons.httpclient.HttpMethodBase.setURI(HttpMethodBase.java:280)
at org.apache.commons.httpclient.HttpMethodBase.<init>(HttpMethodBase.java:220)
at org.apache.commons.httpclient.methods.GetMethod.<init>(GetMethod.java:89)
at org.mapfish.print.PDFUtils.getImageDirect(PDFUtils.java:101)
at org.mapfish.print.PDFUtils.getImage(PDFUtils.java:62)
at org.mapfish.print.PDFUtils.createImage(PDFUtils.java:383)
at org.mapfish.print.PDFUtils.createImageChunk(PDFUtils.java:376)
at org.mapfish.print.config.layout.ImageBlock.render(ImageBlock.java:60)
at org.mapfish.print.PDFUtils.createCell(PDFUtils.java:345)
at org.mapfish.print.PDFUtils.buildTable(PDFUtils.java:330)
at org.mapfish.print.config.layout.ColumnsBlock.render(ColumnsBlock.java:66)
at org.mapfish.print.PDFUtils.createCell(PDFUtils.java:345)
But I can use PNG’s via HTTP, so this works:
url: ‘http://wppgeog3/geoserver/small-logo-camptocamp.png’
|
Project:
|
GeoServer
|
Priority:
|
Major
|
Reporter:
|
Jonathan Moules
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa).
For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)