AnsweredAssumed Answered

Liferay 4.3+Alfresco 2.1: MyFacesContextFactoryImpl problem

Question asked by hbf on Aug 17, 2007
Latest reply on Aug 21, 2007 by lakmal
Hi,

I've followed http://wiki.alfresco.com/wiki/Deploying_2.1WAR_Liferay4.3 on a fresh Liferay4.3 install to get both Liferay and Alfresco running. Unfortunately, at startup, I get an error complaining that class com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl cannot be found:


15:58:01,387 INFO  [service.descriptor.DescriptorService] Alfresco started (Community Network): Current version 2.1.0 (482) schema 64 - Installed version 2.1.0 (482) schema 64
15:58:06,640 ERROR [[Catalina].[localhost].[/alfresco]] StandardWrapper.Throwable
javax.faces.FacesException: java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
        at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:174)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:110)
        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
        at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:130)
        … 28 more
15:58:06,647 ERROR [[Catalina].[localhost].[/alfresco]] Servlet /alfresco threw load() exception
java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205)
        at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:130)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:110)
        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
        at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
        at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3956)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4230)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:825)
        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:714)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:448)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Aug 17, 2007 3:58:09 PM org.apache.catalina.realm.JAASRealm setUseContextClassLoader
INFO: Setting useContextClassLoader = false
15:58:10,285 INFO  [[/tunnel-web]:647] Initializing Spring root WebApplicationContext
15:58:17,160 INFO  [[/tunnel-web]:647] Initializing Spring FrameworkServlet 'SpringServlet'
Aug 17, 2007 3:58:22 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 17, 2007 3:58:22 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 17, 2007 3:58:22 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/69  config=null
Aug 17, 2007 3:58:22 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Aug 17, 2007 3:58:23 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 130384 ms

A grep on the tomcat installation shows me:


hbf-laptop:/opt/liferay-portal-tomcat-5 root# grep -r MyFacesContextFactoryImpl *
alfresco.log:javax.faces.FacesException: java.lang.ClassNotFoundException: com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl
# MORE LOG FILES THAT MATCH…
Binary file temp/liferay/com/liferay/portal/deploy/dependencies/util-bridges.jar matches
webapps/alfresco/WEB-INF/faces-config.xml:              <faces-context-factory>com.liferay.util.bridges.jsf.myfaces.MyFacesContextFactoryImpl</faces-context-factory>
Binary file webapps/ROOT/WEB-INF/lib/util-bridges.jar matches
hbf-laptop:/opt/liferay-portal-tomcat-5 root#

To me this looks like there *is* indeed a class MyFacesContextFactoryImpl but not under com.alfresco… but com.liferay…!? Is this a bug or am I doing something wrong?

Many thanks for a hint,
Kaspar

Outcomes