Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9374

Insert/Update OspfElement: null value in column "ospfrouteridifindex" violates not-null constrain

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 18.0.1
    • Fix Version/s: 20.0.1
    • Component/s: Enhanced Linkd / Linkd
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      Exception in thread "EnhancedLinkd-Thread-5-of-5" org.springframework.dao.DataIntegrityViolationException: could not update: org.opennms.netmgt.model.OspfElement#526638; SQL [update ospfElement set nodeId=?, ospfASBdrRtrStatus=?, ospfAdminStat=?, ospfBdrRtrStatus=?, ospfNodeCreateTime=?, ospfNodeLastPollTime=?, ospfRouterId=?, ospfRouterIdIfindex=?, ospfRouterIdNetmask=?, ospfVersionNumber=? where id=?]; constraint [ospfrouteridifindex]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: org.opennms.netmgt.model.OspfElement#526638
      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659)
      at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:416)
      at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:379)
      at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:938)
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.flush(AbstractDaoHibernate.java:94)
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.store(EnhancedLinkdServiceImpl.java:496)
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$FastClassBySpringCGLIB$$fe4d2451.invoke(<generated>)
      at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
      at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:717)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
      at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:653)
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$EnhancerBySpringCGLIB$$bdb44706.store(<generated>)
      at org.opennms.netmgt.enlinkd.NodeDiscoveryOspf.runCollection(NodeDiscoveryOspf.java:119)
      at org.opennms.netmgt.enlinkd.NodeDiscovery.run(NodeDiscovery.java:112)
      at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:187)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not update: org.opennms.netmgt.model.OspfElement#526638
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2613)
      at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822)
      at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
      at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
      at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
      at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
      at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
      at org.springframework.orm.hibernate3.HibernateTemplate$27.doInHibernate(HibernateTemplate.java:941)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
      ... 21 more
      Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "ospfrouteridifindex" violates not-null constraint
      Detail: Failing row contains (526638, 2228, 10.21.0.108, 1, 2, 2, 1, 255.255.255.255, null, 2016-05-18 13:21:16.617+02, 2017-05-25 08:30:53.995+02).
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2458)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2158)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:291)
      at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:432)
      at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:358)
      at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:171)
      at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:138)
      at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
      at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
      at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
      at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2591)

        Attachments

          Activity

            People

            • Assignee:
              rssntn67 Antonio Russo
              Reporter:
              rssntn67 Antonio Russo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: