2 Replies Latest reply on May 3, 2007 5:36 PM by Pete Muir

    Anyone else find SeamTest broken in CVS?

    Stuart Robertson Novice

      Since updating from CVS (JBoss 4.2.0CR2, Facelets) expressions in SeamTest fail. Here's what breaks it:

      setValue("#{identity.username}", userName);

      And I'm seeing:

      FAILED: registerTest
      java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
       at org.jboss.seam.jsf.SeamApplication.getExpressionFactory(SeamApplication.java:104)
       at org.jboss.seam.core.Expressions.getExpressionFactory(Expressions.java:41)
       at org.jboss.seam.core.Expressions$1.createExpression(Expressions.java:67)
       at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:71)
       at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1688)
       at org.jboss.seam.Component.getInstance(Component.java:1637)
       at org.jboss.seam.Component.getInstance(Component.java:1614)
       at org.jboss.seam.Component.getInstance(Component.java:1608)
       at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
       at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
       at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
       at org.jboss.el.parser.AstValue.getTarget(AstValue.java:34)
       at org.jboss.el.parser.AstValue.setValue(AstValue.java:83)
       at org.jboss.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
       at org.jboss.seam.util.UnifiedELValueBinding.setValue(UnifiedELValueBinding.java:44)
       at org.jboss.seam.mock.SeamTest$Request.setValue(SeamTest.java:373)
       at com.fb.core.test.catalog.RegisterAndLoginTest$LoginFacesRequest.updateModelValues(RegisterAndLoginTest.java:386)
       at org.jboss.seam.mock.SeamTest$Request.run(SeamTest.java:475)
       at com.fb.core.test.catalog.RegisterAndLoginTest.registerTest(RegisterAndLoginTest.java:68)
       at org.jboss.seam.jsf.SeamApplication.getExpressionFactory(SeamApplication.java:100)
       ... 39 more
      Caused by: java.lang.UnsupportedOperationException
       at javax.faces.application.Application.getExpressionFactory(Application.java:766)
       ... 44 more
      


      Anyone else seeing this?

      http://jira.jboss.com/jira/browse/JBSEAM-1278

        • 1. Re: Anyone else find SeamTest broken in CVS?
          Stuart Robertson Novice

          The debugger shed some light on the problem.

          In Application:

          private static Application getRIApplicationImpl(FacesContext context) {
           ExternalContext extContext;
           if (context != null) {
           extContext = context.getExternalContext();
           } else {
           extContext =
           FacesContext.getCurrentInstance().getExternalContext();
           }
           if (extContext != null) {
           return ((Application) extContext.getApplicationMap().
           get("com.sun.faces.ApplicationImpl"));
           }
           return null;
           }
          


          extContext is MockExternalContext. It delegates to MockServletContext, which doesn't contain a value for the key "com.sun.faces.ApplicationImpl"

          Should be an easy fix, but I'd have to dig in to see where this stuff is initialized.



          • 2. Re: Anyone else find SeamTest broken in CVS?
            Pete Muir Master

            Stu, thanks for finding all this stuff. I'll try to get a fix for this in over the weekend.