Search
Calendar
January 2020
S M T W T F S
« Sep    
 1234
567891011
12131415161718
19202122232425
262728293031  
Your widget title
Archives

Posts Tagged ‘Unified Expression Language’

PostHeaderIcon (long tweet) Jetty / Unified Expression Language / NoSuchMethodError: javax.el.ELResolver.invoke

Case

On deploying a JSF project on Jetty (via Maven plugin), when I display the XHtml page I get an error, which starts with:

java.lang.NoSuchMethodError: javax.el.ELResolver.invoke(Ljavax/el/ELContext;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;
 at com.sun.el.parser.AstValue.getValue(AstValue.java:111)
 at com.sun.el.parser.AstValue.getValue(AstValue.java:163)
 at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionIm

Quick fix

I fixed the issue by removing the dependencies to Unified Expression Language (EL API), either direct or induced:

        
<dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <version>2.2</version>
        </dependency>
<dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
        </dependency>

         <dependency>
           <groupId>com.sun.el</groupId>
           <artifactId>el-ri</artifactId>
           <version>1.0</version>
         </dependency>

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2</version>
        </dependency>


        <dependency>
            <groupId>com.sun.el</groupId>
            <artifactId>el-ri</artifactId>
            <version>1.0</version>
        </dependency>

Actually, some JARs that had to be depended on have been included within Tomcat and Jetty, that’s why some conflict of JARs happen to be. What prevented me to fix quickly the issue was that Tomcat and Jetty seem not to embed the same version on EL