facebook

Exception while Deleting a row from data base

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #266864 Reply

    Hello,

    I am getting this exception “org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch update”
    when I am trying to delete the row from db CHICKEN table.

    My Java code is –
    Chicken c = (Chicken) session.load(Chicken.class, id);
    session.delete(c);

    and this is my chicken.hbm.xml file –

    <?xml version=”1.0″?>
    <!DOCTYPE hibernate-mapping PUBLIC “-//Hibernate/Hibernate Mapping DTD 3.0//EN”
    http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”&gt;
    <hibernate-mapping>
    <!–
    Auto-generated mapping file from
    the hibernate.org cfg2hbm engine
    –>
    <class name=”com.test.bus.domain.Chicken” table=”CHICKEN”>
    <id name=”ID” column=”CHICKEN_ID”>
    <generator class=”native”/>
    </id>
    <property name=”chickenName” type=”java.lang.String”>
    <column name=”CHICKEN_NAME”/>
    </property>

    <bag name=”chickenEggAssoc” inverse=”true” cascade=”all-delete-orphan” lazy=”false”>
    <key column=”CHICKEN_ID” />
    <one-to-many class=”com.test.bus.domain.ChickenEggAssoc”/>
    </bag>

    </class>
    </hibernate-mapping>

    #266871 Reply

    Haris Peco
    Member

    chaitanyakoranne,

    Could you please send complete log file and if it is possible ddl for CHICKEN and CHICKENEGG and mapping for chickenEggAssoc

    Regards,

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Exception while Deleting a row from data base

You must be logged in to post in the forum log in