-->
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.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.exception.GenericJDBCException:
PostPosted: Sun Dec 23, 2012 2:55 am 
Newbie

Joined: Sun Dec 23, 2012 2:41 am
Posts: 1
org.hibernate.exception.GenericJDBCException: could not insert:

This Exception may also raise in the following scenario

in .hbm.xml file

MyClass.hbm.xml
<property name="path" column="path" type="java.lang.Integer"/>

and if we try to insert


MyClass my = new MyClass();

my.setPath("SOME PATH");


here the error is :: we should change either

<property name="path" column="path" type="java.lang.Integer"/>

as

<property name="path" column="path" type="java.lang.String"/>


OR

MyClass my = new MyClass();

my.setPath("SOME PATH");

as

my.setPath(123);

_________________
sbabamca


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.