1 2 Previous Next 20 Replies Latest reply on Jul 5, 2007 10:25 AM by jgilbert Go to original post
      • 15. Re: No bridge detected for application factory org.jboss.sea

        can you try with Sun RI ?

        why do you need to replace with MyFaces ?

        "jgilbert" wrote:
        you can reproduce the error using the examples/portal from the seam 1.2.1.GA distribution.

        steps:
        - install portal 2.6 on AS 4.2
        - replace the jsf libs with myfaces per the wiki
        - build seam/examples/portal
        - copy war and datasource to deploy dir
        - start app server

        the exception from the original posting will be generated


        • 16. Re: No bridge detected for application factory org.jboss.sea
          jgilbert

          i did and got the same result. see posting above at 17:57 PM.

          • 17. Re: No bridge detected for application factory org.jboss.sea
            jgilbert

            its not pretty but i got it to work with the following change. i hope there is a better way.

            public class JSFMetaBridgeFactory
            {
            
             /** . */
             private static final Logger log = Logger.getLogger(JSFMetaBridgeFactory.class);
            
             private static boolean isJsf12() {
             try {
             Object af = FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
             java.lang.reflect.Method m = af.getClass().getMethod("getApplication", new Class[]{});
             Object app = m.invoke(af, new Object[]{});
             if ("org.jboss.seam.jsf.SeamApplication12".equals(app.getClass().getName())) {
             return true;
             } else {
             return false;
             }
             } catch (Exception e) {
             throw new RuntimeException(e);
             }
             }
            
             public static JSFMetaBridge getMetaBridge()
             {
             JSFMetaBridge metaBridge = null;
            
             //
             String className = FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
             if ("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
             {
             metaBridge = new SunRIJSFBridge();
             }
             else if ("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
             {
             metaBridge = new MyFacesJSFBridge();
             }
             else if ("org.jboss.seam.jsf.SeamApplicationFactory".equals(className))
             {
             if (isJsf12()) {
             metaBridge = new SunRIJSFBridge();
             } else {
             metaBridge = new MyFacesJSFBridge();
             }
             }
            
             //
             if (metaBridge != null)
             {
             log.debug("Detected JSF bridge " + metaBridge.getName());
             }
             else
             {
             log.warn("No bridge detected for application factory " + className);
             }
            
             //
             return metaBridge;
             }
            
            }
            


            • 18. Re: No bridge detected for application factory org.jboss.sea
              theute

              We are working on a clean way.
              I will blog about JSF + bridge + Facelet hell when i'm done.

              This class (JSFMetaBridgeFactory) should only be used when you define that you want to use the MetaBridge. It shouldn't interfere with your application. (Right now it unfortunately does)

              • 19. Re: No bridge detected for application factory org.jboss.sea

                On the other hand if someone uses portal with facelet, the same problem we faces will happen.

                So at least they should use the very latest version of facelet and jsfportletbridge that we patched.

                "thomas.heute@jboss.com" wrote:
                We are working on a clean way.
                I will blog about JSF + bridge + Facelet hell when i'm done.

                This class (JSFMetaBridgeFactory) should only be used when you define that you want to use the MetaBridge. It shouldn't interfere with your application. (Right now it unfortunately does)


                • 20. Re: No bridge detected for application factory org.jboss.sea
                  jgilbert

                  Thanks. I'll keep using my patch in the meantime.

                  BTW, I am using the a4j-portlet so that I can use richfaces in my portlets. However, it doesn't appear to be working with the Sun RI. I get a NPE in com.sun.faces.portlet.LifecycleImpl. So, I'm stuck with using myfaces for now. I know this is not your issue, but it clarifies the discussion above about MyFaces verse Sun RI.

                  1 2 Previous Next