Wednesday 8 June 2016

not-null property references a null or transient value

org.springframework.dao.DataIntegrityViolationException: not-null property references a null or transient value : entity.VoiceProfile.email; nested exception is org.hibernate.PropertyValueException: not-null property references a null or transient value : entity.voiceProfile.email

 conclustion :
 While persisting into the DB get the users VoicePofile by id or check if any user exist for the voiceprofile or not.
 if exist get and then store in db.

Tuesday 7 June 2016

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ' ' cannot be null

Let us check scenario of hibernate.
solution :
1.check entity  mapping with table.
2. check the primary key and foreign key relationship.
3. primary key cannot be "not null" in table, it can be null in other table. 

Monday 6 June 2016

com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException

com.sun.jersey.spi.container.ContainerResponse mapMappableContainerException

SEVERE: The exception contained within MappableContainerException could not be mapped to a response, re-throwing to the HTTP container

com.fasterxml.jackson.core.JsonParseException: Unexpected character ('"' (code 34)): was expecting comma to separate OBJECT entries

Ex :
error :
{
"name" : "voice"
"email" : "voice@gmail.com"

}
corrected :
{
"name" : "voice" ,
"email" : "voice@gmail.com"

}

Solution :  In the corrected solution put a comma.