javax.ejb.EJBException: javax.persistence.NonUniqueResultException: result returns more than one elements

Stack Overflow | Mitch Talmadge | 10 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    NonUniqueResultException is not being caught

    Stack Overflow | 10 months ago | Mitch Talmadge
    javax.ejb.EJBException: javax.persistence.NonUniqueResultException: result returns more than one elements
  2. 0

    Spring DATA JPA with Java 8 Stream NonUniqueResultException

    Stack Overflow | 2 years ago | FirstX
    javax.persistence.NonUniqueResultException: result returns more than one elements
  3. 0

    NonUniqueResultException in findAll() with Spring Data Jpa and Java8 CompletableFuture

    Stack Overflow | 2 years ago | Markus Lamm
    java.util.concurrent.ExecutionException: javax.persistence.NonUniqueResultException: result returns more than one elements
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Writing a group by expression with spring jpa

    Stack Overflow | 1 year ago | user3779674
    javax.persistence.NonUniqueResultException: result returns more than one elements
  6. 0

    Exception on disburce Loan

    GitHub | 2 years ago | dianmushkov
    org.springframework.dao.IncorrectResultSizeDataAccessException: result returns more than one elements; nested exception is javax.persistence.NonUniqueResultException: result returns more than one elements

Root Cause Analysis

  1. javax.persistence.NonUniqueResultException

    result returns more than one elements

    at org.hibernate.jpa.internal.QueryImpl.getSingleResult()
  2. org.hibernate.jpa
    QueryImpl.getSingleResult
    1. org.hibernate.jpa.internal.QueryImpl.getSingleResult(QueryImpl.java:539)
    1 frame
  3. me.mitcht.myapp
    FieldService.findByTitle
    1. me.mitcht.myapp.core.entities.services.FieldService.findByTitle(FieldService.java:30)
    1 frame
  4. 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
  5. JBoss Application Server: EE
    ManagedReferenceMethodInterceptor.processInvocation
    1. org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
    1 frame
  6. JBoss Application Server Server
    InterceptorContext$Invocation.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    2. org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
    2 frames
  7. Weld
    Jsr299BindingsInterceptor.processInvocation
    1. org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
    2. org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
    2 frames
  8. JBoss Application Server: EE
    UserInterceptorFactory$1.processInvocation
    1. org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
    1 frame
  9. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  10. JBoss Application Server: EJB Subsystem
    ExecutionTimeInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
    1 frame
  11. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  12. JPA
    SBInvocationInterceptor.processInvocation
    1. org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
    1 frame
  13. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  14. JPA
    SFSBInvocationInterceptor.processInvocation
    1. org.jboss.as.jpa.interceptor.SFSBInvocationInterceptor.processInvocation(SFSBInvocationInterceptor.java:57)
    1 frame
  15. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  16. JBoss Application Server: EJB Subsystem
    StatefulSessionSynchronizationInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.stateful.StatefulSessionSynchronizationInterceptor.processInvocation(StatefulSessionSynchronizationInterceptor.java:125)
    1 frame
  17. JBoss Application Server Server
    InterceptorContext$Invocation.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    2. org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:437)
    2 frames
  18. Weld Implementation
    AbstractEJBRequestScopeActivationInterceptor.aroundInvoke
    1. org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:64)
    1 frame
  19. Weld
    EjbRequestScopeActivationInterceptor.processInvocation
    1. org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
    1 frame
  20. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  21. WildFly: EE
    ConcurrentContextInterceptor.processInvocation
    1. org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
    1 frame
  22. JBoss Application Server Server
    ChainedInterceptor.processInvocation
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    2. org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
    3. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    4. org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
    4 frames
  23. JBoss Application Server: EE
    ComponentDispatcherInterceptor.processInvocation
    1. org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:52)
    1 frame
  24. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  25. JBoss Application Server: EJB Subsystem
    StatefulComponentInstanceInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:65)
    1 frame
  26. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  27. JBoss Application Server: EJB Subsystem
    CMTTxInterceptor.processInvocation
    1. org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:275)
    2. org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:327)
    3. org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
    3 frames
  28. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  29. JBoss Application Server: EJB Subsystem
    CurrentInvocationContextInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
    1 frame
  30. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  31. JBoss Application Server: EJB Subsystem
    WaitTimeInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
    1 frame
  32. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  33. JBoss Application Server: EJB Subsystem
    SecurityContextInterceptor.processInvocation
    1. org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:100)
    1 frame
  34. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  35. JBoss Application Server: EJB Subsystem
    ShutDownInterceptorFactory$1.processInvocation
    1. org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
    1 frame
  36. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  37. JBoss Application Server: EJB Subsystem
    LoggingInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:66)
    1 frame
  38. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  39. JBoss Application Server: EE
    NamespaceContextInterceptor.processInvocation
    1. org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
    1 frame
  40. JBoss Application Server Server
    InterceptorContext.proceed
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    1 frame
  41. JBoss Application Server: EJB Subsystem
    AdditionalSetupInterceptor.processInvocation
    1. org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:54)
    1 frame
  42. JBoss Application Server Server
    InterceptorContext.run
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    2. org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
    3. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    4. org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
    4 frames
  43. WildFly Security Manager
    WildFlySecurityManager.doChecked
    1. org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:636)
    1 frame
  44. JBoss Application Server Server
    ChainedInterceptor.processInvocation
    1. org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
    2. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    3. org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:356)
    4. org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
    5. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    6. org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
    6 frames
  45. JBoss Application Server: EE
    ViewDescription$1.processInvocation
    1. org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:195)
    2. org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:185)
    2 frames
  46. JBoss Application Server Server
    ChainedInterceptor.processInvocation
    1. org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:340)
    2. org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
    2 frames
  47. JBoss Application Server: EE
    ProxyInvocationHandler.invoke
    1. org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
    1 frame
  48. me.mitcht.myapp
    FieldService$$$view157.findByTitle
    1. me.mitcht.myapp.core.entities.services.FieldService$$$view157.findByTitle(Unknown Source)
    1 frame
  49. 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
  50. Weld Implementation
    ProxyMethodHandler.invoke
    1. org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:436)
    2. org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
    3. org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
    4. org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
    4 frames
  51. me.mitcht.myapp
    UniqueFieldValidator.validate
    1. me.mitcht.myapp.core.entities.services.FieldService$Proxy$_$$_Weld$EnterpriseProxy$.findByTitle(Unknown Source)
    2. me.mitcht.myapp.web.validators.UniqueFieldValidator.validate(UniqueFieldValidator.java:39)
    2 frames
  52. JavaEE 7
    UIForm.processValidators
    1. javax.faces.component.UIInput.validateValue(UIInput.java:1164)
    2. javax.faces.component.UIInput.validate(UIInput.java:982)
    3. javax.faces.component.UIInput.executeValidate(UIInput.java:1248)
    4. javax.faces.component.UIInput.processValidators(UIInput.java:712)
    5. javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
    6. javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
    7. javax.faces.component.UIForm.processValidators(UIForm.java:253)
    7 frames
  53. JSF
    PartialVisitContext.invokeVisitCallback
    1. com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:575)
    2. com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
    2 frames
  54. JavaEE 7
    UIComponent.visitTree
    1. javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)
    2. javax.faces.component.UIForm.visitTree(UIForm.java:371)
    3. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    4. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    5. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    6. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    7. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    8. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    9. javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
    9 frames
  55. JSF
    PartialViewContextImpl.processPartial
    1. com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
    2. com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
    2 frames
  56. primefaces
    PrimePartialViewContext.processPartial
    1. org.primefaces.context.PrimePartialViewContext.processPartial(PrimePartialViewContext.java:57)
    1 frame
  57. JavaEE 7
    PartialViewContextWrapper.processPartial
    1. javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
    1 frame
  58. org.omnifaces.context
    OmniPartialViewContext.processPartial
    1. org.omnifaces.context.OmniPartialViewContext.processPartial(OmniPartialViewContext.java:144)
    1 frame
  59. JavaEE 7
    UIViewRoot.processValidators
    1. javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1193)
    1 frame
  60. JSF
    LifecycleImpl.execute
    1. com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
    2. com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    3 frames
  61. JavaEE 7
    FacesServlet.service
    1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
    1 frame
  62. Undertow Servlet
    ServletDispatchingHandler.handleRequest
    1. io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
    2. io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:81)
    3. io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    4. io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    4 frames
  63. Undertow Core
    PredicateHandler.handleRequest
    1. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    2. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    3. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    3 frames
  64. Undertow Servlet
    RequestDispatcherImpl.forward
    1. io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:265)
    2. io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:200)
    3. io.undertow.servlet.spec.RequestDispatcherImpl.forwardImpl(RequestDispatcherImpl.java:193)
    4. io.undertow.servlet.spec.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:106)
    4 frames
  65. me.mitcht.myapp
    TenantFilter.doFilter
    1. me.mitcht.myapp.web.filters.TenantFilter.doFilter(TenantFilter.java:73)
    1 frame
  66. Undertow Servlet
    ServletDispatchingHandler.handleRequest
    1. io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
    2. io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    3. io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    4. io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    5. io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    5 frames
  67. WildFly: Undertow
    SecurityContextAssociationHandler.handleRequest
    1. org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    1 frame
  68. Undertow Core
    PredicateHandler.handleRequest
    1. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    1 frame
  69. Undertow Servlet
    ServletAuthenticationCallHandler.handleRequest
    1. io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    2. io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    2 frames
  70. Undertow Core
    AbstractConfidentialityHandler.handleRequest
    1. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    2. io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    2 frames
  71. Undertow Servlet
    ServletConfidentialityConstraintHandler.handleRequest
    1. io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    1 frame
  72. Undertow Core
    AuthenticationMechanismsHandler.handleRequest
    1. io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    1 frame
  73. Undertow Servlet
    CachedAuthenticatedSessionHandler.handleRequest
    1. io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    1 frame
  74. Undertow Core
    PredicateHandler.handleRequest
    1. io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    2. io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    3. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    3 frames
  75. WildFly: Undertow
    JACCContextIdHandler.handleRequest
    1. org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    1 frame
  76. Undertow Core
    PredicateHandler.handleRequest
    1. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    2. io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    2 frames
  77. Undertow Servlet
    ServletInitialHandler$1.handleRequest
    1. io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
    2. io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
    3. io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
    4. io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
    4 frames
  78. Undertow Core
    HttpServerExchange$1.run
    1. io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
    2. io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
    2 frames
  79. Java RT
    Thread.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    3. java.lang.Thread.run(Thread.java:745)
    3 frames