You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Max R. A. (JIRA) <no...@at...> - 2006-07-29 16:40:52
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-713?page=comments#action_23798 ] Max Rydahl Andersen commented on HBX-713: ----------------------------------------- sorry, but in what usecase scenario does it make sense to generate this from hbm.xml if you are already using annotations? > hbm2java task: meta support needed for class level annotations > -------------------------------------------------------------- > > Key: HBX-713 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-713 > Project: Hibernate Tools > Type: Bug > Components: hbm2java > Versions: 3.2beta6 > Environment: hibernate tools 3.2 beta 6 > JBoss 4.0.4.GA with EJB3 > Reporter: Daniel Pocock > > Original Estimate: 1 hour > Remaining: 1 hour > > We use hbm2java to create EJB3 entity beans from hbm files. It would be really useful to use the `meta' element to insert additional class level annotations. Is someone already working on such a feature, or should I submit a patch? > Here is an example of what I would like to do: > <meta attribute="extra-import">org.jboss.seam.annotations.Name</meta> > <meta attributre="class-annotation">@Name("myObject")</meta> > such that the following code would be generated: > import javax.ejb.Entity; > import org.jboss.seam.annotations.Name; > @Entity > @Name("myObject") > public class MyObject .... -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Francois J. (JIRA) <no...@at...> - 2006-07-29 14:33:13
|
Trick to help maintenance of HQL query. --------------------------------------- Key: HBX-716 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX= -716 Project: Hibernate Tools Type: Improvement Components: hbm2java =20 Versions: 3.2beta6 =20 Reporter: Francois Jean Priority: Minor Attachments: patch.txt I'm just sending a modification I made to a FreeMarket template in Hibernat= e Tools (hbm2java) to help us maintaining our HQL. We are using a large database with more the 300 tables and we often do a re= verse-engineering of the database to keep our Java entities in synch and so= metimes we have to deal with column names change. After the reverse-enginee= ring process, the compiler will show errors for all the getter/setter that = have change name. But it will not show any errors in HQL using "old" attrib= ute names. For example if we have a table "Application" with a column "Version_num", w= e would get a Class "Application" with an attribute "versionNum" and its ow= n getter and setter. If the column "Version_num" change its name for "App_v= ersion_num", the new attribute name will be "appVersionNum" with its new ge= tter/setter. And the compiler will show errors for old code using the gette= r "getVersionNum". But will not show any errors for HQL like: "from " +Appl= ication.class.getName() + " where versionNum =3D 3" Solution: We modify the generation of the entity to include a constant string for eac= h attribute name, by using these constants the compiler can flag error in H= QL. The new HQL would be: "from " +Application.class.getName() + " where "+ Application.VERSIONNUM + = " =3D 3" For now, we always generate these constants but it could be possible to tri= gger the constants generation by using a parameter in the ant task when ask= ing Hibernate Tools to generate Java entities. Template that was modified: PojoFields.ftl // Fields name constant =20 <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttribA= sBool(field, "gen-property", true)> public static final String ${field.name?upper_case} =3D "${field.name}= "; </#if> </#foreach> =20 // Fields =20 <#foreach field in pojo.getAllPropertiesIterator()><#if pojo.getMetaAttribA= sBool(field, "gen-property", true)> <#if pojo.hasMetaAttribute(field, "fiel= d-description")> /** ${pojo.getFieldJavaDoc(field, 0)} */ </#if> ${pojo.getFieldModifiers(field)} ${pojo.getJavaTypeName(field, j= dk5)} ${field.name}<#if pojo.hasFieldInitializor(field, jdk5)> =3D ${pojo.g= etFieldInitialization(field, jdk5)}</#if>; </#if> </#foreach> PS: This solution is not perfect, a better approach would be something that= would also validate at compilation time the type of association. For examp= le, the association "person.address.city" present in a HQL statement will o= nly be validated when this HQL will be executed. Fran=C3=A7ois J. --=20 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= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Todor G. (JIRA) <no...@at...> - 2006-07-29 12:48:17
|
Can't use the eclipse 'New' wizards any more after installing the plugin from the Update Site --------------------------------------------------------------------------------------------- Key: HBX-715 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-715 Project: Hibernate Tools Type: Bug Components: eclipse Versions: 3.2beta6 Environment: Windows XP x64, (Eclipse-SDK-3.2-win32-x86_64.zip running on JDK 5.0 Update 7 (x64) ) or (Eclipse-SDK-3.2-win32.zip running on J2SDK1.4.2(x86)), wanted to use with Hibernate 3.1 and MySQL and Firebird Reporter: Todor Gitchev After installing only the 'Hibernate Tools 3.2.0.6a' plugin (except all other JBoss related) using the update site: http://download.jboss.org/jbosside/updates/development/ it is not possible to use any more the eclipse wizards in the 'Other' list. For example if you click on the context menu and choose 'New/Other...' it is not possible to choose any of the items in the list including the 'Hibernate' one added by the plugin installer. The scroller is moving but it's not possible to choose any of the items using a mouse click. It is possible to manipulate the selection only with the keyboard (Up,Down,Enter buttons) which is not so convenient because even resising the window is not working in this case. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-29 07:24:26
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-534?page=comments#action_23797 ] Max Rydahl Andersen commented on HB-534: ---------------------------------------- h3.2 > Table schema use in DatabaseMetadata > ------------------------------------ > > Key: HB-534 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-534 > Project: Hibernate2 > Type: Bug > Components: core > Versions: 2.1 beta 4 > Environment: Hibernate 2.1 beta 4, Oracle 8i > Reporter: Adrien > Attachments: DatabaseMetadata.java, HB-534_patch.txt, TableMetadata.java > > > When using SchemaUpdate, the DatabaseMetaData.getTableMetadata() looks for a table with the correct table name in any database schema and it take the first one it found. This behavior is uncorrect if I have a table existing in different schemas. > The correct behavior would be to first look in the schema with the login name and after in any schema. > user1.article > user2.article > I connected whith user2, DatabaseMetaData should first look for user2.article, then if not found to %.article. > Adrien -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David D. (JIRA) <no...@at...> - 2006-07-28 22:12:53
|
HQL query that uses implicit polymorphism returns (# concrete classes x n) rows, not n rows, when setMaxResults(n) is used -------------------------------------------------------------------------------------------------------------------------- Key: HHH-1952 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1952 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.3 Environment: Hibernate: 3.1.3 Reporter: David Donn If I have m mapped entities that implement the same interface and execute a polymorphic query with setMaxResults(n) I get n x m rows instead of n rows in my result. Query: session.createQuery("from Animal").setMaxResults(1) Hibernate mapping: <class name="Lion" table="lion" lazy="false"> <id name="id"> <generator class="sequence"> <param name="sequence">animal_seq</param> </generator> </id> </class> <class name="Tiger" table="tiger" lazy="false"> <id name="id"> <generator class="sequence"> <param name="sequence">animal_seq</param> </generator> </id> </class> Class definitions: public interface Animal { } public class Lion implements Animal { private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } } public class Tiger implements Animal { private Long id; public Long getId() { return id; } public void setId(Long id) { this.id = id; } } SQL: create sequence animal_seq start with 1 / create table lion (id number(12) primary key) / create table tiger (id number(12) primary key) / insert into lion values (animal_seq.nextval) / insert into tiger values (animal_seq.nextval) / -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-07-28 22:08:20
|
Add getCurrentSession(Map) method to pass options to custom implementations --------------------------------------------------------------------------- Key: HHH-1955 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1955 Project: Hibernate3 Type: New Feature Components: documentation, core Reporter: Christian Bauer Priority: Minor There are a few borderline usecases in HibernateTemplate that can be implemented with CurrentSessionContext ("enable query caching for all queries from this Session", "Enable flushmode by default", etc.). If I want to implement this right now without HibernateTemplate, I'd write a CurrentSessionContext that does the magic before returning a Session (e.g. set a flushmode). This is more difficult if you want to have one CurrentSessionContext that can do several things (like proxy a Session so that all queries are cachable, enable a flushmode when the session is opened, etc.) - you'd need a way to pass some arguments into the SF-scoped CSC. Instead of threadlocals I'd say we should provide an overloaded getCurrentSession(Map) so that any implementor can handle a custom set of parameters. Not sure this is a good idea, because all the use cases that have been named so far are theoretical and are extremely unlikely to happen in practice. However, they are used for the marketing of the HibernateTemplate. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Marco R. (JIRA) <no...@at...> - 2006-07-28 22:02:40
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004?page=comments#action_23790 ] Marco Rothe commented on HHH-1004: ---------------------------------- I ran into the same issue with Hibernate 3.1.3. But I found a workaround which works fine for me. I declared cascade="merge" on the one-to-one side of the relation and forced hibernate to load the child when merge() the parent. So the buggy code is never called. (see the attached, modified example of the first post) > merge() with one-to-one throws ClassCastException > ------------------------------------------------- > > Key: HHH-1004 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1 beta 2 > Reporter: Nathan Moon > Attachments: onetoonemerge.zip > > > Hibernate tries to bind a persistent object to a long variable in a SQL statement during a call to merge() on an object with a one-to-one relation. > I originally posted about this problem here: http://forum.hibernate.org/viewtopic.php?t=948272&highlight= > I have created and attached a junit test to reproduce the problem. When running against 3.0 or 3.1beta2 the ClassCastException is thrown all the way out, as shown in the forum post. The latest code from cvs catches the exception and logs it. org.hibernate.type.NullableType.java rev 1.10 is where the exception is caught. It seems like it should be logged and then re-thrown, but it's not. The debug log from the start of the merge() call to where it logs that it failed to bind the value is: > [junit] 11:12:32,461 DEBUG SessionImpl:271 - opened session at timestamp: 11283595524 > [junit] 11:12:32,461 DEBUG JDBCTransaction:54 - begin > [junit] 11:12:32,461 DEBUG ConnectionManager:309 - opening JDBC connection > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0 > [junit] 11:12:32,461 DEBUG JDBCTransaction:59 - current autocommit status: false > [junit] 11:12:32,461 DEBUG JDBCContext:207 - before transaction completion > [junit] 11:12:32,477 DEBUG IdentifierValue:207 - id unsaved-value: null > [junit] 11:12:32,477 DEBUG AbstractSaveEventListener:470 - detached instance of: org.hibernate.test.onetoone.merge.Person > [junit] 11:12:32,477 DEBUG DefaultMergeEventListener:185 - merging detached instance > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:304 - attempting to resolve: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:340 - object not resolved in any cache: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG ConnectionManager:389 - running Session.finalize() > [junit] 11:12:32,477 DEBUG AbstractEntityPersister:2722 - Fetching entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,493 DEBUG SQL:344 - > [junit] select > [junit] person0_.person_id as person1_0_0_ > [junit] from > [junit] person person0_ > [junit] where > [junit] person0_.person_id=? > [junit] 11:12:32,493 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,493 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,508 DEBUG Loader:682 - processing result set > [junit] 11:12:32,508 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,508 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,524 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,524 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,524 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,524 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#1] > [junit] 11:12:32,539 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,539 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,555 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,555 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,555 DEBUG Loader:682 - processing result set > [junit] 11:12:32,571 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,571 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,571 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,586 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,586 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:222 - entity found in session cache > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,602 DEBUG StatefulPersistenceContext:784 - initializing non-lazy collections > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] > [junit] 11:12:32,602 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,602 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,618 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,618 INFO LongType:89 - could not bind value 'org.hibernate.test.onetoone.merge.Person@153f67e' to parameter: 1 > Running the test on HSQLDB with the latest from cvs hides the problem (logs it as INFO, but doesn't complain that nothing is bound to the variable), but if you run on PostgreSQL, for example, it complains (SQLException) that nothing is bound to the variable when the statement is executed ( org.postgresql.util.PSQLException: No value specified for parameter 1.): > [junit] 11:12:32,633 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,633 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,649 DEBUG JDBCExceptionReporter:63 - could not load an entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] [select address0_.address_id as address1_1_0_, address0_.person_id as person2_1_0_ from address address0_ where address0_.person_id=?] > [junit] org.postgresql.util.PSQLException: No value specified for parameter 1. > [junit] at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:102) > [junit] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:166) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) > [junit] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137) > [junit] at org.hibernate.loader.Loader.getResultSet(Loader.java:1676) > [junit] at org.hibernate.loader.Loader.doQuery(Loader.java:662) > [junit] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223) > [junit] at org.hibernate.loader.Loader.loadEntity(Loader.java:1782) > [junit] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) > [junit] at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:85) > [junit] at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1522) > [junit] at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:365) > [junit] at org.hibernate.type.EntityType.resolve(EntityType.java:306) > [junit] at org.hibernate.type.EntityType.replace(EntityType.java:207) > [junit] at org.hibernate.type.TypeFactory.replace(TypeFactory.java:431) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:279) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:245) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:102) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53) > [junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:609) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:595) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:599) > [junit] at org.hibernate.test.onetoone.merge.OneToOneTest.testOne(OneToOneTest.java:52) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [junit] at java.lang.reflect.Method.invoke(Method.java:585) > [junit] at junit.framework.TestCase.runTest(TestCase.java:154) > [junit] at org.hibernate.test.TestCase.runTest(TestCase.java:140) > [junit] at junit.framework.TestCase.runBare(TestCase.java:127) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) > [junit] at junit.framework.TestResult.run(TestResult.java:109) > [junit] at junit.framework.TestCase.run(TestCase.java:118) > [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) > [junit] at junit.framework.TestSuite.run(TestSuite.java:203) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) > [junit] 11:12:32,664 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 22023 > [junit] 11:12:32,664 ERROR JDBCExceptionReporter:72 - No value specified for parameter 1. > [junit] 11:12:32,680 DEBUG SessionImpl:290 - closing session > [junit] 11:12:32,680 DEBUG ConnectionManager:330 - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] > [junit] 11:12:32,680 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] 11:12:32,680 INFO SessionFactoryImpl:865 - closing > [junit] 11:12:32,680 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:postgresql://localhost:5432/hibtest > [junit] 11:12:32,680 INFO SchemaExport:153 - Running hbm2ddl schema export > [junit] 11:12:32,696 DEBUG SchemaExport:171 - import file not found: /import.sql > [junit] 11:12:32,696 INFO SchemaExport:180 - exporting generated schema to database > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection > [junit] 11:12:32,774 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:postgresql://localhost:5432/hibtest, Isolation Level: 2 > [junit] 11:12:32,789 DEBUG SchemaExport:283 - > [junit] alter table address > [junit] drop constraint FKBB979BF4986F6BA3 > [junit] 11:12:32,805 DEBUG SchemaExport:283 - > [junit] drop table address > [junit] 11:12:32,836 DEBUG SchemaExport:283 - > [junit] drop table person > [junit] 11:12:32,867 DEBUG SchemaExport:283 - > [junit] drop sequence hibernate_sequence > [junit] 11:12:32,883 INFO SchemaExport:200 - schema export complete > [junit] 11:12:32,883 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 5.233 sec > [junit] Test org.hibernate.test.onetoone.merge.OneToOneTest FAILED -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Matt S. (JIRA) <no...@at...> - 2006-07-28 21:55:40
|
Table using back-tick not passing validation on Oracle ------------------------------------------------------ Key: HHH-1951 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1951 Project: Hibernate3 Type: Bug Versions: 3.1.3 Environment: Client: Hibernate 3.1.3, Java 1.5.0_06, Mac OS X 10.4.7 Database server: Windows XP SP2, Oracle XE Reporter: Matt Solnit I have a table mapping that looks similar to the following: <class name="User" table="`User`"> <!-- etc. --> Notice the back-ticks around the table name. When I use Hibernate to create the schema for me, it correctly generates a table name called "User" (including the quote marks). But when I validate the schema, it cannot find the table and so validation fails. I am thinking the problem is somewhere in org/hibernate/tool/hbm2ddl/DatabaseMetadata.getTableMetadata(). It tries to look for "USER", because OracleDatabaseMetaData.storesUpperCaseIdentifiers() returns true. But the code doesn't realize that quoted tables are a special case and it has to look for "User" instead. Another symptom of the same problem is that if I generate a schema update script, it will attempt to re-create the existing table. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Wilson N. de A. (JIRA) <no...@at...> - 2006-07-28 21:51:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004?page=comments#action_23778 ] Wilson N. de Almeida commented on HHH-1004: ------------------------------------------- My hibernate core version is 3.2 rc2 and the bug still exists... > merge() with one-to-one throws ClassCastException > ------------------------------------------------- > > Key: HHH-1004 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1 beta 2 > Reporter: Nathan Moon > Attachments: onetoonemerge.zip > > > Hibernate tries to bind a persistent object to a long variable in a SQL statement during a call to merge() on an object with a one-to-one relation. > I originally posted about this problem here: http://forum.hibernate.org/viewtopic.php?t=948272&highlight= > I have created and attached a junit test to reproduce the problem. When running against 3.0 or 3.1beta2 the ClassCastException is thrown all the way out, as shown in the forum post. The latest code from cvs catches the exception and logs it. org.hibernate.type.NullableType.java rev 1.10 is where the exception is caught. It seems like it should be logged and then re-thrown, but it's not. The debug log from the start of the merge() call to where it logs that it failed to bind the value is: > [junit] 11:12:32,461 DEBUG SessionImpl:271 - opened session at timestamp: 11283595524 > [junit] 11:12:32,461 DEBUG JDBCTransaction:54 - begin > [junit] 11:12:32,461 DEBUG ConnectionManager:309 - opening JDBC connection > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0 > [junit] 11:12:32,461 DEBUG JDBCTransaction:59 - current autocommit status: false > [junit] 11:12:32,461 DEBUG JDBCContext:207 - before transaction completion > [junit] 11:12:32,477 DEBUG IdentifierValue:207 - id unsaved-value: null > [junit] 11:12:32,477 DEBUG AbstractSaveEventListener:470 - detached instance of: org.hibernate.test.onetoone.merge.Person > [junit] 11:12:32,477 DEBUG DefaultMergeEventListener:185 - merging detached instance > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:304 - attempting to resolve: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:340 - object not resolved in any cache: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG ConnectionManager:389 - running Session.finalize() > [junit] 11:12:32,477 DEBUG AbstractEntityPersister:2722 - Fetching entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,493 DEBUG SQL:344 - > [junit] select > [junit] person0_.person_id as person1_0_0_ > [junit] from > [junit] person person0_ > [junit] where > [junit] person0_.person_id=? > [junit] 11:12:32,493 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,493 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,508 DEBUG Loader:682 - processing result set > [junit] 11:12:32,508 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,508 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,524 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,524 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,524 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,524 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#1] > [junit] 11:12:32,539 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,539 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,555 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,555 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,555 DEBUG Loader:682 - processing result set > [junit] 11:12:32,571 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,571 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,571 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,586 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,586 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:222 - entity found in session cache > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,602 DEBUG StatefulPersistenceContext:784 - initializing non-lazy collections > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] > [junit] 11:12:32,602 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,602 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,618 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,618 INFO LongType:89 - could not bind value 'org.hibernate.test.onetoone.merge.Person@153f67e' to parameter: 1 > Running the test on HSQLDB with the latest from cvs hides the problem (logs it as INFO, but doesn't complain that nothing is bound to the variable), but if you run on PostgreSQL, for example, it complains (SQLException) that nothing is bound to the variable when the statement is executed ( org.postgresql.util.PSQLException: No value specified for parameter 1.): > [junit] 11:12:32,633 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,633 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,649 DEBUG JDBCExceptionReporter:63 - could not load an entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] [select address0_.address_id as address1_1_0_, address0_.person_id as person2_1_0_ from address address0_ where address0_.person_id=?] > [junit] org.postgresql.util.PSQLException: No value specified for parameter 1. > [junit] at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:102) > [junit] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:166) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) > [junit] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137) > [junit] at org.hibernate.loader.Loader.getResultSet(Loader.java:1676) > [junit] at org.hibernate.loader.Loader.doQuery(Loader.java:662) > [junit] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223) > [junit] at org.hibernate.loader.Loader.loadEntity(Loader.java:1782) > [junit] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) > [junit] at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:85) > [junit] at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1522) > [junit] at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:365) > [junit] at org.hibernate.type.EntityType.resolve(EntityType.java:306) > [junit] at org.hibernate.type.EntityType.replace(EntityType.java:207) > [junit] at org.hibernate.type.TypeFactory.replace(TypeFactory.java:431) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:279) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:245) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:102) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53) > [junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:609) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:595) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:599) > [junit] at org.hibernate.test.onetoone.merge.OneToOneTest.testOne(OneToOneTest.java:52) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [junit] at java.lang.reflect.Method.invoke(Method.java:585) > [junit] at junit.framework.TestCase.runTest(TestCase.java:154) > [junit] at org.hibernate.test.TestCase.runTest(TestCase.java:140) > [junit] at junit.framework.TestCase.runBare(TestCase.java:127) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) > [junit] at junit.framework.TestResult.run(TestResult.java:109) > [junit] at junit.framework.TestCase.run(TestCase.java:118) > [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) > [junit] at junit.framework.TestSuite.run(TestSuite.java:203) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) > [junit] 11:12:32,664 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 22023 > [junit] 11:12:32,664 ERROR JDBCExceptionReporter:72 - No value specified for parameter 1. > [junit] 11:12:32,680 DEBUG SessionImpl:290 - closing session > [junit] 11:12:32,680 DEBUG ConnectionManager:330 - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] > [junit] 11:12:32,680 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] 11:12:32,680 INFO SessionFactoryImpl:865 - closing > [junit] 11:12:32,680 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:postgresql://localhost:5432/hibtest > [junit] 11:12:32,680 INFO SchemaExport:153 - Running hbm2ddl schema export > [junit] 11:12:32,696 DEBUG SchemaExport:171 - import file not found: /import.sql > [junit] 11:12:32,696 INFO SchemaExport:180 - exporting generated schema to database > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection > [junit] 11:12:32,774 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:postgresql://localhost:5432/hibtest, Isolation Level: 2 > [junit] 11:12:32,789 DEBUG SchemaExport:283 - > [junit] alter table address > [junit] drop constraint FKBB979BF4986F6BA3 > [junit] 11:12:32,805 DEBUG SchemaExport:283 - > [junit] drop table address > [junit] 11:12:32,836 DEBUG SchemaExport:283 - > [junit] drop table person > [junit] 11:12:32,867 DEBUG SchemaExport:283 - > [junit] drop sequence hibernate_sequence > [junit] 11:12:32,883 INFO SchemaExport:200 - schema export complete > [junit] 11:12:32,883 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 5.233 sec > [junit] Test org.hibernate.test.onetoone.merge.OneToOneTest FAILED -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-07-28 21:49:58
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-710?page=all ] Max Rydahl Andersen closed HBX-710: ----------------------------------- Resolution: Fixed done for ant > "newbie" user error messages > ---------------------------- > > Key: HBX-710 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-710 > Project: Hibernate Tools > Type: Improvement > Components: eclipse, ant > Versions: 3.2beta6 > Reporter: Max Rydahl Andersen > Fix For: 3.2beta7 > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 21:45:46
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938?page=comments#action_23777 ] Emmanuel Bernard commented on HHH-1938: --------------------------------------- you need to falback to cglib rather than javassist as the bytecode enhancer > Proxy creation may fails when duplicate methods are used by the compiler > ------------------------------------------------------------------------ > > Key: HHH-1938 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > > > http://jira.jboss.com/jira/browse/JASSIST-24 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 21:22:28
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1944?page=comments#action_23766 ] Emmanuel Bernard commented on HHH-1944: --------------------------------------- test added to JPAQLComplianceTest > JPA compliance complains when IS EMPTY is used > ----------------------------------------------- > > Key: HHH-1944 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1944 > Project: Hibernate3 > Type: Bug > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Blocker > Fix For: 3.2.0.ga > > > is empty is actually translated by the AST into a subtree having an implicit select clause > On my version I've check that we're at level 1 before raising the exception. This might not be the perfect fix > if ( getSessionFactoryHelper().isStrictJPAQLComplianceEnabled() && fromClause.getLevel() == 1 ) { > throw new QuerySyntaxException( "JPA-QL compliance requires select clause" ); > } -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Dennis C. B. (JIRA) <no...@at...> - 2006-07-28 21:19:07
|
Bad link on http://www.hibernate.org/255.html --------------------------------------------- Key: HBX-712 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-712 Project: Hibernate Tools Type: Bug Reporter: Dennis C. Byrne Priority: Trivial Click on "documentation and screenshots " at http://www.hibernate.org/255.html . Browser goes to http://www.hibernate.org/5.html#A13 , should be http://www.hibernate.org/5.html#A10 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 21:08:23
|
@OrderBy still does not work when an association table is involved ------------------------------------------------------------------ Key: ANN-402 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-402 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Fix For: 3.2.0 Waiting for a user test case -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Francois J. (JIRA) <no...@at...> - 2006-07-28 21:06:24
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938?page=comments#action_23782 ] Francois Jean commented on HHH-1938: ------------------------------------ Thank You Emmanuel, just to precise your answer, You must change the value of hibernate.bytecode.provider=javassist for hibernate.bytecode.provider=cglib in: <WHERE IS YOUR JBOSS>\ server\default\deploy\ejb3.deployer\META-INF\ persistence.properties And that fixes the problem of duplicated method. :-) > Proxy creation may fails when duplicate methods are used by the compiler > ------------------------------------------------------------------------ > > Key: HHH-1938 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1938 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Steve Ebersole > Priority: Minor > > > http://jira.jboss.com/jira/browse/JASSIST-24 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: George G. (JIRA) <no...@at...> - 2006-07-28 20:56:51
|
Database Dialect for Progress 9.1D ---------------------------------- Key: HHH-1950 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1950 Project: Hibernate3 Type: Improvement Components: core Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2, 3.2.0.cr3 Environment: Progress 9.1D Reporter: George Gastaldi The current org.hibernate.dialect.ProgressDialect does not support Sequences, as Progress 9.1 does. Following is a working Dialect for Progress 9.1 D Databases. Please include it on the distribution (or update ProgressDialect). package org.hibernate.dialect; import java.sql.Types; import org.hibernate.dialect.Dialect; public class Progress9Dialect extends ProgressDialect { @Override public boolean supportsSequences() { return true; } @Override public String getSequenceNextValString(String sequenceName) { return "select " + getSelectSequenceNextValString( sequenceName ) + " from SYSPROGRESS.SYSCALCTABLE"; } @Override public String getSelectSequenceNextValString(String sequenceName) { return sequenceName + ".nextval"; } } Thanks. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: David Ng (JIRA) <no...@at...> - 2006-07-28 20:34:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1953?page=comments#action_23792 ] David Ng commented on HHH-1953: ------------------------------- I have spoken in detail with Robb Greathouse about this. Our enterprise software engine really needs this to make things work better. Would appreciate your help on this. Thanks, David. > Problem with hibernate proxy object and ClassMetaData > ----------------------------------------------------- > > Key: HHH-1953 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1953 > Project: Hibernate3 > Type: Bug > Versions: 3.1.2 > Environment: Tested environment: > - Hibernate 3.1.2 > - Hibernate 3.1.3 > - Postgresql 8.1 > - Jdk 1.5.0_06 > - Windows XP SP2 and Linux > Reporter: David Ng > Priority: Critical > > > Hi, > The problem can be summarised as follow: > - If an hibernate entity object has proxy attribute is defined inside class node of hbm.xml file, ClassMetaData.getPropertyValue() of any property will throw IllegalArgumentException; > - Regardless whether Reflection API is used or hibernate.cglib.use_reflection_optimizer is either set to true or false; > - If the proxy attribute is not defined, ClassMetaData::getPropertyValue() / ClassMetaData::getPropertyValues() returns the values successfully; and > - Accessing the TsRecStat property by invoking TsPassword::getTsRecStat() does not cause exception to be thrown in any of the case. > My question: > - If reflection API should not be used to access the property value, shouldn't hibernate ClassMetaData API be used to access the property value? > 2 postings have been made in regard to this on hibernate forum: > http://forum.hibernate.org/viewtopic.php?t=955828 > http://forum.hibernate.org/viewtopic.php?t=958029 > ======================================================================================================================== > THE TEST CODE: > public void testAccessingTsPasswordProxyWithClassMetaDataAPI() > { > Session currentSession = null; > Transaction transaction = null; > try > { > ClassMetadata passwordClassMetaData = m_sessionFactory.getClassMetadata( TsPassword.class ); > currentSession = m_sessionFactory.openSession(); > transaction = currentSession.beginTransaction(); > Query query = currentSession.createQuery( "FROM TsPassword AS p" ); > Iterator it = query.iterate(); > while( it.hasNext() ) > { > Object obj = it.next(); > ITsPassword itspassword = (ITsPassword) obj; > Date tsExpiryTimestamp = itspassword.getTsExpiryTimestamp(); > passwordClassMetaData.getPropertyValue( itspassword, "TsRecStat", EntityMode.POJO ); > Object expiryFromPasswordInterface = passwordClassMetaData.getPropertyValue( > itspassword, "TsExpiryTimestamp", EntityMode.POJO > ); > assertEquals( "Expiry timestamp from interface", tsExpiryTimestamp, expiryFromPasswordInterface ); > Object propertyValue = passwordClassMetaData.getPropertyValue( > obj, "TsExpiryTimestamp", EntityMode.POJO > ); > assertEquals( "Expiry timestamp from raw object", tsExpiryTimestamp, propertyValue ); > } > transaction.commit(); > } catch( HibernateException he ) > { > he.printStackTrace(); > fail( "Hibernate exception occurred." ); > if( transaction != null ) > { > transaction.rollback(); > } > } catch( Exception e ) > { > e.printStackTrace(); > fail( "Something else exception occured." ); > if( transaction != null ) > { > transaction.rollback(); > } > } > finally > { > if( currentSession != null ) > { > currentSession.close(); > } > } > } > Line 78 is > passwordClassMetaData.getPropertyValue( itspassword, "TsRecStat", EntityMode.POJO ); > The exception: > IllegalArgumentException in class: com.tokuii.baseapp.conf.redbull.v1.data.TsPassword, getter method of property: TsRecStat > org.hibernate.PropertyAccessException: IllegalArgumentException occurred calling getter of com.tokuii.baseapp.conf.redbull.v1.data.TsPassword.TsRecStat > at org.hibernate.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:171) > at org.hibernate.tuple.AbstractEntityTuplizer.getPropertyValue(AbstractEntityTuplizer.java:270) > at org.hibernate.tuple.AbstractEntityTuplizer.getPropertyValue(AbstractEntityTuplizer.java:280) > at org.hibernate.persister.entity.AbstractEntityPersister.getPropertyValue(AbstractEntityPersister.java:3252) > at com.tokuii.tests.component.hibernate.HibernateProxyTest.testAccessingTsPasswordProxyWithClassMetaDataAPI(Hibe > rnateProxyTest.java:78) > Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class > 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.property.BasicPropertyAccessor$BasicGetter.get(BasicPropertyAccessor.java:145) > ... 50 more > Hbm.xml: > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping> > <class name="com.tokuii.baseapp.conf.redbull.v1.data.TsPassword" table="TsPassword" proxy="com.tokuii.system.ITsPassword"> > <id name="Id" type="long" unsaved-value="0"> > <generator class="native"/> > </id> > <version column="TsVersion" name="TsVersion"/> > <many-to-one name="TsCreateUser" class="com.tokuii.baseapp.conf.redbull.v1.data.TsUser"/> > <many-to-one name="TsModifyUser" class="com.tokuii.baseapp.conf.redbull.v1.data.TsUser"/> > <property name="TsCreateTimestamp" type="timestamp" column="TsCreateTimestamp" not-null="false"/> > <property name="TsModifyTimestamp" type="timestamp" column="TsModifyTimestamp" not-null="false"/> > <property name="TsRecStat" type="java.lang.String" column="TsRecStat" not-null="false"/> > <property name="TsSysRowState" type="java.lang.String" column="TsSysRowState" not-null="false"/> > <property name="TsExpiryTimestamp" type="timestamp" column="TsExpiryTimestamp" not-null="false"/> > <property name="TsPassword" type="java.lang.String" column="TsPassword" not-null="false" length="50"/> > <property name="TsPwChangeRestriction" type="java.lang.Boolean" column="TsPwChangeRestriction" not-null="false"/> > <property name="TsPwValidity" type="java.lang.String" column="TsPwValidity" not-null="false"/> > </class> > </hibernate-mapping> > The TsPassword.java: > public class TsPassword implements com.tokuii.system.ITsPassword { > private java.lang.Long m_Id; > private int m_TsVersion = 1; > private com.tokuii.system.ITsUser m_TsCreateUser; > private com.tokuii.system.ITsUser m_TsModifyUser; > private java.util.Date m_TsCreateTimestamp; > private java.util.Date m_TsModifyTimestamp; > private java.lang.String m_TsRecStat = "A"; > private java.lang.String m_TsSysRowState = "P"; > private java.util.Date m_TsExpiryTimestamp; > private java.lang.String m_TsPassword; // Natural Identifier > private java.lang.Boolean m_TsPwChangeRestriction; > private java.lang.String m_TsPwValidity; > private com.tokuii.system.ITsUser m_TsUserId; // Natural Identifier > private java.util.Set m_TsPasswordIdTsUser; > /** Non-persistent field. */ > private java.util.Map m_NonDBFields; > public TsPassword() { > } > public java.lang.Long getId() { > return m_Id; > } > public void setId(java.lang.Long newId) { > m_Id = newId; > } > public int getTsVersion() { > return m_TsVersion; > } > public void setTsVersion(int newTsVersion) { > m_TsVersion = newTsVersion; > } > public Object getNonDBField(String fieldName) { > synchronized (this) { > if (m_NonDBFields == null) { > return null; > } > return m_NonDBFields.get(fieldName); > } > } > public void setNonDBField(String fieldName, Object value) { > synchronized (this) { > if (m_NonDBFields == null) { > m_NonDBFields = new java.util.HashMap(); > } > m_NonDBFields.put(fieldName, value); > } > } > public com.tokuii.system.ITsUser getTsCreateUser() { > return m_TsCreateUser; > } > public void setTsCreateUser(com.tokuii.system.ITsUser newTsCreateUser) { > m_TsCreateUser = newTsCreateUser; > } > public com.tokuii.system.ITsUser getTsModifyUser() { > return m_TsModifyUser; > } > public void setTsModifyUser(com.tokuii.system.ITsUser newTsModifyUser) { > m_TsModifyUser = newTsModifyUser; > } > public java.util.Date getTsCreateTimestamp() { > return m_TsCreateTimestamp; > } > public void setTsCreateTimestamp(java.util.Date newTsCreateTimestamp) { > m_TsCreateTimestamp = newTsCreateTimestamp; > } > public java.util.Date getTsModifyTimestamp() { > return m_TsModifyTimestamp; > } > public void setTsModifyTimestamp(java.util.Date newTsModifyTimestamp) { > m_TsModifyTimestamp = newTsModifyTimestamp; > } > public java.lang.String getTsRecStat() { > return m_TsRecStat; > } > public void setTsRecStat(java.lang.String newTsRecStat) { > m_TsRecStat = newTsRecStat; > } > public java.lang.String getTsSysRowState() { > return m_TsSysRowState; > } > public void setTsSysRowState(java.lang.String newTsSysRowState) { > m_TsSysRowState = newTsSysRowState; > } > public java.util.Date getTsExpiryTimestamp() { > return m_TsExpiryTimestamp; > } > public void setTsExpiryTimestamp(java.util.Date newTsExpiryTimestamp) { > m_TsExpiryTimestamp = newTsExpiryTimestamp; > } > public java.lang.String getTsPassword() { > return m_TsPassword; > } > public void setTsPassword(java.lang.String newTsPassword) { > m_TsPassword = newTsPassword; > } > public java.lang.Boolean getTsPwChangeRestriction() { > return m_TsPwChangeRestriction; > } > public void setTsPwChangeRestriction(java.lang.Boolean newTsPwChangeRestriction) { > m_TsPwChangeRestriction = newTsPwChangeRestriction; > } > public java.lang.String getTsPwValidity() { > return m_TsPwValidity; > } > public void setTsPwValidity(java.lang.String newTsPwValidity) { > m_TsPwValidity = newTsPwValidity; > } > public com.tokuii.system.ITsUser getTsUserId() { > return m_TsUserId; > } > public void setTsUserId(com.tokuii.system.ITsUser newTsUserId) { > m_TsUserId = newTsUserId; > } > public java.util.Set getTsPasswordIdTsUser() { > synchronized (this) { > if (m_TsPasswordIdTsUser == null) { > m_TsPasswordIdTsUser = new java.util.HashSet(); > } > } > return m_TsPasswordIdTsUser; > } > public void setTsPasswordIdTsUser(java.util.Set newTsPasswordIdTsUser) { > m_TsPasswordIdTsUser = newTsPasswordIdTsUser; > } > public boolean equals(Object o) { > if (this == o) { > return true; > } > if (o == null || getClass() != o.getClass()) { > return false; > } > final TsPassword that = (TsPassword) o; > if (m_TsPassword != null ? !m_TsPassword.equals(that.m_TsPassword) : that.m_TsPassword != null) { > return false; > } > Object thisId = m_TsUserId != null ? m_TsUserId.getId() : null; > Object thatId = that.m_TsUserId != null ? that.m_TsUserId.getId() : null; > if (thisId != null ? !thisId.equals(thatId) : thatId != null) { > return false; > } > return true; > } > public int hashCode() { > int result = 0; > result = 29 * result + (m_TsPassword != null ? m_TsPassword.hashCode() : 0); > result = 29 * result + (m_TsUserId != null && m_TsUserId.getId() != null ? m_TsUserId.getId().hashCode() : 0); > return result; > } > } > The interface: > public interface ITsPassword extends java.io.Serializable > { > java.lang.Long getId(); > void setId( java.lang.Long aLong ); > int getTsVersion(); > void setTsVersion( int index ); > java.lang.Object getNonDBField( java.lang.String elementLinkName ); > void setNonDBField( java.lang.String elementLinkName, java.lang.Object object ); > com.tokuii.system.ITsUser getTsCreateUser(); > void setTsCreateUser( com.tokuii.system.ITsUser iTsUser ); > java.util.Date getTsCreateTimestamp(); > void setTsCreateTimestamp( java.util.Date date ); > com.tokuii.system.ITsUser getTsModifyUser(); > void setTsModifyUser( com.tokuii.system.ITsUser iTsUser ); > java.util.Date getTsModifyTimestamp(); > void setTsModifyTimestamp( java.util.Date date ); > java.lang.String getTsRecStat(); > void setTsRecStat( java.lang.String elementLinkName ); > java.lang.String getTsSysRowState(); > void setTsSysRowState( java.lang.String elementLinkName ); > java.util.Date getTsExpiryTimestamp(); > void setTsExpiryTimestamp( java.util.Date date ); > java.lang.String getTsPassword(); > void setTsPassword( java.lang.String elementLinkName ); > java.lang.Boolean getTsPwChangeRestriction(); > void setTsPwChangeRestriction( java.lang.Boolean aBoolean ); > java.lang.String getTsPwValidity(); > void setTsPwValidity( java.lang.String elementLinkName ); > com.tokuii.system.ITsUser getTsUserId(); > void setTsUserId( com.tokuii.system.ITsUser iTsUser ); > java.util.Set getTsPasswordIdTsUser(); > void setTsPasswordIdTsUser( java.util.Set set ); > } -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Levi P. (JIRA) <no...@at...> - 2006-07-28 20:19:57
|
optimize lazy="no-proxy" on <many-to-one> ----------------------------------------- Key: HHH-1957 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1957 Project: Hibernate3 Type: Improvement Components: core Versions: 3.2.2, 3.2.1, 3.2.0.ga Environment: Hibernate 3.2 cr3 Reporter: Levi Purvis When using lazy="no-proxy" on <many-to-one> relationships, the lazy loading always results in (n * 2) select statements. For each relationship traversed, a select statement is run to get the foreign key, then another select statement is run to fetch the actual entity. The extra select statements are run even if the entity is already loaded! For example, when multiple entities refer to the same lazy entity. Further, the "join fetch" feature doesn't even seem to prevent the (n * 2) selects! This makes the "no-proxy" lazy loading unusuable in many cases. It would be great if "join fetch", batch loading, and subselect loading all worked with lazy="no-proxy". Perhaps if the "no-proxy" option were moved to the <class> level, then the "lazy property" code wouldn't kick in, which seems to be what is causing all of the selects. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 20:18:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-207?page=all ] Emmanuel Bernard resolved EJB-207: ---------------------------------- Resolution: Fixed > em.lock(..., WRITE) raise NPE on some DBs > ----------------------------------------- > > Key: EJB-207 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-207 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 20:18:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1958?page=all ] Emmanuel Bernard resolved HHH-1958: ----------------------------------- Resolution: Fixed > session.lock(LockMode.FORCE) can lead to NPE > -------------------------------------------- > > Key: HHH-1958 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1958 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.cr3 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0.ga > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 20:09:49
|
JPA compliance complains when IS EMPTY is used ----------------------------------------------- Key: HHH-1944 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1944 Project: Hibernate3 Type: Bug Versions: 3.2.0.cr3 Reporter: Emmanuel Bernard Assigned to: Steve Ebersole Priority: Blocker Fix For: 3.2.0.ga is empty is actually translated by the AST into a subtree having an implicit select clause On my version I've check that we're at level 1 before raising the exception. This might not be the perfect fix if ( getSessionFactoryHelper().isStrictJPAQLComplianceEnabled() && fromClause.getLevel() == 1 ) { throw new QuerySyntaxException( "JPA-QL compliance requires select clause" ); } -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Wilson N. de A. (JIRA) <no...@at...> - 2006-07-28 20:02:54
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004?page=comments#action_23783 ] Wilson N. de Almeida commented on HHH-1004: ------------------------------------------- I changed this line if (original==target) return target; to if(orginal.equals(target)) return target; It's working fine! > merge() with one-to-one throws ClassCastException > ------------------------------------------------- > > Key: HHH-1004 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1 beta 2 > Reporter: Nathan Moon > Attachments: onetoonemerge.zip > > > Hibernate tries to bind a persistent object to a long variable in a SQL statement during a call to merge() on an object with a one-to-one relation. > I originally posted about this problem here: http://forum.hibernate.org/viewtopic.php?t=948272&highlight= > I have created and attached a junit test to reproduce the problem. When running against 3.0 or 3.1beta2 the ClassCastException is thrown all the way out, as shown in the forum post. The latest code from cvs catches the exception and logs it. org.hibernate.type.NullableType.java rev 1.10 is where the exception is caught. It seems like it should be logged and then re-thrown, but it's not. The debug log from the start of the merge() call to where it logs that it failed to bind the value is: > [junit] 11:12:32,461 DEBUG SessionImpl:271 - opened session at timestamp: 11283595524 > [junit] 11:12:32,461 DEBUG JDBCTransaction:54 - begin > [junit] 11:12:32,461 DEBUG ConnectionManager:309 - opening JDBC connection > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0 > [junit] 11:12:32,461 DEBUG JDBCTransaction:59 - current autocommit status: false > [junit] 11:12:32,461 DEBUG JDBCContext:207 - before transaction completion > [junit] 11:12:32,477 DEBUG IdentifierValue:207 - id unsaved-value: null > [junit] 11:12:32,477 DEBUG AbstractSaveEventListener:470 - detached instance of: org.hibernate.test.onetoone.merge.Person > [junit] 11:12:32,477 DEBUG DefaultMergeEventListener:185 - merging detached instance > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:304 - attempting to resolve: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:340 - object not resolved in any cache: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG ConnectionManager:389 - running Session.finalize() > [junit] 11:12:32,477 DEBUG AbstractEntityPersister:2722 - Fetching entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,493 DEBUG SQL:344 - > [junit] select > [junit] person0_.person_id as person1_0_0_ > [junit] from > [junit] person person0_ > [junit] where > [junit] person0_.person_id=? > [junit] 11:12:32,493 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,493 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,508 DEBUG Loader:682 - processing result set > [junit] 11:12:32,508 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,508 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,524 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,524 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,524 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,524 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#1] > [junit] 11:12:32,539 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,539 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,555 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,555 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,555 DEBUG Loader:682 - processing result set > [junit] 11:12:32,571 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,571 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,571 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,586 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,586 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:222 - entity found in session cache > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,602 DEBUG StatefulPersistenceContext:784 - initializing non-lazy collections > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] > [junit] 11:12:32,602 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,602 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,618 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,618 INFO LongType:89 - could not bind value 'org.hibernate.test.onetoone.merge.Person@153f67e' to parameter: 1 > Running the test on HSQLDB with the latest from cvs hides the problem (logs it as INFO, but doesn't complain that nothing is bound to the variable), but if you run on PostgreSQL, for example, it complains (SQLException) that nothing is bound to the variable when the statement is executed ( org.postgresql.util.PSQLException: No value specified for parameter 1.): > [junit] 11:12:32,633 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,633 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,649 DEBUG JDBCExceptionReporter:63 - could not load an entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] [select address0_.address_id as address1_1_0_, address0_.person_id as person2_1_0_ from address address0_ where address0_.person_id=?] > [junit] org.postgresql.util.PSQLException: No value specified for parameter 1. > [junit] at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:102) > [junit] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:166) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) > [junit] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137) > [junit] at org.hibernate.loader.Loader.getResultSet(Loader.java:1676) > [junit] at org.hibernate.loader.Loader.doQuery(Loader.java:662) > [junit] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223) > [junit] at org.hibernate.loader.Loader.loadEntity(Loader.java:1782) > [junit] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) > [junit] at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:85) > [junit] at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1522) > [junit] at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:365) > [junit] at org.hibernate.type.EntityType.resolve(EntityType.java:306) > [junit] at org.hibernate.type.EntityType.replace(EntityType.java:207) > [junit] at org.hibernate.type.TypeFactory.replace(TypeFactory.java:431) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:279) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:245) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:102) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53) > [junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:609) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:595) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:599) > [junit] at org.hibernate.test.onetoone.merge.OneToOneTest.testOne(OneToOneTest.java:52) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [junit] at java.lang.reflect.Method.invoke(Method.java:585) > [junit] at junit.framework.TestCase.runTest(TestCase.java:154) > [junit] at org.hibernate.test.TestCase.runTest(TestCase.java:140) > [junit] at junit.framework.TestCase.runBare(TestCase.java:127) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) > [junit] at junit.framework.TestResult.run(TestResult.java:109) > [junit] at junit.framework.TestCase.run(TestCase.java:118) > [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) > [junit] at junit.framework.TestSuite.run(TestSuite.java:203) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) > [junit] 11:12:32,664 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 22023 > [junit] 11:12:32,664 ERROR JDBCExceptionReporter:72 - No value specified for parameter 1. > [junit] 11:12:32,680 DEBUG SessionImpl:290 - closing session > [junit] 11:12:32,680 DEBUG ConnectionManager:330 - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] > [junit] 11:12:32,680 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] 11:12:32,680 INFO SessionFactoryImpl:865 - closing > [junit] 11:12:32,680 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:postgresql://localhost:5432/hibtest > [junit] 11:12:32,680 INFO SchemaExport:153 - Running hbm2ddl schema export > [junit] 11:12:32,696 DEBUG SchemaExport:171 - import file not found: /import.sql > [junit] 11:12:32,696 INFO SchemaExport:180 - exporting generated schema to database > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection > [junit] 11:12:32,774 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:postgresql://localhost:5432/hibtest, Isolation Level: 2 > [junit] 11:12:32,789 DEBUG SchemaExport:283 - > [junit] alter table address > [junit] drop constraint FKBB979BF4986F6BA3 > [junit] 11:12:32,805 DEBUG SchemaExport:283 - > [junit] drop table address > [junit] 11:12:32,836 DEBUG SchemaExport:283 - > [junit] drop table person > [junit] 11:12:32,867 DEBUG SchemaExport:283 - > [junit] drop sequence hibernate_sequence > [junit] 11:12:32,883 INFO SchemaExport:200 - schema export complete > [junit] 11:12:32,883 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 5.233 sec > [junit] Test org.hibernate.test.onetoone.merge.OneToOneTest FAILED -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Marco R. (JIRA) <no...@at...> - 2006-07-28 20:02:41
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004?page=all ] Marco Rothe updated HHH-1004: ----------------------------- Attachment: modified-onetoonemerge.zip Modified original example with cascade="merge" on the one-to-one side. > merge() with one-to-one throws ClassCastException > ------------------------------------------------- > > Key: HHH-1004 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1004 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1 beta 2 > Reporter: Nathan Moon > Attachments: modified-onetoonemerge.zip, onetoonemerge.zip > > > Hibernate tries to bind a persistent object to a long variable in a SQL statement during a call to merge() on an object with a one-to-one relation. > I originally posted about this problem here: http://forum.hibernate.org/viewtopic.php?t=948272&highlight= > I have created and attached a junit test to reproduce the problem. When running against 3.0 or 3.1beta2 the ClassCastException is thrown all the way out, as shown in the forum post. The latest code from cvs catches the exception and logs it. org.hibernate.type.NullableType.java rev 1.10 is where the exception is caught. It seems like it should be logged and then re-thrown, but it's not. The debug log from the start of the merge() call to where it logs that it failed to bind the value is: > [junit] 11:12:32,461 DEBUG SessionImpl:271 - opened session at timestamp: 11283595524 > [junit] 11:12:32,461 DEBUG JDBCTransaction:54 - begin > [junit] 11:12:32,461 DEBUG ConnectionManager:309 - opening JDBC connection > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,461 DEBUG DriverManagerConnectionProvider:99 - using pooled JDBC connection, pool size: 0 > [junit] 11:12:32,461 DEBUG JDBCTransaction:59 - current autocommit status: false > [junit] 11:12:32,461 DEBUG JDBCContext:207 - before transaction completion > [junit] 11:12:32,477 DEBUG IdentifierValue:207 - id unsaved-value: null > [junit] 11:12:32,477 DEBUG AbstractSaveEventListener:470 - detached instance of: org.hibernate.test.onetoone.merge.Person > [junit] 11:12:32,477 DEBUG DefaultMergeEventListener:185 - merging detached instance > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:304 - attempting to resolve: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG DefaultLoadEventListener:340 - object not resolved in any cache: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,477 DEBUG ConnectionManager:389 - running Session.finalize() > [junit] 11:12:32,477 DEBUG AbstractEntityPersister:2722 - Fetching entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,493 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,493 DEBUG SQL:344 - > [junit] select > [junit] person0_.person_id as person1_0_0_ > [junit] from > [junit] person person0_ > [junit] where > [junit] person0_.person_id=? > [junit] 11:12:32,493 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,493 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,508 DEBUG Loader:682 - processing result set > [junit] 11:12:32,508 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,508 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,508 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,524 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,524 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,524 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,524 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,524 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#1] > [junit] 11:12:32,539 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,539 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,555 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,555 DEBUG AbstractBatcher:325 - about to open ResultSet (open ResultSets: 0, globally: 0) > [junit] 11:12:32,555 DEBUG Loader:682 - processing result set > [junit] 11:12:32,571 DEBUG Loader:687 - result set row: 0 > [junit] 11:12:32,571 DEBUG Loader:1164 - result row: EntityKey[org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:1347 - Initializing object from ResultSet: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG AbstractEntityPersister:1859 - Hydrating entity: [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,571 DEBUG Loader:709 - done processing result set (1 rows) > [junit] 11:12:32,571 DEBUG AbstractBatcher:332 - about to close ResultSet (open ResultSets: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,571 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,586 DEBUG Loader:839 - total objects hydrated: 1 > [junit] 11:12:32,586 DEBUG TwoPhaseLoad:104 - resolving associations for [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:153 - loading entity: [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,586 DEBUG DefaultLoadEventListener:222 - entity found in session cache > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Address#2] > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG TwoPhaseLoad:203 - done materializing entity [org.hibernate.test.onetoone.merge.Person#1] > [junit] 11:12:32,602 DEBUG StatefulPersistenceContext:784 - initializing non-lazy collections > [junit] 11:12:32,602 DEBUG Loader:1805 - done entity load > [junit] 11:12:32,602 DEBUG Loader:1774 - loading entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] > [junit] 11:12:32,602 DEBUG AbstractBatcher:309 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0) > [junit] 11:12:32,602 DEBUG SQL:344 - > [junit] select > [junit] address0_.address_id as address1_1_0_, > [junit] address0_.person_id as person2_1_0_ > [junit] from > [junit] address address0_ > [junit] where > [junit] address0_.person_id=? > [junit] 11:12:32,618 DEBUG AbstractBatcher:413 - preparing statement > [junit] 11:12:32,618 INFO LongType:89 - could not bind value 'org.hibernate.test.onetoone.merge.Person@153f67e' to parameter: 1 > Running the test on HSQLDB with the latest from cvs hides the problem (logs it as INFO, but doesn't complain that nothing is bound to the variable), but if you run on PostgreSQL, for example, it complains (SQLException) that nothing is bound to the variable when the statement is executed ( org.postgresql.util.PSQLException: No value specified for parameter 1.): > [junit] 11:12:32,633 DEBUG AbstractBatcher:317 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1) > [junit] 11:12:32,633 DEBUG AbstractBatcher:459 - closing statement > [junit] 11:12:32,649 DEBUG JDBCExceptionReporter:63 - could not load an entity: [org.hibernate.test.onetoone.merge.Address#org.hibernate.test.onetoone.merge.Person@153f67e] [select address0_.address_id as address1_1_0_, address0_.person_id as person2_1_0_ from address address0_ where address0_.person_id=?] > [junit] org.postgresql.util.PSQLException: No value specified for parameter 1. > [junit] at org.postgresql.core.v3.SimpleParameterList.checkAllParametersSet(SimpleParameterList.java:102) > [junit] at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:166) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:389) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:330) > [junit] at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:240) > [junit] at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:137) > [junit] at org.hibernate.loader.Loader.getResultSet(Loader.java:1676) > [junit] at org.hibernate.loader.Loader.doQuery(Loader.java:662) > [junit] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223) > [junit] at org.hibernate.loader.Loader.loadEntity(Loader.java:1782) > [junit] at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93) > [junit] at org.hibernate.loader.entity.EntityLoader.loadByUniqueKey(EntityLoader.java:85) > [junit] at org.hibernate.persister.entity.AbstractEntityPersister.loadByUniqueKey(AbstractEntityPersister.java:1522) > [junit] at org.hibernate.type.EntityType.loadByUniqueKey(EntityType.java:365) > [junit] at org.hibernate.type.EntityType.resolve(EntityType.java:306) > [junit] at org.hibernate.type.EntityType.replace(EntityType.java:207) > [junit] at org.hibernate.type.TypeFactory.replace(TypeFactory.java:431) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.copyValues(DefaultMergeEventListener.java:279) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:245) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:102) > [junit] at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:53) > [junit] at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:609) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:595) > [junit] at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:599) > [junit] at org.hibernate.test.onetoone.merge.OneToOneTest.testOne(OneToOneTest.java:52) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > [junit] at java.lang.reflect.Method.invoke(Method.java:585) > [junit] at junit.framework.TestCase.runTest(TestCase.java:154) > [junit] at org.hibernate.test.TestCase.runTest(TestCase.java:140) > [junit] at junit.framework.TestCase.runBare(TestCase.java:127) > [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) > [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) > [junit] at junit.framework.TestResult.run(TestResult.java:109) > [junit] at junit.framework.TestCase.run(TestCase.java:118) > [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) > [junit] at junit.framework.TestSuite.run(TestSuite.java:203) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672) > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567) > [junit] 11:12:32,664 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState: 22023 > [junit] 11:12:32,664 ERROR JDBCExceptionReporter:72 - No value specified for parameter 1. > [junit] 11:12:32,680 DEBUG SessionImpl:290 - closing session > [junit] 11:12:32,680 DEBUG ConnectionManager:330 - closing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)] > [junit] 11:12:32,680 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] 11:12:32,680 INFO SessionFactoryImpl:865 - closing > [junit] 11:12:32,680 INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:postgresql://localhost:5432/hibtest > [junit] 11:12:32,680 INFO SchemaExport:153 - Running hbm2ddl schema export > [junit] 11:12:32,696 DEBUG SchemaExport:171 - import file not found: /import.sql > [junit] 11:12:32,696 INFO SchemaExport:180 - exporting generated schema to database > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:93 - total checked-out connections: 0 > [junit] 11:12:32,696 DEBUG DriverManagerConnectionProvider:109 - opening new JDBC connection > [junit] 11:12:32,774 DEBUG DriverManagerConnectionProvider:115 - created connection to: jdbc:postgresql://localhost:5432/hibtest, Isolation Level: 2 > [junit] 11:12:32,789 DEBUG SchemaExport:283 - > [junit] alter table address > [junit] drop constraint FKBB979BF4986F6BA3 > [junit] 11:12:32,805 DEBUG SchemaExport:283 - > [junit] drop table address > [junit] 11:12:32,836 DEBUG SchemaExport:283 - > [junit] drop table person > [junit] 11:12:32,867 DEBUG SchemaExport:283 - > [junit] drop sequence hibernate_sequence > [junit] 11:12:32,883 INFO SchemaExport:200 - schema export complete > [junit] 11:12:32,883 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1 > [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 5.233 sec > [junit] Test org.hibernate.test.onetoone.merge.OneToOneTest FAILED -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 19:54:21
|
em.lock(..., WRITE) raise NPE on some DBs ----------------------------------------- Key: EJB-207 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-207 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-07-28 19:46:31
|
PersistenceContext not checked to see whether the associated entity is transient or not --------------------------------------------------------------------------------------- Key: HHH-1943 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1943 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.cr3 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0.ga This affects HEM -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |