org.springframework.dao.IncorrectResultSizeDataAccessException

query did not return a unique result: 12; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 12

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web81

  • via The OpenNMS Issue Tracker by Antonio Russo, 10 months ago
    query did not return a unique result: 12; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 12
  • query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  • via Google Groups by Unknown author, 6 months ago
    query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  • Stack trace

    • org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 12; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 12 at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659) at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339) at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.findUnique(AbstractDaoHibernate.java:198) at org.opennms.netmgt.dao.hibernate.BridgeElementDaoHibernate.getByNodeIdVlan(BridgeElementDaoHibernate.java:65) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$5.query(EnhancedLinkdServiceImpl.java:473) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$5.query(EnhancedLinkdServiceImpl.java:469) at org.opennms.netmgt.dao.support.UpsertTemplate.doUpsert(UpsertTemplate.java:157) at org.opennms.netmgt.dao.support.UpsertTemplate.access$000(UpsertTemplate.java:123) at org.opennms.netmgt.dao.support.UpsertTemplate$1.doInTransaction(UpsertTemplate.java:147) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.opennms.netmgt.dao.support.UpsertTemplate.execute(UpsertTemplate.java:143) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.saveBridgeElement(EnhancedLinkdServiceImpl.java:469) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.store(EnhancedLinkdServiceImpl.java:464) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$FastClassByCGLIB$$fe4d2451.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:627) at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$EnhancerByCGLIB$$96ccf8d6.store(<generated>) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridge.walkDot1d(NodeDiscoveryBridge.java:225) at org.opennms.netmgt.enlinkd.NodeDiscoveryBridge.runCollection(NodeDiscoveryBridge.java:95) at org.opennms.netmgt.enlinkd.NodeDiscovery.run(NodeDiscovery.java:121) at org.opennms.netmgt.linkd.scheduler.Scheduler$1.run(Scheduler.java:209) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124) at java.lang.Thread.run(Thread.java:744) Caused by: org.hibernate.NonUniqueResultException: query did not return a unique result: 12 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:899) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate$3.doInHibernate(AbstractDaoHibernate.java:193) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 6 months ago