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

The OpenNMS Issue Tracker | Amol Paranjpe | 5 years ago
  1. 0

    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

    The OpenNMS Issue Tracker | 5 years ago | Amol Paranjpe
    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
  2. 0

    Unsuccessful attempt to use play with Postresql

    Google Groups | 7 years ago | benimnetz
    org.hibernate.exception.SQLGrammarException: could not execute query
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Re: [Spacewalk-list] Spacewalk Upgrade Issue

    redhat.com | 1 year ago
    javax.servlet.ServletException: Executing query DistChannelMap.findByProductNameReleaseAndChannelArch with params {channelArch=com redhat rhn domain channel ChannelArch 617be11e[id=513,label=channel-x86_64,name=x86_64,archType=com redhat rhn domain common ArchType 7f8e25c0[id=1,label=rpm]], release=5Server, productName=rhel} failed
  5. 0

    Hibernate and Postgres 8.3/8.4

    postgresql.org | 1 year ago
    org.hibernate.exception.SQLGrammarException: could not execute query org.hibernate.exception.SQLGrammarException: could not execute query
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. 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()
  2. PostgreSQL JDBC Driver
    AbstractJdbc2Statement.executeQuery
    1. org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
    2. org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
    3. org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    4. org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
    5. org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    6. org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:273)
    6 frames
  3. c3p0:JDBC DataSources/Resource Pools
    NewProxyPreparedStatement.executeQuery
    1. com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
    1 frame
  4. Hibernate
    QueryLoader.list
    1. org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    2. org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
    3. org.hibernate.loader.Loader.doQuery(Loader.java:697)
    4. org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
    5. org.hibernate.loader.Loader.doList(Loader.java:2228)
    6. org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
    7. org.hibernate.loader.Loader.list(Loader.java:2120)
    8. org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
    8 frames
  5. Hibernate HQL/JP-QL Parser
    QueryTranslatorImpl.list
    1. org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
    1 frame
  6. Hibernate
    QueryImpl.list
    1. org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
    2. org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
    3. org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
    3 frames
  7. Hibernate
    HibernateTemplate.find
    1. org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
    2. org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:1)
    3. org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
    4. org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
    5. org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
    5 frames
  8. org.opennms.netmgt
    DefaultNodeLinkService.getNodeId
    1. org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.find(AbstractDaoHibernate.java:155)
    2. org.opennms.netmgt.dao.hibernate.NodeDaoHibernate.findByLabel(NodeDaoHibernate.java:104)
    3. org.opennms.netmgt.provision.adapters.link.DefaultNodeLinkService.getNodeId(DefaultNodeLinkService.java:175)
    3 frames
  9. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  10. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  11. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    1 frame
  12. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    2 frames
  13. Unknown
    $Proxy76.getNodeId
    1. $Proxy76.getNodeId(Unknown Source)
    1 frame
  14. org.opennms.netmgt
    SimplerQueuedProvisioningAdapter$1.doInTransaction
    1. org.opennms.netmgt.provision.adapters.link.LinkProvisioningAdapter.doAddNode(LinkProvisioningAdapter.java:86)
    2. org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter$1.doInTransaction(SimplerQueuedProvisioningAdapter.java:126)
    2 frames
  15. Spring Tx
    TransactionTemplate.execute
    1. org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
    1 frame
  16. org.opennms.netmgt
    SimpleQueuedProvisioningAdapter$AdapterOperation.run
    1. org.opennms.netmgt.provision.SimplerQueuedProvisioningAdapter.processPendingOperationForNode(SimplerQueuedProvisioningAdapter.java:123)
    2. org.opennms.netmgt.provision.SimpleQueuedProvisioningAdapter$AdapterOperation.run(SimpleQueuedProvisioningAdapter.java:408)
    2 frames
  17. Java RT
    Thread.run
    1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    4. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    5. java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    6. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    7. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    8. java.lang.Thread.run(Thread.java:662)
    8 frames