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

IpNetToMedia Hibernate exception in enlinkd.log

    Details

      Description

      I was doing some more testing of this. Not sure if this is related or is a different issue, but I see the following exception in the enlinkd.log:
      org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select ipnettomed0_.id as id9_, ipnettomed0_.createTime as createTime9_, ipnettomed0_.lastPollTime as lastPoll3_9_, ipnettomed0_.netAddress as netAddress9_, ipnettomed0_.physAddress as physAddr5_9_, ipnettomed0_.sourceIfIndex as sourceIf6_9_, ipnettomed0_.sourceNodeId as sourceNo7_9_ from ipNetToMedia ipnettomed0_ where ipnettomed0_.netAddress=? and ipnettomed0_.physAddress=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:642) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]
      at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:416) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]
      at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:341) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.findUnique(AbstractDaoHibernate.java:202) ~[opennms-dao-16.0.3.jar:?]
      at org.opennms.netmgt.dao.hibernate.IpNetToMediaDaoHibernate.getByNetAndPhysAddress(IpNetToMediaDaoHibernate.java:54) ~[opennms-dao-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$9.query(EnhancedLinkdServiceImpl.java:765) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$9.query(EnhancedLinkdServiceImpl.java:761) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.dao.support.UpsertTemplate.doUpsert(UpsertTemplate.java:157) ~[opennms-dao-16.0.3.jar:?]
      at org.opennms.netmgt.dao.support.UpsertTemplate.access$000(UpsertTemplate.java:123) ~[opennms-dao-16.0.3.jar:?]
      at org.opennms.netmgt.dao.support.UpsertTemplate$1.doInTransaction(UpsertTemplate.java:147) ~[opennms-dao-16.0.3.jar:?]
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133) ~[org.apache.servicemix.bundles.spring-tx-4.0.5.RELEASE_1.jar:?]
      at org.opennms.netmgt.dao.support.UpsertTemplate.execute(UpsertTemplate.java:143) ~[opennms-dao-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.saveIpNetToMedia(EnhancedLinkdServiceImpl.java:792) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.store(EnhancedLinkdServiceImpl.java:756) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$FastClassBySpringCGLIB$$fe4d2451.invoke(<generated>) ~[org.apache.servicemix.bundles.spring-core-4.0.5.RELEASE_1.jar:?]
      at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204) ~[org.apache.servicemix.bundles.spring-core-4.0.5.RELEASE_1.jar:?]
      at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:640) ~[org.apache.servicemix.bundles.spring-aop-4.0.5.RELEASE_1.jar:?]
      at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$EnhancerBySpringCGLIB$$e761e509.store(<generated>) ~[org.apache.servicemix.bundles.spring-core-4.0.5.RELEASE_1.jar:?]
      at org.opennms.netmgt.enlinkd.NodeDiscoveryIpNetToMedia$1.processIpNetToMediaRow(NodeDiscoveryIpNetToMedia.java:81) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.enlinkd.snmp.IpNetToMediaTableTracker.rowCompleted(IpNetToMediaTableTracker.java:217) ~[opennms-services-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.SnmpTableResult.handleCompleteRows(SnmpTableResult.java:99) ~[org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.SnmpTableResult.storeResult(SnmpTableResult.java:75) ~[org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.TableTracker.storeResult(TableTracker.java:106) ~[org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.CollectionTracker.storeResult(CollectionTracker.java:77) ~[org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.ColumnTracker$1.processResponse(ColumnTracker.java:100) ~[org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.TableTracker$CombinedColumnResponseProcessor.processResponse(TableTracker.java:170) [org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.AggregateTracker$ChildTrackerResponseProcessor.processResponse(AggregateTracker.java:165) [org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.SnmpWalker.processResponse(SnmpWalker.java:202) [org.opennms.core.snmp.api-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.snmp4j.Snmp4JWalker.access$700(Snmp4JWalker.java:48) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.snmp4j.Snmp4JWalker$Snmp4JResponseListener.processResponse(Snmp4JWalker.java:151) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.opennms.netmgt.snmp.snmp4j.Snmp4JWalker$Snmp4JResponseListener.onResponse(Snmp4JWalker.java:180) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.Snmp.processPdu(Snmp.java:1203) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.MessageDispatcherImpl.fireProcessPdu(MessageDispatcherImpl.java:675) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.MessageDispatcherImpl.dispatchMessage(MessageDispatcherImpl.java:302) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:373) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.MessageDispatcherImpl.processMessage(MessageDispatcherImpl.java:333) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.transport.AbstractTransportMapping.fireProcessMessage(AbstractTransportMapping.java:76) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at org.snmp4j.transport.DefaultUdpTransportMapping$ListenThread.run(DefaultUdpTransportMapping.java:414) [org.opennms.core.snmp.implementations.snmp4j-16.0.3.jar:?]
      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_45]
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.doList(Loader.java:2545) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.list(Loader.java:2271) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate$3.doInHibernate(AbstractDaoHibernate.java:197) ~[opennms-dao-16.0.3.jar:?]
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]
      ... 37 more
      Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: character varying = bytea
      Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
      Position: 378
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) ~[postgresql-9.3-1100-jdbc4.jar:?]
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76) ~[c3p0-0.9.1.2.jar:0.9.1.2]
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.doQuery(Loader.java:802) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.doList(Loader.java:2542) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.Loader.list(Loader.java:2271) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:890) ~[hibernate-core-3.6.10.Final.jar:3.6.10.Final]
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate$3.doInHibernate(AbstractDaoHibernate.java:197) ~[opennms-dao-16.0.3.jar:?]
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411) ~[org.apache.servicemix.bundles.spring-orm-4.0.5.RELEASE_1.jar:?]

        Attachments

          Issue Links

            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: