[Hibernate-JIRA] Closed: (HHH-1176) List-index defenition needs to be updated
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1176?page=c... ]
Steve Ebersole closed HHH-1176.
-------------------------------
Closing stale resolved issues
> List-index defenition needs to be updated
> -----------------------------------------
>
> Key: HHH-1176
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1176
> Project: Hibernate Core
> Issue Type: Patch
> Components: core
> Affects Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1
> Environment: oracle
> Reporter: Lakshmanan Ramakrishnan
>
> Hi,
> When I create List collection in hibernate, I want to use the oracle ROWNUM as the index column. But if i give the column name as ROWNUM, I get a database exception as the ROWNUM is not a physical column (as hibernate appends the columns names with table alias ).
> So I made a change to the DTD as below
> <!ELEMENT list-index ((column|formula)?)>
> <!ATTLIST list-index column CDATA #IMPLIED>
> <!ATTLIST list-index formula CDATA #IMPLIED>
> <!ATTLIST list-index base CDATA "0">
> and used 'formula' instead of column and it works perfectly fine.
> The code is handling this already. So if the DTD is changed List-index can accept formula or a column
> Lakshmanan
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-1247) HQL doesn't allow '$' as the leading character for property names
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1247?page=c... ]
Steve Ebersole closed HHH-1247.
-------------------------------
Closing stale resolved issues
> HQL doesn't allow '$' as the leading character for property names
> -----------------------------------------------------------------
>
> Key: HHH-1247
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1247
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc3
> Environment: Hibernate 3.1-rc3; Windows; JDK1.5.0; SQLSerer2ksp4
> Reporter: Dean Arnold
> Assignee: Joshua Davis
>
> HQL Query example:
> select distinct user.party from com.itf.iceclaims.domain.party.user.UserImpl user inner join user.party.$RelatedWorkgroups relatedWorkgroups where relatedWorkgroups.workgroup.id = :workgroup and relatedWorkgroups.effectiveTime.start <= :datesnow and relatedWorkgroups.effectiveTime.end > :dateenow
> Stack Trace:
> Caused by: org.hibernate.QueryException: unexpected char: '$' [select distinct user.party from com.itf.iceclaims.domain.party.user.UserImpl user inner join user.party.$RelatedWorkgroups relatedWorkgroups where relatedWorkgroups.workgroup.id = :workgroup and relatedWorkgroups.effectiveTime.start <= :datesnow and relatedWorkgroups.effectiveTime.end > :dateenow]
> at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)
> at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:103)
> at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:72)
> at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:52)
> at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71)
> at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:108)
> at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:88)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.springframework.orm.hibernate3.HibernateTemplate$CloseSuppressingInvocationHandler.invoke(HibernateTemplate.java:1178)
> at $Proxy195.createQuery(Unknown Source)
> at com.itf.iceclaims.dao.party.user.UserDaoHibernateImpl$2.doInHibernate(UserDaoHibernateImpl.java:85)
> at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
> ... 55 more
> Caused by: line 1:105: unexpected char: '$'
> at org.hibernate.hql.antlr.HqlBaseLexer.nextToken(HqlBaseLexer.java:278)
> at antlr.TokenBuffer.fill(TokenBuffer.java:69)
> at antlr.TokenBuffer.LA(TokenBuffer.java:80)
> at antlr.LLkParser.LA(LLkParser.java:52)
> at org.hibernate.hql.ast.HqlParser.weakKeywords(HqlParser.java:281)
> at org.hibernate.hql.antlr.HqlBaseParser.path(HqlBaseParser.java:542)
> at org.hibernate.hql.antlr.HqlBaseParser.fromJoin(HqlBaseParser.java:1705)
> at org.hibernate.hql.antlr.HqlBaseParser.fromClause(HqlBaseParser.java:1420)
> at org.hibernate.hql.antlr.HqlBaseParser.selectFrom(HqlBaseParser.java:1130)
> at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:702)
> at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:296)
> at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:159)
> at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:236)
> at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:153)
> ... 69 more
> Propsed/Working Solution:
> Update the 'hql.g' grammer file, lines 780 to 792, with the following code fragment. (I have moved the '$' character from the ID_LETTER to the ID_START_LETTER):
> protected
> ID_START_LETTER
> : '_'
> | 'a'..'z'
> | '\u0080'..'\ufffe' // HHH-558 : Allow unicode chars in identifiers
> | '$'
> ;
> protected
> ID_LETTER
> : ID_START_LETTER
> | '0'..'9'
> ;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-934) Hibernate tutorial (hbm2ddl.auto?) broken
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-934?page=co... ]
Steve Ebersole closed HHH-934.
------------------------------
Closing stale resolved issues
> Hibernate tutorial (hbm2ddl.auto?) broken
> -----------------------------------------
>
> Key: HHH-934
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-934
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.0.5, 3.1 beta 2, 3.1 rc 1
> Environment: Hibernates 3.0.5, 3.1 beta2 and CVS (3.1 RC1) with HSQLDB and Java 1.5 on Linux.
> Reporter: Brian Ericson
>
> The Hibernate tutorial (http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html) under "Getting Started" "Day 2" doesn't work on any Hibernate 3 release. 3.0.5 and 3.1 beta 2 will log the creation of the EVENTS table and inserting of an Event object, but data/tutorial.script will only contain the following:
> CREATE SCHEMA PUBLIC AUTHORIZATION DBA
> CREATE USER SA PASSWORD ""
> GRANT DBA TO SA
> SET WRITE_DELAY 20
> Because of this, commenting out <property name="hbm2ddl.auto">create</property> in hibernate.cfg.xml will cause ant run -Daction={store,list} to fail as the EVENTS table will not exist. All this works fine using straight JDBC and running multiple sessions (i.e., creating the table in one session, inserting and listing in others).
> 3.1 RC 1 quits early with the following:
> run:
> [java] 16:10:46,555 INFO Environment:468 - Hibernate 3.1rc1
> [java] 16:10:46,565 INFO Environment:481 - hibernate.properties not found
> [java] 16:10:46,571 INFO Environment:514 - using CGLIB reflection optimizer
> [java] 16:10:46,576 INFO Environment:544 - using JDK 1.4 java.sql.Timestamp handling
> [java] 16:10:46,732 INFO Configuration:1247 - configuring from resource: /hibernate.cfg.xml
> [java] 16:10:46,733 INFO Configuration:1215 - Configuration resource: /hibernate.cfg.xml
> [java] 16:10:46,735 WARN Configuration:1223 - /hibernate.cfg.xml not found
> [java] Initial SessionFactory creation failed.org.hibernate.HibernateException: /hibernate.cfg.xml not found
> [java] Exception in thread "main" java.lang.ExceptionInInitializerError
> [java] at HibernateUtil.<clinit>(Unknown Source)
> [java] at EventManager.createAndStoreEvent(Unknown Source)
> [java] at EventManager.main(Unknown Source)
> [java] Caused by: org.hibernate.HibernateException: /hibernate.cfg.xml not found
> [java] at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1224)
> [java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1248)
> [java] at org.hibernate.cfg.Configuration.configure(Configuration.java:1235)
> [java] ... 3 more
> [java] Java Result: 1
> This may be the issue reported as HB-733... I edited Event.hbm.xml to make everything lowercase and got somewhat further, but was still unable to get a row stored and queried. HB-733 was closed as a duplicate, but is not linked to the original.
> Finally, SourceForge's hibernate-3.0.5.tar.gz download is corrupted.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-1187) Cannot delete a object having a delete-orphan collection when user_rollback_id is set
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1187?page=c... ]
Steve Ebersole closed HHH-1187.
-------------------------------
Closing stale resolved issues
> Cannot delete a object having a delete-orphan collection when user_rollback_id is set
> -------------------------------------------------------------------------------------
>
> Key: HHH-1187
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1187
> Project: Hibernate Core
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1 rc3
> Environment: I think it used to work
> Reporter: Emmanuel Bernard
> Assignee: Steve Ebersole
> Priority: Critical
> Fix For: 3.1
>
>
> test in orphan.OrphanIdRollbackTest
> org.hibernate.AssertionFailure: null identifier
> at org.hibernate.engine.EntityKey.<init>(EntityKey.java:34)
> at org.hibernate.engine.Collections.processDereferencedCollection(Collections.java:63)
> at org.hibernate.engine.Collections.processUnreachableCollection(Collections.java:37)
> at org.hibernate.event.def.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:217)
> at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:77)
> at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
> at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:908)
> at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:344)
> at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
> at org.hibernate.test.orphan.OrphanIdRollbackTest.testOrphanDeleteOnDelete(OrphanIdRollbackTest.java:38)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.hibernate.test.TestCase.runTest(TestCase.java:140)
> at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:86)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-1272) hbm2ddl does not escape sql keywords used as column names
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1272?page=c... ]
Steve Ebersole closed HHH-1272.
-------------------------------
Closing stale resolved issues
> hbm2ddl does not escape sql keywords used as column names
> ---------------------------------------------------------
>
> Key: HHH-1272
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1272
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1
> Reporter: Andrew C. Oliver
> Priority: Minor
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> HM2ddl does this:
> 2005-12-14 14:01:42,499 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] create table MessageData (id bigint generated by default as identity (start with 1), subject varchar(255), to varchar(255), from varchar(255), timestamp timestamp, deleted bit not null, header varchar(255), bodyId bigint not null, size bigint not null, folder_id bigint, primary key (id))
> which pukes with this:
> 2005-12-14 14:01:42,511 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] Unsuccessful: create table MessageData (id bigint generated by default as identity (start with 1), subject varchar(255), to varchar(255), from varchar(255), timestamp timestamp, deleted bit not null, header varchar(255), bodyId bigint not null, size bigint not null, folder_id bigint, primary key (id))2005-12-14 14:01:42,513 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] Unexpected token: TO in statement [create table MessageData (id bigint generated by default as identity (start with 1), subject varchar(255), to]
> Should read:
> create table MessageData (id bigint generated by default as identity (start with 1), subject varchar(255), "to" varchar(255), "from" varchar(255), timestamp timestamp, deleted bit not null, header varchar(255), bodyId bigint not null, size bigint not null, folder_id bigint, primary key (id))
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Closed: (HHH-128) NullPointerException when using a 'one-to-many bag' in a 'component' inside a 'dynamic-component'
by Steve Ebersole (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-128?page=co... ]
Steve Ebersole closed HHH-128.
------------------------------
Closing stale resolved issues
> NullPointerException when using a 'one-to-many bag' in a 'component' inside a 'dynamic-component'
> -------------------------------------------------------------------------------------------------
>
> Key: HHH-128
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-128
> Project: Hibernate Core
> Issue Type: Patch
> Components: core
> Affects Versions: 3.0 beta 4
> Environment: Hibernate 3.0 beta 3, HSQLDB, Java 1.4
> Reporter: Daniel Seiler
> Assignee: Gavin King
> Priority: Minor
> Fix For: 3.0 beta 4
>
> Attachments: dynamiccomponent-test.zip, dynamiccomponent-test2.zip
>
> Original Estimate: 2h
> Remaining Estimate: 2h
>
> Problem:
> When I call the method Configuration.addXML(...) with the mapping file showed below I get a NullPointerException (see Stack Trace). The Exception seams only to occur if I try to model a one to many relationship inside a component which is par of a dynamic component.
> Possible Solution:
> I figured out that if I change the code in the method
> bindComponent(...) of the class org.hibernate.cfg.HbmBinder.java
> from:
> ...
> else if ( classNode != null ) {
> component.setComponentClassName( getClassName( classNode, mappings ) );
> }
> ...
> to:
> ...
> else if ( classNode != null ) {
> parentClass = getClassName( classNode, mappings );
> component.setComponentClassName( parentClass );
> }
> ...
> Since the NullPointer was caused by the parentClass that was null. I don't know if my fix is the proper solution to the problem but I tried it out and it worked. Please have a look.
> thanks
> Daniel
> Mapping File:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping default-lazy="false">
> <class name="ch.truesolutions.hibernate.Artifact" table="ZOO1" entity-name="ZOO1">
> <id name="id" type="long" unsaved-value="0" >
> <generator class="native"/>
> </id>
> <dynamic-component name="groupLists">
> <component name="address" class="ch.truesolutions.hibernate.GroupList">
> <bag name="groups"
> cascade="save-update"
> lazy="false">
> <key column="ZOO1_ID"/>
> <one-to-many entity-name="ADDRESS1"/>
> </bag>
> </component>
> </dynamic-component>
> </class>
> <class name="ch.truesolutions.hibernate.Group" entity-name="ADDRESS1" table="ADDRESS1" >
> <id name="id" type="long" unsaved-value="0" >
> <generator class="native"/>
> </id>
> ...
> </class>
> </hibernate-mapping>
> Full stack trace of any exception that occurs:
> ERROR [main] (Configuration.java:304) - Could not configure datastore from XML
> java.lang.NullPointerException
> at org.hibernate.util.StringHelper.qualify(StringHelper.java:201)
> at org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:914)
> at org.hibernate.cfg.HbmBinder$4.create(HbmBinder.java:2193)
> at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1287)
> at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1315)
> at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1490)
> at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:589)
> at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1848)
> at org.hibernate.cfg.Configuration.add(Configuration.java:344)
> at org.hibernate.cfg.Configuration.addXML(Configuration.java:301)
> at ch.truesolutions.hibernate.HibernateHelper.<init>(HibernateHelper.java:65)
> at ch.truesolutions.hibernate.HibernateHelper.getInstance(HibernateHelper.java:56)
> at ch.truesolutions.hibernate.TestHibernate.main(TestHibernate.java:39)
> ERROR [main] (HibernateHelper.java:77) - Building SessionFactory failed.
> org.hibernate.MappingException: java.lang.NullPointerException
> at org.hibernate.cfg.Configuration.addXML(Configuration.java:305)
> at ch.truesolutions.hibernate.HibernateHelper.<init>(HibernateHelper.java:65)
> at ch.truesolutions.hibernate.HibernateHelper.getInstance(HibernateHelper.java:56)
> at ch.truesolutions.hibernate.TestHibernate.main(TestHibernate.java:39)
> Caused by: java.lang.NullPointerException
> at org.hibernate.util.StringHelper.qualify(StringHelper.java:201)
> at org.hibernate.cfg.HbmBinder.bindCollection(HbmBinder.java:914)
> at org.hibernate.cfg.HbmBinder$4.create(HbmBinder.java:2193)
> at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1287)
> at org.hibernate.cfg.HbmBinder.bindComponent(HbmBinder.java:1315)
> at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:1490)
> at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:589)
> at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1848)
> at org.hibernate.cfg.Configuration.add(Configuration.java:344)
> at org.hibernate.cfg.Configuration.addXML(Configuration.java:301)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years