[Hibernate-JIRA] Commented: (HHH-1575) Issue HHH-708 not properly fixed
by Alex Goncharuk (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1575?page=c... ]
Alex Goncharuk commented on HHH-1575:
-------------------------------------
it takes two minutes to fix this issue. Please include it into the next release. I confirm that I experienced the same problem and fixed it in the same way.
now:
for ( int i=0; i<types.length; i++ ) {
for ( int j=0; j<values.length; j++ ) {
should be:
for ( int j=0; j<values.length; j++ ) {
for ( int i=0; i<types.length; i++ ) {
please do it.
> Issue HHH-708 not properly fixed
> --------------------------------
>
> Key: HHH-1575
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1575
> Project: Hibernate3
> Issue Type: Bug
> Components: query-criteria
> Affects Versions: 3.1.2
> Environment: Oracle 9i, org.hibernate.criterion.InExpression
> Reporter: Thierry Hermann
>
> The InExpression produces a statement like [where (key, station) in ((?,?),(?,?)...)] indeed.
> but the parameter binding is wrong.
> In fact if you look in org.hibernate.criterion.InExpression, getTypedValues() method (line: 53-54) both for loop should be inverted:
> for ( int i=0; i<types.length; i++ )
> for ( int j=0; j<values.length; j++ )
> should become:
> for ( int j=0; j<values.length; j++ )
> for ( int i=0; i<types.length; i++ )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[Hibernate-JIRA] Resolved: (HHH-1312) Unclosed ResultSet when using Identity
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312?page=c... ]
Gail Badner resolved HHH-1312.
------------------------------
Resolution: Fixed
Thanks, Christian. I made the change as you suggested and checked that the ResultSet was property closed in the debugger. This should take care of the memory leak.
Fixed in trunk / 3.2 .
> Unclosed ResultSet when using Identity
> --------------------------------------
>
> Key: HHH-1312
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc2, 3.1 rc3, 3.1
> Environment: JBoss 4.0.3SP1
> Hibernate 3.1rc2
> Java 1.5.0_06
> MSSQLServer 2000
> Reporter: Michael Samblanet
> Assignee: Gail Badner
> Priority: Minor
> Fix For: 3.2.6, 3.3
>
>
> The code around AbstractEntityPersister.java line 1969 obtains a result set using GetGeneratedKeysHelper.getGeneratedKey
> but the result set is never closed by this function nor the functions it calls. The issue was exposed by the
> message below in JBoss 4.0.3 SP1.
> This is an EJB3 application on JBoss using MSSQLServer 2000 and we are persisting an object with a primary key using an
> identity data type.
> A review of the Hibernate 3.1 source code seems to indicate it has the same issue.
> 11:29:30,817 WARN [WrappedConnection] Closing a result set you left open! Please close it yourself.
> java.lang.Throwable: STACKTRACE
> at org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:572)
> at org.jboss.resource.adapter.jdbc.WrappedStatement.getGeneratedKeys(WrappedStatement.java:501)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.hibernate.util.GetGeneratedKeysHelper.getGeneratedKey(GetGeneratedKeysHelper.java:59)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1969)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
> at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
> at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
> at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
> at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
> at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
> at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:590)
> at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:568)
> at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:130)
> at org.jboss.ejb3.entity.InjectedEntityManager.persist(InjectedEntityManager.java:97)
> <snip>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[Hibernate-JIRA] Updated: (HHH-1312) Unclosed ResultSet when using Identity
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312?page=c... ]
Gail Badner updated HHH-1312:
-----------------------------
Fix Version/s: 3.3
3.2.6
> Unclosed ResultSet when using Identity
> --------------------------------------
>
> Key: HHH-1312
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc2, 3.1 rc3, 3.1
> Environment: JBoss 4.0.3SP1
> Hibernate 3.1rc2
> Java 1.5.0_06
> MSSQLServer 2000
> Reporter: Michael Samblanet
> Assignee: Gail Badner
> Priority: Minor
> Fix For: 3.2.6, 3.3
>
>
> The code around AbstractEntityPersister.java line 1969 obtains a result set using GetGeneratedKeysHelper.getGeneratedKey
> but the result set is never closed by this function nor the functions it calls. The issue was exposed by the
> message below in JBoss 4.0.3 SP1.
> This is an EJB3 application on JBoss using MSSQLServer 2000 and we are persisting an object with a primary key using an
> identity data type.
> A review of the Hibernate 3.1 source code seems to indicate it has the same issue.
> 11:29:30,817 WARN [WrappedConnection] Closing a result set you left open! Please close it yourself.
> java.lang.Throwable: STACKTRACE
> at org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:572)
> at org.jboss.resource.adapter.jdbc.WrappedStatement.getGeneratedKeys(WrappedStatement.java:501)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.hibernate.util.GetGeneratedKeysHelper.getGeneratedKey(GetGeneratedKeysHelper.java:59)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1969)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
> at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
> at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
> at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
> at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
> at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
> at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:590)
> at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:568)
> at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:130)
> at org.jboss.ejb3.entity.InjectedEntityManager.persist(InjectedEntityManager.java:97)
> <snip>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[Hibernate-JIRA] Assigned: (HHH-1312) Unclosed ResultSet when using Identity
by Gail Badner (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312?page=c... ]
Gail Badner reassigned HHH-1312:
--------------------------------
Assignee: Gail Badner
> Unclosed ResultSet when using Identity
> --------------------------------------
>
> Key: HHH-1312
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1312
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc2, 3.1 rc3, 3.1
> Environment: JBoss 4.0.3SP1
> Hibernate 3.1rc2
> Java 1.5.0_06
> MSSQLServer 2000
> Reporter: Michael Samblanet
> Assignee: Gail Badner
> Priority: Minor
>
> The code around AbstractEntityPersister.java line 1969 obtains a result set using GetGeneratedKeysHelper.getGeneratedKey
> but the result set is never closed by this function nor the functions it calls. The issue was exposed by the
> message below in JBoss 4.0.3 SP1.
> This is an EJB3 application on JBoss using MSSQLServer 2000 and we are persisting an object with a primary key using an
> identity data type.
> A review of the Hibernate 3.1 source code seems to indicate it has the same issue.
> 11:29:30,817 WARN [WrappedConnection] Closing a result set you left open! Please close it yourself.
> java.lang.Throwable: STACKTRACE
> at org.jboss.resource.adapter.jdbc.WrappedStatement.registerResultSet(WrappedStatement.java:572)
> at org.jboss.resource.adapter.jdbc.WrappedStatement.getGeneratedKeys(WrappedStatement.java:501)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.hibernate.util.GetGeneratedKeysHelper.getGeneratedKey(GetGeneratedKeysHelper.java:59)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1969)
> at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2404)
> at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
> at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
> at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
> at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
> at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
> at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
> at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
> at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:590)
> at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:568)
> at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:130)
> at org.jboss.ejb3.entity.InjectedEntityManager.persist(InjectedEntityManager.java:97)
> <snip>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[Hibernate-JIRA] Commented: (HHH-1961) Schema validation fails with floating point column in Oracle 10g
by Julie Chi (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961?page=c... ]
Julie Chi commented on HHH-1961:
--------------------------------
Try Jboss4.0.5GA. the problem goes away *magically* . I have the same issue when mapping Double to Oracle column type NUMBER with JBOSS-4.0.4RC1 at startup time, however it just works fine if using JBOSS-4.0.5.GA. Both are using hibernate3.jar. Does anybody know why? Thanks.
> Schema validation fails with floating point column in Oracle 10g
> ----------------------------------------------------------------
>
> Key: HHH-1961
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1961
> Project: Hibernate3
> Issue Type: Bug
> Affects Versions: 3.2.0.cr2
> Environment: 3.2 CR 2, Oracle 10g express edition release 2, Windows XP service pack 2, JDK 1.5.0_06
> Reporter: Daniel Dyer
>
> I have a table (created automatically by Hibernate) for mapping a double field. The table creation from Ant works fine but when starting up JBoss with the hibernate.hbm2ddl.auto property set to validate, I get the following exception:
> Caused by: org.hibernate.HibernateException: Wrong column type: percentage, expected: double precision
> at org.hibernate.mapping.Table.validateColumns(Table.java:219)
> at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:965)
> at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:116)
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:296)
> at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1176)
> at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:414)
> at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:575)
> at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245)
> at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108)
> at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260)
> ... 127 more
> Doing a "desc" on the table reveals that the column is of type FLOAT with a length of 22.
> I think this may be related to issue HHH-1566 or HHH-1008.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[Hibernate-JIRA] Created: (HHH-2895) PersistentBag.key is not updated when a bag key refer to a non-id property that is generated by database
by Igor Spasic (JIRA)
PersistentBag.key is not updated when a bag key refer to a non-id property that is generated by database
--------------------------------------------------------------------------------------------------------
Key: HHH-2895
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2895
Project: Hibernate3
Issue Type: Bug
Affects Versions: 3.2.0.ga
Environment: Hibernate 3.2.0ga and newer. Oracle 10g.
Reporter: Igor Spasic
Priority: Critical
Attachments: HibernateProblem.zip
Have 2 entities (Customer & Address) in one-to-many relationship.
Customer.linkId is not the id of customer, still, it is used for relationships with the addresses. Moreover, Customer.linkId is generated by database triger.
So, the testcase is:
+ open tx
+ create customer and add two addresses to it
+ commit tx
+ open new tx
+ update customer object
+ commit
the exception is:
Exception in thread "main" org.hibernate.HibernateException: Don't change the reference to a collection with cascade="all-delete-orphan": yc.hibprob.Customer.addresses
This is not true, since collection is not changed at all.
Some hints:
i assume that when hibernate reads generated linkId from database, it doesn't update it in PersistentCollection used for relationships. When I debug, i see that key property of PersistentBad is set to -1 after the first transaction, and it should be set to value of Customer.linkId. When I manually change the key in debuger during runtime, problem is solved.
Take a look at the enclosed example, it contains complete example and sql script.
Moreover, notice the Customer constructor - i had to initalize the linkId, otherwise hibernate will give NullPointerException. huh:)
Please provide me some feedback regarding this issue. Maybe configuration is wrong or we are doing something wrong here. Just do not rant about the database model, it is something what is fixed and set by our customers, so we cant change it ;) Also, we would like to use 'all-delete-orphan', since if cascade is set to 'all', there will be no problem.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months