AnsweredAssumed Answered

Hit NullPointerException while using parseXMLDocuments

Question asked by shmu80 on Jan 2, 2008
Latest reply on Jul 28, 2008 by jak-wei

I using eclipse to deploy a war project and run it inside tomcat, but i hit NullPointerException, below is my error message.

Jan 2, 2008 10:49:11 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
   at org.alfresco.web.forms.FormDataFunctions.parseXMLDocuments(
   at org.alfresco.web.forms.ServletContextFormDataFunctionsAdapter.parseXMLDocuments(

This is my code:

public static List getArticle(PageContext pageContext)
       throws Exception
       FormDataFunctions ef = new ServletContextFormDataFunctionsAdapter(pageContext.getServletContext());
       Map entries = ef.parseXMLDocuments("Article", "/article");
       System.out.println("entries.size() -> " + entries.size());
       List result = new ArrayList(entries.size());
       java.util.Map.Entry entry;
       for(Iterator i$ = entries.entrySet().iterator(); i$.hasNext(); result.add(loadArticle((Document)entry.getValue(), (String)entry.getKey())))
           entry = (java.util.Map.Entry)i$.next();
       return result;

the docRoot for my war project is like below:


and inside article folder has 2 files 1 is index.jsp and another 1 is Article.xml (which I create manually inside this folder).

May I know is it something else I need to do?

Please advise.

Thank you.