File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.ObjectNot Found Exception:

 
Abhinav Sahai
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • 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: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know what the problem was, but it got fixed when I restarted the PC.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic