[opencms-dev] NullPointerException with cms:enable-ade tag

Siegfried Ehret s.ehret at eurelis.com
Mon Jul 9 12:05:48 CEST 2012


Solved it !
Bad configuration for ADE... Sorry for the inconvenience...


De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Siegfried Ehret
Envoyé : lundi 9 juillet 2012 10:19
À : The OpenCms mailing list
Objet : [opencms-dev] NullPointerException with cms:enable-ade tag

Hi all,

I have a containerpage_template with this content :
<%@page buffer="none" session="false" taglibs="c,cms,fn,fmt" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>

<!doctype html>
<html>
  <head>
    <cms:enable-ade/>
  </head>
  <body>Hello World !</body>
</html>

And I'm getting the following error :
javax.servlet.jsp.JspException: java.lang.NullPointerException
Reason: An unexpected error happened, but no error message has been provided.
Please check the error details or contact your system administrator.

If I check my compiled jsp, I can see the error is in this part of the file (see the red text line) :
public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {

  final javax.servlet.jsp.PageContext pageContext;
  final javax.servlet.ServletContext application;
  final javax.servlet.ServletConfig config;
  javax.servlet.jsp.JspWriter out = null;
  final java.lang.Object page = this;
  javax.servlet.jsp.JspWriter _jspx_out = null;
  javax.servlet.jsp.PageContext _jspx_page_context = null;


  try {
    response.setContentType("text/html; charset=UTF-8");
    pageContext = _jspxFactory.getPageContext(this, request, response,
          null, false, 0, true);
    _jspx_page_context = pageContext;
    application = pageContext.getServletContext();
    config = pageContext.getServletConfig();
    out = pageContext.getOut();
    _jspx_out = out;

    out.write("\n");
    out.write("\n");
    out.write("<!doctype html>\n");
    out.write("<html>\n");
    out.write("  <head>\n");
    out.write("    ");
    if (_jspx_meth_cms_005fenable_002dade_005f0(_jspx_page_context))
      return;
    out.write("\n");
    out.write("  </head>\n");
    out.write("  <body>Hello World !</body>\n");
    out.write("</html>");
  } catch (java.lang.Throwable t) {
    if (!(t instanceof javax.servlet.jsp.SkipPageException)){
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0)
        try { out.clearBuffer(); } catch (java.io.IOException e) {}
      if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
    }
  } finally {
    _jspxFactory.releasePageContext(_jspx_page_context);
  }
}

If I remove the <cms:enable-ade/> tag from the head, the jsp works.
Any hint on what can cause this ?

Thanks !

Siegfried Ehret
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20120709/47947f3d/attachment.htm>


More information about the opencms-dev mailing list