Closed sbrunner closed 9 years ago
from the stack trace it appears that there is a URL with no schema or host. Make sure all urls are valid
Witch URL ? I didn't see any URL in the log ...
I run this standalone (without Tomcat) ...
I dont know what url but if you look at the stacktrace:
Caused by: java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3023)
at java.net.URI.<init>(URI.java:595)
you can see it is problem with the uri. in my experience this is usually the host name is missing.
If I remember right. You can define a jasper tempalte with all the styles and columns you want for the table and it will construct a table dynamically with arbitrary number of columns based on the styles declared in the jasper template.
The idea was that for certain projects you need an arbitrary number of columns but want to be able to design the table using jasper studio or some editor. This permits this functionality.
- !createDataSource
reportTemplate: table.jrxml
reportKey: reportTemplate
processors:
- !prepareTable
dynamic: true
I think you don't need a datasource, or do you? Try to do it like in this example: https://github.com/mapfish/mapfish-print/tree/development/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn
Yes I need a data source because I have list of table, Than your example didn't have a list of table, and he isn't dynamic ...
dynamic initially mean that we don't know the number of column ...
And we strongly need this in GeoMapFish
Have you looked at the examples on how to use this?
On Fri, Feb 20, 2015 at 8:53 AM, Stéphane Brunner notifications@github.com wrote:
And we strongly need this in GeoMapFish
— Reply to this email directly or view it on GitHub https://github.com/mapfish/mapfish-print/issues/194#issuecomment-75201739 .
I have a look on this file: https://github.com/mapfish/mapfish-print/blob/development/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/requestData.json Only one table, than not the same case as me, And this file: https://github.com/mapfish/mapfish-print/blob/development/core/src/test/resources/org/mapfish/print/processor/jasper/table_converters_dyn/table.jrxml On witch one we should know the number of columns that not my case :-(
so I have this figured out now. the table is configured as dynamic but there is no jasper report configured for the processor.
This is a major problem in that there should be an error message if the table processor is incorrectly configured. I am thinking of:
After more research I found that the problem was actually DataSourceProcessor not calling validate on all of its contained processor so the errors are never reported. I have fixed this issue and added defaults to the jasperReport template file is optional instead of required.
See:
https://github.com/mapfish/mapfish-print/pull/200
and
Project datas: https://github.com/camptocamp/demo_geomapfish/tree/printV3/print/print-apps/demo
Result: