when i first open netbeans and run the webapp i am doing i get an error..
java.lang.NullPointerException
at org.apache.batik.dom.util.DOMUtilities.writeDocument(Unknown
Source)
at map.LoadMapServlet.svgToString(LoadMapServlet.java:40)
at map.LoadMapServlet.processRequest(LoadMapServlet.java:129)
at map.LoadMapServlet.doGet(LoadMapServlet.java:24)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
this error only shows when i open netbeans and run the webapp for the first
time.. if i recompile, it does not show..
this is the method where i get the error
protected String svgToString(SVGDocument doc) {
//Outputs the contents of the entire current DOM as a single string
StringWriter writer;
String svg = null;
try{
writer = new StringWriter();
DOMUtilities.writeDocument(doc, writer); ----->this is where the
error is
writer.close();
svg = writer.toString();
}
catch (IOException e) {
e.printStackTrace();
}
return svg;
}
i can;t understand what the error means.. the SVGDocument is not null
--
View this message in context:
http://www.nabble.com/load---save-using-servlet-tf4011429.html#a11560634
Sent from the Batik - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]