• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate is giving exceptions: couldnot load and could not executequery

 
ganesh vinayaka
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
posted September 26, 2005 06:13 AM
--------------------------------------------------------------------------------
hai,

I am using hibernate in my jsf application. I use a method which
executes Query returned from session.createQuery(here query is typed)
and i will run the Iterator of java.util package.

Now the problem is if i call this from one jsf page it is working
very well. when i call the same method from another jsf page it is giving
two exceptions as follows:

exception1)

Hibernate: select questionse0_.questionId as questionId0_, questionse0_.question as question0_, questionse0_.optionOne as optionOne0_, questionse0_.optionTwo as optionTwo0_, questionse0_.optionThree as optionTh5_0_, questionse0_.optionFour
as optionFour0_, questionse0_.answer as answer0_, questionse0_.subjectId as subjectId0_, questionse0_.seniorityId as seniorit9_0_, questionse0_.averageTime as average10_0_, questionse0_.answerWeightage as answerW11_0_ from questions questionse0_ where questionse0_.questionId=?
net.sf.hibernate.exception.JDBCConnectionException: could not load: [com.kb.bean.QuestionSet#2]
at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:66)

exception2)

Hibernate: select questionse0_.questionId as x0_0_ from questions questionse0_ where (questionse0_.subjectId=? )and (questionse0_.seniorityId=? )and
(questionse0_.questionId in(? , ? , ? , ? , ? , ? , ?))
net.sf.hibernate.exception.JDBCConnectionException: Could not execute query
at net.sf.hibernate.exception.SQLStateConverter.convert
(SQLStateConverter.java:66)

Remember that Query is working in one instance and in the second it is giving above exceptions.
can any one do favour for this? It will be appreciated.

regards
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please try not to duplicate post the same question. I deleted the other thread that had the same question.

As the originator of a thread, you can always delete the thread yourself by using the Edit Reply icon button then click the delete checkbox.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic