java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query;

Spring JIRA | Mark Serrano | 5 years ago
  1. 0

    I have a Jpa repository that utilizes QueryDSL's fluent API: {code:title=IUserRepository.java|borderStyle=solid} public interface IUserRepository extends JpaRepository<User, Long>, QueryDslPredicateExecutor<User> {code} Then I have a service that reads records from the repository via the findAll() method. I have a requirement that the fields must be dynamic and the records are pageable: {code:title=UserService.java|borderStyle=solid} @Service @Transactional public class UserService implements IUserService { @Autowired private IUserRepository userRepository; @Autowired private EntityManagerFactory emf; @Override public Page<User> readFromRepository(String username, Pageable page) { PathBuilder<User> entityPath = new PathBuilder<User>(User.class, "user"); StringPath path = entityPath.get(new StringPath("username")); BooleanExpression hasUsername = path.eq(username); BooleanBuilder builder = new BooleanBuilder(); builder.and(hasUsername); return userRepository.findAll(builder, page); } ... } {code} However an exception is thrown whenever that method is called: {noformat} java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query; at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination(QueryDslJpaRepository.java:168) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:322) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy24.findAll(Unknown Source) at org.demo.service.UserService.readFromRepository(UserService.java:43) {noformat} I tried digging into the code and the source and I can't find the reasons why. The internal implementation doesn't show any missing methods. I have checked my jars but I didn't find any old dependencies. I tested my project both at home and at work (Ubuntu, Windows, proxied, non-proxied environments). But I keep getting the same exception. When I check the following: {noformat} org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination(QueryDslJpaRepository.java:168) {noformat} {code:title=QueryDslJpaRepository.java|borderStyle=solid} protected JPQLQuery applyPagination(JPQLQuery query, Pageable pageable) { if (pageable == null) { return query; } query.offset(pageable.getOffset()); query.limit(pageable.getPageSize()); return applySorting(query, pageable.getSort()); } {code} As a workaround, I did the following code: {code:title=UserService.java|borderStyle=solid} @Service @Transactional public class UserService implements IUserService { @Autowired private IUserRepository userRepository; @Autowired private EntityManagerFactory emf; ... @Override public List<User> readFromEntityManager(String username, Pageable page) { PathBuilder<User> entityPath = new PathBuilder<User>(User.class, "user"); StringPath path = entityPath.get(new StringPath("username")); BooleanExpression hasUsername = path.ne(username); BooleanBuilder builder = new BooleanBuilder(); builder.and(hasUsername); EntityManager em = emf.createEntityManager(); JPQLQuery result = new JPAQuery(em).from(entityPath).where(builder); if (page != null) { result.offset(page.getOffset()); result.limit(page.getPageSize()); } return result.list(entityPath); } ... } {code} And it works perfectly. I tried to match as possible the original Spring JPA implementation. I don't really know what's wrong with the findAll() method, but directly calling the EntityManagerFactory somehow did the trick. I have attached a strip-down version of my webapp. It's a Maven project with unit tests included. Just run Maven test to verify the error. You need to have MySQL and create a db "testdb". No data is needed but you can prepopulate them. There's a data.sql inside the classpath. (I'm trying to initialize the db with jdbc:initialize-database but it keeps throwing an error. You might wanna take a peek of that error if you like). By the way my Maven properties: {noformat} <properties> <spring.version>3.1.0.RC1</spring.version> <spring.data.jpa.version>1.1.0.M1</spring.data.jpa.version> <querydsl.version>2.2.3</querydsl.version> </properties> {noformat} Thanks.

    Spring JIRA | 5 years ago | Mark Serrano
    java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query;
  2. 0

    I have a Jpa repository that utilizes QueryDSL's fluent API: {code:title=IUserRepository.java|borderStyle=solid} public interface IUserRepository extends JpaRepository<User, Long>, QueryDslPredicateExecutor<User> {code} Then I have a service that reads records from the repository via the findAll() method. I have a requirement that the fields must be dynamic and the records are pageable: {code:title=UserService.java|borderStyle=solid} @Service @Transactional public class UserService implements IUserService { @Autowired private IUserRepository userRepository; @Autowired private EntityManagerFactory emf; @Override public Page<User> readFromRepository(String username, Pageable page) { PathBuilder<User> entityPath = new PathBuilder<User>(User.class, "user"); StringPath path = entityPath.get(new StringPath("username")); BooleanExpression hasUsername = path.eq(username); BooleanBuilder builder = new BooleanBuilder(); builder.and(hasUsername); return userRepository.findAll(builder, page); } ... } {code} However an exception is thrown whenever that method is called: {noformat} java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query; at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination(QueryDslJpaRepository.java:168) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:322) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) at $Proxy24.findAll(Unknown Source) at org.demo.service.UserService.readFromRepository(UserService.java:43) {noformat} I tried digging into the code and the source and I can't find the reasons why. The internal implementation doesn't show any missing methods. I have checked my jars but I didn't find any old dependencies. I tested my project both at home and at work (Ubuntu, Windows, proxied, non-proxied environments). But I keep getting the same exception. When I check the following: {noformat} org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination(QueryDslJpaRepository.java:168) {noformat} {code:title=QueryDslJpaRepository.java|borderStyle=solid} protected JPQLQuery applyPagination(JPQLQuery query, Pageable pageable) { if (pageable == null) { return query; } query.offset(pageable.getOffset()); query.limit(pageable.getPageSize()); return applySorting(query, pageable.getSort()); } {code} As a workaround, I did the following code: {code:title=UserService.java|borderStyle=solid} @Service @Transactional public class UserService implements IUserService { @Autowired private IUserRepository userRepository; @Autowired private EntityManagerFactory emf; ... @Override public List<User> readFromEntityManager(String username, Pageable page) { PathBuilder<User> entityPath = new PathBuilder<User>(User.class, "user"); StringPath path = entityPath.get(new StringPath("username")); BooleanExpression hasUsername = path.ne(username); BooleanBuilder builder = new BooleanBuilder(); builder.and(hasUsername); EntityManager em = emf.createEntityManager(); JPQLQuery result = new JPAQuery(em).from(entityPath).where(builder); if (page != null) { result.offset(page.getOffset()); result.limit(page.getPageSize()); } return result.list(entityPath); } ... } {code} And it works perfectly. I tried to match as possible the original Spring JPA implementation. I don't really know what's wrong with the findAll() method, but directly calling the EntityManagerFactory somehow did the trick. I have attached a strip-down version of my webapp. It's a Maven project with unit tests included. Just run Maven test to verify the error. You need to have MySQL and create a db "testdb". No data is needed but you can prepopulate them. There's a data.sql inside the classpath. (I'm trying to initialize the db with jdbc:initialize-database but it keeps throwing an error. You might wanna take a peek of that error if you like). By the way my Maven properties: {noformat} <properties> <spring.version>3.1.0.RC1</spring.version> <spring.data.jpa.version>1.1.0.M1</spring.data.jpa.version> <querydsl.version>2.2.3</querydsl.version> </properties> {noformat} Thanks.

    Spring JIRA | 5 years ago | Mark Serrano
    java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query;
  3. 0

    When using QueryDSL 3.0.0 my testcase is broken at run-time: {code} java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.from([Lcom/mysema/query/types/EntityPath;)Lcom/mysema/query/jpa/JPQLCommonQuery; at org.springframework.data.jpa.repository.support.Querydsl.createQuery(Querydsl.java:88) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.createQuery(QueryDslJpaRepository.java:131) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:93) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor.invoke(LockModeRepositoryPostProcessor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy97.findAll(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy98.findAll(Unknown Source) {code}

    Spring JIRA | 4 years ago | Thomas Hackel
    java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.from([Lcom/mysema/query/types/EntityPath;)Lcom/mysema/query/jpa/JPQLCommonQuery;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    When using QueryDSL 3.0.0 my testcase is broken at run-time: {code} java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.from([Lcom/mysema/query/types/EntityPath;)Lcom/mysema/query/jpa/JPQLCommonQuery; at org.springframework.data.jpa.repository.support.Querydsl.createQuery(Querydsl.java:88) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.createQuery(QueryDslJpaRepository.java:131) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:93) at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.data.jpa.repository.support.LockModeRepositoryPostProcessor$LockModePopulatingMethodIntercceptor.invoke(LockModeRepositoryPostProcessor.java:92) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy97.findAll(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198) at com.sun.proxy.$Proxy98.findAll(Unknown Source) {code}

    Spring JIRA | 4 years ago | Thomas Hackel
    java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.from([Lcom/mysema/query/types/EntityPath;)Lcom/mysema/query/jpa/JPQLCommonQuery;
  6. 0

    {noformat} java.lang.NoSuchMethodError: com.mysema.query.types.PathMetadata.getExpression()Lcom/mysema/query/types/Expression; at org.springframework.data.mongodb.repository.support.SpringDataMongodbSerializer.getKeyForPath(SpringDataMongodbSerializer.java:66) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:223) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:34) at com.mysema.query.types.PathImpl.accept(PathImpl.java:94) at com.mysema.query.mongodb.MongodbSerializer.asDBValue(MongodbSerializer.java:75) at com.mysema.query.mongodb.MongodbSerializer.asDBKey(MongodbSerializer.java:71) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:93) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:34) at com.mysema.query.types.expr.BooleanOperation.accept(BooleanOperation.java:61) at com.mysema.query.mongodb.MongodbSerializer.handle(MongodbSerializer.java:39) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:102) at com.mysema.query.mongodb.MongodbSerializer.visit(MongodbSerializer.java:34) at com.mysema.query.types.OperationImpl.accept(OperationImpl.java:91) at com.mysema.query.mongodb.MongodbSerializer.handle(MongodbSerializer.java:39) at com.mysema.query.mongodb.MongodbQuery.createQuery(MongodbQuery.java:389) at com.mysema.query.mongodb.MongodbQuery.createCursor(MongodbQuery.java:286) at com.mysema.query.mongodb.MongodbQuery.createCursor(MongodbQuery.java:281) at com.mysema.query.mongodb.MongodbQuery.list(MongodbQuery.java:267) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:93) at org.springframework.data.mongodb.repository.support.QueryDslMongoRepository.findAll(QueryDslMongoRepository.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:333) at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:318) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy27.findAll(Unknown Source) at ch.twinf.mongodb.repositories.PersonRepositoryTest.querydsl(PersonRepositoryTest.java:137) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) {noformat}

    Spring JIRA | 4 years ago | Thomas W├╝rsch
    java.lang.NoSuchMethodError: com.mysema.query.types.PathMetadata.getExpression()Lcom/mysema/query/types/Expression;

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      com.mysema.query.jpa.JPQLQuery.offset(J)Lcom/mysema/query/Query;

      at org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination()
    2. Spring Data JPA
      QueryDslJpaRepository.findAll
      1. org.springframework.data.jpa.repository.support.QueryDslJpaRepository.applyPagination(QueryDslJpaRepository.java:168)
      2. org.springframework.data.jpa.repository.support.QueryDslJpaRepository.findAll(QueryDslJpaRepository.java:128)
      2 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    4. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:322)
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:307)
      2 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      1 frame
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      1 frame
    8. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
      1 frame
    9. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      2 frames
    10. Unknown
      $Proxy24.findAll
      1. $Proxy24.findAll(Unknown Source)
      1 frame
    11. org.demo.service
      UserService.readFromRepository
      1. org.demo.service.UserService.readFromRepository(UserService.java:43)
      1 frame