This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
All was working fine (tomcat serves JSP form to Mozilla Firefox, form data inserted back into mySQL, all processes running on local machine) until I restarted tomcat with the webapp rebuilt with a batik SVG object. Now, the servlet runs, but the form never loads, and this message appears in catalina.out:
"Gtk-WARNING **: cannot open display:"
The JSP that fails attempts to instantiate a javabean, which now (this build) attempts to instantiate the batik SVG object.
Just before running into this error, I received the following error, for the same build, in (log4j's) tomcat.log:
dom = SVGDOMImplementation.getDOMImplementation(); doc = (SVGDocument) dom.createDocument(null, "svg", null); svggen = new SVGGraphics2D(doc);
I successfully run this same object in a standalone version (java swing) of this webapp on this PC. The SVG enabled Firefox browser (adobesvg-3.01-linux-i386) successfully loads the SVG images this application produces.
Regarding possible Xserver issues, i'm logged in as me, and start/stop tomcat by way of 'sudo /sbin/service'. The links to the batik jars, and the jars themselves, are owned by user 'tomcat'. I have other tomcat webapps on this box, and they run fine ... this must be some sort of unhappiness about SVG, n'est-ce pas?