Activiti: JSP: Cannot use el expression(EL library conflicting issue)

Created on 21 Jan 2018  路  9Comments  路  Source: Activiti/Activiti

JSP: Cannot use el expression(EL library conflicting issue)

  • [ ] 6.x
  • [ ] develop

Issue

  • An error occurs when executing a jsp file containing an el expression.
  • No error occurs when executing eL expressions in process execution.

Related issues

Cause

  • The library 'juel' on which Activiti engine depends conflicts with the Expression Language 3.0 API(like jasper-el).
<dependency>
    <groupId>de.odysseus.juel</groupId>
    <artifactId>juel-impl</artifactId>
    <version>2.2.7</version>
</dependency>
<dependency>
    <groupId>de.odysseus.juel</groupId>
    <artifactId>juel-api</artifactId>
    <version>2.2.7</version>
</dependency>
<dependency>
    <groupId>de.odysseus.juel</groupId>
    <artifactId>juel-spi</artifactId>
    <version>2.2.7</version>
</dependency>
  • juel-api-2.2.7.jar has the same interfaces as javax.el-api(Expression Language API Spec).
  • Their interfaces's content is based on javax.el-api 2.x(Expression Language API Spec 2.x).
  • So, juel-api-2.2.7.jar conflicts with the Expression Language 3.0 API(like jasper-el).

  • On the other hand, Activiti-engine's java code depends on not only the interface of javax.el(Java EE spec) but also juel's implementation(juel-impl-2.2.7.jar).

Why does this issue not reproduce in 5.x?

Plan for fix

Plan1 for fix

It is an easy fix. But I don't know which this fix is perfect.
At least, all test case passes with this fix.

Remove the dependency for only juel-api and juel-spi that cause conflicts.
Remain the dependency for juel-impl.

<dependency>
    <groupId>de.odysseus.juel</groupId>
    <artifactId>juel-api</artifactId>
    <version>2.2.7</version>
</dependency>
<dependency>
    <groupId>de.odysseus.juel</groupId>
    <artifactId>juel-spi</artifactId>
    <version>2.2.7</version>
</dependency>

Instead, we should add the following dependency.

<!-- https://mvnrepository.com/artifact/javax.el/javax.el-api -->
<dependency>
    <groupId>javax.el</groupId>
    <artifactId>javax.el-api</artifactId>
    <version>2.2.5</version>
</dependency>

Plan2 for fix

bug

All 9 comments

I'd rather go with the first option unless their is a good case for the second option.

agree with @balsarori, we should check what happens with war projects that should have that dependency coming from the container so it might be necessary to set it as provided only in that case

@balsarori @mteodori
Sorry for my late reply 馃槩
Is it okay if I create a pull request to modify pom.xml for 6.x and develop each branches?

thanks @daisuke-yoshimoto ok for me, not sure if we can/should switch to a javax.el 3.0 implementation instead where development is active provided we don't break any existing functionality, WDYT? also @balsarori

I don't think we should use javax.el 3.0 especially for 6.x branch. It might be something to consider for develop branch.

@balsarori is there a decision on this one?

I tried the first solution I'm using the version 7 of activiti integrated in spring. Dose not work. Any suggestion?
With regard to solution 2, it is not clear to me what should be done.

<dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring-boot-starter</artifactId> <version>7.1.43</version> <exclusions> <exclusion> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> </exclusion> <!--<exclusion> <groupId>javax.el</groupId> <artifactId>javax.el-api</artifactId> </exclusion>--> <exclusion> <groupId>de.odysseus.juel</groupId> <artifactId>juel-api</artifactId> </exclusion><!-- <exclusion> <groupId>de.odysseus.juel</groupId> <artifactId>juel-impl</artifactId> </exclusion>--> <exclusion> <groupId>de.odysseus.juel</groupId> <artifactId>juel-spli</artifactId> </exclusion> </exclusions> </dependency>

I juste remove only juel-spi. Now it's work

Any update about this subject?We encounter the same question, and I deleted juel-spi, tomcat works.But I am not sure whether this lack jar will effect the main course of the Activiti6.0.0. Since this has been marked as bug, which branch of 6.X will this be settled @daisuke-yoshimoto

Was this page helpful?
0 / 5 - 0 ratings

Related issues

erdemedeiros picture erdemedeiros  路  8Comments

Shaun-Yao picture Shaun-Yao  路  3Comments

DestinyWang picture DestinyWang  路  4Comments

salaboy picture salaboy  路  4Comments

leiyanfamily picture leiyanfamily  路  3Comments