title: Using EL 2.2 in an application deployed on Oracle Weblogic 10.3.6 isn't working?
body: <p>I'm running <code>Weblogic 10.3.6</code> and trying to build a new dynamic web application (in eclipse) that supports <code>JSF 2.2.8</code> and <code>EL 2.2</code> and <code>JDK 1.7 U45</code>, but unfortunately <code>EL 2.2</code> is throwing an exception.
  <br/></p>
  
  <p><strong>The <code>weblogic.xml</code></strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" 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_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd"&gt;
      &lt;wls:weblogic-version&gt;10.3.6&lt;/wls:weblogic-version&gt;
  
      &lt;wls:context-root&gt;MyApp&lt;/wls:context-root&gt;
  
      &lt;wls:library-ref&gt;
          &lt;wls:library-name&gt;jstl&lt;/wls:library-name&gt;
          &lt;wls:specification-version&gt;1.2&lt;/wls:specification-version&gt;
          &lt;wls:exact-match&gt;true&lt;/wls:exact-match&gt;
      &lt;/wls:library-ref&gt;
  
      &lt;wls:container-descriptor&gt;                  
          &lt;wls:prefer-application-packages&gt;
              &lt;wls:package-name&gt;com.sun.el.*&lt;/wls:package-name&gt;
              &lt;wls:package-name&gt;javax.el.*&lt;/wls:package-name&gt;     
              &lt;wls:package-name&gt;com.sun.faces.*&lt;/wls:package-name&gt;
              &lt;wls:package-name&gt;javax.faces.*&lt;/wls:package-name&gt;
          &lt;/wls:prefer-application-packages&gt;
      &lt;/wls:container-descriptor&gt;        
  &lt;/wls:weblogic-web-app&gt;
  </code></pre>
  
  <p><br/>
  The following exception is thrown trying to run a page with an parameterized method call in EL</p>
  
  <pre><code>com.sun.el.parser.ParseException: Encountered "(" at line 1, column 22.
   Was expecting one of:
      "}" ...
      "." ...
      "[" ...
      "&gt;" ...
      "gt" ...
      "&lt;" ...
      "lt" ...
      "&gt;=" ...
      "ge" ...
      "&lt;=" ...
      "le" ...
      "==" ...
      "eq" ...
      "!=" ...
      "ne" ...
      "&amp;&amp;" ...
      "and" ...
      "||" ...
      "or" ...
      "*" ...
      "+" ...
      "-" ...
      "?" ...
      "/" ...
      "div" ...
      "%" ...
      "mod" ...
  
      at com.sun.el.parser.ELParser.generateParseException(ELParser.java:2143)
      at com.sun.el.parser.ELParser.jj_consume_token(ELParser.java:2025)
      at com.sun.el.parser.ELParser.DeferredExpression(ELParser.java:113)
      at com.sun.el.parser.ELParser.CompositeExpression(ELParser.java:40)
      at com.sun.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java:173)
  </code></pre>
  
  <p><br/></p>
  
  <p><strong>Changing the <code>weblogic.xml</code> <code>&lt;container-descriptor&gt;</code> to</strong></p>
  
  <pre><code>&lt;wls:container-descriptor&gt;
      &lt;wls:prefer-web-inf-classes&gt;true&lt;/wls:prefer-web-inf-classes&gt;
  &lt;/wls:container-descriptor&gt;
  </code></pre>
  
  <p>yields the same exception above, untill I add the following to the <strong><code>web.xml</code></strong></p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
      &lt;param-value&gt;com.sun.el.ExpressionFactoryImpl&lt;/param-value&gt;     
  &lt;/context-param&gt;
  </code></pre>
  
  <p>Then the exception thrown changes to</p>
  
  <pre><code>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(ValueExpressionImpl.java:219)
      at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(Unknown Source)
      at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(Unknown Source)
      at com.sun.faces.facelets.compiler.TextInstruction.write(Unknown Source)
      at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(Unknown Source)
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(Unknown Source)
      at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(Unknown Source)
      at javax.faces.component.UIComponentBase.encodeChildren(Unknown Source)
      at javax.faces.component.UIComponent.encodeAll(Unknown Source)
      at javax.faces.component.UIComponent.encodeAll(Unknown Source)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(Unknown Source)
      at com.sun.faces.application.view.MultiViewHandler.renderView(Unknown Source)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(Unknown Source)
      at com.sun.faces.lifecycle.Phase.doPhase(Unknown Source)
      at com.sun.faces.lifecycle.LifecycleImpl.render(Unknown Source)
      at javax.faces.webapp.FacesServlet.service(Unknown Source)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
  </code></pre>
  
  <p>I don't understand how weblogic is behaving, the same steps worked with other  develobers as in the second answer in <a href="https://stackoverflow.com/questions/8884231/how-to-leverage-el-2-2-functionality-on-weblogic-10-3-x">this question</a></p>