Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-66766

Expression Language not working in JSPs when using Wildfly

Details

    • 4
    • Wildfly 10.0

    Description

      Description

      When running Liferay 7 GA2 on WildFly 10, using EL expressions in JSP pages will cause an error.

      This does not affect the Tomcat Bundle.

      Steps to reproduce

      This issue uses a demonstration LR7 Maven project. You will need Maven to compile it, or reproduce the issue by developing a MVC Portlet by hand. All you need to do is have a JSP view containing EL expressions.

      1. Install a vanilla Liferay 7 GA2 Wildfly bundle using a MySQL 5.7 database
      2. Install a vanilla Liferay 7 GA2 Tomcat bundle using a MySQL 5.7 database
      3. Clone the following repository : https://github.com/njuneau/lr7-test-project or create an MVC Portlet module having a JSP view and EL expressions
      4. Make sure you have the public Liferay maven repository configured in your settings
      5. Package the modules using the command "mvn -C clean package" in the parent project
      6. Deploy the 3 modules (portlet-remover-api-0.0.1.jar, portlet-remover-svc-0.0.1.jar and portlet-remover-web-0.0.1.jar) on the Tomcat server
      7. Add "category.training > Portlet Remover" to a page
      8. The portlet will work correctly
      9. Deploy the 3 modules (portlet-remover-api-0.0.1.jar, portlet-remover-svc-0.0.1.jar and portlet-remover-web-0.0.1.jar) on the WildFly server
      10. Add "category.training > Portlet Remover" to a page

      Expected result

      The portlet should work

      Actual result

      "Portlet Remover is temporarily unavailable." will be shown on the page while the following stack trace is shown:

      18:04:29,237 ERROR [default task-106][render_portlet_jsp:77] null
      java.lang.ClassCastException: com.sun.el.ExpressionFactoryImpl cannot be cast to javax.el.ExpressionFactory
              at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:197)
              at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:168)
              at org.apache.jasper.compiler.JspUtil.getExpressionFactory(JspUtil.java:1192)
              at org.apache.jasper.compiler.JspUtil.validateExpressions(JspUtil.java:654)
              at org.apache.jasper.compiler.Validator$ValidateVisitor.getJspAttribute(Validator.java:1366)
              at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1142)
              at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:859)
              at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1502)
              at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
              at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2347)
              at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2353)
              at org.apache.jasper.compiler.Node$Root.accept(Node.java:499)
              at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2297)
              at org.apache.jasper.compiler.Validator.validate(Validator.java:1890)
              at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223)
              at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
              at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:625)
              at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
              at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
              at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
      

      Full stack trace : el-error-stack-trace.txt

      Possibly related issues

      • LPS-63820 (EL is not working in JSPs)
      • LPS-65488 (The module framework boot delegation permits com.sun.* which is too broad) see Kyle Stiemann' May 13th comment

      Attachments

        Issue Links

          Activity

            People

              brian.wulbern Brian Wulbern
              sfl-njuneau Nicolas Juneau (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5 years, 50 weeks, 3 days ago

                Packages

                  Version Package
                  7.0.X EE
                  Master