[Hibernate-JIRA] Closed: (HHH-901) TransactionHelper doesn't restore autocommit setting
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-901?page=co... ]
Steve Ebersole closed HHH-901.
------------------------------
Closing stale resolved issues
> TransactionHelper doesn't restore autocommit setting
> ----------------------------------------------------
>
> Key: HHH-901
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-901
> Project: Hibernate Core
> Issue Type: Bug
…
[View More]> Components: core
> Affects Versions: 3.0.5
> Environment: Hibernate 3.0.5, sybase ase 12.5
> Reporter: Paul Lorenz
> Priority: Minor
>
> When the TransactionHelper gets a connection, it sets auto commit to false. Later, when the connection is commited, the auto commit flag isn't restored. Is this supposed to be handled by the connection pool?
> Here is a patch to change this behaviour
> -----------------------------------------------------
> --- foo.java 2005-08-23 17:26:02.000000000 -0400
> +++ TransactionHelper.java 2005-08-23 17:30:06.000000000 -0400
> @@ -43,6 +43,7 @@
> String sql = null; // for exception
> boolean isJta = tm != null;
> boolean catchedException = false;
> + boolean isAutoCommitEnabled = false;
> try {
> if ( isJta ) {
> //JTA environment
> @@ -58,7 +59,8 @@
> else {
> // get connection from the hibernate defined pool
> conn = session.getBatcher().openConnection();
> - if ( conn.getAutoCommit() ) conn.setAutoCommit( false );
> + isAutoCommitEnabled = conn.getAutoCommit();
> + if ( isAutoCommitEnabled ) conn.setAutoCommit( false );
> }
> Serializable result = doWorkInCurrentTransaction( conn, sql );
> @@ -69,6 +71,7 @@
> }
> else {
> conn.commit();
> + if ( isAutoCommitEnabled ) conn.setAutoCommit( true );
> }
> return result;
> }
--
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
[View Less]
13 years, 11 months
[Hibernate-JIRA] Closed: (HHH-1180) Property Not Found
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1180?page=c... ]
Steve Ebersole closed HHH-1180.
-------------------------------
Closing stale resolved issues
> Property Not Found
> ------------------
>
> Key: HHH-1180
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1180
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> …
[View More] Environment: Gentoo Linux
> java version "1.4.2-02"
> Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-02)
> Java HotSpot(TM) Client VM (build Blackdown-1.4.2-02, mixed mode)
> Reporter: James Calfee
> Priority: Minor
> Attachments: AccountInError.jar
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Hibernate will not deploy the following String property name:
> Top_5_3rd_Party_Insuracne__c
> (yes, there is a typo in Insurance)
> Two objects have this property and both will not deploy (same error). All objects deploy if this property is removed.
> 09:29:11,967 ERROR Configuration:365 - Could not compile the mapping document
> org.hibernate.PropertyNotFoundException: field not found: Top_5_3rd_Party_Insuracne__c
> at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:96)
> at org.hibernate.property.DirectPropertyAccessor.getField(DirectPropertyAccessor.java:103)
> at org.hibernate.property.DirectPropertyAccessor.getGetter(DirectPropertyAccessor.java:111)
> Here is the 'trimmed' code:
> * hibernate.cfg.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
> <hibernate-configuration>
> <session-factory>
> <mapping resource="AccountInError.hbm.xml"/>
> </session-factory>
> </hibernate-configuration>
> * AccountInError.hbm.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping>
> <class name="org.hibernate.bugfix.AccountInError">
> <id name="Id"/>
> <property name="Top_5_3rd_Party_Insuracne__c" not-null="false"/>
> </class>
> </hibernate-mapping>
> * org/hibernate/bugfix/AccountInError.java
> package org.hibernate.bugfix;
> public class AccountInError implements java.io.Serializable {
> int id;
> String top_5_3Rd_Party_Insuracne__c;
> public AccountInError() {
> }
> public int getId() {
> return id;
> }
> public void setId(int id) {
> this.id = id;
> }
> public String getTop_5_3Rd_Party_Insuracne__c() {
> return top_5_3Rd_Party_Insuracne__c;
> }
> public void setTop_5_3Rd_Party_Insuracne__c(String top_5_3Rd_Party_Insuracne__c) {
> this.top_5_3Rd_Party_Insuracne__c = top_5_3Rd_Party_Insuracne__c;
> }
> }
--
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
[View Less]
13 years, 11 months
[Hibernate-JIRA] Closed: (HHH-894) SQL Server 2000 many-to-one unique="true" cascade="all" to String custom generated Id throws PropertyValueException on cascade save
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-894?page=co... ]
Steve Ebersole closed HHH-894.
------------------------------
Closing stale resolved issues
> SQL Server 2000 many-to-one unique="true" cascade="all" to String custom generated Id throws PropertyValueException on cascade save
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-894
> …
[View More] URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-894
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1 beta 2
> Environment: Hibernate: 3.1 latest from CVS (22 August 2005)
> Database: SQL Server 2000
> Java: j2sdk1.4.2_03
> Reporter: Nathan Moon
> Attachments: jug.jar, nathanuuidtest.zip, onetoonecascade.zip
>
>
> see http://forum.hibernate.org/viewtopic.php?t=946560
> I get an exception: org.hibernate.PropertyValueException: not-null property references a null or transient value: ... in the following case:
> UUIDTable has a String user generated UUID PK.
> OneToOneTable has a one-to-one association to UUIDTable, with cascase="all"
> I create a new UUIDTable object and a new OneToOneTable object, set the association, and call save on the OneToOneTable object. The cascade attribute should cause the UUIDTable object to get saved before the OneToOneTable object, but the exception is thrown instead.
> This happens when using SQLServer 2000 database (SQLServerDialect), but not when using PostgreSQL 8 database (PostgreSQLDialect). I haven't tried other DBs.
> I have attached my mapping files and POJOs, my UUID generator classes, SQLServer DDL, and my testcase code to reproduce the problem. POJOs and DDL are generated by Hibernate Tools and SchemaExport.
--
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
[View Less]
13 years, 11 months
[Hibernate-JIRA] Closed: (HHH-970) Error reporting should be improved and suggestion for "lax error checking" with no exceptions thrown
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-970?page=co... ]
Steve Ebersole closed HHH-970.
------------------------------
Closing stale resolved issues
> Error reporting should be improved and suggestion for "lax error checking" with no exceptions thrown
> ----------------------------------------------------------------------------------------------------
>
> Key: HHH-970
> URL: http://opensource.atlassian.com/projects/…
[View More]hibernate/browse/HHH-970
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.1 beta 2
> Environment: all
> Reporter: Andy Bailey
>
> I use hibernate in all my web applications and have had good experiences and bad experiences,
> when its good its very good (like you dont even know you are using a database) and when its bad there is no information
> In many cases there is not enough information to go on all you know is that somewhere in the application
> "Illegal attempt to associate a collection with two open sessions"
> "deleted object would be resaved by cascade"
> "object associated with two sessions"
> I think all the error reporting should say what the object is what class it is what is the primary key,
> if it is a collection the first few objects , primary key and class.
> Or I suspect more controversial would be that hibernate could have a "lax mode" and a "strict mode", that in lax mode these problems get logged as errors but no error gets thrown, assume that the user knows what they are doing.
> It has happened to me that what should have been a unique result was not as the user had entered in wrong data
> the result was that using uniqueResult() caused the whole web application to effectively hang, not pleasant!
> I have seen the number of post to the users forum about these topics and think that a way to reduce them and make hibernate easier to use is to improve the error reports.
> I see in 2.1.2 there was a fix: better exception report if deleted object is resaved by cascade
> I havent checked it out as I havent fallen into that trap again! but it caused a delay of several days as I hadnt a clue as to which object.
> You could say that unit tests could narrow it down but its always possible for an error to only show up in integration tests
> like synchronisation issues.
--
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
[View Less]
13 years, 11 months
[Hibernate-JIRA] Closed: (HHH-668) Nullpointer when lazy-loading instrumented entity
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-668?page=co... ]
Steve Ebersole closed HHH-668.
------------------------------
Closing stale resolved issues
> Nullpointer when lazy-loading instrumented entity
> -------------------------------------------------
>
> Key: HHH-668
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-668
> Project: Hibernate Core
> Issue Type: Bug
> …
[View More] Components: core
> Environment: Hibernate CVS 23/6/2005
> Reporter: Mathias Bogaert
> Attachments: NILapi.rar
>
>
> java.lang.NullPointerException
> at
> org.hibernate.persister.entity.BasicEntityPersister.initializeLazyProperty(B
> asicEntityPersister.java:709)
> at
> org.hibernate.intercept.FieldInterceptor.intercept(FieldInterceptor.java:76)
> at
> org.hibernate.intercept.FieldInterceptor.readObject(FieldInterceptor.java:12
> 9)
> at
> eu.cec.regio.sysaudit.domain.adonis.AdonisReferenceDocument.$cglib_read_imag
> e(AdonisReferenceDocument.java)
> at
> eu.cec.regio.sysaudit.domain.adonis.AdonisReferenceDocument.getImage(AdonisR
> eferenceDocument.java:63)
> at
> eu.cec.regio.sysaudit.web.action.adonis.UploadIfsAdonisDocumentWithMetadata.
> upload(UploadIfsAdonisDocumentWithMetadata.java:123)
> Worked fine with Hibernate 3.0.5.
> Line 709 in BasicEntityPersister:
> snapshot[ lazyPropertyNumbers[j] ] = lazyPropertyTypes[j].deepCopy( propValue, session.getEntityMode(), factory );
--
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
[View Less]
13 years, 11 months