Hibernate version: 3.0.5
Try to execute a HQL query DELETE com.bmc.idm.ctsa.hb8.dbobject.UserGroup where (attached_group_subEntity = :0 and attached_group_id = :1 )
reciving the following exception. Can anyone point me to what I am doing wrong?
Full stack trace of any exception that occurs:
org.hibernate.hql.ast.QuerySyntaxError: expecting IDENT, found '0' near line 1, column 83 [DELETE com.bmc.idm.ctsa.hb8.dbobject.UserGroup where (attached_group_subEntity = :0 and attached_group_id = :1 )]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:63)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:215)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
Name and version of the database you are using: Oracle 9.2
Debug level Hibernate log excerpt:
2006-05-31 17:41:07,601 DEBUG [main] org.hibernate.hql.ast.QueryTranslatorImpl - parse() - HQL: DELETE com.bmc.idm.ctsa.hb8.dbobject.UserGroup where (attached_group_subEntity = :0 and attached_group_id = :1 )
2006-05-31 17:41:07,631 ERROR [main] org.hibernate.hql.PARSER - *** ERROR: line 1:83: expecting IDENT, found '0'
2006-05-31 17:41:07,631 DEBUG [main] org.hibernate.hql.ast.ErrorCounter - line 1:83: expecting IDENT, found '0'
line 1:83: expecting IDENT, found '0'
at antlr.Parser.match(Parser.java:211)
at org.hibernate.hql.antlr.HqlBaseParser.identifier(HqlBaseParser.java:461)
at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:3355)
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3031)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:2806)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:2687)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2407)
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:481)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2195)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2150)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2020)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:1937)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:1901)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:1663)
at org.hibernate.hql.antlr.HqlBaseParser.expressionOrVector(HqlBaseParser.java:3980)
at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:3394)
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3031)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:2806)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:2687)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2407)
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:481)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2195)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2057)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2020)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:1937)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:1901)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:1663)
at org.hibernate.hql.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1834)
at org.hibernate.hql.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:376)
at org.hibernate.hql.antlr.HqlBaseParser.deleteStatement(HqlBaseParser.java:232)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:139)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
at com.bmc.idm.ctsa.hb8.query.HB8ExecuteQuery.execute(HB8ExecuteQuery.java:47)
at com.bmc.idm.ctsa.datalayer.datasource.dbh.DBSetImpl.delete(DBSetImpl.java:622)
at com.bmc.idm.ctsa.datalayer.datasource.BaseAssociationImpl.detach(BaseAssociationImpl.java:283)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.findAllAssociatedParents2PK(SetServiceBean.java:435)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.doDisconnectFromAssociations(SetServiceBean.java:347)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.handleAssociations(SetServiceBean.java:268)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.delete(SetServiceBean.java:237)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.delete(SetServiceBean.java:190)
at com.bmc.idm.ctsa.test.entities.tree.TestTree.testGetChildren(TestTree.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
at junit.textui.TestRunner.start(TestRunner.java:172)
at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:98)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
2006-05-31 17:41:07,661 ERROR [main] org.hibernate.hql.PARSER - *** ERROR: line 1:111: expecting IDENT, found '1'
2006-05-31 17:41:07,661 DEBUG [main] org.hibernate.hql.ast.ErrorCounter - line 1:111: expecting IDENT, found '1'
line 1:111: expecting IDENT, found '1'
at antlr.Parser.match(Parser.java:211)
at org.hibernate.hql.antlr.HqlBaseParser.identifier(HqlBaseParser.java:461)
at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:3355)
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3031)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:2806)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:2687)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2407)
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:481)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2195)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2150)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2020)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:1947)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:1901)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:1663)
at org.hibernate.hql.antlr.HqlBaseParser.expressionOrVector(HqlBaseParser.java:3980)
at org.hibernate.hql.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:3394)
at org.hibernate.hql.antlr.HqlBaseParser.atom(HqlBaseParser.java:3031)
at org.hibernate.hql.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:2806)
at org.hibernate.hql.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:2687)
at org.hibernate.hql.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2407)
at org.hibernate.hql.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:481)
at org.hibernate.hql.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2195)
at org.hibernate.hql.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2057)
at org.hibernate.hql.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2020)
at org.hibernate.hql.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:1937)
at org.hibernate.hql.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:1901)
at org.hibernate.hql.antlr.HqlBaseParser.expression(HqlBaseParser.java:1663)
at org.hibernate.hql.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1834)
at org.hibernate.hql.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:376)
at org.hibernate.hql.antlr.HqlBaseParser.deleteStatement(HqlBaseParser.java:232)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:139)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:209)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:884)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:865)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:89)
at com.bmc.idm.ctsa.hb8.query.HB8ExecuteQuery.execute(HB8ExecuteQuery.java:47)
at com.bmc.idm.ctsa.datalayer.datasource.dbh.DBSetImpl.delete(DBSetImpl.java:622)
at com.bmc.idm.ctsa.datalayer.datasource.BaseAssociationImpl.detach(BaseAssociationImpl.java:283)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.findAllAssociatedParents2PK(SetServiceBean.java:435)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.doDisconnectFromAssociations(SetServiceBean.java:347)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.handleAssociations(SetServiceBean.java:268)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.delete(SetServiceBean.java:237)
at com.bmc.idm.ids.dal.ejb.SetServiceBean.delete(SetServiceBean.java:190)
at com.bmc.idm.ctsa.test.entities.tree.TestTree.testGetChildren(TestTree.java:461)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.textui.TestRunner.doRun(TestRunner.java:116)
at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
at junit.textui.TestRunner.start(TestRunner.java:172)
at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:98)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
2006-05-31 17:41:07,701 DEBUG [main] org.hibernate.hql.ast.AST - --- HQL AST ---
\-[DELETE] 'DELETE'
+-[FROM] 'FROM'
| \-[RANGE] 'RANGE'
| \-[DOT] '.'
| +-[DOT] '.'
| | +-[DOT] '.'
| | | +-[DOT] '.'
| | | | +-[DOT] '.'
| | | | | +-[DOT] '.'
| | | | | | +-[IDENT] 'com'
| | | | | | \-[IDENT] 'bmc'
| | | | | \-[IDENT] 'idm'
| | | | \-[IDENT] 'ctsa'
| | | \-[IDENT] 'hb8'
| | \-[IDENT] 'dbobject'
| \-[IDENT] 'UserGroup'
\-[WHERE] 'where'
\-[AND] 'and'
+-[EQ] '='
| \-[IDENT] 'attached_group_subEntity'
\-[EQ] '='
\-[IDENT] 'attached_group_id'
|