javax.faces.FacesException: #{cadastroUsuarioBean.salvar}: javax.persistence.NonUniqueResultException: result returns more than one elements

com.br | 2 months ago
  1. 0

    cdi - Erro: javax.persistence.NonUniqueResultException: result returns more than one elements

    com.br | 2 months ago
    javax.faces.FacesException: #{cadastroUsuarioBean.salvar}: javax.persistence.NonUniqueResultException: result returns more than one elements
  2. 0

    SR: reaproveitamento do código da solicitação

    GitHub | 11 months ago | rafaela00castro
    javax.persistence.NonUniqueResultException: result returns more than one elements
  3. 0

    SR: Evitar que NonUniqueResultException seja lançado no log

    GitHub | 9 months ago | esredson
    javax.persistence.NonUniqueResultException: result returns more than one elements
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    db:: 3.84::Resteasy EAR - Could not find resource for relative pa

    hivmr.com | 4 months ago
    org.jboss.resteasy.spi.UnhandledException: javax.persistence.NonUniqueResultException: result returns more than one elements
  6. 0

    Since we updated to sonar 1.11 we get this exception during our hudson build... org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:87) at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65) at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:117) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more Caused by: javax.persistence.NonUniqueResultException: result returns more than one elements at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:109) at org.sonar.api.database.DatabaseSession.getSingleResult(DatabaseSession.java:161) at org.sonar.api.database.DatabaseSession.getSingleResult(DatabaseSession.java:174) at org.sonar.batch.DefaultSensorContext.createResource(DefaultSensorContext.java:317) at org.sonar.batch.DefaultSensorContext.saveSnapshot(DefaultSensorContext.java:304) at org.sonar.batch.DefaultSensorContext.saveSource(DefaultSensorContext.java:194) at org.sonar.api.batch.AbstractSourceImporter.parseDirs(AbstractSourceImporter.java:80) at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:71) at org.sonar.api.batch.AbstractSourceImporter.analyse(AbstractSourceImporter.java:63) at org.sonar.batch.core.SensorsExecutor.execute(SensorsExecutor.java:59) at org.sonar.batch.Batch.executeJobs(Batch.java:91) at org.sonar.batch.Batch.analyse(Batch.java:79) at org.sonar.batch.Batch.start(Batch.java:54) at org.sonar.batch.BatchMojo.executeBatch(BatchMojo.java:138) at org.sonar.batch.BatchMojo.execute(BatchMojo.java:130) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82) ... 21 more

    SonarSource JIRA | 7 years ago | Cyrille Lebec
    org.apache.maven.lifecycle.LifecycleExecutionException: Can not execute Sonar

    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. javax.persistence.NonUniqueResultException

      result returns more than one elements

      at org.hibernate.ejb.QueryImpl.getSingleResult()
    2. Hibernate EJB
      QueryImpl.getSingleResult
      1. org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:295)
      1 frame
    3. br.com.endpoint
      CadastroUsuarioService$Proxy$_$$_WeldSubclass.salvar
      1. br.com.endpoint.repository.Usuarios.porNome(Usuarios.java:31)
      2. br.com.endpoint.services.CadastroUsuarioService.salvar(CadastroUsuarioService.java:27)
      3. br.com.endpoint.services.CadastroUsuarioService$Proxy$_$$_WeldSubclass.salvar(CadastroUsuarioService$Proxy$_$$_WeldSubclass.java)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Weld Implementation
      InterceptorInvocationContext.proceed
      1. org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:85)
      2. org.jboss.weld.interceptor.proxy.InterceptorInvocationContext.proceed(InterceptorInvocationContext.java:127)
      2 frames
    6. br.com.endpoint
      TransactionInterceptor.invoke
      1. br.com.endpoint.util.jpa.TransactionInterceptor.invoke(TransactionInterceptor.java:38)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    8. Weld Implementation
      CombinedInterceptorAndDecoratorStackMethodHandler.invoke
      1. org.jboss.weld.interceptor.proxy.SimpleMethodInvocation.invoke(SimpleMethodInvocation.java:30)
      2. org.jboss.weld.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:69)
      3. org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:112)
      4. org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:88)
      5. org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:55)
      5 frames
    9. br.com.endpoint
      CadastroUsuarioBean$Proxy$_$$_WeldClientProxy.salvar
      1. br.com.endpoint.services.CadastroUsuarioService$Proxy$_$$_WeldSubclass.salvar(CadastroUsuarioService$Proxy$_$$_WeldSubclass.java)
      2. br.com.endpoint.controller.CadastroUsuarioBean.salvar(CadastroUsuarioBean.java:41)
      3. br.com.endpoint.controller.CadastroUsuarioBean$Proxy$_$$_WeldClientProxy.salvar(CadastroUsuarioBean$Proxy$_$$_WeldClientProxy.java)
      3 frames
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    11. 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
    12. Weld Implementation
      WeldMethodExpression.invoke
      1. org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:39)
      2. org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
      2 frames
    13. JSF
      TagMethodExpression.invoke
      1. com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
      1 frame
    14. JavaEE 7
      MethodBindingMethodExpressionAdapter.invoke
      1. javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:87)
      1 frame
    15. JSF
      ActionListenerImpl.processAction
      1. com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:101)
      1 frame
    16. JavaEE 7
      UIViewRoot.processApplication
      1. javax.faces.component.UICommand.broadcast(UICommand.java:315)
      2. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:786)
      3. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1251)
      3 frames
    17. 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:118)
      3 frames
    18. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      1 frame
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      2 frames
    20. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    21. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      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:142)
      7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)
      9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
      10 frames
    22. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1527)
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1484)
      4 frames
    23. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      2 frames
    24. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    25. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame