Maven Central JARs Causing NullPointerException
Cameron Mullen <[email protected]> Thu, 25 Feb 2016 16:45:44 +0000
| Newsgroups | gmane.text.xml.batik.user |
|---|---|
| Message-ID | <CAAx0B7VCi5sE5vRTgq+tU8gzdbn1jc96Eexar6V=Q9tD41MoBw@mail.gmail.com> |
--001a113dea3c78a327052c9aea29 Content-Type: text/plain; charset=UTF-8 I had been getting an odd NullPointerException when calling SVGGraphics2D.drawRenderedImage, so I built the library from source to get more debugging information, and the problem simply went away. I tried recompiling with the debug flag off, and still couldn't reproduce the problem. I think there might be a problem with the JARs being hosted in maven central. I put together a small GitHub repo to reproduce the problem: https://github.com/SkioDev/batik-debug This generates this stacktrace: Exception in thread "main" java.lang.NullPointerException at org.apache.batik.svggen.ImageHandlerBase64Encoder.encodeImage(Unknown Source) at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(Unknown Source) at org.apache.batik.svggen.DefaultImageHandler.handleImage(Unknown Source) at org.apache.batik.svggen.SimpleImageHandler.handleImage(Unknown Source) at org.apache.batik.svggen.SVGGraphics2D.drawRenderedImage(Unknown Source) at com.skio.batik_debug.App.main(App.java:44) Environment details: OS: Mac OS X El Capitan Version 10.11.3 JDK: Java(TM) SE Runtime Environment (build 1.8.0_40-b25) -- Cameron Mullen Founder & CEO - Skio +1 (214) 232-5010 [email protected] --001a113dea3c78a327052c9aea29 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><span style=3D"font-size:13px;line-height:19.5px">I had be= en getting an odd NullPointerException when calling SVGGraphics2D.</span><s= pan style=3D"font-size:13px;line-height:19.5px">drawRenderedImage, so I bui= lt the library from source to get more debugging information, and the probl= em simply went away. I tried recompiling with the debug flag off, and still= couldn't reproduce the problem. I think there might be a problem with = the JARs being hosted in maven central.</span><div style=3D"font-size:13px;= line-height:19.5px"><br></div><div style=3D"font-size:13px;line-height:19.5= px">I put together a small GitHub repo to reproduce the problem:</div><div = style=3D"font-size:13px;line-height:19.5px"><a href=3D"https://github.com/S= kioDev/batik-debug" target=3D"_blank">https://github.com/SkioDev/batik-debu= g</a><br></div><div style=3D"font-size:13px;line-height:19.5px"><br></div><= div style=3D"font-size:13px;line-height:19.5px">This generates this stacktr= ace:</div><div style=3D"font-size:13px;line-height:19.5px"><br></div><div s= tyle=3D"font-size:13px;line-height:19.5px"><div>Exception in thread "m= ain" java.lang.NullPointerException</div><div><span style=3D"white-spa= ce:pre-wrap"> </span>at org.apache.batik.svggen.ImageHandlerBase64Encoder.e= ncodeImage(Unknown Source)</div><div><span style=3D"white-space:pre-wrap"> = </span>at org.apache.batik.svggen.ImageHandlerBase64Encoder.handleHREF(Unkn= own Source)</div><div><span style=3D"white-space:pre-wrap"> </span>at org.a= pache.batik.svggen.DefaultImageHandler.handleImage(Unknown Source)</div><di= v><span style=3D"white-space:pre-wrap"> </span>at org.apache.batik.svggen.S= impleImageHandler.handleImage(Unknown Source)</div><div><span style=3D"whit= e-space:pre-wrap"> </span>at org.apache.batik.svggen.SVGGraphics2D.drawRend= eredImage(Unknown Source)</div><div><span style=3D"white-space:pre-wrap"> <= /span>at com.skio.batik_debug.App.main(App.java:44)</div></div><div style= =3D"font-size:13px;line-height:19.5px"><br></div><div style=3D"font-size:13= px;line-height:19.5px"><br></div><div style=3D"font-size:13px;line-height:1= 9.5px">Environment details:</div><div style=3D"font-size:13px;line-height:1= 9.5px"><br></div><div style=3D"font-size:13px;line-height:19.5px">OS: Mac O= S X El Capitan Version 10.11.3</div><div style=3D"font-size:13px;line-heigh= t:19.5px">JDK: Java(TM) SE Runtime Environment (build 1.8.0_40-b25)</div></= div><div dir=3D"ltr">-- <br></div><div dir=3D"ltr">Cameron Mullen<div>Found= er & CEO - Skio</div><div><br></div><div>+1 (214) 232-5010</div><div><a= href=3D"mailto:[email protected]">[email protected]</a></div></div> --001a113dea3c78a327052c9aea29--