AnsweredAssumed Answered

NullPointerException error when trying to add content in 2.2

Question asked by schoony99 on Nov 7, 2008
Latest reply on Jan 12, 2009 by witho
Hello,

I am running Alfresco 2.2 as a portlet in Liferay.  Whenever I attempt to add content to a space, I receive the following error in my browser:

javax.portlet.PortletException: java.lang.NullPointerException
caused by:
java.lang.NullPointerException


And this is what I get when I hit "show details":

javax.portlet.PortletException: java.lang.NullPointerException 
at org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:313)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:502)
at com.cignex.portal.web.app.portlet.AlfrescoFacesPortlet.facesRender(AlfrescoFacesPortlet.java:302)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:323)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:121)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:115)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at com.liferay.portlet.InvokerPortlet.invoke(InvokerPortlet.java:550)
at com.liferay.portlet.InvokerPortlet.render(InvokerPortlet.java:366)
at org.apache.jsp.html.portal.render_005fportlet_jsp._jspService(render_005fportlet_jsp.java:1361)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at com.liferay.portal.util.PortalImpl.renderPortlet(PortalImpl.java:1914)
at com.liferay.portal.util.PortalUtil.renderPortlet(PortalUtil.java:667)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:165)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processPortlet(RuntimePortletUtil.java:102)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:271)
at com.liferay.portlet.layoutconfiguration.util.RuntimePortletUtil.processTemplate(RuntimePortletUtil.java:189)
at org.apache.jsp.html.portal.layout.view.portlet_jsp._jspService(portlet_jsp.java:805)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:535)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:472)
at com.liferay.portal.action.LayoutAction.includeLayoutContent(LayoutAction.java:263)
at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:427)
at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:186)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:163)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:409)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:638)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:149)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:138)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.strip.StripFilter.doFilter(StripFilter.java:91)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.compression.CompressionFilter.doFilter(CompressionFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.secure.SecureFilter.doFilter(SecureFilter.java:205)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.doubleclick.DoubleClickFilter.doFilter(DoubleClickFilter.java:134)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.layoutcache.LayoutCacheFilter.doFilter(LayoutCacheFilter.java:191)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.doFilter(AutoLoginFilter.java:142)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.doFilter(VirtualHostFilter.java:173)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:98)
at com.liferay.portal.servlet.filters.sessionid.SessionIdFilter.doFilter(SessionIdFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(PortletExternalContextImpl.java:167)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:175)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:498)
… 117 more


Now, If I run Alfresco only (by browsing to http://servername/alfresco) and attempt to upload content from here, I receive the following:

javax.faces.FacesException: An exception occurred processing JSP page /jsp/content/add-content-dialog.jsp at line 153

150: </tr>
151: <tr><td class="paddingRow"></td></tr>
152:
153: <r:uploadForm>
154: <tr>
155: <td colspan="3">
156: <input style="margin-left:12px;" type="file" size="75" name="alfFileInput"/>


Stacktrace:
   org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
   org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
   org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
   org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
   javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
   org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)


root cause

org.apache.jasper.JasperException: An exception occurred processing JSP page /jsp/content/add-content-dialog.jsp at line 153

150: </tr>
151: <tr><td class="paddingRow"></td></tr>
152:
153: <r:uploadForm>
154: <tr>
155: <td colspan="3">
156: <input style="margin-left:12px;" type="file" size="75" name="alfFileInput"/>


Stacktrace:
   org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:410)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
   org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
   org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
   org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
   javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
   org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)


root cause

java.lang.IllegalStateException: RenderResponse object is null. The web application is not executing within a portal server!
   org.alfresco.web.ui.repo.tag.UploadFormTag.doStartTag(UploadFormTag.java:68)
   org.apache.jsp.jsp.content.add_002dcontent_002ddialog_jsp._jspService(add_002dcontent_002ddialog_jsp.java:628)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
   org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
   org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
   org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
   javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
   org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)


Absolutely nothing is logged in my Alfresco.log.  Can anyone help me with this?  Thanks in advance!

Outcomes