java.lang.NullPointerException: null

  1. 0

    Spring 4 - Config XML jpa:repositories throwing NoSuchMethodError BeanDefinitionParserDelegate.getEnvironment()

    Stack Overflow | 1 year ago | a.hrdie
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityContextFilter' defined in file [/var/lib/tomcat6/webapps/services/WEB-INF/classes/com/services/filter/SecurityContextFilter.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.services.user.UserRepository]: : Error creating bean with name 'userRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract com.services.user.domain.User com.services.user.UserRepository.findBySession(java.lang.String)!; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract com.services.user.domain.User com.services.user.UserRepository.findBySession(java.lang.String)!
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Error in Join on a relation ManyToOne. Using QueryDSL

    GitHub | 8 months ago | luiscamposjr
    org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
  4. 0

    Writing custom queries in Spring JPA

    Stack Overflow | 1 year ago | drunkenfist
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List EmployeeRepository.findByDeptId(java.lang.Long)!

    4 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.NullPointerException

      null

      at org.hibernate.internal.util.StringHelper.root()
    2. Hibernate
      SessionImpl.createQuery
      1. org.hibernate.internal.util.StringHelper.root(StringHelper.java:370)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      2. org.hibernate.persister.entity.AbstractEntityPersister.getSubclassPropertyTableNumber(AbstractEntityPersister.java:1769)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      3. org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.java:46)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      4. org.hibernate.persister.entity.AbstractEntityPersister.toColumns(AbstractEntityPersister.java:1745)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      5. org.hibernate.hql.internal.ast.tree.FromElement.getIdentityColumns(FromElement.java:352)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      6. org.hibernate.hql.internal.ast.tree.IdentNode.resolveAsAlias(IdentNode.java:149)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      7. org.hibernate.hql.internal.ast.tree.IdentNode.resolve(IdentNode.java:86)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      8. org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:109)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      9. org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:104)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      10. org.hibernate.hql.internal.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:942)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      11. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.propertyRef(HqlSqlBaseWalker.java:1162)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      12. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectExpr(HqlSqlBaseWalker.java:2276)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      13. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectExprList(HqlSqlBaseWalker.java:2217)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      14. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectClause(HqlSqlBaseWalker.java:1492)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      15. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:581)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      16. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:309)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      17. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:257)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      18. org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      19. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      20. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      21. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      22. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      23. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      24. org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:302)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      25. org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:240)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      26. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1894)[hibernate-core-5.0.9.Final.jar:5.0.9.Final]
      26 frames
    3. org.hibernate.jpa
      AbstractEntityManagerImpl.createQuery
      1. org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:531)[hibernate-entitymanager-5.0.9.Final.jar:5.0.9.Final]
      2. org.hibernate.jpa.criteria.CriteriaQueryImpl$1.buildCompiledQuery(CriteriaQueryImpl.java:319)[hibernate-entitymanager-5.0.9.Final.jar:5.0.9.Final]
      3. org.hibernate.jpa.criteria.compile.CriteriaCompiler.compile(CriteriaCompiler.java:130)[hibernate-entitymanager-5.0.9.Final.jar:5.0.9.Final]
      4. org.hibernate.jpa.spi.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:699)[hibernate-entitymanager-5.0.9.Final.jar:5.0.9.Final]
      4 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)[na:na]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_45]
      3. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_45]
      3 frames
    5. Spring ORM
      ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke
      1. org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:347)[spring-orm-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    6. com.sun.proxy
      $Proxy88.createQuery
      1. com.sun.proxy.$Proxy88.createQuery(Unknown Source)[na:na]
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)[na:na]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_45]
      3. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_45]
      3 frames
    8. Spring ORM
      SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke
      1. org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:298)[spring-orm-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    9. com.sun.proxy
      $Proxy88.createQuery
      1. com.sun.proxy.$Proxy88.createQuery(Unknown Source)[na:na]
      1 frame
    10. Spring Data JPA
      SimpleJpaRepository.findAll
      1. org.springframework.data.jpa.repository.support.SimpleJpaRepository.getQuery(SimpleJpaRepository.java:649)[spring-data-jpa-1.10.2.RELEASE.jar:na]
      2. org.springframework.data.jpa.repository.support.SimpleJpaRepository.getQuery(SimpleJpaRepository.java:626)[spring-data-jpa-1.10.2.RELEASE.jar:na]
      3. org.springframework.data.jpa.repository.support.SimpleJpaRepository.findAll(SimpleJpaRepository.java:327)[spring-data-jpa-1.10.2.RELEASE.jar:na]
      3 frames
    11. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_45]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_45]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_45]
      4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_45]
      4 frames
    12. Spring Data Core
      RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke
      1. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:503)[spring-data-commons-1.12.2.RELEASE.jar:na]
      2. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:488)[spring-data-commons-1.12.2.RELEASE.jar:na]
      3. org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:460)[spring-data-commons-1.12.2.RELEASE.jar:na]
      3 frames
    13. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    14. org.springframework.data
      DefaultMethodInvokingMethodInterceptor.invoke
      1. org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)[spring-data-commons-1.12.2.RELEASE.jar:na]
      1 frame
    15. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    16. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:280)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3 frames
    17. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    18. Spring Tx
      PersistenceExceptionTranslationInterceptor.invoke
      1. org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:136)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    19. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    20. Spring Data JPA
      CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke
      1. org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:133)[spring-data-jpa-1.10.2.RELEASE.jar:na]
      1 frame
    21. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4 frames
    22. com.sun.proxy
      $Proxy90.findAll
      1. com.sun.proxy.$Proxy90.findAll(Unknown Source)[na:na]
      1 frame
    23. com.mag.boot
      HomeController.home
      1. com.mag.boot.controllers.HomeController.home(HomeController.java:57)[classes/:na]
      1 frame