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

Stephan Hartmann hartmann at metamesh.de
Thu May 12 15:02:26 CEST 2005


The generated html code is taken from the defaul body file. You have to 
adjust it for your needs or create a new one.
The ones from template one are under
/system/modules/org.opencms.frontend.templateone/default_bodies/

Regards,
Stephan

Jorge González schrieb:
> 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
> 
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev


-- 
Stephan Hartmann

metamesh

Lippstädter Str. 22
44143 Dortmund

http://www.metamesh.de/




More information about the opencms-dev mailing list