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: <leg...@at...> - 2003-09-25 21:26:55
|
Message: The following issue has been re-assigned. Assignee: Daniel Bradby (mailto:db...@ci...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-330 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-330 Summary: Loading mapping files from ManagedConnectionFactoryImpl in WebLogic Type: Bug Status: Assigned Priority: Minor Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Daniel Bradby Reporter: Ethan Wolf Created: Fri, 12 Sep 2003 1:31 PM Updated: Thu, 25 Sep 2003 4:25 PM Environment: Windows 2000, WebLogic 8.1 (on windows 2000) Description: ManagedConnectionFactoryImpl.initialize() passes the contextClassLoader from the thread to load the mapping files in Configuration.addResource. This works fine (in both JBoss and WebLogic) IF the mapping files are on the class path of the application server. It also works on JBoss when the mapping files are packaged with the connector deployment (-ds.xml). (The mapping files are found through JBoss' UnifiedClassLoader architecture.) However, in WebLogic, the configuration files are not found when they are packaged with the individual deployment. This seems to be because the thread that deploys the component corresponds to the root thread on the application server, and therefore uses the Launcher$AppClassLoader. The actual class loader used to load the deployed connector (GenericClassLoader) is managed by the deploymer components of weblogic. Changin the class loader passed to Configuration.addResource by the ManagedConnectionFactoryImpl to getClass().getClassLoader() seems to result in the desired ability to load the mapping files from the deployment directory. Since the ManagedConnectionFactoryImpl is only used when deploying to an application server, I would assume that this has no adverse affects and it seems correct, but these class loader issues are quite mind boggling. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 21:24:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 4:24 PM I fixed this in CVS --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-337 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-337 Summary: Connections from DataSource + WebSphere Type: Task Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Versions: 2.0 final 2.0.1 2.0.2 2.0.3 Assignee: Reporter: Ralf Taugerbeck Created: Tue, 16 Sep 2003 7:20 AM Updated: Thu, 25 Sep 2003 4:24 PM Environment: Hibernate configured with DataSources on WebSphere Description: Using Hibernate 2.0.x with Datasource connections on WebSphere (4.0, 5.0) the following error message occurs when closing a Hibernate Session: net.sf.hibernate.util.JDBCExceptionReporter TRAS0014I: The following exception was logged com.ibm.websphere.ce.cm.StaleConnectionException: Connection is closed WebSphere seems to close the connection after a UserTransaction#commit but Hibernate afterwards in SessionFactoryImpl#closeConnection tries to call #getWarnings on the closed connection which causes the above exception. ---- The behavior can be fixed by either checking for closed connections in SessionFactoryImpl#closeConnection or by configuring the data source to "Disable auto connection cleanup" (checkbox in the data source setup in Websphere) -> FAQ --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 21:24:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 4:24 PM i've fixed this in CVS --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-360 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-360 Summary: WebLogic DataSource doesn't permit conn.getWarnings after commit Type: Patch Status: Closed Priority: Major Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Versions: 2.0.2 Assignee: Reporter: John Kristian Created: Wed, 24 Sep 2003 1:49 PM Updated: Thu, 25 Sep 2003 4:24 PM Environment: WebLogic 7, Windows 2000, Microsoft SQL Server Description: SessionFactoryImpl.closeConnection fails to close the JDBC conection, because an exception propagates from conn.getWarnings, because the connection is already closed (as a side-effect of commiting the JTA transaction, I suppose). This patch solves the problem: ==== src/net/sf/hibernate/impl/SessionFactoryImpl.java ==== @@ -403,6 +403,11 @@ try { JDBCExceptionReporter.logWarnings( conn.getWarnings() ); conn.clearWarnings(); + } + catch (SQLException sqle) { + log.warn("Cannot log warnings: " + sqle.getMessage()); + } + try { connections.closeConnection(conn); } catch (SQLException sqle) { --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 21:20:56
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 4:19 PM Latest CVS handles this much more elegantly. As for multiple-transactions-per-connection, you will need to use the Hibernate transaction API for this case. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-349 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-349 Summary: NullPointerException in SessionImpl.connect under jboss Type: Bug Status: Closed Priority: Minor Resolution: DUPLICATE Project: Hibernate2 Fix Fors: 2.1 beta 4 Versions: 2.1 beta 3 Assignee: Reporter: toby cabot Created: Fri, 19 Sep 2003 12:58 PM Updated: Thu, 25 Sep 2003 4:19 PM Environment: win2k, jboss 3.2.1, sun vm 1.4.1-b21 Description: Thanks for Hibernate, it's very nice. I'm using the version labelled "2.1beta3b" from sourceforge. I get a NullPointerException under jboss when I try to use a session where Hibernate got the connection from a DataSource. Hibernate 2.0 works fine, and 2.1beta3b works fine in a standalone JVM. My code is: Session s = hFactory.openSession(); Query q = s.createQuery("from com.nlg.dps.teo.booking.db.ItineraryLineItem as ili where ili.booking=:id and ili.origin!=ili.destination"); q.setProperties(key); List lineItems = q.list(); <-- crash site Stack trace: 11:14:13,280 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets 11:14:13,280 ERROR [STDERR] com.nlg.dps.tpl.mgt.PostBookingManagerException: Exception while trying to retrieve booking 6 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:665) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerEJB.getAirDetails(PostBookingManagerEJB.java:119) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:14:13,280 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 11:14:13,280 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 11:14:13,280 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:324) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:629) 11:14:13,280 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:186) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:273) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.Container.invoke(Container.java:674) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:353) 11:14:13,280 ERROR [STDERR] at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83) 11:14:13,280 ERROR [STDERR] at $Proxy466.getAirDetails(Unknown Source) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.businessdelegates.BookingBusinessDelegate.getAirDetails(BookingBusinessDelegate.java:100) 11:14:13,280 ERROR [STDERR] at com.nlg.dps.operationsui.actions.RetrieveBookingFromMultipleAction.execute(RetrieveBookingFromMultipleAction.java:59) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) 11:14:13,280 ERROR [STDERR] at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) 11:14:13,280 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) 11:14:13,280 ERROR [STDERR] at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:863) 11:14:13,280 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:460) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) 11:14:13,280 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) 11:14:13,295 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) 11:14:13,295 ERROR [STDERR] at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) 11:14:13,295 ERROR [STDERR] Caused by: net.sf.hibernate.TransactionException: could not register synchronization with JTA TransactionManager 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3175) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3155) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:60) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:559) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:167) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.loader.Loader.find(Loader.java:736) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:959) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1366) 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:41) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:705) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.lookupAirDetails(PostBookingManagerHibernate.java:682) 11:14:13,295 ERROR [STDERR] at com.nlg.dps.tpl.mgt.ejb.PostBookingManagerHibernate.getAirDetails(PostBookingManagerHibernate.java:661) 11:14:13,295 ERROR [STDERR] ... 41 more 11:14:13,295 ERROR [STDERR] Caused by: java.lang.NullPointerException 11:14:13,295 ERROR [STDERR] at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3171) 11:14:13,295 ERROR [STDERR] ... 53 more --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 21:09:55
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 25 Sep 2003 4:08 PM Body: Also see HB-339 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-296 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-296 Summary: ConcurrentModificationException when initializing collection Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 Assignee: Gavin King Reporter: Mathias Bogaert Created: Thu, 28 Aug 2003 6:49 AM Updated: Thu, 28 Aug 2003 3:41 PM Environment: 2.1 beta 2 from CVS Description: When initializing a collection, I get the following stacktrace (not seen with Hibernate 2.0.3): 8047 ERROR [tcpConnection-81-0] (webwork.dispatcher.ServletDispatcher:188) - Could not execute action java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.remove(HashMap.java:801) at net.sf.hibernate.impl.SessionImpl.endLoadingCollections(SessionImpl.java:2973) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:224) at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:720) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:703) at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:74) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:3101) at net.sf.hibernate.collection.PersistentCollection.forceLoad(PersistentCollection.java:236) at net.sf.hibernate.Hibernate.initialize(Hibernate.java:255) at com.intrasoft.persistence.hibernate.HibernatePersistenceService.initialize(HibernatePersistenceService.java:143) at com.intrasoft.sysaudit.mission.action.wizard.AbstractMissionStepAction.initializeMission(AbstractMissionStepAction.java:112) at com.intrasoft.sysaudit.mission.action.wizard.AbstractMissionStepAction.saveMissionInSession(AbstractMissionStepAction.java:74) at com.intrasoft.sysaudit.mission.action.wizard.MissionStep1.doExecute(MissionStep1.java:173) at com.opensymphony.xwork.ActionSupport.execute(ActionSupport.java:31) Here is my code: if (mission.getUnit() != null) { persistenceService.initialize(mission.getUnit().getUsers()); } and in HibernatePersistenceService: public void initialize(Object objectToInitialize) { try { if (!Hibernate.isInitialized(objectToInitialize)) { Hibernate.initialize(objectToInitialize); } } catch (HibernateException e) { throw new InfrastructureException(e); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 21:07:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 4:07 PM This is a dupe of HB-296 --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-339 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-339 Summary: java.util.ConcurrentModificationException Type: Bug Status: Closed Priority: Major Resolution: DUPLICATE Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: jason zhang Created: Wed, 17 Sep 2003 1:59 AM Updated: Thu, 25 Sep 2003 4:07 PM Environment: Window 2000 professional, JVM 1.4, oracle 9 Description: There is no any problem if the same test case is run with hibernate 2.0. But it does not work with hibernate 2.1 beta 3b. 14:46:56,891 ERROR PersistentCollection:157 - Failed to lazily initialize a collection java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.remove(HashMap.java:781) at net.sf.hibernate.impl.SessionImpl.endLoadingCollections(SessionImpl.java:3015) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:224) at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:720) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:703) at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:74) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:3143) at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:154) at net.sf.hibernate.collection.PersistentCollection.read(PersistentCollection.java:63) at net.sf.hibernate.collection.Set.iterator(Set.java:132) .... caused by: java.util.ConcurrentModificationException at java.util.HashMap$HashIterator.remove(HashMap.java:781) at net.sf.hibernate.impl.SessionImpl.endLoadingCollections(SessionImpl.java:3015) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:224) at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:720) at net.sf.hibernate.loader.Loader.loadCollection(Loader.java:703) at net.sf.hibernate.loader.OneToManyLoader.initialize(OneToManyLoader.java:74) at net.sf.hibernate.impl.SessionImpl.initialize(SessionImpl.java:3143) at net.sf.hibernate.collection.PersistentCollection.initialize(PersistentCollection.java:154) ... 30 more --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 20:40:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 3:39 PM Well, I suggest you talk to IBM about this! --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-362 Summary: Save with native ID on DB2 fails with duplicate row exception if data inserted behind hibernate Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Brian Bonner Created: Thu, 25 Sep 2003 11:53 AM Updated: Thu, 25 Sep 2003 3:39 PM Environment: Win 2K SP4, JDK 1.4.2, Hibernate 2.0.3, DB2 7.2 UDB Description: If we restart the database manager (clean state), then execute the DDL generated by hibernate, and run the test case: TestHibernate records are inserted without problem. We can rerun the test case numerous times. If we restart the database manager, then insert data from a command line (behind hibernate): insert into parents values(1,'test','test','test','test',current timestamp); insert into children values (1,'bb','1); insert into children values (2,'cc','1); and run the test case, it fails. hibernate.properties, Mapping, generated DDL, Domain Source, Test Source follows. hibernate.connection.driver_class = COM.ibm.db2.jdbc.app.DB2Driver hibernate.dialect = net.sf.hibernate.dialect.DB2Dialect hibernate.connection.url = jdbc:db2:sample hibernate.connection.username = xyz hibernate.connection.password = pdq <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Parent" table="parents"> <id name="keyId" type="int" unsaved-value="0"> <column name="key_id" not-null="true"/> <generator class="native"/> </id> <property name="userID" column="LogonID" type="string"/> <property name="userName" column="Name" type="string"/> <property name="password" type="string"/> <property name="emailAddress" type="string"/> <property name="lastLogon" type="timestamp"/> <set name="children" table="children" cascade="all" lazy="true" inverse="true"> <key column="key_id"/> <one-to-many class="com.paraware.domain.Child"/> </set> </class> </hibernate-mapping> <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Child" table="children"> <id name="mouseId" type="int" unsaved-value="0"> <column name="mouse_id" not-null="true"/> <generator class="native"/> </id> <property name="name" column="name" type="string"/> <many-to-one name="parent" class="com.paraware.domain.Parent" column="key_id" /> </class> </hibernate-mapping> drop table parents; drop table children; create table parents ( key_id INTEGER not null generated by default as identity, LogonID VARCHAR(255), Name VARCHAR(255), password VARCHAR(255), emailAddress VARCHAR(255), lastLogon TIMESTAMP, primary key (key_id) ); create table children ( mouse_id INTEGER not null generated by default as identity, name VARCHAR(255), key_id INTEGER, primary key (mouse_id) ); alter table children add constraint FK62EA5DFFBC5E42FB foreign key (key_id) references parents; package com.paraware.domain; import java.util.Date; import java.util.Set; // ... public class Parent { private int keyId; private String userID; private String userName; private String password; private String emailAddress; private Date lastLogon; private Set children; public int getKeyId() { return keyId; } public void setKeyId(int keyId) { this.keyId = keyId; } public String getUserID() { return userID; } public void setUserID(String newUserID) { userID = newUserID; } public String getUserName() { return userName; } public void setUserName(String newUserName) { userName = newUserName; } public String getPassword() { return password; } public void setPassword(String newPassword) { password = newPassword; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String newEmailAddress) { emailAddress = newEmailAddress; } public Date getLastLogon() { return lastLogon; } public void setLastLogon(Date newLastLogon) { lastLogon = newLastLogon; } public Set getChildren() { return children; } public void setChildren(Set mouses) { this.children = mouses; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Parent Parent other = (Parent) obj; return userID == other.userID || userID != null && userID.equals(other.userID) && userName == other.userName || userName != null && userName.equals(other.userName); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = userID == null ? result : 37 * result + userID.hashCode(); result = userName == null ? result : 37 * result + userName.hashCode(); return result; } } package com.paraware.domain; public class Child { private int mouseId; private String name; private Parent parent; public int getMouseId() { return mouseId; } public void setMouseId(int id) { this.mouseId = id; } public String getName() { return name; } public void setName(String newName) { name = newName; } public Parent getParent() { return parent; } public void setParent(Parent newUser) { parent = newUser; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Child Child other = (Child) obj; return name == other.name || name != null && name.equals(other.name); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = name == null ? result : 37 * result + name.hashCode(); return result; } } package com.paraware; import java.sql.SQLException; import java.util.Date; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Transaction; import net.sf.hibernate.cfg.Configuration; import com.paraware.domain.Child; import com.paraware.domain.Parent; public class TestHibernate { public static void main(String args[]) throws HibernateException, SQLException { SessionFactory sessionFactory; Transaction transaction; Configuration cfg = new Configuration(); cfg.addClass(Parent.class); cfg.addClass(Child.class); sessionFactory = cfg.buildSessionFactory(); Session session = sessionFactory.openSession(); transaction = session.beginTransaction(); Parent newUser = new Parent(); newUser.setUserID("bnnn"); newUser.setUserName("Vivi"); newUser.setPassword("abcff"); newUser.setEmailAddress("vi...@co..."); newUser.setLastLogon(new Date()); session.save(newUser); Child ms1 = new Child(); ms1.setName("Mickey"); Child ms2 = new Child(); ms2.setName("Mouse"); Set mouseSet = new HashSet(); mouseSet.add(ms1); mouseSet.add(ms2); //set up association newUser.setChildren(mouseSet); //save foreign keys ms1.setParent(newUser); ms2.setParent(newUser); transaction.commit(); // close our session and release resources session.flush(); session.close(); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 20:36:54
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 3:35 PM This is known, and is not a bug, and is a dupe of another JIRA issue, I think. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-329 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-329 Summary: <property name="default_schema"> Does not propagate to non-Table types Type: Bug Status: Closed Priority: Minor Resolution: WON'T FIX Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: Eric Fenderbosch Created: Fri, 12 Sep 2003 12:44 PM Updated: Thu, 25 Sep 2003 3:35 PM Description: When specifing <property name="default_schema">eousr</property> in cfg.xml, this does not have any effect on sequence names. Example: <id name="id" type="java.lang.Long"> <column name="TARIFF_ID"/> <generator class="sequence"> <param name="sequence">tariff_seq</param> </generator> </id> However, if the schema is specified in the mapping using <hibernate-mapping schema="eousr"> or <class name="com.fedex.cc.objectlib.tariff.TariffState" table="TARIFF" schema="eousr"> then it works as expected. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 20:34:54
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 3:34 PM prepared statement cahce is gone, so close the issue --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-319 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-319 Summary: PreparedStatementCache should check for NULL on equals() Type: Patch Status: Closed Priority: Trivial Resolution: FIXED Project: Hibernate2 Components: core Fix Fors: 2.1 beta 4 Assignee: Reporter: Jonas Van Poucke Created: Tue, 9 Sep 2003 3:47 AM Updated: Thu, 25 Sep 2003 3:34 PM Environment: JDK 1.4.1 and 1.4.2 Description: I found PrepeparedStatementCache to throw NullPointerExceptions. The bas news: I could not exactly trace the location of the bug. The problem lies in the fact that java.util.LinkedList has some entries where the element is NULL (in our case the element is a PrepeparedStatementCache$Entry). Also, the line entries.remove(entryMap.get(ps)); is dangerous: the entryMap.get(ps) sometimes return NULL as well. I could not find the point where the key-value pair is removed. The good news: I fixed this bug by modifying the PrepeparedStatementCache in two places: --- Fix 1 --- The equals() method of the Entry inner class should be: public boolean equals(Object other) { Entry oe = (Entry) other; return oe != null && oe.connection == connection && oe.scrollable == scrollable && oe.sql.equals(sql); } That is, I added oe != null --- Fix 2 --- The close(Collection statements) method should also check for NULL elemements: private void close(Collection statements) { PreparedStatement ps; Iterator iter = statements.iterator(); while (iter.hasNext()) { try { ps = (PreparedStatement) iter.next(); if (ps != null) { ps.close(); } } catch (SQLException sqle) { log.warn("could not close statement", sqle); } } } I hope that this patch actually solves a problem in the right place, i.e. that the bug is not created outside of PreparedStatementCache or in the JDK Background: By looking on the net, I found there might be a --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 20:32:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 3:32 PM A number of comments: (1) your test code contained dependencies upon Cactus and some of your own code that you did not include!! (2) when I fixed this, the test run successfully against the current Hibernate CVS --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-342 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-342 Summary: JCSCache.put java.lang.Error: update: last is null! Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: John Kristian Created: Wed, 17 Sep 2003 2:29 PM Updated: Thu, 25 Sep 2003 3:32 PM Environment: Windows XP, JBoss 3, Microsoft SQL Server Description: With Hibernate 2.1 beta 3b (but not 2.0.2), the following errors occur. I will supply a small test case and more detailed log, soon. 12:19:30,390 ERROR [LRUMemoryCache] verifycache: map does NOT contain key, what the HECK! 12:19:30,390 ERROR [TestCache] testScan failed java.lang.Error: update: last is null! at org.apache.jcs.engine.memory.lru.LRUMemoryCache.update(LRUMemoryCache.java:140) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:241) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:200) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:311) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:279) at net.sf.hibernate.cache.JCSCache.put(JCSCache.java:34) at net.sf.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:86) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:2137) at net.sf.hibernate.loader.Loader.doResultSet(Loader.java:221) at net.sf.hibernate.loader.Loader.doFind(Loader.java:113) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:661) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:676) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:52) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:44) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:378) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2059) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1913) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1872) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:84) at net.sf.hibernate.type.EntityType.assemble(EntityType.java:95) at net.sf.hibernate.collection.Set.<init>(Set.java:94) at net.sf.hibernate.type.SetType.assembleCachedCollection(SetType.java:36) at net.sf.hibernate.collection.CollectionPersister.getCachedCollection(CollectionPersister.java:370) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:67) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:178) at net.sf.hibernate.type.PersistentCollectionType.assemble(PersistentCollectionType.java:130) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:54) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:46) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2044) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1913) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1872) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:84) at net.sf.hibernate.type.EntityType.nullSafeGet(EntityType.java:111) at net.sf.hibernate.impl.IteratorImpl.postNext(IteratorImpl.java:67) at net.sf.hibernate.impl.IteratorImpl.next(IteratorImpl.java:87) at com.docent.lms.entities.tests.hibernate.TestCache.scan(TestCache.java:104) --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 20:32:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 3:32 PM The test case did not fail. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-321 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-321 Summary: could not create JCS region: NullPointerException Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.3 Assignee: Reporter: John Kristian Created: Tue, 9 Sep 2003 6:42 PM Updated: Thu, 25 Sep 2003 3:32 PM Environment: Windows XP Professional, JBoss 3, Microsoft SQL Server 2000 Description: With Hibernate 2.0.3 (but not 2.0.2), the following error occurs. 2003-09-09 16:25:11,453 ERROR [net.sf.hibernate.cache.JCSCache] could not create JCS region java.lang.NullPointerException at org.apache.jcs.engine.memory.lru.LRUMemoryCache.update(LRUMemoryCache.java:116) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:241) at org.apache.jcs.engine.control.CompositeCache.update(CompositeCache.java:200) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:311) at org.apache.jcs.access.CacheAccess.put(CacheAccess.java:279) at net.sf.hibernate.cache.JCSCache.put(JCSCache.java:36) at net.sf.hibernate.cache.ReadWriteCache.put(ReadWriteCache.java:64) at net.sf.hibernate.impl.SessionImpl.initializeEntity(SessionImpl.java:1966) at net.sf.hibernate.loader.Loader.doFind(Loader.java:196) at net.sf.hibernate.loader.Loader.loadEntity(Loader.java:587) at net.sf.hibernate.loader.EntityLoader.load(EntityLoader.java:42) at net.sf.hibernate.persister.EntityPersister.load(EntityPersister.java:396) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1889) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.assemble(EntityType.java:93) at net.sf.hibernate.collection.Set.<init>(Set.java:94) at net.sf.hibernate.type.SetType.assembleCachedCollection(SetType.java:36) at net.sf.hibernate.collection.CollectionPersister.getCachedCollection(CollectionPersister.java:308) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:66) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.type.PersistentCollectionType.assemble(PersistentCollectionType.java:129) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:53) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:45) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1872) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.assemble(EntityType.java:93) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:53) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:45) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1872) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1716) at net.sf.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:62) at net.sf.hibernate.type.EntityType.assemble(EntityType.java:93) at net.sf.hibernate.collection.Set.<init>(Set.java:94) at net.sf.hibernate.type.SetType.assembleCachedCollection(SetType.java:36) at net.sf.hibernate.collection.CollectionPersister.getCachedCollection(CollectionPersister.java:308) at net.sf.hibernate.type.PersistentCollectionType.getCollection(PersistentCollectionType.java:66) at net.sf.hibernate.type.PersistentCollectionType.resolveIdentifier(PersistentCollectionType.java:177) at net.sf.hibernate.type.PersistentCollectionType.assemble(PersistentCollectionType.java:129) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:53) at net.sf.hibernate.impl.CacheEntry.assemble(CacheEntry.java:45) at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:1872) at net.sf.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1757) at net.sf.hibernate.impl.SessionImpl.load(SessionImpl.java:1688) at com.docent.lms.entities.reference.GeneratedUser$Factory.getById(GeneratedUser.java:456) at com.docent.lms.web.Visit.getUser(Visit.java:252) --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 19:50:54
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 2:50 PM The user did not respond with any code to reproduce the problem, and anyway I doubt there is a bug, so closing this issue now. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-331 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-331 Summary: Problem with create Query Type: Bug Status: Closed Priority: Critical Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.0.1 Assignee: Reporter: Osvaldo Andres Cifuentes Created: Fri, 12 Sep 2003 5:26 PM Updated: Thu, 25 Sep 2003 2:50 PM Environment: windows 2000 server spanish,xdoclet,jboss 3.2.1,jdk 1.4.2,oracle 9i Enterprise Edition Description: I'm using Session createQuery from Hibernate 2.0.1, the source look like this: List tipos = new ArrayList(); for(int lu=0;lu<ti.length;lu++) tipos.add(ti[lu]); Query q = sess.createQuery("from Cliente cliente where cliente.identificacionPK.tipoIdentidad in (:tiposIdentidad) and cliente.identificacionPK.identidad like (:identidad)"); q.setParameterList("tiposIdentidad", tipos); q.setString("identidad", i+"%"); List client=q.list(); with this code i put the query on a list for (int k=1;k<=client.size();k++){ Cliente cli=(Cliente)client.get(k); log.debug(cli.getNombres()); } the Hibernate generated SQL source is OK. (I already tasted) But when I look the client list, i can see that the first data is overwriting the others, The same numbers of times than must have the query. For example: *The expected result: id name __________ 1 a 2 b 3 c 4 d 5 e 6 f 7 g *The actual result: id name __________ 1 a 1 a 1 a 1 a 1 a 1 a 1 a I hope any one can help me, I'll be very thankful --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 19:46:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 2:46 PM I'm pretty certain that the cause of this is that the after completion callbacks are stored until the transaction completes. You should split this work across multiple transactions, --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-343 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-343 Summary: Session.clear() not clearing saved objects Type: Bug Status: Closed Priority: Major Resolution: REJECTED Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: Robson Miranda Created: Wed, 17 Sep 2003 3:40 PM Updated: Thu, 25 Sep 2003 2:46 PM Environment: RedHat Linux 9, j2sdk 1.4.2 Description: I am having a problem with Session.clear(). It seems that, when doing PersistentObject o = new PersistentObject(); o.setRelation(session.load(OtherPersistentObject.class, idOfOtherObject)); session.save(o); session.flush(o); session.clear(o); the session cache is not cleared. I'm having OutOfMemoryExceptions when doing this loop several times. When I remove the session.save(o), everything works fine. ---- Robson --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 18:38:54
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-363 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-363 Summary: Constraint.java does not support CascadeConstraintsString Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: ron lussier Created: Thu, 25 Sep 2003 1:38 PM Updated: Thu, 25 Sep 2003 1:38 PM Environment: Mac OS X, Frontbase Description: In order to properly support SQL92, a change is required to allow the 'alter table ... drop constraint' statement to take a drop behavior. This change affects net.sf.hibernate.mapping.Constraint.java, line 43. I would like the line to read: return "alter table " + getTable().getQualifiedName(dialect) + " drop constraint " + getName() + dialect.getCascadeConstraintsString(); Frontbase (the dialect I contributed) requires either 'CASCADE' or 'RESTRICT' in a drop constraint clause. (Frontbase is VERY SQL/92 standard, sometimes annoyingly.) Isn't this what the dialect.getCascadeConstraintsString() property is for? (The documentation for the property reads 'Completely optional cascading drop clause'.) According to the documentation for SQL/92 (from http://www.contrib.andrew.cmu.edu/~shadow/sql/sql2bnf.aug92.txt), the syntax should be: <alter table statement> ::= ALTER TABLE <table name> <alter table action> <alter table action> ::= <add column definition> | <alter column definition> | <drop column definition> | <add table constraint definition> | <drop table constraint definition> <drop table constraint definition> ::= DROP CONSTRAINT <constraint name> <drop behavior> <drop behavior> ::= CASCADE | RESTRICT The requirement of CASCADE or RESTRICT is also affirmed in "A Guide to the SQL Standard", Fourth Edition, on page 106, where the syntax is given as: base-table-alteration ::= ALTER TABLE base-table base-table-alteration-action base-table-alteration-action ::= column-alteration-action | base-table-constraint-alteration-action base-table-constraint-alteration-action ::= ADD base-table-constraint-definition | DROP CONSTRAINT constraint { RESTRICT | CASCADE } On page 38 of the same volume, under 'Notation', the book states "Braces '{' and '}' are used to indicate that the material enclosed in those braces consists of a set of two or more items (separated by vertical bars) from which exactly one is to be chosen. If you would prefer, I would be fine with creating a new, optional property of Dialect.java for this purpose, but I think that Hibernate needs something. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 17:21:55
|
The following issue has been updated: Updater: Brian Bonner (mailto:bri...@pa...) Date: Thu, 25 Sep 2003 12:21 PM Comment: I tried to run this with 2.1b3 and received similar errors. Changes: Attachment changed to hibernate.2.1b3.log --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-362 Summary: Save with native ID on DB2 fails with duplicate row exception if data inserted behind hibernate Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Brian Bonner Created: Thu, 25 Sep 2003 11:53 AM Updated: Thu, 25 Sep 2003 12:21 PM Environment: Win 2K SP4, JDK 1.4.2, Hibernate 2.0.3, DB2 7.2 UDB Description: If we restart the database manager (clean state), then execute the DDL generated by hibernate, and run the test case: TestHibernate records are inserted without problem. We can rerun the test case numerous times. If we restart the database manager, then insert data from a command line (behind hibernate): insert into parents values(1,'test','test','test','test',current timestamp); insert into children values (1,'bb','1); insert into children values (2,'cc','1); and run the test case, it fails. hibernate.properties, Mapping, generated DDL, Domain Source, Test Source follows. hibernate.connection.driver_class = COM.ibm.db2.jdbc.app.DB2Driver hibernate.dialect = net.sf.hibernate.dialect.DB2Dialect hibernate.connection.url = jdbc:db2:sample hibernate.connection.username = xyz hibernate.connection.password = pdq <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Parent" table="parents"> <id name="keyId" type="int" unsaved-value="0"> <column name="key_id" not-null="true"/> <generator class="native"/> </id> <property name="userID" column="LogonID" type="string"/> <property name="userName" column="Name" type="string"/> <property name="password" type="string"/> <property name="emailAddress" type="string"/> <property name="lastLogon" type="timestamp"/> <set name="children" table="children" cascade="all" lazy="true" inverse="true"> <key column="key_id"/> <one-to-many class="com.paraware.domain.Child"/> </set> </class> </hibernate-mapping> <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Child" table="children"> <id name="mouseId" type="int" unsaved-value="0"> <column name="mouse_id" not-null="true"/> <generator class="native"/> </id> <property name="name" column="name" type="string"/> <many-to-one name="parent" class="com.paraware.domain.Parent" column="key_id" /> </class> </hibernate-mapping> drop table parents; drop table children; create table parents ( key_id INTEGER not null generated by default as identity, LogonID VARCHAR(255), Name VARCHAR(255), password VARCHAR(255), emailAddress VARCHAR(255), lastLogon TIMESTAMP, primary key (key_id) ); create table children ( mouse_id INTEGER not null generated by default as identity, name VARCHAR(255), key_id INTEGER, primary key (mouse_id) ); alter table children add constraint FK62EA5DFFBC5E42FB foreign key (key_id) references parents; package com.paraware.domain; import java.util.Date; import java.util.Set; // ... public class Parent { private int keyId; private String userID; private String userName; private String password; private String emailAddress; private Date lastLogon; private Set children; public int getKeyId() { return keyId; } public void setKeyId(int keyId) { this.keyId = keyId; } public String getUserID() { return userID; } public void setUserID(String newUserID) { userID = newUserID; } public String getUserName() { return userName; } public void setUserName(String newUserName) { userName = newUserName; } public String getPassword() { return password; } public void setPassword(String newPassword) { password = newPassword; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String newEmailAddress) { emailAddress = newEmailAddress; } public Date getLastLogon() { return lastLogon; } public void setLastLogon(Date newLastLogon) { lastLogon = newLastLogon; } public Set getChildren() { return children; } public void setChildren(Set mouses) { this.children = mouses; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Parent Parent other = (Parent) obj; return userID == other.userID || userID != null && userID.equals(other.userID) && userName == other.userName || userName != null && userName.equals(other.userName); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = userID == null ? result : 37 * result + userID.hashCode(); result = userName == null ? result : 37 * result + userName.hashCode(); return result; } } package com.paraware.domain; public class Child { private int mouseId; private String name; private Parent parent; public int getMouseId() { return mouseId; } public void setMouseId(int id) { this.mouseId = id; } public String getName() { return name; } public void setName(String newName) { name = newName; } public Parent getParent() { return parent; } public void setParent(Parent newUser) { parent = newUser; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Child Child other = (Child) obj; return name == other.name || name != null && name.equals(other.name); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = name == null ? result : 37 * result + name.hashCode(); return result; } } package com.paraware; import java.sql.SQLException; import java.util.Date; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Transaction; import net.sf.hibernate.cfg.Configuration; import com.paraware.domain.Child; import com.paraware.domain.Parent; public class TestHibernate { public static void main(String args[]) throws HibernateException, SQLException { SessionFactory sessionFactory; Transaction transaction; Configuration cfg = new Configuration(); cfg.addClass(Parent.class); cfg.addClass(Child.class); sessionFactory = cfg.buildSessionFactory(); Session session = sessionFactory.openSession(); transaction = session.beginTransaction(); Parent newUser = new Parent(); newUser.setUserID("bnnn"); newUser.setUserName("Vivi"); newUser.setPassword("abcff"); newUser.setEmailAddress("vi...@co..."); newUser.setLastLogon(new Date()); session.save(newUser); Child ms1 = new Child(); ms1.setName("Mickey"); Child ms2 = new Child(); ms2.setName("Mouse"); Set mouseSet = new HashSet(); mouseSet.add(ms1); mouseSet.add(ms2); //set up association newUser.setChildren(mouseSet); //save foreign keys ms1.setParent(newUser); ms2.setParent(newUser); transaction.commit(); // close our session and release resources session.flush(); session.close(); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 17:06:59
|
Message: The following issue has been re-assigned. Assignee: Gavin King (mailto:ga...@in...) --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-338 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-338 Summary: NullPointerException at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch Type: Bug Status: Assigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Gavin King Reporter: jason zhang Created: Tue, 16 Sep 2003 10:50 PM Updated: Thu, 25 Sep 2003 12:06 PM Environment: hibernate 2.1 beta 3. Window 2000 professional. JVM 1.4, Oracle 9. Description: I do not have this problem before when I use hibernate 2.0. yesterday I changed to 2.1 beta 3 and used <idbag>, I got this exception. This problem may be related to <idbag>. The exception is throwed just after the email is inserted. The email is a <idbag> mapped. Hibernate: insert into email (contactID, id, email, type) values (?, ?, ?, ?) Hibernate: select seq_email.nextval from dual java.lang.NullPointerException at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.collection.CollectionPersister.recreate(CollectionPersister.java:705) at net.sf.hibernate.impl.ScheduledCollectionRecreate.execute(ScheduledCollectionRecreate.java:22) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2278) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2238) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2178) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:56) at com.access.sync.framework.persistence.HibernatePersister.commit(HibernatePersister.java:311) at com.access.sync.framework.persistence.test.ContactPersisterTester.myTestSave(ContactPersisterTester.java:126) at com.access.sync.framework.persistence.test.ContactPersisterTester.testAll(ContactPersisterTester.java:79) 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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at junit.textui.TestRunner.doRun(TestRunner.java:109) at junit.textui.TestRunner.run(TestRunner.java:72) at junit.textui.TestRunner.run(TestRunner.java:57) --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 17:06:58
|
The following comment has been added to this issue: Author: Gavin King Created: Thu, 25 Sep 2003 12:06 PM Body: There is an issue with <idbag> and "sequence" id generation. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-338 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-338 Summary: NullPointerException at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch Type: Bug Status: Unassigned Priority: Major Project: Hibernate2 Components: core Versions: 2.1 beta 3 Assignee: Reporter: jason zhang Created: Tue, 16 Sep 2003 10:50 PM Updated: Thu, 18 Sep 2003 12:52 AM Environment: hibernate 2.1 beta 3. Window 2000 professional. JVM 1.4, Oracle 9. Description: I do not have this problem before when I use hibernate 2.0. yesterday I changed to 2.1 beta 3 and used <idbag>, I got this exception. This problem may be related to <idbag>. The exception is throwed just after the email is inserted. The email is a <idbag> mapped. Hibernate: insert into email (contactID, id, email, type) values (?, ?, ?, ?) Hibernate: select seq_email.nextval from dual java.lang.NullPointerException at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22) at net.sf.hibernate.collection.CollectionPersister.recreate(CollectionPersister.java:705) at net.sf.hibernate.impl.ScheduledCollectionRecreate.execute(ScheduledCollectionRecreate.java:22) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2278) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2238) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2178) at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:56) at com.access.sync.framework.persistence.HibernatePersister.commit(HibernatePersister.java:311) at com.access.sync.framework.persistence.test.ContactPersisterTester.myTestSave(ContactPersisterTester.java:126) at com.access.sync.framework.persistence.test.ContactPersisterTester.testAll(ContactPersisterTester.java:79) 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:324) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at junit.textui.TestRunner.doRun(TestRunner.java:116) at junit.textui.TestRunner.doRun(TestRunner.java:109) at junit.textui.TestRunner.run(TestRunner.java:72) at junit.textui.TestRunner.run(TestRunner.java:57) --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 17:06:58
|
The following comment has been added to this issue: Author: Brian Bonner Created: Thu, 25 Sep 2003 12:06 PM Body: Forgot to include the log output: Buildfile: D:\data\eclipseworkspace\TEST\build.xml runtestcase: [java] CA 0 main INFO net.sf.hibernate.cfg.Env= ironment - Hibernate 2.0.3 [java] CA 20 main INFO net.sf.hibernate.cfg.Env= ironment - loaded properties from resource hibernate.properties: {hibernat= e.connection.username=3Duser, hibernate.connection.password=3Ddemo, hiberna= te.cglib.use_reflection_optimizer=3Dtrue, hibernate.dialect=3Dnet.sf.hibern= ate.dialect.DB2Dialect, hibernate.connection.url=3Djdbc:db2:pbbtest, hibern= ate.connection.driver_class=3DCOM.ibm.db2.jdbc.app.DB2Driver} [java] CA 20 main INFO net.sf.hibernate.cfg.Env= ironment - using CGLIB reflection optimizer [java] CA 40 main INFO net.sf.hibernate.cfg.Env= ironment - JVM proxy support: true [java] CA 50 main INFO net.sf.hibernate.cfg.Con= figuration - Mapping resource: com/paraware/domain/Parent.hbm.xml [java] CA 100 main DEBUG net.sf.hibernate.util.DT= DEntityResolver - trying to locate http://hibernate.sourceforge.net/hibern= ate-mapping-2.0.dtd in classpath under net/sf/hibernate/ [java] CA 100 main DEBUG net.sf.hibernate.util.DT= DEntityResolver - found http://hibernate.sourceforge.net/hibernate-mapping= -2.0.dtd in classpath [java] CA 241 main INFO net.sf.hibernate.cfg.Bin= der - Mapping class: com.paraware.domain.Parent -> parents [java] CA 331 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: keyId -> key_id, type: integer [java] CA 351 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: userID -> LogonID, type: string [java] CA 351 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: userName -> Name, type: string [java] CA 361 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: password -> password, type: string [java] CA 361 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: emailAddress -> emailAddress, type: string [java] CA 361 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: lastLogon -> lastLogon, type: timestamp [java] CA 391 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: children, type: java.util.Set [java] CA 391 main INFO net.sf.hibernate.cfg.Con= figuration - Mapping resource: com/paraware/domain/Child.hbm.xml [java] CA 391 main DEBUG net.sf.hibernate.util.DT= DEntityResolver - trying to locate http://hibernate.sourceforge.net/hibern= ate-mapping-2.0.dtd in classpath under net/sf/hibernate/ [java] CA 391 main DEBUG net.sf.hibernate.util.DT= DEntityResolver - found http://hibernate.sourceforge.net/hibernate-mapping= -2.0.dtd in classpath [java] CA 431 main INFO net.sf.hibernate.cfg.Bin= der - Mapping class: com.paraware.domain.Child -> children [java] CA 431 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: mouseId -> mouse_id, type: integer [java] CA 431 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: name -> name, type: string [java] CA 441 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped property: parent -> key_id, type: com.paraware.domain.Parent [java] CA 441 main INFO net.sf.hibernate.cfg.Con= figuration - processing one-to-many association mappings [java] CA 451 main DEBUG net.sf.hibernate.cfg.Bin= der - Second pass for collection: com.paraware.domain.Parent.children [java] CA 451 main INFO net.sf.hibernate.cfg.Bin= der - Mapping collection: com.paraware.domain.Parent.children -> children [java] CA 471 main DEBUG net.sf.hibernate.cfg.Bin= der - Mapped collection key: key_id, one-to-many: com.paraware.domain.Chil= d [java] CA 471 main INFO net.sf.hibernate.cfg.Con= figuration - processing foreign key constraints [java] CA 471 main DEBUG net.sf.hibernate.cfg.Con= figuration - resolving reference to class: com.paraware.domain.Parent [java] CA 841 main INFO net.sf.hibernate.impl.Se= ssionFactoryImpl - building session factory [java] CA 841 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - instantiating session factory with properties: {java.ru= ntime.name=3DJava(TM) 2 Runtime Environment, Standard Edition, hibernate.co= nnection.password=3Ddemo, sun.boot.library.path=3DD:\j2sdk1.4.2\jre\bin, ja= va.vm.version=3D1.4.2-b28, hibernate.connection.username=3Duser, java.vm.ve= ndor=3DSun Microsystems Inc., java.vendor.url=3Dhttp://java.sun.com/, path.= separator=3D;, java.vm.name=3DJava HotSpot(TM) Client VM, file.encoding.pkg= =3Dsun.io, user.country=3DUS, sun.os.patch.level=3DService Pack 4, java.vm.= specification.name=3DJava Virtual Machine Specification, user.dir=3DD:\data= \eclipseworkspace\TEST, java.runtime.version=3D1.4.2-b28, java.awt.graphics= env=3Dsun.awt.Win32GraphicsEnvironment, java.endorsed.dirs=3DD:\j2sdk1.4.2\= jre\lib\endorsed, os.arch=3Dx86, java.io.tmpdir=3DC:\DOCUME~1\BBONNE~1.MIC\= LOCALS~1\Temp\, line.separator=3D [java] , java.vm.specification.vendor=3DSun Microsystems Inc., user= .variant=3D, os.name=3DWindows 2000, sun.java2d.fontpath=3D, java.library.p= ath=3DD:\j2sdk1.4.2\jre\bin;.;C:\WINNT\system32;C:\WINNT;d:\j2sdk1.4.2\bin;= c:\winnt\system32;d:\sqllib\bin;"d:\program files\ibm\mqseries\bin";d:\cygw= in\bin;d:\dev\java\apache-ant-1.5.3-1\bin, java.specification.name=3DJava P= latform API Specification, java.class.version=3D48.0, java.util.prefs.Prefe= rencesFactory=3Djava.util.prefs.WindowsPreferencesFactory, os.version=3D5.0= , user.home=3DC:\Documents and Settings\bbonner.MICKEY, user.timezone=3D, j= ava.awt.printerjob=3Dsun.awt.windows.WPrinterJob, file.encoding=3DCp1252, j= ava.specification.version=3D1.4, hibernate.connection.driver_class=3DCOM.ib= m.db2.jdbc.app.DB2Driver, user.name=3Dbbonner, java.class.path=3DD:\data\ec= lipseworkspace\TEST\bin;D:\data\eclipseworkspace\TEST\lib\c3p0.jar;D:\data\= eclipseworkspace\TEST\lib\cglib.jar;D:\data\eclipseworkspace\TEST\lib\commo= ns-beanutils-1.6.1.jar;D:\data\eclipseworkspace\TEST\lib\commons-collection= s-2.1.jar;D:\data\eclipseworkspace\TEST\lib\commons-dbcp.jar;D:\data\eclips= eworkspace\TEST\lib\commons-lang-1.0.1.jar;D:\data\eclipseworkspace\TEST\li= b\commons-logging-1.0.2.jar;D:\data\eclipseworkspace\TEST\lib\commons-loggi= ng-api-1.0.2.jar;D:\data\eclipseworkspace\TEST\lib\db2java.jar;D:\data\ecli= pseworkspace\TEST\lib\dom4j.jar;D:\data\eclipseworkspace\TEST\lib\hibernate= 2.jar;D:\data\eclipseworkspace\TEST\lib\log4j-1.2.8.jar;D:\data\eclipsework= space\TEST\lib\odmg.jar, java.vm.specification.version=3D1.0, sun.arch.data= .model=3D32, java.home=3DD:\j2sdk1.4.2\jre, hibernate.connection.url=3Djdbc= :db2:pbbtest, hibernate.dialect=3Dnet.sf.hibernate.dialect.DB2Dialect, java= .specification.vendor=3DSun Microsystems Inc., user.language=3Den, awt.tool= kit=3Dsun.awt.windows.WToolkit, java.vm.info=3Dmixed mode, hibernate.cglib.= use_reflection_optimizer=3Dtrue, java.version=3D1.4.2, java.ext.dirs=3DD:\j= 2sdk1.4.2\jre\lib\ext, sun.boot.class.path=3DD:\j2sdk1.4.2\jre\lib\rt.jar;D= :\j2sdk1.4.2\jre\lib\i18n.jar;D:\j2sdk1.4.2\jre\lib\sunrsasign.jar;D:\j2sdk= 1.4.2\jre\lib\jsse.jar;D:\j2sdk1.4.2\jre\lib\jce.jar;D:\j2sdk1.4.2\jre\lib\= charsets.jar;D:\j2sdk1.4.2\jre\classes, java.vendor=3DSun Microsystems Inc.= , file.separator=3D\, java.vendor.url.bug=3Dhttp://java.sun.com/cgi-bin/bug= report.cgi, sun.cpu.endian=3Dlittle, sun.io.unicode.encoding=3DUnicodeLittl= e, sun.cpu.isalist=3Dpentium i486 i386} [java] CA 982 main INFO net.sf.hibernate.dialect= .Dialect - Using dialect: net.sf.hibernate.dialect.DB2Dialect [java] CA 1002 main INFO net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - Hibernate connection pool size: 20 [java] CA 1122 main INFO net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - using driver: COM.ibm.db2.jdbc.app.D= B2Driver at URL: jdbc:db2:pbbtest [java] CA 1122 main INFO net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - connection properties: {user=3Duser,= password=3Ddemo} [java] CA 1122 main INFO net.sf.hibernate.impl.Se= ssionFactoryImpl - Use outer join fetching: true [java] CA 1122 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - total checked-out connections: 0 [java] CA 1162 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - opening new JDBC connection [java] CA 1192 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - created connection to: jdbc:db2:pbbt= est, Isolation Level: 2 [java] CA 1212 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - returning connection to pool, pool s= ize: 1 [java] CA 1212 main INFO net.sf.hibernate.impl.Se= ssionFactoryImpl - Use scrollable result sets: true [java] CA 1673 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryObjectFactory - initializing class SessionFactoryObjectFactory [java] CA 1673 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryObjectFactory - registered: 402881b9f7d9b05400f7d9b059230000 (= unnamed) [java] CA 1673 main INFO net.sf.hibernate.impl.Se= ssionFactoryObjectFactory - no JDNI name configured [java] CA 1673 main INFO net.sf.hibernate.impl.Se= ssionFactoryImpl - Query language substitutions: {} [java] CA 1703 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - instantiated session factory [java] CA 1743 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - opened session [java] CA 1753 main DEBUG net.sf.hibernate.transac= tion.JDBCTransaction - begin [java] CA 1753 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - total checked-out connections: 0 [java] CA 1753 main DEBUG net.sf.hibernate.connect= ion.DriverManagerConnectionProvider - using pooled JDBC connection, pool s= ize: 0 [java] CA 1753 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - saving [com.paraware.domain.Parent#<null>] [java] CA 1783 main DEBUG net.sf.hibernate.engine.= Cascades - processing cascades for: com.paraware.domain.Parent [java] CA 1783 main DEBUG net.sf.hibernate.engine.= Cascades - done processing cascades for: com.paraware.domain.Parent [java] CA 1783 main DEBUG net.sf.hibernate.persist= er.EntityPersister - Inserting entity: com.paraware.domain.Parent (native = id) [java] CA 1783 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets [java] CA 1803 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - prepared statement get: insert into parents (LogonID, N= ame, password, emailAddress, lastLogon, key_id) values (?, ?, ?, ?, ?, defa= ult) [java] CA 1803 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - preparing statement [java] CA 1803 main DEBUG net.sf.hibernate.persist= er.EntityPersister - Dehydrating entity: com.paraware.domain.Parent#null [java] CA 1833 main DEBUG net.sf.hibernate.type.St= ringType - binding 'bnnn' to parameter: 1 [java] CA 1833 main DEBUG net.sf.hibernate.type.St= ringType - binding 'Vivi' to parameter: 2 [java] CA 1833 main DEBUG net.sf.hibernate.type.St= ringType - binding 'abcff' to parameter: 3 [java] CA 1833 main DEBUG net.sf.hibernate.type.St= ringType - binding 'vi...@co...' to parameter: 4 [java] CA 1923 main DEBUG net.sf.hibernate.type.Ti= mestampType - binding '25 September 2003 12:58:55' to parameter: 5 [java] CA 1943 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets [java] CA 1943 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - closing statement [java] CA 1943 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets [java] CA 1943 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - prepared statement get: values IDENTITY_VAL_LOCAL() [java] CA 1963 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - preparing statement [java] CA 1973 main DEBUG net.sf.hibernate.persist= er.EntityPersister - Natively generated identity: 2 [java] CA 1973 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets [java] CA 1973 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - closing statement [java] CA 1993 main DEBUG net.sf.hibernate.engine.= Cascades - processing cascades for: com.paraware.domain.Parent [java] CA 1993 main DEBUG net.sf.hibernate.engine.= Cascades - done processing cascades for: com.paraware.domain.Parent [java] CA 1993 main DEBUG net.sf.hibernate.transac= tion.JDBCTransaction - commit [java] CA 1993 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - flushing session [java] CA 2013 main DEBUG net.sf.hibernate.engine.= Cascades - processing cascades for: com.paraware.domain.Parent [java] CA 2013 main DEBUG net.sf.hibernate.engine.= Cascades - cascading to collection: com.paraware.domain.Parent.children [java] CA 2013 main DEBUG net.sf.hibernate.engine.= Cascades - cascading to saveOrUpdate() [java] CA 2013 main DEBUG net.sf.hibernate.engine.= Cascades - unsaved-value: 0 [java] CA 2033 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - saveOrUpdate() unsaved instance with id: 0 [java] CA 2033 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - saving [com.paraware.domain.Child#<null>] [java] CA 2033 main DEBUG net.sf.hibernate.persist= er.EntityPersister - Inserting entity: com.paraware.domain.Child (native i= d) [java] CA 2033 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets [java] CA 2063 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - prepared statement get: insert into children (name, key= _id, mouse_id) values (?, ?, default) [java] CA 2063 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - preparing statement [java] CA 2063 main DEBUG net.sf.hibernate.persist= er.EntityPersister - Dehydrating entity: com.paraware.domain.Child#null [java] CA 2063 main DEBUG net.sf.hibernate.type.St= ringType - binding 'Mouse' to parameter: 1 [java] CA 2083 main DEBUG net.sf.hibernate.type.In= tegerType - binding '2' to parameter: 2 [java] CA 2093 main DEBUG net.sf.hibernate.util.JD= BCExceptionReporter - SQL Exception [java] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL= 0803N One or more values in the INSERT statement, UPDATE statement, or for= eign key update caused by a DELETE statement are not valid because the prim= ary key, unique constraint or unique index identified by "1" constrains tab= le "USER.CHILDREN" from having duplicate rows for those columns. SQLSTATE= =3D23505 [java]=20 [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:269) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:206) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_retur= n_code(SQLExceptionGenerator.java:457) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2= PreparedStatement.java:1429) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdat= e(DB2PreparedStatement.java:1021) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:504) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:444) [java] =09at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.j= ava:717) [java] =09at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.jav= a:605) [java] =09at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(Session= Impl.java:1202) [java] =09at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.ja= va:88) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :258) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :298) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :341) [java] =09at net.sf.hibernate.impl.SessionImpl.preFlushEntities(Ses= sionImpl.java:2285) [java] =09at net.sf.hibernate.impl.SessionImpl.flushEverything(Sess= ionImpl.java:2015) [java] =09at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.ja= va:2004) [java] =09at net.sf.hibernate.transaction.JDBCTransaction.commit(JD= BCTransaction.java:57) [java] =09at com.paraware.TestHibernate.main(TestHibernate.java:42) [java] CA 2193 main WARN net.sf.hibernate.util.JD= BCExceptionReporter - SQL Error: -803, SQLState: 23505 [java] CA 2193 main ERROR net.sf.hibernate.util.JD= BCExceptionReporter - [IBM][CLI Driver][DB2/NT] SQL0803N One or more valu= es in the INSERT statement, UPDATE statement, or foreign key update caused = by a DELETE statement are not valid because the primary key, unique constra= int or unique index identified by "1" constrains table "USER.CHILDREN" from= having duplicate rows for those columns. SQLSTATE=3D23505 [java]=20 [java] CA 2213 main DEBUG net.sf.hibernate.impl.Ba= tcherImpl - done closing: 0 open PreparedStatements, 0 open ResultSets [java] CA 2213 main DEBUG net.sf.hibernate.impl.Se= ssionFactoryImpl - closing statement [java] CA 2223 main ERROR net.sf.hibernate.util.JD= BCExceptionReporter - Could not insert [java] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL= 0803N One or more values in the INSERT statement, UPDATE statement, or for= eign key update caused by a DELETE statement are not valid because the prim= ary key, unique constraint or unique index identified by "1" constrains tab= le "USER.CHILDREN" from having duplicate rows for those columns. SQLSTATE= =3D23505 [java]=20 [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:269) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:206) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_retur= n_code(SQLExceptionGenerator.java:457) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2= PreparedStatement.java:1429) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdat= e(DB2PreparedStatement.java:1021) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:504) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:444) [java] =09at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.j= ava:717) [java] =09at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.jav= a:605) [java] =09at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(Session= Impl.java:1202) [java] =09at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.ja= va:88) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :258) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :298) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :341) [java] =09at net.sf.hibernate.impl.SessionImpl.preFlushEntities(Ses= sionImpl.java:2285) [java] =09at net.sf.hibernate.impl.SessionImpl.flushEverything(Sess= ionImpl.java:2015) [java] =09at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.ja= va:2004) [java] =09at net.sf.hibernate.transaction.JDBCTransaction.commit(JD= BCTransaction.java:57) [java] =09at com.paraware.TestHibernate.main(TestHibernate.java:42) [java] CA 2314 main DEBUG net.sf.hibernate.impl.Se= ssionImpl - transaction completion [java] COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL= 0803N One or more values in the INSERT statement, UPDATE statement, or for= eign key update caused by a DELETE statement are not valid because the prim= ary key, unique constraint or unique index identified by "1" constrains tab= le "USER.CHILDREN" from having duplicate rows for those columns. SQLSTATE= =3D23505 [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:269) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:206) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_retur= n_code(SQLExceptionGenerator.java:457) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2= PreparedStatement.java:1429) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdat= e(DB2PreparedStatement.java:1021) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:504) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:444) [java] =09at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.j= ava:717) [java] =09at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.jav= a:605) [java] =09at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(Session= Impl.java:1202) [java] =09at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.ja= va:88) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :258) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :298) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :341) [java] =09at net.sf.hibernate.impl.SessionImpl.preFlushEntities(Ses= sionImpl.java:2285) [java] =09at net.sf.hibernate.impl.SessionImpl.flushEverything(Sess= ionImpl.java:2015) [java] =09at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.ja= va:2004) [java] =09at net.sf.hibernate.transaction.JDBCTransaction.commit(JD= BCTransaction.java:57) [java] =09at com.paraware.TestHibernate.main(TestHibernate.java:42) [java] rethrown as net.sf.hibernate.JDBCException: Could not insert= : [IBM][CLI Driver][DB2/NT] SQL0803N One or more values in the INSERT stat= ement, UPDATE statement, or foreign key update caused by a DELETE statement= are not valid because the primary key, unique constraint or unique index i= dentified by "1" constrains table "USER.CHILDREN" from having duplicate row= s for those columns. SQLSTATE=3D23505 [java] =09at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.j= ava:720) [java] =09at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.jav= a:605) [java] =09at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(Session= Impl.java:1202) [java] =09at net.sf.hibernate.engine.Cascades$3.cascade(Cascades.ja= va:88) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :258) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :298) [java] =09at net.sf.hibernate.engine.Cascades.cascade(Cascades.java= :341) [java] =09at net.sf.hibernate.impl.SessionImpl.preFlushEntities(Ses= sionImpl.java:2285) [java] =09at net.sf.hibernate.impl.SessionImpl.flushEverything(Sess= ionImpl.java:2015) [java] =09at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.ja= va:2004) [java] =09at net.sf.hibernate.transaction.JDBCTransaction.commit(JD= BCTransaction.java:57) [java] =09at com.paraware.TestHibernate.main(TestHibernate.java:42) [java] Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][= DB2/NT] SQL0803N One or more values in the INSERT statement, UPDATE statem= ent, or foreign key update caused by a DELETE statement are not valid becau= se the primary key, unique constraint or unique index identified by "1" con= strains table "USER.CHILDREN" from having duplicate rows for those columns.= SQLSTATE=3D23505 [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:269) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLEx= ception(SQLExceptionGenerator.java:206) [java] =09at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_retur= n_code(SQLExceptionGenerator.java:457) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2= PreparedStatement.java:1429) [java] =09at COM.ibm.db2.jdbc.app.DB2PreparedStatement.executeUpdat= e(DB2PreparedStatement.java:1021) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:504) [java] =09at net.sf.hibernate.persister.EntityPersister.insert(Enti= tyPersister.java:444) [java] =09at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.j= ava:717) [java] =09... 11 more [java] Exception in thread "main"=20 [java] Java Result: 1 BUILD SUCCESSFUL Total time: 3 seconds --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?= key=3DHB-362 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-362 Summary: Save with native ID on DB2 fails with duplicate row exception = if data inserted behind hibernate Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Versions: 2.0.3 Assignee:=20 Reporter: Brian Bonner Created: Thu, 25 Sep 2003 11:53 AM Updated: Thu, 25 Sep 2003 11:58 AM Environment: Win 2K SP4, JDK 1.4.2, Hibernate 2.0.3, DB2 7.2 UDB Description: If we restart the database manager (clean state), then execute the DDL generated by hibernate, and run the test case: TestHibernate records are inserted without problem. W= e can rerun the test case numerous times. If we restart the database manager, then insert data from a command line (behind hibernate): insert into parents values(1,'test','test','test','test',current timestamp)= ; insert into children values (1,'bb','1); insert into children values (2,'cc','1); and run the test case, it fails. hibernate.properties, Mapping, generated DDL, Domain Source, Test Source fo= llows. hibernate.connection.driver_class =3D COM.ibm.db2.jdbc.app.DB2Driver hibernate.dialect =3D net.sf.hibernate.dialect.DB2Dialect hibernate.connection.url =3D jdbc:db2:sample hibernate.connection.username =3D xyz hibernate.connection.password =3D pdq <?xml version=3D"1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> =09<class name=3D"com.paraware.domain.Parent" table=3D"parents"> =09=09<id name=3D"keyId" type=3D"int" unsaved-value=3D"0"> =09=09=09<column name=3D"key_id" not-null=3D"true"/> =09=09=09<generator class=3D"native"/> =09=09</id> =09=09<property name=3D"userID" column=3D"LogonID" type=3D"string"/> =09=09<property name=3D"userName" column=3D"Name" type=3D"string"/> =09=09<property name=3D"password" type=3D"string"/> =09=09<property name=3D"emailAddress" type=3D"string"/> =09=09<property name=3D"lastLogon" type=3D"timestamp"/> =09=09 =09=09<set name=3D"children" table=3D"children" cascade=3D"all" lazy=3D"tru= e" inverse=3D"true"> =09=09=09<key column=3D"key_id"/> =09=09=09<one-to-many class=3D"com.paraware.domain.Child"/> =09=09</set> =09</class> </hibernate-mapping> <?xml version=3D"1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> =09<class name=3D"com.paraware.domain.Child" table=3D"children"> =09=09 =09=09<id name=3D"mouseId" type=3D"int" unsaved-value=3D"0"> =09=09=09<column name=3D"mouse_id" not-null=3D"true"/> =09=09=09<generator class=3D"native"/> =09=09</id> =09=09 =09=09<property name=3D"name" column=3D"name" type=3D"string"/> =09=09 =09=09<many-to-one name=3D"parent" class=3D"com.paraware.domain.Parent" col= umn=3D"key_id" /> =09=09 =09</class> </hibernate-mapping> drop table parents; drop table children; create table parents ( key_id INTEGER not null generated by default as identity, LogonID VARCHAR(255), Name VARCHAR(255), password VARCHAR(255), emailAddress VARCHAR(255), lastLogon TIMESTAMP, primary key (key_id) ); create table children ( mouse_id INTEGER not null generated by default as identity, name VARCHAR(255), key_id INTEGER, primary key (mouse_id) ); alter table children add constraint FK62EA5DFFBC5E42FB foreign key (key_id)= references parents; package com.paraware.domain; import java.util.Date; import java.util.Set; // ... public class Parent { private int keyId; private String userID; private String userName; private String password; private String emailAddress; private Date lastLogon; private Set children; public int getKeyId() { return keyId; } public void setKeyId(int keyId) { this.keyId =3D keyId; } public String getUserID() { return userID; } public void setUserID(String newUserID) { userID =3D newUserID; } public String getUserName() { return userName; } public void setUserName(String newUserName) { userName =3D newUserName; } public String getPassword() { return password; } public void setPassword(String newPassword) { password =3D newPassword; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String newEmailAddress) { emailAddress =3D newEmailAddress; } public Date getLastLogon() { return lastLogon; } public void setLastLogon(Date newLastLogon) { lastLogon =3D newLastLogon; } public Set getChildren() { return children; } public void setChildren(Set mouses) { this.children =3D mouses; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this =3D=3D obj) return true; if ((obj =3D=3D null) || (obj.getClass() !=3D this.getClass())) return false; // Must be the Parent Parent other =3D (Parent) obj; return userID =3D=3D other.userID || userID !=3D null && userID.equals(other.userID) && userName =3D=3D other.userName || userName !=3D null && userName.equals(other.userName); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result =3D 17; result =3D userID =3D=3D null ? result : 37 * result + userID.hashCode(= ); result =3D userName =3D=3D null ? result : 37 * result + userName.hashC= ode(); return result; } } package com.paraware.domain; public class Child { private int mouseId; private String name; private Parent parent; public int getMouseId() { return mouseId; } public void setMouseId(int id) { this.mouseId =3D id; } public String getName() { return name; } public void setName(String newName) { name =3D newName; } public Parent getParent() { return parent; } public void setParent(Parent newUser) { parent =3D newUser; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this =3D=3D obj) return true; if ((obj =3D=3D null) || (obj.getClass() !=3D this.getClass())) return false; // Must be the Child Child other =3D (Child) obj; return name =3D=3D other.name || name !=3D null && name.equals(other.na= me); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result =3D 17; result =3D name =3D=3D null ? result : 37 * result + name.hashCode(); return result; } } package com.paraware; import java.sql.SQLException; import java.util.Date; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Transaction; import net.sf.hibernate.cfg.Configuration; import com.paraware.domain.Child; import com.paraware.domain.Parent; public class TestHibernate { public static void main(String args[]) throws HibernateException, SQLExce= ption { SessionFactory sessionFactory; Transaction transaction; Configuration cfg =3D new Configuration(); cfg.addClass(Parent.class); cfg.addClass(Child.class); sessionFactory =3D cfg.buildSessionFactory(); Session session =3D sessionFactory.openSession(); transaction =3D session.beginTransaction(); Parent newUser =3D new Parent(); newUser.setUserID("bnnn"); newUser.setUserName("Vivi"); newUser.setPassword("abcff"); newUser.setEmailAddress("vi...@co..."); newUser.setLastLogon(new Date()); session.save(newUser); Child ms1 =3D new Child(); ms1.setName("Mickey"); Child ms2 =3D new Child(); ms2.setName("Mouse"); Set mouseSet =3D new HashSet(); mouseSet.add(ms1); mouseSet.add(ms2); //set up association newUser.setChildren(mouseSet); //save foreign keys ms1.setParent(newUser); ms2.setParent(newUser); transaction.commit(); // close our session and release resources session.flush(); session.close(); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 16:58:55
|
The following issue has been updated: Updater: Brian Bonner (mailto:bri...@pa...) Date: Thu, 25 Sep 2003 11:58 AM Comment: Doh! I didn't see that I could attach a file when I was creating the report. Sorry about that. Changes: Attachment changed to failing.jar --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-362 Summary: Save with native ID on DB2 fails with duplicate row exception if data inserted behind hibernate Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Brian Bonner Created: Thu, 25 Sep 2003 11:53 AM Updated: Thu, 25 Sep 2003 11:58 AM Environment: Win 2K SP4, JDK 1.4.2, Hibernate 2.0.3, DB2 7.2 UDB Description: If we restart the database manager (clean state), then execute the DDL generated by hibernate, and run the test case: TestHibernate records are inserted without problem. We can rerun the test case numerous times. If we restart the database manager, then insert data from a command line (behind hibernate): insert into parents values(1,'test','test','test','test',current timestamp); insert into children values (1,'bb','1); insert into children values (2,'cc','1); and run the test case, it fails. hibernate.properties, Mapping, generated DDL, Domain Source, Test Source follows. hibernate.connection.driver_class = COM.ibm.db2.jdbc.app.DB2Driver hibernate.dialect = net.sf.hibernate.dialect.DB2Dialect hibernate.connection.url = jdbc:db2:sample hibernate.connection.username = xyz hibernate.connection.password = pdq <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Parent" table="parents"> <id name="keyId" type="int" unsaved-value="0"> <column name="key_id" not-null="true"/> <generator class="native"/> </id> <property name="userID" column="LogonID" type="string"/> <property name="userName" column="Name" type="string"/> <property name="password" type="string"/> <property name="emailAddress" type="string"/> <property name="lastLogon" type="timestamp"/> <set name="children" table="children" cascade="all" lazy="true" inverse="true"> <key column="key_id"/> <one-to-many class="com.paraware.domain.Child"/> </set> </class> </hibernate-mapping> <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Child" table="children"> <id name="mouseId" type="int" unsaved-value="0"> <column name="mouse_id" not-null="true"/> <generator class="native"/> </id> <property name="name" column="name" type="string"/> <many-to-one name="parent" class="com.paraware.domain.Parent" column="key_id" /> </class> </hibernate-mapping> drop table parents; drop table children; create table parents ( key_id INTEGER not null generated by default as identity, LogonID VARCHAR(255), Name VARCHAR(255), password VARCHAR(255), emailAddress VARCHAR(255), lastLogon TIMESTAMP, primary key (key_id) ); create table children ( mouse_id INTEGER not null generated by default as identity, name VARCHAR(255), key_id INTEGER, primary key (mouse_id) ); alter table children add constraint FK62EA5DFFBC5E42FB foreign key (key_id) references parents; package com.paraware.domain; import java.util.Date; import java.util.Set; // ... public class Parent { private int keyId; private String userID; private String userName; private String password; private String emailAddress; private Date lastLogon; private Set children; public int getKeyId() { return keyId; } public void setKeyId(int keyId) { this.keyId = keyId; } public String getUserID() { return userID; } public void setUserID(String newUserID) { userID = newUserID; } public String getUserName() { return userName; } public void setUserName(String newUserName) { userName = newUserName; } public String getPassword() { return password; } public void setPassword(String newPassword) { password = newPassword; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String newEmailAddress) { emailAddress = newEmailAddress; } public Date getLastLogon() { return lastLogon; } public void setLastLogon(Date newLastLogon) { lastLogon = newLastLogon; } public Set getChildren() { return children; } public void setChildren(Set mouses) { this.children = mouses; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Parent Parent other = (Parent) obj; return userID == other.userID || userID != null && userID.equals(other.userID) && userName == other.userName || userName != null && userName.equals(other.userName); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = userID == null ? result : 37 * result + userID.hashCode(); result = userName == null ? result : 37 * result + userName.hashCode(); return result; } } package com.paraware.domain; public class Child { private int mouseId; private String name; private Parent parent; public int getMouseId() { return mouseId; } public void setMouseId(int id) { this.mouseId = id; } public String getName() { return name; } public void setName(String newName) { name = newName; } public Parent getParent() { return parent; } public void setParent(Parent newUser) { parent = newUser; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Child Child other = (Child) obj; return name == other.name || name != null && name.equals(other.name); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = name == null ? result : 37 * result + name.hashCode(); return result; } } package com.paraware; import java.sql.SQLException; import java.util.Date; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Transaction; import net.sf.hibernate.cfg.Configuration; import com.paraware.domain.Child; import com.paraware.domain.Parent; public class TestHibernate { public static void main(String args[]) throws HibernateException, SQLException { SessionFactory sessionFactory; Transaction transaction; Configuration cfg = new Configuration(); cfg.addClass(Parent.class); cfg.addClass(Child.class); sessionFactory = cfg.buildSessionFactory(); Session session = sessionFactory.openSession(); transaction = session.beginTransaction(); Parent newUser = new Parent(); newUser.setUserID("bnnn"); newUser.setUserName("Vivi"); newUser.setPassword("abcff"); newUser.setEmailAddress("vi...@co..."); newUser.setLastLogon(new Date()); session.save(newUser); Child ms1 = new Child(); ms1.setName("Mickey"); Child ms2 = new Child(); ms2.setName("Mouse"); Set mouseSet = new HashSet(); mouseSet.add(ms1); mouseSet.add(ms2); //set up association newUser.setChildren(mouseSet); //save foreign keys ms1.setParent(newUser); ms2.setParent(newUser); transaction.commit(); // close our session and release resources session.flush(); session.close(); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 16:53:54
|
Message: A new issue has been created in JIRA. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-362 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-362 Summary: Save with native ID on DB2 fails with duplicate row exception if data inserted behind hibernate Type: Bug Status: Unassigned Priority: Critical Project: Hibernate2 Versions: 2.0.3 Assignee: Reporter: Brian Bonner Created: Thu, 25 Sep 2003 11:53 AM Updated: Thu, 25 Sep 2003 11:53 AM Environment: Win 2K SP4, JDK 1.4.2, Hibernate 2.0.3, DB2 7.2 UDB Description: If we restart the database manager (clean state), then execute the DDL generated by hibernate, and run the test case: TestHibernate records are inserted without problem. We can rerun the test case numerous times. If we restart the database manager, then insert data from a command line (behind hibernate): insert into parents values(1,'test','test','test','test',current timestamp); insert into children values (1,'bb','1); insert into children values (2,'cc','1); and run the test case, it fails. hibernate.properties, Mapping, generated DDL, Domain Source, Test Source follows. hibernate.connection.driver_class = COM.ibm.db2.jdbc.app.DB2Driver hibernate.dialect = net.sf.hibernate.dialect.DB2Dialect hibernate.connection.url = jdbc:db2:sample hibernate.connection.username = xyz hibernate.connection.password = pdq <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Parent" table="parents"> <id name="keyId" type="int" unsaved-value="0"> <column name="key_id" not-null="true"/> <generator class="native"/> </id> <property name="userID" column="LogonID" type="string"/> <property name="userName" column="Name" type="string"/> <property name="password" type="string"/> <property name="emailAddress" type="string"/> <property name="lastLogon" type="timestamp"/> <set name="children" table="children" cascade="all" lazy="true" inverse="true"> <key column="key_id"/> <one-to-many class="com.paraware.domain.Child"/> </set> </class> </hibernate-mapping> <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.paraware.domain.Child" table="children"> <id name="mouseId" type="int" unsaved-value="0"> <column name="mouse_id" not-null="true"/> <generator class="native"/> </id> <property name="name" column="name" type="string"/> <many-to-one name="parent" class="com.paraware.domain.Parent" column="key_id" /> </class> </hibernate-mapping> drop table parents; drop table children; create table parents ( key_id INTEGER not null generated by default as identity, LogonID VARCHAR(255), Name VARCHAR(255), password VARCHAR(255), emailAddress VARCHAR(255), lastLogon TIMESTAMP, primary key (key_id) ); create table children ( mouse_id INTEGER not null generated by default as identity, name VARCHAR(255), key_id INTEGER, primary key (mouse_id) ); alter table children add constraint FK62EA5DFFBC5E42FB foreign key (key_id) references parents; package com.paraware.domain; import java.util.Date; import java.util.Set; // ... public class Parent { private int keyId; private String userID; private String userName; private String password; private String emailAddress; private Date lastLogon; private Set children; public int getKeyId() { return keyId; } public void setKeyId(int keyId) { this.keyId = keyId; } public String getUserID() { return userID; } public void setUserID(String newUserID) { userID = newUserID; } public String getUserName() { return userName; } public void setUserName(String newUserName) { userName = newUserName; } public String getPassword() { return password; } public void setPassword(String newPassword) { password = newPassword; } public String getEmailAddress() { return emailAddress; } public void setEmailAddress(String newEmailAddress) { emailAddress = newEmailAddress; } public Date getLastLogon() { return lastLogon; } public void setLastLogon(Date newLastLogon) { lastLogon = newLastLogon; } public Set getChildren() { return children; } public void setChildren(Set mouses) { this.children = mouses; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Parent Parent other = (Parent) obj; return userID == other.userID || userID != null && userID.equals(other.userID) && userName == other.userName || userName != null && userName.equals(other.userName); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = userID == null ? result : 37 * result + userID.hashCode(); result = userName == null ? result : 37 * result + userName.hashCode(); return result; } } package com.paraware.domain; public class Child { private int mouseId; private String name; private Parent parent; public int getMouseId() { return mouseId; } public void setMouseId(int id) { this.mouseId = id; } public String getName() { return name; } public void setName(String newName) { name = newName; } public Parent getParent() { return parent; } public void setParent(Parent newUser) { parent = newUser; } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ public boolean equals(Object obj) { if (this == obj) return true; if ((obj == null) || (obj.getClass() != this.getClass())) return false; // Must be the Child Child other = (Child) obj; return name == other.name || name != null && name.equals(other.name); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ public int hashCode() { int result = 17; result = name == null ? result : 37 * result + name.hashCode(); return result; } } package com.paraware; import java.sql.SQLException; import java.util.Date; import java.util.HashSet; import java.util.Set; import net.sf.hibernate.HibernateException; import net.sf.hibernate.Session; import net.sf.hibernate.SessionFactory; import net.sf.hibernate.Transaction; import net.sf.hibernate.cfg.Configuration; import com.paraware.domain.Child; import com.paraware.domain.Parent; public class TestHibernate { public static void main(String args[]) throws HibernateException, SQLException { SessionFactory sessionFactory; Transaction transaction; Configuration cfg = new Configuration(); cfg.addClass(Parent.class); cfg.addClass(Child.class); sessionFactory = cfg.buildSessionFactory(); Session session = sessionFactory.openSession(); transaction = session.beginTransaction(); Parent newUser = new Parent(); newUser.setUserID("bnnn"); newUser.setUserName("Vivi"); newUser.setPassword("abcff"); newUser.setEmailAddress("vi...@co..."); newUser.setLastLogon(new Date()); session.save(newUser); Child ms1 = new Child(); ms1.setName("Mickey"); Child ms2 = new Child(); ms2.setName("Mouse"); Set mouseSet = new HashSet(); mouseSet.add(ms1); mouseSet.add(ms2); //set up association newUser.setChildren(mouseSet); //save foreign keys ms1.setParent(newUser); ms2.setParent(newUser); transaction.commit(); // close our session and release resources session.flush(); session.close(); } } --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 16:30:55
|
The following issue has been updated: Updater: Gavin King (mailto:ga...@in...) Date: Thu, 25 Sep 2003 11:30 AM Comment: This is not actually a bug, the value just expresses a grouping. We actually generate the unique constraint into the CREATE TABLE, with no name at all. okay, I can see that it might be nicer to use the name, so I'm changing this to "improvement". Changes: type changed from Bug --------------------------------------------------------------------- For a full history of the issue, see: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-346&page=history --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-346 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-346 Summary: SchemaExport ignores user-specified unique index name Type: Improvement Status: Unassigned Priority: Trivial Project: Hibernate2 Components: toolset Versions: 2.0.3 Assignee: Reporter: Robert Zhu Created: Thu, 18 Sep 2003 7:32 PM Updated: Thu, 25 Sep 2003 11:30 AM Environment: Any Description: > robertz wrote: I use SchemaExport to generate a mysql table called userandrole. The table has an internalId, which is the PK. It also has a unique key (index) comprising roleName and userName. The interesting thing is that this unique key generated for the table ignores the specified key name (key1). It uses the first column name of the composite key, ie, roleName. I am not sure if this is intentional or just a small bug in SchemaExport. Below is the Hibernate descriptor file. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.abcd.persist.UserAndRole" table="userandrole" dynamic-update="false" dynamic-insert="false" > <id name="internalId" column="internalId" type="java.lang.Long" > <generator class="native"> </generator> </id> <property name="roleName" type="java.lang.String" update="true" insert="true"> <column name="roleName" unique-key="key1" length="200" not-null="true"/> </property> <property name="userName" type="java.lang.String" update="true" insert="true"> <column name="userName" unique-key="key1" length="200" not-null="true"/> </property> <property name="creationDate" type="java.util.Calendar" update="true" insert="true" column="creationDate" /> </class> </hibernate-mapping> ------------------------------- > Christian Bauer replied: The unique constraint name should be "key1". Please open a new JIRA issue. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 16:18:55
|
Message: The following issue has been closed. Resolver: Gavin King Date: Thu, 25 Sep 2003 11:18 AM Done. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-356 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-356 Summary: SchemaExport and hsqldb drop table statements Type: Improvement Status: Closed Priority: Trivial Resolution: FIXED Project: Hibernate2 Components: toolset Fix Fors: 2.1 beta 4 Versions: 2.0.3 Assignee: Reporter: Aapo Laakkonen Created: Tue, 23 Sep 2003 9:33 AM Updated: Thu, 25 Sep 2003 11:18 AM Description: For convenience it would be great if SchemaExport generates "IF EXISTS" statements after each DROP TABLE statement when HSQLDialect is in use. For example instead of this: drop table usr; generate code like this: drop table usr if exists; Also do we need to drop constraints separately? --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 16:01:06
|
Message: The following issue has been closed. Resolver: Christian Bauer Date: Thu, 25 Sep 2003 11:00 AM I'm not very happy with this scripts. They don't improve much and have some hardcoded paths to JDBC drivers and assume that the current working dir is the Hibernate directory. Actually, we had no request for scripts like this, because people usually use Ant anyway. We will also have a nice Ant example soon in the "Toolset" workshop papers. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-274 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-274 Summary: bin scripts addition / rewrite Type: Improvement Status: Closed Priority: Major Resolution: WON'T FIX Project: Hibernate2 Components: core toolset Versions: 2.0rc2 2.1 2.0 final 2.0.1 2.0.2 2.0.3 2.1 beta 1 2.1 beta 2 Assignee: Christian Bauer Reporter: Les Hazlewood Created: Tue, 19 Aug 2003 7:38 AM Updated: Thu, 25 Sep 2003 11:00 AM Environment: windows (all), *nix Description: I downloaded the latest beta binary version of Hibernate this morning and untarred it to start using it. However, I noticed there were no linux binary scripts to run. So I created some :) I also re-wrote the windows batch scripts to be more robust and flexible with respect to how classpaths are set. I didn't test the windows scripts, so someone needs to run them on a windows box to make sure they work (although the code is pretty trivial and should run nicely). The linux scripts all work properly (I tested all of them) and are chmodded to execute permissions. If you manipulate these files in an ant build (or copy them from one location to another during build time), please ensure that the <chmod/> ant task sets the execute permissions properly for *nix users. The directory structure of the file I have is as follows: bin-scripts | |--bin (rewritten and new Hibernate bin scripts, for win and *nix) | |--tools | |--bin (rewritten and new Tools bin scripts, for win and *nix). Naturally, please feel free to format/rewrite/reuse the code however you feel that it may benefit Hibernate. Apparently, this "create new issue" page does not allow file uploads, so please email pha...@us... to let me know to whom I may send the tarball. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 15:55:54
|
Message: The following issue has been closed. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-341 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-341 Summary: demo.sh uses wrong jar: lib/cglib.jar, not lib/cglib-asm.jar Type: Improvement Status: Closed Priority: Trivial Resolution: FIXED Project: Hibernate2 Versions: 2.0.3 Assignee: Christian Bauer Reporter: Clemens Robbenhaar Created: Wed, 17 Sep 2003 7:10 AM Updated: Thu, 25 Sep 2003 10:54 AM Description: The subject actually says all. when downloading hibernate-2.0.3.tar.gz and trying to run the "demo.sh" I get the error java.lang.NoClassDefFoundError: net/sf/cglib/KeyFactory The reason for this is that the "lib/cglib.jar has been renamed to "lib/cglib-asm.jar" in the CVS; the classpath in the script needs to be fixed to reflect this. The demo.bat is most propably affected, too, though I did not really try it. After fixing the classpath manually in my downloaded version, the demo runs. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |
From: <leg...@at...> - 2003-09-25 10:46:55
|
Message: The following issue has been re-assigned. Assignee: Max Rydahl Andersen (mailto:xa...@xa...) Assigner: Max Rydahl Andersen (mailto:xa...@xa...) Date: Thu, 25 Sep 2003 5:45 AM Comment: Good idea - will integrate as soon as i can. --------------------------------------------------------------------- View the issue: http://opensource.atlassian.com/projects/hibernate/secure/ViewIssue.jspa?key=HB-361 Here is an overview of the issue: --------------------------------------------------------------------- Key: HB-361 Summary: Have hbm2java.Field provide the Length information via easy accessor to renderer Type: Improvement Status: Assigned Priority: Major Project: Hibernate2 Assignee: Max Rydahl Andersen Reporter: Klaus Zimmermann Created: Thu, 25 Sep 2003 4:37 AM Updated: Thu, 25 Sep 2003 5:45 AM Description: It was nice to have the information of the length attribute of your average property element available to a custom renderer via a simple accessor in the net.sf.hibernate.tools.hbm2java.Field class. We need this information for a BeanInfo-renderer we have in house. --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira |