-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate refresh problem,
PostPosted: Thu Feb 22, 2007 12:28 pm 
Newbie

Joined: Thu Feb 22, 2007 12:21 pm
Posts: 3
Hi,

I am developing some applications in hibernate ,tomcat,eclipse environment. I have developed a jsp, but while refreshing the jsp
using F5 button i get some errors.

These are the errors.

Caused by: org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:92)
at org.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:80)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1596)
at org.hibernate.loader.Loader.list(Loader.java:1577)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
at it.lispa.bdi.db.UocProgrammaDAO.getAvailableProgramma(UocProgrammaDAO.java:77)
at it.lispa.bdi.service.ServiceProgramma.getAvailableProgramma(ServiceProgramma.java:154)
at it.lispa.bdi.service.ServiceProgramma.getAvailableProgramma(ServiceProgramma.java:149)
... 66 more
Caused by: java.sql.SQLException: ORA-01001: cursore non valido

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.v8Odscrarr.receive(v8Odscrarr.java:205)
at oracle.jdbc.ttc7.TTC7Protocol.describe(TTC7Protocol.java:754)
at oracle.jdbc.driver.OracleStatement.describe(OracleStatement.java:6195)
at oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5959)
at oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1527)
at oracle.jdbc.driver.OracleResultSet.getInt(OracleResultSet.java:1528)
at org.apache.commons.dbcp.DelegatingResultSet.getInt(DelegatingResultSet.java:236)
at org.hibernate.type.IntegerType.get(IntegerType.java:26)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:77)
at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:68)
at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:759)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:292)
at org.hibernate.loader.Loader.doQuery(Loader.java:412)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
at org.hibernate.loader.Loader.doList(Loader.java:1593)
... 74 more


These are the errors iam getting can any one suggest some option to
rectify this errors.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 22, 2007 11:44 pm 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Hi dude,

its oracle exception.Check your logic



--------------------------------------------------------------------------------

What causes this error?
This error occurs when a PL/SQL or a 3GL program attempts to use a cursor which has not yet been opened, or which has already been closed.

Back to top of file



--------------------------------------------------------------------------------

How to fix it
This is 100% a program logic problem. You have either forgotten to code an open statement before using a cursor, or have not noticed that the cursor has been closed and have tried to continue using it. The following checklist may help identify the fault:


Make sure you have an OPEN statement prior to using any explicit cursors.

Make sure that you do not have a misplaced CLOSE statement.

If you need to do a sequence of OPEN...CLOSE...OPEN...CLOSE (perhaps because you need to reset bind variables or to commit updates inside a loop) check your logic flow and make sure there are no fetches between the 1st CLOSE and the 2nd OPEN.

If you have nested loops, check that a condition in an inner loop is not being missed which allows control to pass unexpectedly to a CLOSE in an outer loop

Remember that a PL/SQL FOR loop does an implicit OPEN and CLOSE. If you take a routine with a FOR loop and change it to a WHILE loop you must remember to code the OPEN and CLOSE.

_________________
Dharmendra Pandey


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.