javax.xml.transform.TransformerException: java.lang.NullPointerException

classic Classic list List threaded Threaded
2 messages Options
Jim
Reply | Threaded
Open this post in threaded view
|

javax.xml.transform.TransformerException: java.lang.NullPointerException

Jim
Stack trace

javax.servlet.ServletException:
javax.xml.transform.TransformerException: java.lang.NullPointerException
        org.apache.fop.servlet.FopServlet.doGet(FopServlet.java:158)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
       
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)


line 158 is  throw new ServletException(ex);


public void doGet(HttpServletRequest request,
                      HttpServletResponse response) throws
ServletException {
        try {
            //Get parameters
            String foParam = request.getParameter(FO_REQUEST_PARAM);
            String xmlParam = request.getParameter(XML_REQUEST_PARAM);
            String xsltParam = request.getParameter(XSLT_REQUEST_PARAM);
                                                String rootParam =
request.getParameter(ROOT_REQUEST_PARAM);

            //Analyze parameters and decide with method to use
            if (foParam != null) {
                renderFO(foParam, response);
            } else if ((xmlParam != null) && (xsltParam != null)) {
                renderXML(xmlParam,xsltParam,rootParam,response);
            } else {
                response.setContentType("text/html");
                PrintWriter out = response.getWriter();
                out.println("<html><head><title>Error</title></head>\n"
                          + "<body><h1>FopServlet Error</h1><h3>No 'fo'
"
                          + "request param given.</body></html>");
            }
        } catch (Exception ex) {
            throw new ServletException(ex);
        }
    }



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: javax.xml.transform.TransformerException: java.lang.NullPointerException

Pascal Sancho-2
Hi,

you should give further info to permit the audience to reproduce what you get:
 - FOP version
 - description of FOP inputs and environment
 - etc.


2015-09-22 21:58 GMT+02:00 Jim <[hidden email]>:

> Stack trace
>
> javax.servlet.ServletException:
> javax.xml.transform.TransformerException: java.lang.NullPointerException
>         org.apache.fop.servlet.FopServlet.doGet(FopServlet.java:158)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
> line 158 is  throw new ServletException(ex);
>
>
> public void doGet(HttpServletRequest request,
>                       HttpServletResponse response) throws
> ServletException {
>         try {
>             //Get parameters
>             String foParam = request.getParameter(FO_REQUEST_PARAM);
>             String xmlParam = request.getParameter(XML_REQUEST_PARAM);
>             String xsltParam = request.getParameter(XSLT_REQUEST_PARAM);
>                                                 String rootParam =
> request.getParameter(ROOT_REQUEST_PARAM);
>
>             //Analyze parameters and decide with method to use
>             if (foParam != null) {
>                 renderFO(foParam, response);
>             } else if ((xmlParam != null) && (xsltParam != null)) {
>                 renderXML(xmlParam,xsltParam,rootParam,response);
>             } else {
>                 response.setContentType("text/html");
>                 PrintWriter out = response.getWriter();
>                 out.println("<html><head><title>Error</title></head>\n"
>                           + "<body><h1>FopServlet Error</h1><h3>No 'fo'
> "
>                           + "request param given.</body></html>");
>             }
>         } catch (Exception ex) {
>             throw new ServletException(ex);
>         }
>     }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>



--
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]