cancel
Showing results for 
Search instead for 
Did you mean: 

WCM example crash with Null Pointer Exeption

smg
Champ in-the-making
Champ in-the-making
Hi,
great work and very good platform to plan future work on.
But with 2.0 final i get stuck with an annoying NPE that i can't seem to solve. Please help me out if possible.

I've installed  2.0 final on 2 different systems and done ok the example from eval guide up to Creating New Web Content: Company Profiles on page 31. At that point when i try to Expand the list of Web Forms under the Admin sandbox I always get a NullPointerExeption with the following trace

12:31:57,225 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.RuntimeException: java.lang.NullPointerException
   at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:486)
   at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:337)
   at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:250)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_w_userSandboxes_0(browse_002dwebsite_jsp.java:1798)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_a_panel_2(browse_002dwebsite_jsp.java:1772)
   at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspService(browse_002dwebsite_jsp.java:684)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
   at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
   at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
   at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
   at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:106)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
   at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
   at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:78)
   at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:69)
   at org.alfresco.web.bean.wcm.WebProject.getFormsImpl(WebProject.java:307)
   at org.alfresco.web.bean.wcm.WebProject.getForms(WebProject.java:224)
   at org.alfresco.web.ui.wcm.component.UIUserSandboxes.renderContentForms(UIUserSandboxes.java:818)
   at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:461)
   … 38 more
13 REPLIES 13

alexgacon
Champ in-the-making
Champ in-the-making
Hi,

In french language, I manage to arrive to the CompanyFooter form but in the 2nd step of the wizard, I have no box to fill (if I follow the PDF example, I should have two boxes to fill).

Alexandre

clutjespelberg
Champ in-the-making
Champ in-the-making
There is a filed issue on this in our JIRA:

http://issues.alfresco.com/browse/WCM-448

The problem seems to be associated with a timed out user session.  The issue should be unrelated to which language GUI interface you are choosing.   If you are in the English language GUI though, see this error, click logout, select the French language GUI, login, and try again - you'll see the Mod List expand.  It's irrelevant whether you select one language interface or the other - it's because you re-established a session.

We'll look into a fix.  We should bounce you to the login screen.


Kevin

As far as I can see this is not true.
When I switch to Dutch I can expand the Web Forms without any problem. When I log out and switch back to English I can get the NullPointerException when expanding the Web Forms.

Maybe it's a missing resource in a resource bundle?

I filed an issue in JIRA: http://issues.alfresco.com/browse/WCM-486

kevinr
Star Contributor
Star Contributor
Hello,

This issue WCM-486 has now been resolved for 2.0.2Enterprise and will be merged to HEAD for the final community release and enterprise release of 2.1 also.

Note that it is definitely NOT related to WCM-448!

Thanks,

Kevin

brianathuge
Champ in-the-making
Champ in-the-making
Hi Everyone,

I seem to be running into the exact same problem now. I'm using the 2.1 community release and when I try to expand the view of "Web Forms" in the sandbox, I get this NullPointerException:

17:08:48,778 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[161.2.184.249].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
        at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:89)
        at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:80)
        at org.alfresco.web.bean.wcm.WebProject.getFormsImpl(WebProject.java:408)
        at org.alfresco.web.bean.wcm.WebProject.getForms(WebProject.java:271)
        at org.alfresco.web.ui.wcm.component.UIUserSandboxes.renderContentForms(UIUserSandboxes.java:846)
        at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:476)
        at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
        at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_w_005fuserSandboxes_005f0(browse_002dwebsite_jsp.java:1994)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_a_005fpanel_005f3(browse_002dwebsite_jsp.java:1968)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspService(browse_002dwebsite_jsp.java:710)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)
17:08:48,779 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[161.2.184.249].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
        at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:89)
        at org.alfresco.web.bean.wcm.WebProject$FormWrapper.<init>(WebProject.java:80)
        at org.alfresco.web.bean.wcm.WebProject.getFormsImpl(WebProject.java:408)
        at org.alfresco.web.bean.wcm.WebProject.getForms(WebProject.java:271)
        at org.alfresco.web.ui.wcm.component.UIUserSandboxes.renderContentForms(UIUserSandboxes.java:846)
        at org.alfresco.web.ui.wcm.component.UIUserSandboxes.encodeBegin(UIUserSandboxes.java:476)
        at javax.faces.webapp.UIComponentTag.encodeBegin(UIComponentTag.java:467)
        at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_w_005fuserSandboxes_005f0(browse_002dwebsite_jsp.java:1994)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspx_meth_a_005fpanel_005f3(browse_002dwebsite_jsp.java:1968)
        at org.apache.jsp.jsp.wcm.browse_002dwebsite_jsp._jspService(browse_002dwebsite_jsp.java:710)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:691)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
        at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
        at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
        at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
        at java.lang.Thread.run(Thread.java:595)

Retracing the steps that led up to it…

1) I deleted a Web Form
2) I created a new Web Form, but when I named the form I included parenthesis (is this invalid)? So for example, it was "Contact - En - (06242008)"
3) I deleted the same form thinking characters would affect this, but I continue to get the NullPointerException
4) Accessing Web Forms in the data definitions worked fine every time, so this is exclusively an issue when accessing Web Forms in the sand box
5) I tried changing the languages as suggested above, but it fails in every language setting

Any help is greatly appreciated. Thank you all!