• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

org.hibernate.ObjectNot Found Exception:

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to load data from database, but it is not returning any results(though there is a record and I can see it!), and throwing an exception ...........

org.hibernate.ObjectNotFoundException: No row with the given identifier exists

I am doing simple load..
DMSIndex index = (DMSIndex)session.load(DMSIndex.class, pIndexID);System.out.println("Unique ID = "+index.getUnique_id());

My hibernate mapping file looks like this:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="dms2dms.businessobject.DMSIndex" table="index">
<id name="index_id" column="index_id" type="java.lang.Integer">
<generator class="assigned" />
</id>

<property name="index_type" column="index_type" type="string"/>

<property name="overlay_id" column="overlay_id" type="java.lang.Long"/>

<property name="authorisation" column="authorisation" type="string"/>
<property name="authorisation_date" column="authorisation_date" type="java.util.Date"/>

<property name="instruction" column="instruction" type="string"/>

<property name="unique_id" column="unique_id" type="string"/>
<property name="ra_notes" column="ra_notes" type="string"/>

<property name="ra_status" column="ra_status" type="string"/>
<property name="completion_status" column="completion_status" type="string"/>

</class>
</hibernate-mapping>

Please help it is urgent... :-((
 
Abhinav Sahai
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know what the problem was, but it got fixed when I restarted the PC.
reply
    Bookmark Topic Watch Topic
  • New Topic