cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer on fresh Enterprise Install

mholtzman
Champ in-the-making
Champ in-the-making
Hello, I am trying to get an enterprise trial up and running but I am receiving exceptions when I try to access the login page. 
My set up is as follows:
Fedora Core 9 64 bit
Apache Tomcat 5.5.26
Sun JDK 1.6.0_06
Mysql 5.0 database
Alfresco Enterprise 2.2 (alfresco-enterprise-war-2.2.0.tar.gz)
I copied over the following three files into the webappsalfresco/WEB-INF/classes/alfresco/extension dir:
  • custom-hibernate-dialect.properties

  • custom-repository-context.xml

  • custom-repository.properties
I have been trying to piece together the install from various wiki pages.

Here is the exception that is dumped to the web page when I access /alfresco/faces/jsp/login.jsp
javax.faces.FacesException: org.apache.jasper.JasperException
   org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:429)
   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:94)

Here is a stack trace from the catalina.out file:
10:27:10,977 ERROR [[localhost].[/alfresco].[jsp]] Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
   at org.alfresco.web.app.ResourceBundleWrapper.handleGetObject(ResourceBundleWrapper.java:103)
   at java.util.ResourceBundle.getObject(ResourceBundle.java:378)
   at java.util.ResourceBundle.getString(ResourceBundle.java:344)
   at org.alfresco.web.app.Application.getMessage(Application.java:714)
   at org.alfresco.web.ui.repo.tag.PageTag.doStartTag(PageTag.java:146)
   at org.apache.jsp.jsp.login_jsp._jspService(login_jsp.java:140)
   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:331)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   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:679)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
   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:94)
   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:213)
   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:174)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Thread.java:619)
10:27:10,978 ERROR [[localhost].[/alfresco].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
   at org.alfresco.web.app.ResourceBundleWrapper.handleGetObject(ResourceBundleWrapper.java:103)
   at java.util.ResourceBundle.getObject(ResourceBundle.java:378)
   at java.util.ResourceBundle.getString(ResourceBundle.java:344)
   at org.alfresco.web.app.Application.getMessage(Application.java:714)
   at org.alfresco.web.ui.repo.tag.PageTag.doStartTag(PageTag.java:146)
   at org.apache.jsp.jsp.login_jsp._jspService(login_jsp.java:140)
   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:331)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
   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:679)
   at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
   at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:399)
   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:94)
   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:213)
   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:174)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
   at java.lang.Thread.run(Thread.java:619)

I would appreciate any help.
Thanks, Mike
6 REPLIES 6

jbarmash
Champ in-the-making
Champ in-the-making
Which CPU architecture is this?  We observed some issues with AMD processors.  We typically test on SPARC64bit and Intel64bit. 

Can you try to get the tomcat-bundled alfresco? 

Looking at the source, it looks like it's failing while trying to resolve resource bundles.  Which language are you using?

mholtzman
Champ in-the-making
Champ in-the-making
This is really weird, things seems to be working now. 
I restarted Tomcat and I noticed that I was able to access the site through localhost but not from a remote computer.  After some time period I am now able to access the site through the remote computer as well. 

I don't know what could have changed but is it possible it was taking a while to load up resources or something? 

I am running the site in US English language.  I should note that this is currently set up in a VMWare VM Server. 
uname -a
Linux vmlnx02 2.6.25.3-18.fc9.x86_64 #1 SMP Tue May 13 04:54:47 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux

mholtzman
Champ in-the-making
Champ in-the-making
OK, so I might be getting to the bottom of this issue.  It seems that where I start Tomcat from has some affect on if the app comes up successfully.  I dont know if it has something to do with the classpath getting messed up.  It really shouldn't as I am using the standard start/stop scripts that come with Tomcat.

I just did another install on a 32 bit Fedora Core 8 machine I had kicking around with Tomcat 5.5.9 and I have not had any problems at all yet. 

I am wondering also if the fact that it was running on a VM could be an issue.  I recall seeing at some point that the VM may be emulating AMD 64 bit architecture.  Can anyone confirm this? 

Anyway, I'll play around on this new working copy as I want to test the Alfresco functionality not the Fedora Core infrastructure…yet. 

Thanks

jbarmash
Champ in-the-making
Champ in-the-making
where I start Tomcat from has some affect on if the app comes up successfully.
That could be the case if you are using the relative path for your file store.  By default, it writes the file store to .\alf_data, so if you change the present directory, it looks to the file store in different places. 

This is why there is a warning saying to change it to an absolute path.

So please point dir.root to an absolute path and this might go away for good.   Blow away your db first though (if you are using MySQL).

fshipley
Champ in-the-making
Champ in-the-making
Hi Mike,

We just came across this problem ourselves on Alfresco Enterprise 2.2. I might be wrong, but it seems like the ResourceBundleWrapper object is being persisted with the user session by Tomcat. When the session is restored, the list of resource bundles held by the class is empty (null). Hence the null pointer exception.

You may have noticed that since 2.2, the class now implements Serializable. I believe that was added to support Tomcat clusters.

Anyway, the (not very elegant) solution we found was to delete the Tomcat work/Catalina directory on each restart.

Does anyone have a better solution?

Regards,
Frank

fshipley
Champ in-the-making
Champ in-the-making
Hi again,

Just noticed there is an open issue for this on Jira: https://issues.alfresco.com/browse/ETWOTWO-57

Regards,
Frank