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

Provisiond Error : org.hibernate.exception.SQLGrammarException: could not execute query

    XMLWordPrintable

    Details

      Description

      I am getting following error in provisiond.log

      2012-05-09 09:41:37,332 INFO [scanExecutor-5] IpInterfaceScan$1: Attempted to detect service ICMP on address X.Y.Z.D: true
      2012-05-09 09:41:37,347 INFO [scanExecutor-2] IpInterfaceScan$1: Attempted to detect service SNMP on address X.Y.Z.D: true
      2012-05-09 09:41:37,410 INFO [NioProcessor-2] HttpStatusResponse: HTTP status regex: ([H][T][T][P+]/[1].[0-1]) ([0-6]) ([a-zA-Z ])

      2012-05-09 09:41:37,425 INFO [NioProcessor-2] IpInterfaceScan$1: Attempted to detect service HTTP on address X.Y.Z.D: true
      2012-05-09 09:41:37,504 INFO [scanExecutor-10] AddEventVisitor: Sending nodeGainedService Event for [OnmsMonitoredService@65373267 id = 7, lastGood = [null], lastFail = [null], qualifier = [null], status = 'A', source = [null], notify = [null], serviceType = [OnmsServiceType@770b5264 id = 4, name = 'HTTP']]

      2012-05-09 09:41:37,675 INFO [LinkEventCorrelator] EventIpcManagerDefaultImpl: run: calling onEvent on LinkEventCorrelator for event uei.opennms.org/nodes/nodeGainedService dbid 20 with time Wednesday, May 9, 2012 4:11:37 AM GMT
      2012-05-09 09:41:38,003 ERROR [pool-5-thread-1] SimpleQueuedProvisioningAdapter: Unexpected exception during node operation: could not execute query; SQL [select onmsnode0_.nodeId as nodeId8_, onmsnode0_.nodeCreateTime as nodeCrea2_8_, onmsnode0_.dpName as dpName8_, onmsnode0_.foreignId as foreignId8_, onmsnode0_.foreignSource as foreignS4_8_, onmsnode0_.nodeLabel as nodeLabel8_, onmsnode0_.nodeLabelSource as nodeLabe6_8_, onmsnode0_.lastCapsdPoll as lastCaps7_8_, onmsnode0_.nodeDomainName as nodeDoma8_8_, onmsnode0_.nodeNetBIOSName as nodeNetB9_8_, onmsnode0_.operatingSystem as operati10_8_, onmsnode0_.nodeParentID as nodePar18_8_, onmsnode0_.nodeSysContact as nodeSys11_8_, onmsnode0_.nodeSysDescription as nodeSys12_8_, onmsnode0_.nodeSysLocation as nodeSys13_8_, onmsnode0_.nodeSysName as nodeSys14_8_, onmsnode0_.nodeSysOID as nodeSysOID8_, onmsnode0_.nodeType as nodeType8_, onmsnode0_1_.criticalPathIp as critical1_9_, onmsnode0_1_.criticalPathServiceName as critical2_9_ from node onmsnode0_ left outer join pathOutage onmsnode0_1_ on onmsnode0_.nodeId=onmsnode0_1_.nodeId where onmsnode0_.nodeLabel=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
      org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select onmsnode0_.nodeId as nodeId8_, onmsnode0_.nodeCreateTime as nodeCrea2_8_, onmsnode0_.dpName as dpName8_, onmsnode0_.foreignId as foreignId8_, onmsnode0_.foreignSource as foreignS4_8_, onmsnode0_.nodeLabel as nodeLabel8_, onmsnode0_.nodeLabelSource as nodeLabe6_8_, onmsnode0_.lastCapsdPoll as lastCaps7_8_, onmsnode0_.nodeDomainName as nodeDoma8_8_, onmsnode0_.nodeNetBIOSName as nodeNetB9_8_, onmsnode0_.operatingSystem as operati10_8_, onmsnode0_.nodeParentID as nodePar18_8_, onmsnode0_.nodeSysContact as nodeSys11_8_, onmsnode0_.nodeSysDescription as nodeSys12_8_, onmsnode0_.nodeSysLocation as nodeSys13_8_, onmsnode0_.nodeSysName as nodeSys14_8_, onmsnode0_.nodeSysOID as nodeSysOID8_, onmsnode0_.nodeType as nodeType8_, onmsnode0_1_.criticalPathIp as critical1_9_, onmsnode0_1_.criticalPathServiceName as critical2_9_ from node onmsnode0_ left outer join pathOutage onmsnode0_1_ on onmsnode0_.nodeId=onmsnode0_1_.nodeId where onmsnode0_.nodeLabel=?]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query
      at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:629)
      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.executeWithNativeSession(HibernateTemplate.java:374)
      at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
      at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.find(AbstractDaoHibernate.java:155)
      at org.opennms.netmgt.dao.hibernate.NodeDaoHibernate.findByLabel(NodeDaoHibernate.java:104)
      at org.opennms.netmgt.provision.adapters.link.DefaultNodeLinkService.getNodeId(DefaultNodeLinkService.java:175)
      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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy76.getNodeId(Unknown Source)
      at org.opennms.netmgt.provision.adapters.link.LinkProvisioningAdapter.doAddNode(LinkProvisioningAdapter.java:86)
      at org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter$1.doInTransaction(SimplerQueuedProvisioningAdapter.java:126)
      at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
      at org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter.processPendingOperationForNode(SimplerQueuedProvisioningAdapter.java:123)
      at org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter$AdapterOperation.run(SimpleQueuedProvisioningAdapter.java:408)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      at org.hibernate.loader.Loader.doList(Loader.java:2231)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
      at org.hibernate.loader.Loader.list(Loader.java:2120)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
      at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
      at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
      at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:1)
      at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
      ... 29 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: 961
      at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
      at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
      at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
      at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
      at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
      at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
      at org.hibernate.loader.Loader.doQuery(Loader.java:697)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
      at org.hibernate.loader.Loader.doList(Loader.java:2228)
      ... 39 more

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              amolparanjpe Amol Paranjpe
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: