Jump to content
Changes to the Jaspersoft community edition download ×

Batik exception


dunham

Recommended Posts

I have a SVG that displays fine in Illustrator, no errors:

<svg xmlns:xlink="http://www.w3.org/1999/xlink"     version="1.1" class="highcharts-root"     style="font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif; font-size: 12px;"     xmlns="http://www.w3.org/2000/svg" width="1000" height="400" viewbox="0 0 1000 400">    <desc>Created with Highstock 6.2.0</desc>    <defs>        <clipPath id="highcharts-rc2t804-10">            <rect x="0" y="0" width="980" height="266" fill="none"></rect>        </clipPath>        <clipPath id="highcharts-rc2t804-13">            <rect x="0" y="0" width="980" height="266" fill="none"></rect>        </clipPath>    </defs>    <rect fill="#ffffff" class="highcharts-background" x="0" y="0"          width="1000" height="400" rx="0" ry="0"></rect>    <rect fill="none" class="highcharts-plot-background" x="10" y="59"          width="980" height="266"></rect>    <g class="highcharts-grid highcharts-xaxis-grid " data-z-index="1">        <path fill="none" data-z-index="1" class="highcharts-grid-line"              d="M 363.5 59 L 363.5 325" opacity="1"></path>    </g>    <g class="highcharts-grid highcharts-yaxis-grid " data-z-index="1">        <path fill="none" stroke="#e6e6e6" stroke-width="1" data-z-index="1"              class="highcharts-grid-line" d="M 10 325.5 L 990 325.5" opacity="1"></path>        <path fill="none" stroke="#e6e6e6" stroke-width="1" data-z-index="1"              class="highcharts-grid-line" d="M 10 259.5 L 990 259.5" opacity="1"></path>        <path fill="none" stroke="#e6e6e6" stroke-width="1" data-z-index="1"              class="highcharts-grid-line" d="M 10 192.5 L 990 192.5" opacity="1"></path>        <path fill="none" stroke="#e6e6e6" stroke-width="1" data-z-index="1"              class="highcharts-grid-line" d="M 10 126.5 L 990 126.5" opacity="1"></path>        <path fill="none" stroke="#e6e6e6" stroke-width="1" data-z-index="1"              class="highcharts-grid-line" d="M 10 58.5 L 990 58.5" opacity="1"></path>    </g>    <rect fill="none" class="highcharts-plot-border" data-z-index="1" x="10" y="59"          width="980" height="266"></rect>    <g class="highcharts-axis highcharts-xaxis " data-z-index="2">        <path fill="none" class="highcharts-tick" stroke="#ccd6eb" stroke-width="1"              d="M 363.5 325 L 363.5 335" opacity="1"></path><path fill="none"              class="highcharts-axis-line" stroke="#ccd6eb" stroke-width="1"              data-z-index="7" d="M 10 325.5 L 990 325.5"></path>    </g>    <g class="highcharts-axis highcharts-yaxis " data-z-index="2">        <path fill="none" class="highcharts-axis-line" data-z-index="7"              d="M 990 59 L 990 325"></path>    </g>    <g class="highcharts-series-group" data-z-index="3">        <g data-z-index="0.1"           class="highcharts-series highcharts-series-0 highcharts-line-series highcharts-color-0 "           transform="translate(10,59) scale(1 1)" clip-path="url(#highcharts-rc2t804-13)">            <path fill="none" d="M 0 266 L 980 66.41373994793702" class="highcharts-graph"                  data-z-index="1" stroke="#7cb5ec" stroke-width="2" stroke-linejoin="round"                  stroke-linecap="round"></path>    </g>    <g data-z-index="0.1"       class="highcharts-markers highcharts-series-0 highcharts-line-series highcharts-color-0 "       transform="translate(10,59) scale(1 1)" clip-path="none"></g>    <g data-z-index="0.1"       class="highcharts-series highcharts-series-1 highcharts-line-series highcharts-color-1 "       transform="translate(10,59) scale(1 1)" clip-path="url(#highcharts-rc2t804-13)">        <path fill="none" d="M 0 " class="highcharts-graph" data-z-index="1" stroke="#434348"              stroke-width="2" stroke-linejoin="round" stroke-linecap="round"></path>    </g>    <g data-z-index="0.1"       class="highcharts-markers highcharts-series-1 highcharts-line-series highcharts-color-1 "       transform="translate(10,59) scale(1 1)" clip-path="none"></g>    </g>    <text x="500"          text-anchor="middle" class="highcharts-title" data-z-index="4"          style="color: rgb(51, 51, 51); font-size: 16px; fill: #333333; width: 936px;" y="22">    </text>    <text x="500" text-anchor="middle" class="highcharts-subtitle"          data-z-index="4"          style="color: rgb(102, 102, 102); fill: #666666; width: 936px;" y="43">    </text>    <g class="highcharts-legend" data-z-index="7" transform="translate(395,359)">        <rect fill="none" class="highcharts-legend-box" rx="0" ry="0" x="0" y="0"              width="210" height="26" visibility="visible"></rect>        <g data-z-index="1">            <g>                <g class="highcharts-legend-item highcharts-line-series highcharts-color-0 highcharts-series-0"                   data-z-index="1" transform="translate(8,3)">                    <path fill="none" d="M 0 11 L 16 11" class="highcharts-graph"                          stroke="#7cb5ec" stroke-width="2"></path>                    <text x="21"                          style="color: rgb(51, 51, 51); font-size: 12px; font-weight: bold; text-overflow: ellipsis; cursor: pointer; fill: #333333;"                          text-anchor="start" data-z-index="2" y="15">                        <tspan>Benchmark</tspan>                    </text>                </g>                <g class="highcharts-legend-item highcharts-line-series highcharts-color-1 highcharts-series-1"                   data-z-index="1" transform="translate(108.4,3)">                    <path fill="none" d="M 0 11 L 16 11" class="highcharts-graph"                          stroke="#434348" stroke-width="2"></path>                    <text x="21" y="15"                          style="color: rgb(51, 51, 51); font-size: 12px; font-weight: bold; text-overflow: ellipsis; cursor: pointer; fill: #333333;"                          text-anchor="start" data-z-index="2">                        <tspan>BENCHMARK_1</tspan>                    </text>                </g>            </g>        </g>    </g>    <g class="highcharts-axis-labels highcharts-xaxis-labels " data-z-index="7">        <text x="363.88888888889"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="middle" transform="translate(0,0)" y="344" opacity="1">            <tspan>22. Sep</tspan>        </text>    </g>    <g class="highcharts-axis-labels highcharts-yaxis-labels " data-z-index="7">        <text x="990"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="end" transform="translate(0,0)" y="323" opacity="1">0</text>        <text x="990"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="end" transform="translate(0,0)" y="257" opacity="1">0.05</text>        <text x="990"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="end" transform="translate(0,0)" y="190" opacity="1">0.1</text>        <text x="990"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="end" transform="translate(0,0)" y="124" opacity="1">0.15</text>        <text x="0"              style="color: rgb(102, 102, 102); cursor: default; font-size: 11px; fill: #666666;"              text-anchor="end" transform="translate(0,0)" y="-9999">0.2</text>    </g></svg>[/code]

When I include it with jaspersoft to create a PDF report I get:

Exception: org.apache.batik.bridge.BridgeException: null:-1The attribute "d" of the element <path> is invalidstack: [org.apache.batik.bridge.SVGPathElementBridge.buildShape(SVGPathElementBridge.java:94),        org.apache.batik.bridge.SVGShapeElementBridge.createGraphicsNode(SVGShapeElementBridge.java:60),        org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:213),        org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171),        org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219),        org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171),        org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219),        org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171),        org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82),        net.sf.jasperreports.renderers.AbstractSvgDataToGraphics2DRenderer.getRootNode(AbstractSvgDataToGraphics2DRenderer.java:173),        net.sf.jasperreports.renderers.AbstractSvgDataToGraphics2DRenderer.getDimension(AbstractSvgDataToGraphics2DRenderer.java:122),        net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.processGraphics2D(JRPdfExporter.java:1807),        net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.process(JRPdfExporter.java:1597),        net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.access$300(JRPdfExporter.java:1547),        net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1487),        net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:1105),        net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:1068),        net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:932),        net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:552),        net.sf.dynamicreports.jasper.builder.JasperReportBuilder.export(JasperReportBuilder.java:600),        net.sf.dynamicreports.jasper.builder.JasperReportBuilder.toPdf(JasperReportBuilder.java:536),        dynamicreports.Rep3.makeReport(Rep3.java:2169),        dynamicreports.Rep3.main(Rep3.java:2794)][/code]
Link to comment
Share on other sites

  • 10 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...