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.  [ 3 posts ] 
Author Message
 Post subject: problem in DetachedCriteria--- new to hibernate
PostPosted: Thu Jun 19, 2008 3:28 pm 
Newbie

Joined: Thu Jun 19, 2008 3:23 pm
Posts: 4
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
private void deleteStudent(){

Session session = HibernateUtil.getSessionFactory()
.openSession();
session.beginTransaction();
Map<String,String> map = new HashMap<String, String>(10);
map.put("firstName","Ashish");
map.put("lastName","Mark");
DetachedCriteria crit = DetachedCriteria.forClass(Student.class).add(Restrictions.allEq(map));
List insurance = crit.getExecutableCriteria(session).list();
for(Iterator it = insurance.iterator();it.hasNext();){
Student insurance1 = (Student) it.next();
System.out.println("ID: " + insurance1.getStudentId());
System.out.println("Name: " + insurance1.getFirstName()+insurance1.getLastName());

}
session.getTransaction().commit();
System.out.println("Rows affected: " + insurance.size());

}
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2214)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at StudentRecord.deleteStudent(StudentRecord.java:70)
at StudentRecord.main(StudentRecord.java:96)
Caused by: java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []

at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
at oracle.jdbc.ttc7.TTC7Protocol.fetch(TTC7Protocol.java:889)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:1826)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2015)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:395)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:339)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1778)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
... 7 more

Problems with Session and transaction handling?

so could any one explain what was wrong in this code( add all jar file and oracle driver zip file also)

Any help would be appricaited

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 12:51 am 
Newbie

Joined: Wed Jun 18, 2008 3:51 am
Posts: 4
Check this link http://ora-00600.ora-code.com/
http://www.adp-gmbh.ch/ora/err/ora_00600.html


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 11:09 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Quote:
An ORA-00600 is thrown if Oracle detects an unexpected condition (also known as internal error).
In order to isolate the cause of an ORA-00600, the error comes with a list of arguments in square brackets. The first item identifies the problem cause.
Along with a ORA-00600, a trace file is written in the user_dump_dest or background_dump_dest directory. The name for the trace file written is recorded in the alert.log.
Arguments
[729]
An ORA-00600 [729] indicates a memory leak in the UGA.
Setting diagnostic events 10262 ignores this error, that is, no ORA-00600 is produced even if a memory leak is detected.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.