0 Replies Latest reply on Nov 28, 2011 9:02 PM by geekkit

    JBoss AS 7 - EL 2.2?

    geekkit

      Hello,

       

      I downloaded, extracted jboss-as-web-7.0.2.Final.zip, and ran it, and dumped in my web app and got the following runtime error:

       

      16:05:39,856 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http--127.0.0.1-8080-1) Error Rendering View[/index.xhtml]: javax.el.PropertyNotFoundException: /index.xhtml @29,70 value="#{serverTime.getDate()}": The class 'org.jboss.weld.proxies.DateMessager$Proxy$_$$_WeldClientProxy' does not have the property 'getDate'.

       

       

      The class that I have is:

       

      import java.util.Date;

      import javax.enterprise.context.RequestScoped;

      import javax.inject.Named;

       

      @Named("serverTime")

      @RequestScoped

      public class DateMessager {

       

          public String getDate() {

              return new Date().toString();

          }

      }

       

      And the JSF code accessing the object is:

       

      <h:outputText value="#{serverTime.getDate()}" id="time"/>

       

      My web.xml file has:

       

      <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"

        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

      ...

      </web-app>

       

      And so everything is set up using EL 2.2 parameterized method calls but the JBOSS AS 7 runtime appears to be confusing this expression as

      a property and not the parameterized method call that it is.

       

      When I run the exact same WAR file it runs flawlessly in Glassfish 3.1.1 with no errors. Any ideas why JBOSS is confusing the parameterized method call as a property?