facebook

Batch Update error

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

    bala.aru
    Member

    hi all,

    the following is my code and try to insert the values it shows the error like this.

    Error org.hibernate.exception.GenericJDBCException: Could not execute JDBC batch Update

    >XML code

    
    <class name="suggestion" table="ESS_SUGGESTION">
            <id name="suggnID" column="SUGGESTION_ID" type="string">
            </id>
            <property name="empId" column="EMP_ID" type="int"/>
            <property name="deptAgent" column="DEPT_AGENT" type = "string"/>
            <property name="imdSuper" column="IMD_SUPER" type = "string"/>
            <property name="jointSuggestion" column="JOINT_SUGGESTION" type ="string"/>
            <property name="suggnTitle" column="SUGGN_TITLE" type = "string"/>
            <property name="preSolu" column="PRE_SOLU" type = "string"/>
            <property name="suggn" column="SUGGN" type = "string"/>
            <property name="tarSitu" column="TAR_SITU" type = "string"/>
            <property name="benefit" column="BENEFIT" type = "string"/>
            <property name="category" column="CATEGORY" type = "string"/>
            <property name="otherFact" column="OTHER_FACT" type = "string"/>
            <property name="attachFile" column="ATTACH_FILE" type = "string"/>
            <property name="areaAffect" column="AREA_AFFECT" type = "string"/>
            <property name="moreinfo" column="MORE_INFO" type = "string"/>
            <property name="phone" column="PHONE" type = "string"/>
            <property name="ext" column="EXT" type = "int"/>
            <property name="enteredDate" column="ENTERED_DATE" type="date" not-null="true" />
            
            <set name="csm1" cascade="all" inverse="true">
                <key column="SUGGESTION_ID" not-null="true"/>
                <one-to-many class="Material1" />
            </set>
        </class>
        
        <class name="Material1" table="ESS_SUGGN_MATERIAL1"
            dynamic-update="true" optimistic-lock="version">
    
            <id name="m1ID" type="int" column="M1_ID"
                unsaved-value="0">
                <generator class="sequence">
                    <param name="sequence">ess_suggn_material1_seq</param>
                </generator>
            </id>
            <property name="m1prex" column="PRE_EXAMPLE" type="string"/>
            <property name="m1prunit" column="PRE_UNIT" type="int"/>
            <property name="m1prnou" column="PRE_NO_OF_UNIT" type="int"/>
            <property name="m1prucost" column="PRE_UNIT_COST" type="int"/>
            <property name="m1prtcost" column="PRE_TOTAL_COST" type="int"/>
            <property name="m1poex" column="PRO_EXAMPLE" type="string"/>
            <property name="m1pounit" column="PRO_UNIT" type="int"/>
            <property name="m1ponou" column="PRO_NO_OF_UNIT" type="int"/>
            <property name="m1poucost" column="PRO_UNIT_COST" type="int"/>
            <property name="m1potcost" column="PRO_TOTAL_COST" type="int"/>
            <many-to-one name="suggestion" class="suggestion" cascade="all" >
                <column name="SUGGESTION_ID" />
            </many-to-one>
        </class>
    

    and my insertion code is

    
    session.save(suggestion);
    transaction.commit();
    
    #273635 Reply

    Riyad Kalla
    Member

    What DB are you using? What JDBC driver and version are you using?

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Batch Update error

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