-->
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.id.SequenceHiLoGenerator giving wrong id
PostPosted: Sun Mar 22, 2015 2:26 am 
Newbie

Joined: Sun Mar 22, 2015 2:18 am
Posts: 1
Getting wrong values from oracle sequence

In weblogic 11, I have 2 manages severs under 1 cluster. I have created 1 datasource on Admin server and attached to cluster. In hibernate side I am using

@XmlTransient
@Id
@Column(name = "id", nullable = false)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_NAME")
@SequenceGenerator(name = "SEQ_NAME", sequenceName = "SEQ_NAME")
public Integer getId() {
return this.id;
}

Exception:

org.hibernate.event.def.AbstractSaveEventListener saveWithGeneratedId - generated identifier: 41813, using strategy: org.hibernate.id.SequenceHiLoGenerator org.hibernate.util.JDBCExceptionReporter logExceptions - Could not execute JDBC batch update ......bla..bla..java.sql.BatchUpdateException: ORA-00001: unique constraint

Assumption is only on 2nd managed server I am facing this problem.
Can anyone suggest me please.


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.