-->
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.  [ 13 posts ] 
Author Message
 Post subject: Core 3.2.4 "native" id generator no longer works
PostPosted: Wed May 09, 2007 7:44 pm 
Newbie

Joined: Sat Oct 07, 2006 4:57 pm
Posts: 7
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.2.4

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html

I just upgraded to 3.2.4 GA and now my "native" id generator no longer works. This is a program that has been working with 3.2.2 for months.
Nothing else has changed.

Hibernate: insert into Version (version, structureModified, _uuid_, id) values (?, ?, ?, ?)

05/09/07 04:37:36.828 PM PDT mxPortal.<init>:408
ERROR: org.hibernate.exception.GenericJDBCException: could not insert: [com.finisar.portal.deviceRepository.objects.Version]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:40)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2158)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2638)
at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:48)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:250)
at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:298)
at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:181)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:107)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
at com.finisar.portal.deviceRepository.Session.persist(Session.java:550)
at com.finisar.portal.deviceRepository.Session.save(Session.java:582)
at com.finisar.portal.deviceRepository.DeviceRepository.writeVersion(DeviceRepository.java:237)
at com.finisar.portal.deviceRepository.DeviceRepository.initializeDatabase(DeviceRepository.java:117)
at com.finisar.portal.deviceRepository.DeviceRepository.<init>(DeviceRepository.java:91)
at com.finisar.portal.mxPortal.initialize(mxPortal.java:940)
at com.finisar.portal.mxPortal.<init>(mxPortal.java:406)
at com.finisar.portal.mxPortal.main(mxPortal.java:1091)
Caused by: java.sql.SQLException: Statement parameter 4 not set.
at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1277)
at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:952)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1974)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1897)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1758)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
... 23 more



I reverted back to 3.2.2 GA and its running fine.

Any one else experiencing this?


Top
 Profile  
 
 Post subject: upgrade from 3.2.3 to 3.2.4 causes regression
PostPosted: Wed May 09, 2007 7:58 pm 
Beginner
Beginner

Joined: Fri Sep 05, 2003 6:11 pm
Posts: 34
I'm having the same problem with identity id generator


Top
 Profile  
 
 Post subject: statement parameter not set
PostPosted: Thu May 10, 2007 12:36 am 
Newbie

Joined: Sun Sep 03, 2006 1:21 am
Posts: 9
i get same problem on update/insert on hiber 3.2.4

error message = statement parameter not set

i do not use any id generator. i use auto increment by db.

my app works ok on hiber 3.2.2

by the way is there any real advantage using id generator instead of auto inc by db?


Top
 Profile  
 
 Post subject: java.sql.SQLException: Statement parameter 2 not set.
PostPosted: Sat May 12, 2007 4:40 pm 
Newbie

Joined: Sat May 12, 2007 4:30 pm
Posts: 1
Location: Madrid
After various tests and comparing with other project within version 3.2.2 I discover the same exception with this mapping. I'm using MySQL database.

<class name="org.butcherless.domain.Persona" table="CC_PERSONA">
<id name="id" column="ID">
<generator class="native"></generator>
</id>
<property name="documento">
<column name="DOCUMENTO" length="32" not-null="true" />
</property>
</class>

The statement generated with version 3.2.4 is
Hibernate: insert into CC_PERSONA (DOCUMENTO, ID) values (?, ?)

and the insert statement generated with version 3.2.2 does not include the ID field in the insert statement.

Any idea or workaround?


Last edited by carlos.martin on Tue May 15, 2007 3:17 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Mon May 14, 2007 7:25 pm 
Newbie

Joined: Mon Sep 08, 2003 4:04 pm
Posts: 8
Location: San Diego, CA
I am having the same problem here after upgrading to 3.2.4 when using either an id generator of identity or native using the org.hibernate.dialect.Sybase11Dialect dialect.

I've never seen this issue before and I've been using Hibernate for quite some time now.

Edit: This issue is in the issue tracker:

http://opensource.atlassian.com/project ... e/HHH-2605


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 9:58 am 
Beginner
Beginner

Joined: Fri Apr 22, 2005 5:58 pm
Posts: 26
I am having this problem as well. All my insert statements which use an auto_increment for the PK are failing.

Any response from the hibernate team yet? This is a pretty big problem to have slipped through a release, no?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 15, 2007 2:19 pm 
Newbie

Joined: Wed May 18, 2005 12:14 pm
Posts: 7
Similar problem here with DB2 and any mappings that use a "native" generator. Looking at the debug logs, I see that the "identity insert" string has changed between 3.2.3 and 3.2.4. Here's an example:

3.2.3:

insert into USER_BOOKMARK_GROUP (USER_BOOKMARK_GROUP_ID, UPDATE_TIMESTAMP, CREATE_TIMESTAMP, CREATE_USER, UPDATE_USER, INACTIVE_DATE, USER_ID, GROUP_NAME, SEQUENCE_NUMBER) values (default, ?, ?, ?, ?, ?, ?, ?, ?)

3.2.4:

insert into USER_BOOKMARK_GROUP (UPDATE_TIMESTAMP, CREATE_TIMESTAMP, CREATE_USER, UPDATE_USER, INACTIVE_DATE, USER_ID, GROUP_NAME, SEQUENCE_NUMBER, USER_BOOKMARK_GROUP_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)

The latter causes DB2 to throw an exception in 3.2.4. Prior versions (including 3.2.3) worked fine.


Top
 Profile  
 
 Post subject: Re: Core 3.2.4 "native" id generator no longer wor
PostPosted: Tue May 15, 2007 3:09 pm 
Newbie

Joined: Sat Aug 27, 2005 1:08 pm
Posts: 4
frisbee wrote:
I just upgraded to 3.2.4 GA and now my "native" id generator no longer works. This is a program that has been working with 3.2.2 for months.
Nothing else has changed.
...

same problem with hibernate 3.2.4 on mysql 5.x

Geoff2010 wrote:
This is a pretty big problem to have slipped through a release, no?

yes it is, very strange ...


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 3:43 am 
Newbie

Joined: Sat Aug 27, 2005 1:08 pm
Posts: 4
sorry for bumping but it looks to me a major problem for all the hibernate users


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 12:02 am 
Newbie

Joined: Fri May 18, 2007 12:00 am
Posts: 1
I just registered to say that I installed 3.2.4 not 30 minutes ago and all of a sudden I have this exact problem. Glad to know its not just me, I was going insane for a minute. :)


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 5:25 am 
Newbie

Joined: Thu Nov 16, 2006 1:39 am
Posts: 13
I upgraded to 3.2.4 and also have this problem.

I revert back to 3.2.2


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 18, 2007 10:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Please upgrade to 3.2.4 SP1.


Top
 Profile  
 
 Post subject: What about maven repository
PostPosted: Thu May 24, 2007 4:25 am 
Newbie

Joined: Thu May 24, 2007 4:13 am
Posts: 4
Location: Lyon (France)
Does someone know when this new release will be available in Maven Repository?


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

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.