-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Getting this error..like IDENT...How to make the query work?
PostPosted: Wed Sep 30, 2009 5:39 pm 
Newbie

Joined: Wed Sep 30, 2009 5:34 pm
Posts: 1
org.hibernate.hql.ast.QuerySyntaxException: expecting IDENT, found '(' near line 1, column 194 [from com.wellsfargo.lbx.wli.orm.domain.TSpdfInboundBatch as a where a.lockboxNumber in (:lbxList) and a.companyId = :companyId and a.siteCode in (:siteCodeList) and a.creationDatetime between :(sysdate - 7) and :sysdate ]
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:281)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:180)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:134)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94)
at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1650)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342)
at $Proxy9.createQuery(Unknown Source)
at com.wellsfargo.lbx.wli.orm.daoimpl.TSpdfInboundBatchDAO.createQuery(TSpdfInboundBatchDAO.java:228)
at com.wellsfargo.lbx.common.orm.daoimpl.BaseHibernateDAO.findList(BaseHibernateDAO.java:76)
at com.wellsfargo.lbx.wli.orm.daoimpl.TSpdfInboundBatchDAO.findAll(TSpdfInboundBatchDAO.java:257)
at com.wellsfargo.lbx.wli.test.orm.TestTSpdfInboundBatchDAO.testFindAll(TestTSpdfInboundBatchDAO.java:147)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


Top
 Profile  
 
 Post subject: Re: Getting this error..like IDENT...How to make the query work?
PostPosted: Fri Oct 02, 2009 5:31 am 
Newbie

Joined: Wed Sep 30, 2009 7:25 am
Posts: 2
i think you need to write the code which caused this error...so others may have the idea why this happened


Top
 Profile  
 
 Post subject: Re: Getting this error..like IDENT...How to make the query work?
PostPosted: Tue Nov 03, 2009 11:07 am 
Newbie

Joined: Tue Oct 27, 2009 10:20 am
Posts: 3
this error will get when you use org.hibernate.hql.ast.astquerytranslator insead of this use org.hibernate.hql.Classic.classicquerytranslator

otherwise check for eg. expense.linenumber in( or exists ( like this you implemented this should be given elobrated in your HQL code


Top
 Profile  
 
 Post subject: Re: Getting this error..like IDENT...How to make the query work?
PostPosted: Tue Nov 03, 2009 11:10 am 
Beginner
Beginner

Joined: Tue Nov 03, 2009 9:38 am
Posts: 24
I'd say it's this part:
Quote:
a.creationDatetime between :(sysdate - 7) and :sysdate


should maybe be
Quote:
a.creationDatetime between (:sysdate - 7) and :sysdate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.