AnsweredAssumed Answered

Error message :java.lang.IllegalStateException: No Factories

Question asked by intln on Mar 15, 2010
Dear All,

i'm trying my first steps on using Alfresco + Liferay, i'm rellay new to the world of both. And quite lost.

I was trying to have something working to then explore it. But fail to do so.

i have downloaded : liferay-portal-5.2.3

and created databases as explained :

create database alfresco character set utf8;
grant all on alfresco.* to 'alfresco'@'localhost' identified by 'alfresco' with grant option;
grant all on alfresco.* to 'alfresco'@'localhost.localdomain' identified by 'alfresco' with grant option;

Alfresco.war was downloaded from here =>  http://www.liferay.com/web/jonas.yuan/blog/-/blogs/integrating-alfresco-web-client-as-a-set-of-portlets-with-liferay

and i copy this files un "<LIFERAY>"/deploy

accessing http://localhost:8081/alfresco/

produce a page containing Alfresco error message : see below,

also blow is the content of the Alfresco.log, if that could help.

many thanks for any help,

best regards.

java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

Hide Details

java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
at org.alfresco.web.app.servlet.FacesHelper.getFacesContextImpl(FacesHelper.java:131)
at org.alfresco.web.app.servlet.FacesHelper.getFacesContext(FacesHelper.java:86)
at org.apache.jsp.index_jsp._jspService(index_jsp.java:160)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
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:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
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:172)
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:875)
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)


——————————-

Alfresco.lo g


20:24:25,332 INFO  [org.alfresco.config.SystemPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/hibernate-cfg.properties]
20:24:47,323 ERROR [org.alfresco.repo.content.transform.magick.AbstractImageMagickContentTransformer] ImageMagickContentTransformer not available: Failed to perform ImageMagick transformation:
Execution result:
   os:         Linux
   command:    [./ImageMagick/bin/convert, /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_source_2493142994370496254.gif[0], /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/ImageMagickContentTransformer_init_target_7372697971745053892.png]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./ImageMagick/bin/convert": java.io.IOException: error=2, No such file or directory
20:24:48,382 WARN  [org.springframework.jmx.support.JmxUtils] Found more than one MBeanServer instance. Returning first from list.
20:24:50,163 INFO  [org.alfresco.config.xml.XMLConfigService$PropertyConfigurer] Loading properties file from class path resource [alfresco/file-servers.properties]
20:24:51,054 WARN  [org.springframework.jmx.support.JmxUtils] Found more than one MBeanServer instance. Returning first from list.
20:25:04,470 ERROR [org.alfresco.repo.content.transform.RuntimeExecutableContentTransformer] Failed to start a runtime executable content transformer:
Execution result:
   os:         Linux
   command:    [./bin/pdf2swf, -V]
   succeeded:  false
   exit code:  1
   out:       
   err:        Cannot run program "./bin/pdf2swf": java.io.IOException: error=2, No such file or directory
20:25:13,147 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Schema managed by database dialect org.hibernate.dialect.MySQLInnoDBDialect.
20:25:13,342 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaCreate-org.hibernate.dialect.MySQLInnoDBDialect-1658299978196645316.sql (Generated).
20:25:17,121 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-6312960806937138666.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.2-MappedFKIndexes.sql).
20:25:17,139 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-5034659005061150090.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/AlfrescoPostCreate-2.2-Extra.sql).
20:25:17,465 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-577119894437256806.sql (Copied from classpath:alfresco/dbscripts/create/2.2/org.hibernate.dialect.MySQLInnoDBDialect/post-create-indexes-04.sql).
20:25:17,486 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] Executing database script /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-org.hibernate.dialect.MySQLInnoDBDialect-2655125586342253084.sql (Copied from classpath:alfresco/dbscripts/create/3.0/org.hibernate.dialect.MySQLInnoDBDialect/create-activities-extras.sql).
20:25:17,604 INFO  [org.alfresco.repo.domain.schema.SchemaBootstrap] All executed statements written to file /opt/intellinium/liferay-portal-5.2.3/tomcat/temp/Alfresco/AlfrescoSchemaUpdate-All_Statements-1232695067970631292.sql.
20:25:17,981 DEBUG [org.alfresco.repo.avm.TransactionalLookupCache.init] preRegister called. Server=com.sun.jmx.mbeanserver.JmxMBeanServer@1e48b4c, name=log4j:logger=org.alfresco.repo.avm.TransactionalLookupCache.init
20:26:14,582 INFO  [org.alfresco.service.descriptor.DescriptorService] Successfully installed license from file [/opt/intellinium/liferay-portal-5.2.3/tomcat/temp/0-alfresco/WEB-INF/classes/alfresco/extension/license/alfresco-enterprise-v3.1-partner-unlimited.lic]
20:26:14,772 WARN  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco 'dir.root' property is set to a relative path '../../alf_data'.  'dir.root' should be overridden to point to a specific folder.
20:26:14,772 INFO  [org.alfresco.repo.admin.ConfigurationChecker] The Alfresco root data directory ('dir.root') is: ../../alf_data
20:26:14,843 INFO  [org.alfresco.repo.admin.patch.PatchExecuter] Checking for patches to apply …
20:26:16,092 INFO  [org.alfresco.repo.admin.patch.PatchExecuter]
=== Applied patch                 ===
ID: patch.db-V3.0-0-CreateActivitiesExtras
RESULT:
Script completed
=====================================
20:26:16,103 INFO  [org.alfresco.repo.module.ModuleServiceImpl] Found 0 module(s).
20:26:21,476 ERROR [org.alfresco.smb.protocol] Failed to get local domain/workgroup name, using default of WORKGROUP
20:26:21,477 ERROR [org.alfresco.smb.protocol] (This may be due to firewall settings or incorrect <broadcast> setting)
20:26:22,039 WARN  [org.alfresco.util.OpenOfficeConnectionTester] An initial OpenOffice connection could not be established.
20:26:22,174 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco JVM - v1.6.0_12-b04; maximum heap size 1016,125MB
20:26:22,175 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco license: Enterprise - v3.1 granted to Cignex (does not expire)
20:26:22,176 INFO  [org.alfresco.service.descriptor.DescriptorService] Alfresco started (Enterprise): Current version 3.1.0 (142) schema 1008 - Installed version 3.1.0 (142) schema 1008
20:27:49,983 ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/alfresco].[jsp]] "Servlet.service()" pour la servlet jsp a généré une exception
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

   at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
   at org.alfresco.web.app.servlet.FacesHelper.getFacesContextImpl(FacesHelper.java:131)
   at org.alfresco.web.app.servlet.FacesHelper.getFacesContext(FacesHelper.java:86)
   at org.apache.jsp.index_jsp._jspService(index_jsp.java:160)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   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:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:140)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:91)
   at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
   at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:154)
   at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:94)
   at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:78)
   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:172)
   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:875)
   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)

Outcomes