You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.NoClassDefFoundError: net/sf/jsqlparser/statement/select/Values
at org.springframework.data.jpa.repository.query.JSqlParserQueryEnhancer.getProjection(JSqlParserQueryEnhancer.java:410)
at org.springframework.data.jpa.repository.query.StringQuery.getProjection(StringQuery.java:102)
at org.springframework.data.jpa.repository.query.StringQuery.isDefaultProjection(StringQuery.java:147)
at org.springframework.data.jpa.repository.query.NativeJpaQuery.getTypeToQueryFor(NativeJpaQuery.java:82)
at org.springframework.data.jpa.repository.query.NativeJpaQuery.createJpaQuery(NativeJpaQuery.java:71)
at org.springframework.data.jpa.repository.query.AbstractStringBasedJpaQuery.doCreateQuery(AbstractStringBasedJpaQuery.java:124)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.createQuery(AbstractJpaQuery.java:243)
at org.springframework.data.jpa.repository.query.JpaQueryExecution$SingleEntityExecution.doExecute(JpaQueryExecution.java:223)
at org.springframework.data.jpa.repository.query.JpaQueryExecution.execute(JpaQueryExecution.java:92)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.doExecute(AbstractJpaQuery.java:152)
at org.springframework.data.jpa.repository.query.AbstractJpaQuery.execute(AbstractJpaQuery.java:140)
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170)
at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:164)
at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:143)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)
at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:136)
Indeed, the class net/sf/jsqlparser/statement/select/Values is only available in version 4.7+ of jsqlparser lib.
Now it seems spring-data-jdbc requires jsqlparser 4.6 while spring-data-jpa requires jsqlparser 4.9 as seen here
Jsqlparser is a test-only dependency, the fix will come via spring-projects/spring-data-relational#1796. Until then, either exclude the JDBC dependency or pin the dependency version, please.
Hi,
I have a project that uses both spring-data-jpa and spring-data-jdbc with spring boot version 3.3.0
Here is a excerpt of my maven dependency tree:
When starting my project, I get this error:
Indeed, the class net/sf/jsqlparser/statement/select/Values is only available in version 4.7+ of jsqlparser lib.
Now it seems spring-data-jdbc requires jsqlparser 4.6 while spring-data-jpa requires jsqlparser 4.9 as seen here
https://mvnrepository.com/artifact/org.springframework.data/spring-data-relational/3.3.0
https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa/3.3.0
Any idea about how to fix this issue ?
The text was updated successfully, but these errors were encountered: