Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

net.sf.hibernate.JDBCException: Could not execute query

 
ramesh rbabu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the following error

net.sf.hibernate.JDBCException: Could not execute query
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1547)
at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
at com.caremark.hmgmt.phmcyadvsr.carecall.dao.hibernate.TokensDaoHibImpl.listTokens(TokensDaoHibImpl.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:299)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy68.listTokens(Unknown Source)
at com.caremark.hmgmt.phmcyadvsr.carecall.dataprovider.DataProviderFactory.initTokens(DataProviderFactory.java:155)
at com.caremark.hmgmt.phmcyadvsr.carecall.dataprovider.DataProviderFactory.init(DataProviderFactory.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)

when i inspect the code i found that it throws from the below line

tokens = getSession().getNamedQuery("loadTokensQuery").list();

upto getSession().getNamedQuery("loadTokensQuery") works fine only .list() method throws the exception.

please help me to find out the fix.

thanks
Ramesh
 
Anantha Sharma
Ranch Hand
Posts: 43
Android Hibernate jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
looks like there is something wrong with your query.. can you try and execute the query in the db directly & check if its working fine...

also please post the full stack trace.. there must be a SQLException thrown which is not added as part of your post.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic