Volker Malzahn created TRINIDAD-2537:
----------------------------------------

             Summary: Combination of Trinidad with MyFaces Core and Spring 
WebFlow doesn't function
                 Key: TRINIDAD-2537
                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2537
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Facelets
    Affects Versions: 2.1.0-core
         Environment: MyFaces Core 2.1.17 (instead of Mojarra)
Trinidad 2.0.1
Spring WebFlow 2.4.2
Tomcat 7.0.35
Windows 7 64 bit
Java 8.0.45-64bit
            Reporter: Volker Malzahn


When starting a webapp based on Trinidad and Spring WebFlow with MyFaces Core 
as JSF implementation following exception occurrs:
java.lang.ClassNotFoundException: 
com.sun.faces.component.CompositeComponentStackManager
        java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        
org.springframework.faces.webflow.JsfViewFactory$MojarraProcessTreeHandler.handleBefore(JsfViewFactory.java:225)
        
org.springframework.faces.webflow.JsfViewFactory.processTree(JsfViewFactory.java:166)
        
org.springframework.faces.webflow.JsfViewFactory.getViewStateViewRoot(JsfViewFactory.java:138)
        
org.springframework.faces.webflow.JsfViewFactory.getViewRoot(JsfViewFactory.java:102)
        
org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:86)
        org.springframework.webflow.engine.ViewState.resume(ViewState.java:192)
        org.springframework.webflow.engine.Flow.resume(Flow.java:537)

Reason: 
org.springframework.faces.webflow.JsfRuntimeInformation.isMyFacesInUse() 
returns false because of following bug in Trinidad:
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl extends 
javax.faces.context.FacesContextFactory but FacesContextFactory.getWrapped() 
isn't overwritten. So getWrapped() returns null which causes the loop in 
org.springframework.faces.webflow.JsfRuntimeInformation.checkMyFacesContextFactory()
 to terminate and to return false.

Solution: Add following method to 
org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl:
        @Override
        public FacesContextFactory getWrapped() {
                return _factory;
        }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to