[hibernate-issues] [Hibernate-JIRA] Commented: (BVAL-207) Hibernate 3.5.1-Final cannot parse order-by fragment
Aleksandar Gargenta (JIRA)
noreply at atlassian.com
Mon May 3 12:59:28 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/BVAL-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=36862#action_36862 ]
Aleksandar Gargenta commented on BVAL-207:
------------------------------------------
I ran into exactly the same problem after upgrading from Hibernate 3.3.1 to 3.5.1. Also using Spring 2.5.
I wish the error message was a bit more descriptive, and provided a bit more context as it's not clear what's causing this issue - so it may be too hard to find a workaround while this bug is being investigated/fixed.
> Hibernate 3.5.1-Final cannot parse order-by fragment
> ----------------------------------------------------
>
> Key: BVAL-207
> URL: http://opensource.atlassian.com/projects/hibernate/browse/BVAL-207
> Project: Bean Validation
> Issue Type: Bug
> Environment: Hibernate 3.5.1-Final
> MySQL 5.0
> Spring 2.5
> Reporter: Vladimir Kobetic
> Priority: Critical
>
> When upgrading from Hibernate 3.2.5.ga to the newest Hibernate 3.5.1-Final with the newest build-with dependent libraries an error occurs during initial phase of launching application.
> I tried to build and run with all libraries from lib directory from Hibernate zip download.
> The order-by clause is configured in hbm.xml:
> <hibernate-mapping>
> <class name="com.test.Object" table="err">
> <id name="id" type="java.lang.Long">
> <generator class="native" />
> </id>
> <set name="history" table="history" lazy="true" order-by="timestamp desc" cascade="all-delete-orphan">
> <key column="object_id" />
> <one-to-many class="com.test.Event" />
> </set>
> </class>
> </hibernate-mapping>
> The exception is:
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext-dao-hibernate.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to parse order-by fragment
> Caused by: org.hibernate.HibernateException: Unable to parse order-by fragment
> at org.hibernate.sql.ordering.antlr.OrderByFragmentTranslator.render(OrderByFragmentTranslator.java:66)
> at org.hibernate.sql.Template.renderOrderByStringTemplate(Template.java:310)
> at org.hibernate.persister.collection.AbstractCollectionPersister.<init>(AbstractCollectionPersister.java:557)
> at org.hibernate.persister.collection.OneToManyPersister.<init>(OneToManyPersister.java:84)
> at org.hibernate.persister.PersisterFactory.createCollectionPersister(PersisterFactory.java:104)
> and more...
> Caused by: java.lang.NullPointerException
> at org.hibernate.sql.ordering.antlr.OrderByFragmentParser.resolveFunction(OrderByFragmentParser.java:115)
> at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.expression(GeneratedOrderByFragmentParser.java:619)
> at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.sortKey(GeneratedOrderByFragmentParser.java:337)
> at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.sortSpecification(GeneratedOrderByFragmentParser.java:248)
> at org.hibernate.sql.ordering.antlr.GeneratedOrderByFragmentParser.orderByFragment(GeneratedOrderByFragmentParser.java:192)
> at org.hibernate.sql.ordering.antlr.OrderByFragmentTranslator.render(OrderByFragmentTranslator.java:60)
> ... 38 more
--
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
More information about the hibernate-issues
mailing list