java.lang.NullPointerException: null

Stack Overflow | mohsen | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 0

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

    Stack Overflow | 2 years 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)!
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.dialect.function.StandardAnsiSqlAggregationFunctions$SumFunction.determineJdbcTypeCode()
  2. Hibernate
    SessionImpl.createQuery
    1. org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions$SumFunction.determineJdbcTypeCode(StandardAnsiSqlAggregationFunctions.java:200)
    2. org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions$SumFunction.getReturnType(StandardAnsiSqlAggregationFunctions.java:158)
    3. org.hibernate.hql.internal.ast.tree.IdentNode.getDataType(IdentNode.java:327)
    4. org.hibernate.hql.internal.ast.tree.MethodNode.getFirstArgumentType(MethodNode.java:59)
    5. org.hibernate.hql.internal.ast.SqlGenerator.endFunctionTemplate(SqlGenerator.java:211)
    6. org.hibernate.hql.internal.antlr.SqlGeneratorBase.methodCall(SqlGeneratorBase.java:2538)
    7. org.hibernate.hql.internal.antlr.SqlGeneratorBase.selectExpr(SqlGeneratorBase.java:2102)
    8. org.hibernate.hql.internal.antlr.SqlGeneratorBase.selectColumn(SqlGeneratorBase.java:1914)
    9. org.hibernate.hql.internal.antlr.SqlGeneratorBase.selectClause(SqlGeneratorBase.java:544)
    10. org.hibernate.hql.internal.antlr.SqlGeneratorBase.selectStatement(SqlGeneratorBase.java:186)
    11. org.hibernate.hql.internal.antlr.SqlGeneratorBase.statement(SqlGeneratorBase.java:135)
    12. org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(QueryTranslatorImpl.java:244)
    13. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:210)
    14. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)
    15. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)
    16. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
    17. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152)
    18. org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:521)
    19. org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:623)
    20. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:3250)
    20 frames
  3. org.hibernate.query
    CriteriaCompiler.compile
    1. org.hibernate.query.criteria.internal.CriteriaQueryImpl$1.buildCompiledQuery(CriteriaQueryImpl.java:318)
    2. org.hibernate.query.criteria.internal.compile.CriteriaCompiler.compile(CriteriaCompiler.java:127)
    2 frames
  4. Hibernate
    SessionImpl.createQuery
    1. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:3543)
    2. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:203)
    2 frames
  5. com.advertisement.database
    DbEntityRepository.find
    1. com.advertisement.database.DbHelper.test(DbHelper.java:432)
    2. com.advertisement.database.DbHelper.find(DbHelper.java:278)
    3. com.advertisement.database.DbEntityRepository.find(DbEntityRepository.java:148)
    3 frames
  6. com.advertisement.controller
    Test.test
    1. com.advertisement.controller.Test.test(Test.java:28)
    1 frame
  7. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:497)
    4 frames
  8. Pax Jsp
    MethodExpressionImpl.invoke
    1. org.apache.el.parser.AstValue.invoke(AstValue.java:247)
    2. org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
    2 frames
  9. JavaEE 7
    UIViewRoot.processApplication
    1. javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:149)
    2. javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
    3. javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:813)
    4. javax.faces.component.UICommand.broadcast(UICommand.java:300)
    5. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:790)
    6. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1282)
    6 frames
  10. JSF
    LifecycleImpl.execute
    1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81)
    2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    3 frames
  11. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
    1 frame
  12. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    2 frames
  13. primefaces
    FileUploadFilter.doFilter
    1. org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:78)
    1 frame
  14. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    2 frames
  15. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    1 frame
  16. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    2 frames
  17. com.advertisement.lifecycle
    OverrideEncodingFilter.doFilter
    1. com.advertisement.lifecycle.OverrideEncodingFilter.doFilter(OverrideEncodingFilter.java:22)
    1 frame
  18. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
    10 frames
  19. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
    4 frames
  20. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    2 frames
  21. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    1 frame
  22. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame