darrachequesne / spring-data-jpa-datatables

Spring Data JPA extension to work with the great jQuery plugin DataTables (https://datatables.net/)
Apache License 2.0
450 stars 172 forks source link

error,factory-class cause exception #18

Closed wangjia2016 closed 8 years ago

wangjia2016 commented 8 years ago

**when use

factory-class="org.springframework.data.jpa.datatables.repository.DataTablesRepositoryFactoryBean"

it cause error as follows:**

Servlet.service() for servlet [jsp] in context with path [/mgr] threw exception [java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type avax/el/ExpressionFactory; used in the signature] with root cause java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/codehaus/plexus/classworlds/realm/ClassRealm) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type avax/el/ExpressionFactory; used in the signature

when remove factory-class="org.springframework.data.jpa.datatables.repository.DataTablesRepositoryFactoryBean"

it works!

darrachequesne commented 8 years ago

Hi! According to the stacktrace, it seems that there may be a version conflict about the javax.el dependency, but I can't tell much more, could you provide some further context please?

A simple project reproducing the issue would be awesome :angel:

wangjia2016 commented 8 years ago

qq 20160614092229

Maven dependency:

com.github.darrachequesne spring-data-jpa-datatables 2.3 ``` javax.el-api javax.el


it works! THKS
darrachequesne commented 8 years ago

Great news! :+1: