[opencms-dev] (6b3) null pointer creating html page from empty template

Jorge González informatico at hotelparadisepark.com
Thu May 12 14:28:33 CEST 2005


Hi list:

I'm getting a null pointer in this scenario

1. Edit opencms-system.cml and change langs and default langs to
	1.1 es
	1.2 en

2. Create new html with wizard and empty template

The html code generated is (look at the "de" tag, maybe it's hardcoded ?)

<?xml version="1.0" encoding="UTF-8"?>

<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.opencms.org/dtd/6.0/xmlpage.xsd">
  <page language="de">
    <element name="text1">
      <links/>
      <content/>
    </element>
  </page>
  <page language="en">
    <element name="text1">
      <links/>
      <content/>
    </element>
  </page>
</pages>

3. Include this page with cms:include tag and you will get a nasty

java.lang.NullPointerException
	at org.opencms.xml.CmsXmlUtils.createXpath(CmsXmlUtils.java:138)
	at org.opencms.xml.A_CmsXmlDocument.getLocales(A_CmsXmlDocument.java:214)
	at org.opencms.loader.CmsXmlPageLoader.service(CmsXmlPageLoader.java:228)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.j
ava:323)
	at
org.opencms.jsp.CmsJspTagInclude.includeTagAction(CmsJspTagInclude.java:210)
	at org.opencms.jsp.CmsJspTagInclude.doEndTag(CmsJspTagInclude.java:344)
	at
org.apache.jsp.WEB_002dINF.jsp.offline.sites.default_.opt.www.pri.t_jsp._jsp
x_meth_cmstag_include_0(t_jsp.java:107)
	at
org.apache.jsp.WEB_002dINF.jsp.offline.sites.default_.opt.www.pri.t_jsp._jsp
Service(t_jsp.java:81)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

etc, etc

Thanks




More information about the opencms-dev mailing list