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: Emmanuel B. (JIRA) <no...@at...> - 2006-05-24 22:46:16
|
Configuration at runtime the 2nd level cache parameters through a JMX and a SF API ---------------------------------------------------------------------------------- Key: HHH-1783 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1783 Project: Hibernate3 Type: New Feature Components: core Reporter: Emmanuel Bernard Ability to enable / disable (ie define a caching strategy for entities and collections. Some random ORM has this feature which seems to be useful when hot tuning the application. I'm not 100% convinced by the usefulness of it but it might worth considering it. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 21:48:17
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-183?page=all ] Steve Ebersole resolved EJB-183: -------------------------------- Resolution: Fixed fixed, but this will require the 3.2.0.ga release of hibernate core > EntityManager.remove should be a noop on new/transient entities > --------------------------------------------------------------- > > Key: EJB-183 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-183 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: Java 1.5.06, hibernate 3.2.CR2, entity manager 3.2.CR1, annotation 3.2.CR1 > Reporter: Rob Hughes > Assignee: Steve Ebersole > > > According to section 3.2.2 of the ejb persistence spec the following code should be a noop: > EntityManager em = Persistence.createEntityManagerFactory("manager").createEntityManager(); > SomeEntity entity = new SomeEntity(); > em.getTransaction().begin(); > em.remove(entity); > em.getTransaction().commit(); > This is throwing a TransientObjectException wrapped in a PersistenceException. > I looked at patching AbstractEntityManagerImpl.remove to specifically ignore TransientObjectException but that wouldn't allow the delete operation to be cascaded downward as the cascading in DefaultDeleteEventListener.onDelete is after the transient object check. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 21:46:14
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1779?page=all ] Steve Ebersole closed HHH-1779: ------------------------------- Resolution: Fixed > Allow Session.remove() on transient object > ------------------------------------------ > > Key: HHH-1779 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1779 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > See EJB-183 > Essentially, the JPA spec requires that EntityManager.remove() be allowed on a transient object. It further says that the remove operation is required to be cascaded: > If X is a new entity, it is ignored by the remove operation. However, the remove operation is > cascaded to entities referenced by X, if the relationships from X to these other entities is annotated > with the cascade=REMOVE or cascade=ALL annotation element value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 21:22:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1779?page=all ] Steve Ebersole updated HHH-1779: -------------------------------- Summary: Allow Session.remove() on transient object (was: Allow Sessiojn.remove() on transient object) > Allow Session.remove() on transient object > ------------------------------------------ > > Key: HHH-1779 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1779 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > See EJB-183 > Essentially, the JPA spec requires that EntityManager.remove() be allowed on a transient object. It further says that the remove operation is required to be cascaded: > If X is a new entity, it is ignored by the remove operation. However, the remove operation is > cascaded to entities referenced by X, if the relationships from X to these other entities is annotated > with the cascade=REMOVE or cascade=ALL annotation element value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 21:20:23
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617?page=all ] Steve Ebersole closed HHH-1617: ------------------------------- Fix Version: 3.2.0 Resolution: Fixed Assign To: Steve Ebersole Done for both entity and collection batches. Although see HHH-1775 for follow-on for collection batches > Check the second-level cache before adding a PK to a batch fetch > ---------------------------------------------------------------- > > Key: HHH-1617 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1617 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Gavin King > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > BatchFetchQueue.getEntityBatch() should check the second level cache to see if the pk is available in the cache before adding it to a batch of pks. Ditto for getCollectionBatch(). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Joe K. (JIRA) <no...@at...> - 2006-05-24 20:55:29
|
PersistentList.readFrom() Shouldn't Pad With Nulls For UserCollectionType ------------------------------------------------------------------------- Key: HHH-1782 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1782 Project: Hibernate3 Type: Bug Components: core Versions: 3.1.3 Environment: Hibernate 3.1.3, DB2 8.1.3 Reporter: Joe Kelly Priority: Minor I'm using HIbernate's UserCollectionType feature to persist a custom List implementation. The custom List's add(int, Object) and add(Object) methods do some validity checking such as making sure that the Object param is not null. Unfortunately, PersistentList.readFrom() does not deal with this case. Here is the code for that method: ------------- public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException { Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ; int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue(); //pad with nulls from the current last element up to the new index for ( int i = list.size(); i<=index; i++) { list.add(i, null); } list.set(index, element); return element; } ------------- The problem is the "pad with nulls" section. When a null object is added to the underlying custom List implementation, an exception is thrown. Perhaps you could use temporary List to solve this. For example: ------------- public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner) throws HibernateException, SQLException { Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ; int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue(); List temp = new ArrayList(list); //pad with nulls from the current last element up to the new index for ( int i = list.size(); i<=index; i++) { temp.add(i, null); } temp.set(index, element); list.clear(); list.addAll(temp); return element; } ------------- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Adrian S. (JIRA) <no...@at...> - 2006-05-24 20:55:28
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1781?page=comments#action_23159 ] Adrian Sampaleanu commented on HHH-1781: ---------------------------------------- Could you point me to the issue this one duplicates or link this to that one please? I really did try to find if this was already reported, but I guess I missed it in the search results. Thanks > Criteria query returns duplicate results when root class contains eagerly fetched many-to-many collection > --------------------------------------------------------------------------------------------------------- > > Key: HHH-1781 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1781 > Project: Hibernate3 > Type: Bug > Components: query-criteria > Versions: 3.2.0.cr2 > Environment: Hibernate 3.2 post CR2, Oracle 10g > Reporter: Adrian Sampaleanu > > > The following query returns multiple UserImpl instances when the "ids" collection holds just one identifier: > return session.createCriteria(UserImpl.class) > .add(Restrictions.in("id", ids)) > .list(); > Sniffing the generated SQL I get: > SELECT > this_.ID as ID46_3_, > this_.version as version46_3_, > this_.locale as locale46_3_, > this_.username as username46_3_, > this_.ENABLED as ENABLED46_3_, > this_.ORGANIZATION_ID as ORGANIZ12_46_3_, > this_.firstname as firstname46_3_, > this_.lastname as lastname46_3_, > this_.EMAIL as EMAIL46_3_, > this_.OTA_LOGIN as OTA9_46_3_, > this_.OTA_PASSWORD as OTA10_46_3_, > this_.PASSWORD as PASSWORD46_3_, > groups2_.USER_ID as USER1_5_, > groupimpl3_.id as GROUP2_5_, > groupimpl3_.id as id43_0_, > groupimpl3_.name as name43_0_, > groupimpl3_.version as version43_0_, > organizati4_.id as id37_1_, > organizati4_.name as name37_1_, > organizati4_.version as version37_1_, > organizati4_.CURRENCY as CURRENCY37_1_, > organizati4_.enabled as enabled37_1_, > organizati4_.CODE as CODE37_1_, > organizati4_.PARENT_ORGANIZATION_ID as PARENT14_37_1_, > organizati4_.PKG_FILENAME_PATTERN as PKG8_37_1_, > organizati4_.SHORT_CODE as SHORT9_37_1_, > organizati4_.WEBHOST_NAME_PREFIX as WEBHOST10_37_1_, > organizati4_.WEBHOST_NAME as WEBHOST11_37_1_, > organizati4_.PRODUCT_FEATURES as PRODUCT12_37_1_, > organizati4_.ORGANIZATION_TYPE as ORGANIZ13_37_1_, > organizati4_.TYPE as TYPE37_1_, > organizati5_.id as id37_2_, > organizati5_.name as name37_2_, > organizati5_.version as version37_2_, > organizati5_.CURRENCY as CURRENCY37_2_, > organizati5_.enabled as enabled37_2_, > organizati5_.CODE as CODE37_2_, > organizati5_.PARENT_ORGANIZATION_ID as PARENT14_37_2_, > organizati5_.PKG_FILENAME_PATTERN as PKG8_37_2_, > organizati5_.SHORT_CODE as SHORT9_37_2_, > organizati5_.WEBHOST_NAME_PREFIX as WEBHOST10_37_2_, > organizati5_.WEBHOST_NAME as WEBHOST11_37_2_, > organizati5_.PRODUCT_FEATURES as PRODUCT12_37_2_, > organizati5_.ORGANIZATION_TYPE as ORGANIZ13_37_2_, > organizati5_.TYPE as TYPE37_2_ > FROM > rnadarajah.USERS this_ > LEFT OUTER JOIN > rnadarajah.USER_GROUPS groups2_ > ON > this_.ID= groups2_.USER_ID > LEFT OUTER JOIN > rnadarajah.GROUPS groupimpl3_ > ON > groups2_.GROUP_ID= groupimpl3_.id > LEFT OUTER JOIN > rnadarajah.ORGANIZATIONS organizati4_ > ON > this_.ORGANIZATION_ID= organizati4_.id > LEFT OUTER JOIN > rnadarajah.ORGANIZATIONS organizati5_ > ON > organizati4_.PARENT_ORGANIZATION_ID= organizati5_.id > WHERE > this_.ID in (:1) > When substituting the appropriate ID, a row is returned for every group the user is part of. This makes sense since the mapping to the groups (and join) table is specified as: > @ManyToMany(targetEntity = GroupImpl.class, fetch = FetchType.EAGER) > @JoinTable( name = "USER_GROUPS", > joinColumns = @JoinColumn(name = "USER_ID"), > inverseJoinColumns = @JoinColumn(name = "GROUP_ID")) > public Set<Group> getGroups() > { > return _groups; > } > So, the collection is eagerly fetched as specified, but it looks like Hibernate doesn't return a distinct root entity as it should. I'm pretty sure this was working correctly in Hibernate 3.2 CR1 (for sure it was working with some prior version of 3.2), but I can't be sure since we switched from XDoclet to annotations for specifying the mapping of this particular entity at the same time as upgrading and maybe that's where the problem lies. The collection mapping used to be specified as following with XDoclet: > /** > * @hibernate.set table = "USER_GROUPS" > * @hibernate.collection-key column = "USER_ID" > * @hibernate.collection-key-column name = "USER_ID" > * length = "32" > * @hibernate.collection-many-to-many class = "com.xxx.common.model.user.GroupImpl" > * column = "GROUP_ID" > */ > Using the following, I get only one user as expected, for the single ID supplied: > String queryString = "from UserImpl where id in (:userIds)"; > Query query = session.createQuery(queryString); > query.setParameterList("userIds", ids); > return query.list(); > I can do this as a work around, but I'd like to know if this is a problem in Hibernate 3.2 or with something we're doing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-24 20:40:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1781?page=all ] Emmanuel Bernard resolved HHH-1781: ----------------------------------- Resolution: Duplicate this is a dupe > Criteria query returns duplicate results when root class contains eagerly fetched many-to-many collection > --------------------------------------------------------------------------------------------------------- > > Key: HHH-1781 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1781 > Project: Hibernate3 > Type: Bug > Components: query-criteria > Versions: 3.2.0.cr2 > Environment: Hibernate 3.2 post CR2, Oracle 10g > Reporter: Adrian Sampaleanu > > > The following query returns multiple UserImpl instances when the "ids" collection holds just one identifier: > return session.createCriteria(UserImpl.class) > .add(Restrictions.in("id", ids)) > .list(); > Sniffing the generated SQL I get: > SELECT > this_.ID as ID46_3_, > this_.version as version46_3_, > this_.locale as locale46_3_, > this_.username as username46_3_, > this_.ENABLED as ENABLED46_3_, > this_.ORGANIZATION_ID as ORGANIZ12_46_3_, > this_.firstname as firstname46_3_, > this_.lastname as lastname46_3_, > this_.EMAIL as EMAIL46_3_, > this_.OTA_LOGIN as OTA9_46_3_, > this_.OTA_PASSWORD as OTA10_46_3_, > this_.PASSWORD as PASSWORD46_3_, > groups2_.USER_ID as USER1_5_, > groupimpl3_.id as GROUP2_5_, > groupimpl3_.id as id43_0_, > groupimpl3_.name as name43_0_, > groupimpl3_.version as version43_0_, > organizati4_.id as id37_1_, > organizati4_.name as name37_1_, > organizati4_.version as version37_1_, > organizati4_.CURRENCY as CURRENCY37_1_, > organizati4_.enabled as enabled37_1_, > organizati4_.CODE as CODE37_1_, > organizati4_.PARENT_ORGANIZATION_ID as PARENT14_37_1_, > organizati4_.PKG_FILENAME_PATTERN as PKG8_37_1_, > organizati4_.SHORT_CODE as SHORT9_37_1_, > organizati4_.WEBHOST_NAME_PREFIX as WEBHOST10_37_1_, > organizati4_.WEBHOST_NAME as WEBHOST11_37_1_, > organizati4_.PRODUCT_FEATURES as PRODUCT12_37_1_, > organizati4_.ORGANIZATION_TYPE as ORGANIZ13_37_1_, > organizati4_.TYPE as TYPE37_1_, > organizati5_.id as id37_2_, > organizati5_.name as name37_2_, > organizati5_.version as version37_2_, > organizati5_.CURRENCY as CURRENCY37_2_, > organizati5_.enabled as enabled37_2_, > organizati5_.CODE as CODE37_2_, > organizati5_.PARENT_ORGANIZATION_ID as PARENT14_37_2_, > organizati5_.PKG_FILENAME_PATTERN as PKG8_37_2_, > organizati5_.SHORT_CODE as SHORT9_37_2_, > organizati5_.WEBHOST_NAME_PREFIX as WEBHOST10_37_2_, > organizati5_.WEBHOST_NAME as WEBHOST11_37_2_, > organizati5_.PRODUCT_FEATURES as PRODUCT12_37_2_, > organizati5_.ORGANIZATION_TYPE as ORGANIZ13_37_2_, > organizati5_.TYPE as TYPE37_2_ > FROM > rnadarajah.USERS this_ > LEFT OUTER JOIN > rnadarajah.USER_GROUPS groups2_ > ON > this_.ID= groups2_.USER_ID > LEFT OUTER JOIN > rnadarajah.GROUPS groupimpl3_ > ON > groups2_.GROUP_ID= groupimpl3_.id > LEFT OUTER JOIN > rnadarajah.ORGANIZATIONS organizati4_ > ON > this_.ORGANIZATION_ID= organizati4_.id > LEFT OUTER JOIN > rnadarajah.ORGANIZATIONS organizati5_ > ON > organizati4_.PARENT_ORGANIZATION_ID= organizati5_.id > WHERE > this_.ID in (:1) > When substituting the appropriate ID, a row is returned for every group the user is part of. This makes sense since the mapping to the groups (and join) table is specified as: > @ManyToMany(targetEntity = GroupImpl.class, fetch = FetchType.EAGER) > @JoinTable( name = "USER_GROUPS", > joinColumns = @JoinColumn(name = "USER_ID"), > inverseJoinColumns = @JoinColumn(name = "GROUP_ID")) > public Set<Group> getGroups() > { > return _groups; > } > So, the collection is eagerly fetched as specified, but it looks like Hibernate doesn't return a distinct root entity as it should. I'm pretty sure this was working correctly in Hibernate 3.2 CR1 (for sure it was working with some prior version of 3.2), but I can't be sure since we switched from XDoclet to annotations for specifying the mapping of this particular entity at the same time as upgrading and maybe that's where the problem lies. The collection mapping used to be specified as following with XDoclet: > /** > * @hibernate.set table = "USER_GROUPS" > * @hibernate.collection-key column = "USER_ID" > * @hibernate.collection-key-column name = "USER_ID" > * length = "32" > * @hibernate.collection-many-to-many class = "com.xxx.common.model.user.GroupImpl" > * column = "GROUP_ID" > */ > Using the following, I get only one user as expected, for the single ID supplied: > String queryString = "from UserImpl where id in (:userIds)"; > Query query = session.createQuery(queryString); > query.setParameterList("userIds", ids); > return query.list(); > I can do this as a work around, but I'd like to know if this is a problem in Hibernate 3.2 or with something we're doing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Adrian S. (JIRA) <no...@at...> - 2006-05-24 20:12:17
|
Criteria query returns duplicate results when root class contains eagerly fetched many-to-many collection --------------------------------------------------------------------------------------------------------- Key: HHH-1781 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1781 Project: Hibernate3 Type: Bug Components: query-criteria Versions: 3.2.0.cr2 Environment: Hibernate 3.2 post CR2, Oracle 10g Reporter: Adrian Sampaleanu The following query returns multiple UserImpl instances when the "ids" collection holds just one identifier: return session.createCriteria(UserImpl.class) .add(Restrictions.in("id", ids)) .list(); Sniffing the generated SQL I get: SELECT this_.ID as ID46_3_, this_.version as version46_3_, this_.locale as locale46_3_, this_.username as username46_3_, this_.ENABLED as ENABLED46_3_, this_.ORGANIZATION_ID as ORGANIZ12_46_3_, this_.firstname as firstname46_3_, this_.lastname as lastname46_3_, this_.EMAIL as EMAIL46_3_, this_.OTA_LOGIN as OTA9_46_3_, this_.OTA_PASSWORD as OTA10_46_3_, this_.PASSWORD as PASSWORD46_3_, groups2_.USER_ID as USER1_5_, groupimpl3_.id as GROUP2_5_, groupimpl3_.id as id43_0_, groupimpl3_.name as name43_0_, groupimpl3_.version as version43_0_, organizati4_.id as id37_1_, organizati4_.name as name37_1_, organizati4_.version as version37_1_, organizati4_.CURRENCY as CURRENCY37_1_, organizati4_.enabled as enabled37_1_, organizati4_.CODE as CODE37_1_, organizati4_.PARENT_ORGANIZATION_ID as PARENT14_37_1_, organizati4_.PKG_FILENAME_PATTERN as PKG8_37_1_, organizati4_.SHORT_CODE as SHORT9_37_1_, organizati4_.WEBHOST_NAME_PREFIX as WEBHOST10_37_1_, organizati4_.WEBHOST_NAME as WEBHOST11_37_1_, organizati4_.PRODUCT_FEATURES as PRODUCT12_37_1_, organizati4_.ORGANIZATION_TYPE as ORGANIZ13_37_1_, organizati4_.TYPE as TYPE37_1_, organizati5_.id as id37_2_, organizati5_.name as name37_2_, organizati5_.version as version37_2_, organizati5_.CURRENCY as CURRENCY37_2_, organizati5_.enabled as enabled37_2_, organizati5_.CODE as CODE37_2_, organizati5_.PARENT_ORGANIZATION_ID as PARENT14_37_2_, organizati5_.PKG_FILENAME_PATTERN as PKG8_37_2_, organizati5_.SHORT_CODE as SHORT9_37_2_, organizati5_.WEBHOST_NAME_PREFIX as WEBHOST10_37_2_, organizati5_.WEBHOST_NAME as WEBHOST11_37_2_, organizati5_.PRODUCT_FEATURES as PRODUCT12_37_2_, organizati5_.ORGANIZATION_TYPE as ORGANIZ13_37_2_, organizati5_.TYPE as TYPE37_2_ FROM rnadarajah.USERS this_ LEFT OUTER JOIN rnadarajah.USER_GROUPS groups2_ ON this_.ID= groups2_.USER_ID LEFT OUTER JOIN rnadarajah.GROUPS groupimpl3_ ON groups2_.GROUP_ID= groupimpl3_.id LEFT OUTER JOIN rnadarajah.ORGANIZATIONS organizati4_ ON this_.ORGANIZATION_ID= organizati4_.id LEFT OUTER JOIN rnadarajah.ORGANIZATIONS organizati5_ ON organizati4_.PARENT_ORGANIZATION_ID= organizati5_.id WHERE this_.ID in (:1) When substituting the appropriate ID, a row is returned for every group the user is part of. This makes sense since the mapping to the groups (and join) table is specified as: @ManyToMany(targetEntity = GroupImpl.class, fetch = FetchType.EAGER) @JoinTable( name = "USER_GROUPS", joinColumns = @JoinColumn(name = "USER_ID"), inverseJoinColumns = @JoinColumn(name = "GROUP_ID")) public Set<Group> getGroups() { return _groups; } So, the collection is eagerly fetched as specified, but it looks like Hibernate doesn't return a distinct root entity as it should. I'm pretty sure this was working correctly in Hibernate 3.2 CR1 (for sure it was working with some prior version of 3.2), but I can't be sure since we switched from XDoclet to annotations for specifying the mapping of this particular entity at the same time as upgrading and maybe that's where the problem lies. The collection mapping used to be specified as following with XDoclet: /** * @hibernate.set table = "USER_GROUPS" * @hibernate.collection-key column = "USER_ID" * @hibernate.collection-key-column name = "USER_ID" * length = "32" * @hibernate.collection-many-to-many class = "com.xxx.common.model.user.GroupImpl" * column = "GROUP_ID" */ Using the following, I get only one user as expected, for the single ID supplied: String queryString = "from UserImpl where id in (:userIds)"; Query query = session.createQuery(queryString); query.setParameterList("userIds", ids); return query.list(); I can do this as a work around, but I'd like to know if this is a problem in Hibernate 3.2 or with something we're doing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jeremy H. (JIRA) <no...@at...> - 2006-05-24 19:43:33
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293?page=comments#action_23157 ] Jeremy Haile commented on HHH-1293: ----------------------------------- This problem exists in our environment. We are running jdk1.5.0_06 on Fedora Core 5, kernel 2.6.16-1.2122, Hibernate 3.1, CGLIB 2.1.3. The problem happens with the client VM, and disappears when the -server parameter is used. The application where we experienced this problem is a single-threaded app that is using Hibernate to run many large selects. > java.lang.NoSuchMethodError: <persistent class>.getHibernateLazyInitializer() > ----------------------------------------------------------------------------- > > Key: HHH-1293 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1293 > Project: Hibernate3 > Type: Bug > Versions: 3.1.1 > Reporter: Andreas Schildbach > Priority: Blocker > Attachments: manysessions.tgz > > > As documented in > http://forum.hibernate.org/viewtopic.php?t=940119 > some people (including me) are getting this exception with the final release of Hibernate 3.1: > java.lang.NoSuchMethodError: de.schildbach.game.integration.HibernateGamePlayer.getHibernateLazyInitializer()Lorg/hibernate/proxy/LazyInitializer; > at de.schildbach.game.integration.HibernateGamePlayer$$EnhancerByCGLIB$$afecb986.getHibernateLazyInitializer(<generated>) > at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:274) > at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177) > at org.hibernate.type.TypeFactory.assemble(TypeFactory.java:398) > at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:96) > at org.hibernate.cache.entry.CacheEntry.assemble(CacheEntry.java:82) > at org.hibernate.event.def.DefaultLoadEventListener.assembleCacheEntry(DefaultLoadEventListener.java:520) > at org.hibernate.event.def.DefaultLoadEventListener.loadFromSecondLevelCache(DefaultLoadEventListener.java:474) > at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:328) > at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123) > at org.hibernate.event.def.DefaultLoadEventListener.returnNarrowedProxy(DefaultLoadEventListener.java:202) > at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:169) > at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) > at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869) > at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838) > at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266) > at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:177) > at org.hibernate.collection.PersistentList.initializeFromCache(PersistentList.java:378) > at org.hibernate.cache.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:35) > at org.hibernate.event.def.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:130) > at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:48) > at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1627) > at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344) > at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86) > at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:109) > at org.hibernate.collection.PersistentList.size(PersistentList.java:91) > The exception varies with the actual persistent class in use. Most people seem to be using JDK 1.5 and Linux. Some reports say that the exception does not happen from the very start of the application, but it takes "several invocations"/"some time" until it appear, but then it appears very often. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Marton P. (JIRA) <no...@at...> - 2006-05-24 18:23:16
|
negation of EXISTS in hql query does not work --------------------------------------------- Key: HHH-1780 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1780 Project: Hibernate3 Type: Bug Versions: 3.1.3, 3.2.0 cr1, 3.2.0.cr2 Reporter: Marton Papp Hello! I think I found a bug in Hibernate, in class org.hibernate.hql.ast.HqlParser. It is in the methtod: public AST negateNode(AST x) The switch lacks the node type: EXISTS. The default negateNode() implementation in org.hibernate.hql.antlr.HqlBaseParser seems to be broken by me, since it does not actually inverts the node but returns a node that is inverted. Or, to be more exact, the negation of OR and AND types are buggy, since they seem to assume that negateNode() will change the node itself, and so they simply discard its return value. I wish the branch for NOT was not commented out, since it would provide a workaround, but now i'm stuck. Regards, Marton -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Chris H. (JIRA) <no...@at...> - 2006-05-24 17:43:28
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1746?page=comments#action_23156 ] Chris Harvey commented on HHH-1746: ----------------------------------- This issue can also be reproduced with a select clause in the form of: select c from customers c where c.lastname = :lastname A rewritten query of the form from customers c where c.lastname = :lastname works fine. > NullPointerException at IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195 > ------------------------------------------------------------------------------------------ > > Key: HHH-1746 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1746 > Project: Hibernate3 > Type: Bug > Components: query-hql > Versions: 3.2.0 cr1 > Reporter: Igor A Tarasov > > > java.lang.NullPointerException > at org.hibernate.hql.ast.tree.IdentNode.resolveAsNakedComponentPropertyRefLHS(IdentNode.java:195) > at org.hibernate.hql.ast.tree.IdentNode.resolve(IdentNode.java:85) > at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:139) > at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:469) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4316) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1211) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4032) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3518) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1758) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1683) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.updateStatement(HqlSqlBaseWalker.java:358) > at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:237) > at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:227) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:159) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:110) > at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77) > at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1586) > at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:77) > at org.dicr.isp.mbean.DataManager.deleteGroup(DataManager.java:121) > at org.apache.jsp.admin.data.group_del_jsp._jspService(group_del_jsp.java:67) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) > at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329) > ... 17 more > 194: Type componentType = getNakedPropertyType(fromElement); > 195: if (!componentType.isComponentType()) { > 196: throw new QueryException("Property '" + getOriginalText() + "' is not a component. Use an alias to reference associations or collections."); > 197: } > This occur if EJB3-QL query contains this errors: > update GroupDO set GroupDO._deleted = now() where GroupDO._id = ?1 and GroupDO._deleted is NULL > Correct query work fine: > update GroupDO set _deleted = now() where _id = ?1 and _deleted is NULL -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Todd N. (JIRA) <no...@at...> - 2006-05-24 16:52:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-1215?page=comments#action_23155 ] Todd Nine commented on HB-1215: ------------------------------- I need to implement a dialect for Tera Data, but I will be using Hibernate 3. As far as I can tell, TeraData's type 4 driver does not support any sort of metadata, should I just throw an UnsupportedOperationException for the DDL generation. > Teradata Dialect > ---------------- > > Key: HB-1215 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1215 > Project: Hibernate2 > Type: Patch > Environment: hibernate 2.1.4 on JBoss 3.2.5 > Reporter: John Pianezze > Attachments: TeradataDialect.java > > Original Estimate: 1 hour > Remaining: 1 hour > > The Teradata DBMS is not supported. > I have implemented a dialect that supports the basic features of the database. > Notes: Newer versions of teradata support "identity columns" but there's no way to know the value of the column that was generated, so you can't use it generate the ID column with Hibernate. > It also does not support Sequence numbers, however you can implement a "teradata macro" to support it, and inthe dialect, you use the following syntax: > execute hibernate_sequence(seq_name) > with the sequence name as a parameter. > One additional fix is required, as detailed in HB-1214 > the JDBC code that runs the sequence query needs to be able to get the sequence number from a compound result set. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 16:32:15
|
Allow Sessiojn.remove() on transient object ------------------------------------------- Key: HHH-1779 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1779 Project: Hibernate3 Type: Improvement Components: core Reporter: Steve Ebersole Assigned to: Steve Ebersole Fix For: 3.2.0 See EJB-183 Essentially, the JPA spec requires that EntityManager.remove() be allowed on a transient object. It further says that the remove operation is required to be cascaded: If X is a new entity, it is ignored by the remove operation. However, the remove operation is cascaded to entities referenced by X, if the relationships from X to these other entities is annotated with the cascade=REMOVE or cascade=ALL annotation element value. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 16:29:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-183?page=all ] Steve Ebersole reassigned EJB-183: ---------------------------------- Assign To: Steve Ebersole > EntityManager.remove should be a noop on new/transient entities > --------------------------------------------------------------- > > Key: EJB-183 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-183 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Environment: Java 1.5.06, hibernate 3.2.CR2, entity manager 3.2.CR1, annotation 3.2.CR1 > Reporter: Rob Hughes > Assignee: Steve Ebersole > > > According to section 3.2.2 of the ejb persistence spec the following code should be a noop: > EntityManager em = Persistence.createEntityManagerFactory("manager").createEntityManager(); > SomeEntity entity = new SomeEntity(); > em.getTransaction().begin(); > em.remove(entity); > em.getTransaction().commit(); > This is throwing a TransientObjectException wrapped in a PersistenceException. > I looked at patching AbstractEntityManagerImpl.remove to specifically ignore TransientObjectException but that wouldn't allow the delete operation to be cascaded downward as the cascading in DefaultDeleteEventListener.onDelete is after the transient object check. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Rob H. (JIRA) <no...@at...> - 2006-05-24 15:19:12
|
EntityManager.remove should be a noop on new/transient entities --------------------------------------------------------------- Key: EJB-183 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-183 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Environment: Java 1.5.06, hibernate 3.2.CR2, entity manager 3.2.CR1, annotation 3.2.CR1 Reporter: Rob Hughes According to section 3.2.2 of the ejb persistence spec the following code should be a noop: EntityManager em = Persistence.createEntityManagerFactory("manager").createEntityManager(); SomeEntity entity = new SomeEntity(); em.getTransaction().begin(); em.remove(entity); em.getTransaction().commit(); This is throwing a TransientObjectException wrapped in a PersistenceException. I looked at patching AbstractEntityManagerImpl.remove to specifically ignore TransientObjectException but that wouldn't allow the delete operation to be cascaded downward as the cascading in DefaultDeleteEventListener.onDelete is after the transient object check. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-24 14:05:50
|
Add Websphere proprietary jar protocol -------------------------------------- Key: EJB-182 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-182 Project: Hibernate Entity Manager Type: Improvement Components: EntityManager Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Tomas D. (JIRA) <no...@at...> - 2006-05-24 13:53:28
|
Transient object returned from session -------------------------------------- Key: HHH-1778 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1778 Project: Hibernate3 Type: Bug Versions: 3.1.2, 3.1.3 Environment: hibernete 3.1.3, 3.1.2 Reporter: Tomas Drencak I have object1 which have collection of object2 which have association with object3. I add new object2 with transient instance of object3 into object1 collection. Then I save object1. It cascades save to object2. Then I need to reread the object1 state from the database. So I call session.get(Object1.class, object1.getId()); returned object contains newly added object2 in the collection and that object2 has original transient object3, which is not associated with the current session. So I get LazyInitializationException... I think that session have to check if all returned objects are associated with current session. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-24 13:51:04
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1776?page=all ] Steve Ebersole closed HHH-1776: ------------------------------- Resolution: Rejected Assign To: Steve Ebersole You actually have the collection mapped incorrectly. You attempt to use the primary key of the collection elements as the list index. list-index refers to the index or position of the elements within the list, which in fact must be sequential. lazy=extra is intended for *huge* collections. Across such data sets, a "select max(...)" query will be much faster that a "select count(...)" query. That, coupled with the fact mentioned above, is why the max() query is used instead of the count() query > Extra Lazy collection, wrong size > --------------------------------- > > Key: HHH-1776 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1776 > Project: Hibernate3 > Type: Bug > Versions: 3.2.0.cr2 > Environment: HSQLDB 1.8.0.4 > Reporter: Ecmel Ercan > Assignee: Steve Ebersole > > > I have the following mappings: > <hibernate-mapping> > <class name="TestParent" table="TESTPARENT"> > <id name="id" column="ID"> > <generator class="native"/> > </id> > <list name="children" lazy="extra"> > <key column="PARENT_ID" /> > <list-index column="id"/> > <one-to-many class="TestChild" /> > </list> > > </class> > > </hibernate-mapping> > <hibernate-mapping> > <class name="TestChild" table="TESTCHILD"> > <id name="id" column="ID"> > <generator class="native"/> > </id> > > <many-to-one name="parent" column="id" class="TestParent" /> > > </class> > > </hibernate-mapping> > When I get the size of the children by: > System.out.println(parent.getChildren().size()); > the following query is issued: > select max(id) + 1 from TESTCHILD where PARENT_ID =? > This assumes a sequential id column with no deleted rows. I expect a count(id) query. > Strangely, if I map the same class with annotations, a count(id) query is issued, but the collection will not be extra lazy as I mentioned in the annotations forum: http://forum.hibernate.org/viewtopic.php?t=959249 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-24 13:50:45
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-182?page=all ] Emmanuel Bernard resolved EJB-182: ---------------------------------- Resolution: Fixed > Add Websphere proprietary jar protocol > -------------------------------------- > > Key: EJB-182 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-182 > Project: Hibernate Entity Manager > Type: Improvement > Components: EntityManager > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-24 11:08:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Max Rydahl Andersen closed HHH-1777: ------------------------------------ Resolution: Rejected read Hibernate 3 migration guide which contains info about H3 and Weblogic > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:06:25
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Ranjit Patil updated HHH-1777: ------------------------------ Attachment: BookListAction.java BookListForm.class > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, BookListAction.java, BookListForm.class, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:04:26
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777?page=all ] Ranjit Patil updated HHH-1777: ------------------------------ Attachment: LibraryManager.java Book.java AbstractBook.java > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken > ------------------------------------------------------------------------------------- > > Key: HHH-1777 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 > Project: Hibernate3 > Type: Bug > Versions: 3.1.3 > Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA > Reporter: Ranjit Patil > Attachments: AbstractBook.java, Book.hbm.xml, Book.java, HibernateSessionFactory.java, LibraryManager.java, hibernate.cfg.xml > > > I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: > public Book[] getAllBooks() { > /* will hold the books we are going to return later */ > List books = new ArrayList(); > /* a Hibernate session */ > Session session = null; > /* we always need a transaction */ > Transaction tx = null; > /* get session of the current thread */ > session = HibernateSessionFactory.currentSession(); > tx = session.beginTransaction(); > ----------Exception is thrown when the below line of code is executed--------------------- > List tmpBooks = session.createQuery( > "select b from Book as b order by b.author, b.title").list(); > ----------------------------------------------------------------------------------------------------------------- > for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { > books.add((Book) iter.next()); > } > tx.commit(); > return (Book[]) books.toArray(new Book[0]); > } > In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: > org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] > at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) > at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) > at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) > at antlr.CharScanner.(CharScanner.java:42) > at antlr.CharScanner.(CharScanner.java:51) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) > at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) > at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) > at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) > at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) > at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) > at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) > at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) > at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) > at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) > at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) > at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) > at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ranjit P. (JIRA) <no...@at...> - 2006-05-24 11:00:35
|
org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken ------------------------------------------------------------------------------------- Key: HHH-1777 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1777 Project: Hibernate3 Type: Bug Versions: 3.1.3 Environment: Hibernate 3.1.3,mysql-5.0.21-win32,mysql-connector-java-3.0.17-ga,jdk1.4.1_05,Struts 1.1,weblogic 8.1,MyEclipse 4.1.1GA Reporter: Ranjit Patil Attachments: Book.hbm.xml, HibernateSessionFactory.java, hibernate.cfg.xml I have two tables book and customer. My index page has two links show book list and Show customer List.Currently I am working on only Book List. It calls BookListAction.java which in turn calls LibraryManager.java in which getAllBooks() has code something like this: public Book[] getAllBooks() { /* will hold the books we are going to return later */ List books = new ArrayList(); /* a Hibernate session */ Session session = null; /* we always need a transaction */ Transaction tx = null; /* get session of the current thread */ session = HibernateSessionFactory.currentSession(); tx = session.beginTransaction(); ----------Exception is thrown when the below line of code is executed--------------------- List tmpBooks = session.createQuery( "select b from Book as b order by b.author, b.title").list(); ----------------------------------------------------------------------------------------------------------------- for (Iterator iter = tmpBooks.iterator(); iter.hasNext();) { books.add((Book) iter.next()); } tx.commit(); return (Book[]) books.toArray(new Book[0]); } In eclipse it runs fine but when i deployed on weblogic i got following error when i clicked the show book list link: org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [select b from de.laliluna.library.Book as b order by b.author, b.title] at org.hibernate.hql.ast.HqlLexer.panic(HqlLexer.java:57) at antlr.CharScanner.setTokenObjectClass(CharScanner.java:287) at org.hibernate.hql.ast.HqlLexer.setTokenObjectClass(HqlLexer.java:31) at antlr.CharScanner.(CharScanner.java:42) at antlr.CharScanner.(CharScanner.java:51) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:56) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:53) at org.hibernate.hql.antlr.HqlBaseLexer.(HqlBaseLexer.java:50) at org.hibernate.hql.ast.HqlLexer.(HqlLexer.java:26) at org.hibernate.hql.ast.HqlParser.getInstance(HqlParser.java:44) at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:232) at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:155) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:109) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:75) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:54) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1583) at de.laliluna.library.bl.LibraryManager.getAllBooks(LibraryManager.java:35) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Ecmel E. (JIRA) <no...@at...> - 2006-05-23 16:30:25
|
Extra Lazy collection, wrong size --------------------------------- Key: HHH-1776 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1776 Project: Hibernate3 Type: Bug Versions: 3.2.0.cr2 Environment: HSQLDB 1.8.0.4 Reporter: Ecmel Ercan I have the following mappings: <hibernate-mapping> <class name="TestParent" table="TESTPARENT"> <id name="id" column="ID"> <generator class="native"/> </id> <list name="children" lazy="extra"> <key column="PARENT_ID" /> <list-index column="id"/> <one-to-many class="TestChild" /> </list> </class> </hibernate-mapping> <hibernate-mapping> <class name="TestChild" table="TESTCHILD"> <id name="id" column="ID"> <generator class="native"/> </id> <many-to-one name="parent" column="id" class="TestParent" /> </class> </hibernate-mapping> When I get the size of the children by: System.out.println(parent.getChildren().size()); the following query is issued: select max(id) + 1 from TESTCHILD where PARENT_ID =? This assumes a sequential id column with no deleted rows. I expect a count(id) query. Strangely, if I map the same class with annotations, a count(id) query is issued, but the collection will not be extra lazy as I mentioned in the annotations forum: http://forum.hibernate.org/viewtopic.php?t=959249 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |