Hello, I keep running into a "could not resolve property" error and I do not know what else to do. As shown in the output below, the max fetch depth is set for 10. Can someone please help me figure out what I am doing wrong???
This query does work, but gives me too many results:
Code:
String query =
"select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname )" +
" from Enrollment e" +
" where e.classroom.id = ?" +
" order by e.user.surname asc, e.user.givenName asc";
This query does NOT works, but this is the one I want:
Code:
String query =
"select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname )" +
" from Enrollment e" +
" where e.classroom.id = ?" +
" and e.user.roles.permissions.actions like '%" + ClassroomPermission.HOST_LECTURE + "%'" +
" order by e.user.surname asc, e.user.givenName asc";
The only difference being the:
Code:
" and e.user.roles.permissions.actions like '%" + ClassroomPermission.HOST_LECTURE + "%'" +
The PersistantPermission class is a subclass of the abstract InstancePermission class from jsecurity, which is a subclass of java.security.Permission class.
When I run this query, it returns the permission that I want to check for in the above query:
Code:
String query = "from PersistentPermission p" +
" where p.actions like '%"+ClassroomPermission.HOST_LECTURE+"%'";
Hibernate version: 3.1.3
Mapping documents:Code:
<hibernate-mapping>
<class name="com.org.prod.realm.Role" table="roles">
...
<cache usage="nonstrict-read-write"/>
<id name="id" type="com.org.prod.framework.orm.hibernate.JdkUUIDUserType" length="36">
<column name="role_id" sql-type="char(36)"/>
<generator class="com.org.prod.framework.orm.hibernate.JdkUUIDGenerator"/>
</id>
<set name="permissions" inverse="false" cascade="all-delete-orphan">
<cache usage="read-write"/>
<key foreign-key="permissions_role_id_fk">
<column name="role_id" sql-type="char(36)"/>
</key>
<one-to-many class="com.org.prod.realm.PersistentPermission"/>
</set>
</class>
</hibernate-mapping>
<hibernate-mapping>
<class name="com.org.prod.realm.PersistentPermission" table="permissions">
<!-- Permissions are immutable: -->
<cache usage="nonstrict-read-write"/>
<id name="id" type="com.org.prod.framework.orm.hibernate.JdkUUIDUserType" length="36">
<column name="permission_id" sql-type="char(36)"/>
<generator class="com.org.prod.framework.orm.hibernate.JdkUUIDGenerator"/>
</id>
<property name="targetName" column="target_name" not-null="true"
index="targetname_target_name_idx"/>
<property name="actions" not-null="true"/>
</class>
</hibernate-mapping>
Full stack trace of any exception that occurs: [junit] 2007-01-09 17:18:52,536 INFO [org.hibernate.cfg.Environment] - Hibernate 3.1.3
[junit] 2007-01-09 17:18:52,540 INFO [org.hibernate.cfg.Environment] - hibernate.properties not found
[junit] 2007-01-09 17:18:52,541 INFO [org.hibernate.cfg.Environment] - Bytecode provider name : cglib
[junit] 2007-01-09 17:18:52,544 INFO [org.hibernate.cfg.Environment] - using JDK 1.4 java.sql.Timestamp handling
[junit] 2007-01-09 17:18:53,589 INFO [org.hibernate.cfg.HbmBinder] - Mapping class: com.org.prod.classroom.Classroom -> classrooms
[junit] 2007-01-09 17:18:54,153 INFO [org.hibernate.cfg.HbmBinder] - Mapping class: com.org.prod.classroom.Enrollment -> enrollments
[junit] 2007-01-09 17:18:55,383 INFO [org.hibernate.cfg.HbmBinder] - Mapping class: com.org.prod.realm.PersistentPermission -> permissions
[junit] 2007-01-09 17:18:55,611 INFO [org.hibernate.cfg.HbmBinder] - Mapping class: com.org.prod.realm.Role -> roles
[junit] 2007-01-09 17:18:56,292 INFO [org.hibernate.cfg.HbmBinder] - Mapping joined-subclass: com.org.prod.party.User -> users
[junit] 2007-01-09 17:18:56,679 INFO [org.hibernate.cfg.HbmBinder] - Mapping collection: com.org.prod.classroom.Classroom.enrollments -> enrollments
[junit] 2007-01-09 17:18:56,686 INFO [org.hibernate.cfg.HbmBinder] - Mapping collection: com.org.prod.party.User.enrollments -> enrollments
[junit] 2007-01-09 17:18:56,784 INFO [org.hibernate.connection.ConnectionProviderFactory] - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
[junit] 2007-01-09 17:18:56,809 INFO [org.hibernate.cfg.SettingsFactory] - RDBMS: MySQL, version: 5.0.24a-Debian_9-log
[junit] 2007-01-09 17:18:56,809 INFO [org.hibernate.cfg.SettingsFactory] - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.3 ( $Date: 2006-07-26 17:26:47 +0200 (Wed, 26 Jul 2006) $, $Revision: 5553 $ )
[junit] 2007-01-09 17:18:56,905 INFO [org.hibernate.dialect.Dialect] - Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
[junit] 2007-01-09 17:18:56,910 INFO [org.hibernate.transaction.TransactionFactoryFactory] - Using default transaction strategy (direct JDBC transactions)
[junit] 2007-01-09 17:18:56,911 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
[junit] 2007-01-09 17:18:56,911 INFO [org.hibernate.cfg.SettingsFactory] - Automatic flush during beforeCompletion(): disabled
[junit] 2007-01-09 17:18:56,911 INFO [org.hibernate.cfg.SettingsFactory] - Automatic session close at end of transaction: disabled
[junit] 2007-01-09 17:18:56,911 INFO [org.hibernate.cfg.SettingsFactory] - JDBC batch size: 15
[junit] 2007-01-09 17:18:56,911 INFO [org.hibernate.cfg.SettingsFactory] - JDBC batch updates for versioned data: disabled
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Scrollable result sets: enabled
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - JDBC3 getGeneratedKeys(): enabled
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Connection release mode: on_close
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Maximum outer join fetch depth: 10
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Default batch fetch size: 1
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Generate SQL with comments: disabled
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Order SQL updates by primary key: disabled
[junit] 2007-01-09 17:18:56,912 INFO [org.hibernate.cfg.SettingsFactory] - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] - Using ASTQueryTranslatorFactory
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.cfg.SettingsFactory] - Query language substitutions: {}
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.cfg.SettingsFactory] - JPA-QL strict compliance: disabled
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.cfg.SettingsFactory] - Second-level cache: enabled
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.cfg.SettingsFactory] - Query cache: disabled
[junit] 2007-01-09 17:18:56,914 INFO [org.hibernate.cfg.SettingsFactory] - Cache provider: org.hibernate.cache.EhCacheProvider
[junit] 2007-01-09 17:18:56,917 INFO [org.hibernate.cfg.SettingsFactory] - Optimize cache for minimal puts: disabled
[junit] 2007-01-09 17:18:56,917 INFO [org.hibernate.cfg.SettingsFactory] - Structured second-level cache entries: disabled
[junit] 2007-01-09 17:18:56,921 INFO [org.hibernate.cfg.SettingsFactory] - Statistics: disabled
[junit] 2007-01-09 17:18:56,921 INFO [org.hibernate.cfg.SettingsFactory] - Deleted entity synthetic identifier rollback: disabled
[junit] 2007-01-09 17:18:56,921 INFO [org.hibernate.cfg.SettingsFactory] - Default entity-mode: pojo
[junit] 2007-01-09 17:18:57,109 INFO [org.hibernate.impl.SessionFactoryImpl] - building session factory
[junit] 2007-01-09 17:18:57,697 WARN [org.hibernate.cache.EhCacheProvider] - Could not find configuration [com.org.prod.realm.PersistentPermission]; using defaults.
[junit] 2007-01-09 17:18:58,267 WARN [org.hibernate.cache.EhCacheProvider] - Could not find configuration [com.org.prod.realm.Role]; using defaults.
[junit] 2007-01-09 17:18:58,927 WARN [org.hibernate.cache.EhCacheProvider] - Could not find configuration [com.org.prod.party.Party]; using defaults.
[junit] 2007-01-09 17:19:00,538 WARN [org.hibernate.cache.EhCacheProvider] - Could not find configuration [com.org.prod.party.User.roles]; using defaults.
[junit] 2007-01-09 17:19:00,659 WARN [org.hibernate.cache.EhCacheProvider] - Could not find configuration [com.org.prod.realm.Role.permissions]; using defaults.
[junit] 2007-01-09 17:19:01,076 INFO [org.hibernate.impl.SessionFactoryObjectFactory] - Not binding factory to JNDI, no JNDI name configured
[junit] 2007-01-09 17:19:04,836 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Began transaction (1): transaction manager [org.springframework.orm.hibernate3.HibernateTransactionManager@9a6bbb]; default rollback = true
[junit] 2007-01-09 17:19:04,836 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - **************************************************************************************************8
[junit] 2007-01-09 17:19:04,836 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - **************************************************************************************************8
[junit] 2007-01-09 17:19:04,836 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - I AM IN THE FREAKING HIBERNATE CLASSROOM DAO TEST!!!
[junit] 2007-01-09 17:19:05,087 ERROR [org.hibernate.hql.PARSER] - illegal syntax near collection: permissions
[junit] 2007-01-09 17:19:05,089 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Rolled back transaction after test execution
[junit] 2007-01-09 17:19:05,099 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Began transaction (1): transaction manager [org.springframework.orm.hibernate3.HibernateTransactionManager@9a6bbb]; default rollback = true
[junit] 2007-01-09 17:19:05,099 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[junit] 2007-01-09 17:19:05,133 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - reference = [("com.org.prod.classroom.ClassroomPermission" "*" "hostLecture,enterLecture")]
[junit] 2007-01-09 17:19:05,134 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - reference = [("com.org.prod.classroom.ClassroomPermission" "*" "hostLecture,enterLecture")]
[junit] 2007-01-09 17:19:05,134 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - reference = [("com.org.prod.classroom.ClassroomPermission" "*" "hostLecture,enterLecture")]
[junit] 2007-01-09 17:19:05,134 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - reference = [("com.org.prod.classroom.ClassroomPermission" "*" "hostLecture,enterLecture")]
[junit] 2007-01-09 17:19:05,134 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
[junit] 2007-01-09 17:19:05,136 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Rolled back transaction after test execution
[junit] ------------- ---------------- ---------------
[junit] Testcase: testGetTeachers(com.org.prod.classroom.HibernateClassroomDAOSystemTest): Caused an ERROR
[junit] could not resolve property: actions of: com.org.prod.realm.Role [select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc]; nested exception is org.hibernate.QueryException: could not resolve property: actions of: com.org.prod.realm.Role [select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc]
[junit] org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: actions of: com.org.prod.realm.Role [select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc]; nested exception is org.hibernate.QueryException: could not resolve property: actions of: com.org.prod.realm.Role [select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc]
[junit] Caused by: org.hibernate.QueryException: could not resolve property: actions of: com.org.prod.realm.Role [select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc]
[junit] at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMapping.java:43)
[junit] at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:37)
[junit] at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1312)
[junit] at org.hibernate.persister.collection.AbstractCollectionPersister.toType(AbstractCollectionPersister.java:1435)
[junit] at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:279)
[junit] at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:386)
[junit] at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:505)
[junit] at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:223)
[junit] at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:174)
[junit] at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:94)
[junit] at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:90)
[junit] at org.hibernate.hql.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:727)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1216)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4041)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3669)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1690)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
[junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
[junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
[junit] at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
[junit] at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
[junit] at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
[junit] at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:832)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:830)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:826)
[junit] at com.org.prod.framework.orm.hibernate.SimpleHibernateDAO.find(SimpleHibernateDAO.java:213)
[junit] at com.org.prod.classroom.eis.hibernate.HibernateClassroomDAO.getTeachersForLecture(HibernateClassroomDAO.java:252)
[junit] at com.org.prod.classroom.HibernateClassroomDAOSystemTest.testGetTeachers(HibernateClassroomDAOSystemTest.java:51)
[junit] at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
[junit] 2007-01-09 17:19:05,296 INFO [org.hibernate.impl.SessionFactoryImpl] - closing
Name and version of the database you are using: [junit] 2007-01-09 17:18:56,809 INFO [org.hibernate.cfg.SettingsFactory] - RDBMS: MySQL, version: 5.0.24a-Debian_9-log
The generated SQL (show_sql=true): [junit] 2007-01-09 18:10:34,787 DEBUG [org.hibernate.impl.SessionImpl] - opened session at timestamp: 4785701825687552
[junit] 2007-01-09 18:10:34,799 DEBUG [org.hibernate.transaction.JDBCTransaction] - begin
[junit] 2007-01-09 18:10:34,799 DEBUG [org.hibernate.jdbc.ConnectionManager] - opening JDBC connection
[junit] 2007-01-09 18:10:34,799 DEBUG [org.hibernate.transaction.JDBCTransaction] - current autocommit status: true
[junit] 2007-01-09 18:10:34,799 DEBUG [org.hibernate.transaction.JDBCTransaction] - disabling autocommit
[junit] 2007-01-09 18:10:34,799 DEBUG [org.hibernate.jdbc.JDBCContext] - after transaction begin
[junit] 2007-01-09 18:10:34,801 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Began transaction (1): transaction manager [org.springframework.orm.hibernate3.HibernateTransactionManager@13c1b69]; default rollback = true
[junit] 2007-01-09 18:10:34,802 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - **************************************************************************************************8
[junit] 2007-01-09 18:10:34,802 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - **************************************************************************************************8
[junit] 2007-01-09 18:10:34,802 ERROR [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - I AM IN THE FREAKING HIBERNATE CLASSROOM DAO TEST!!!
[junit] 2007-01-09 18:10:34,806 DEBUG [org.hibernate.engine.query.QueryPlanCache] - unable to locate HQL query plan in cache; generating (select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc)
[junit] 2007-01-09 18:10:34,859 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - parse() - HQL: select distinct new com.org.prod.util.IdReference( e.user.id, e.user.givenName || ' ' || e.user.middleNames || ' ' || e.user.surname ) from com.org.prod.classroom.Enrollment e where e.classroom.id = ? and e.user.roles.permissions.actions like '%hostLecture%' order by e.user.surname asc, e.user.givenName asc
[junit] 2007-01-09 18:10:34,879 DEBUG [org.hibernate.hql.ast.AST] - --- HQL AST ---
[junit] \-[QUERY] 'query'
[junit] +-[SELECT_FROM] 'SELECT_FROM'
[junit] | +-[FROM] 'from'
[junit] | | \-[RANGE] 'RANGE'
[junit] | | +-[DOT] '.'
[junit] | | | +-[DOT] '.'
[junit] | | | | +-[DOT] '.'
[junit] | | | | | +-[DOT] '.'
[junit] | | | | | | +-[IDENT] 'com'
[junit] | | | | | | \-[IDENT] 'org'
[junit] | | | | | \-[IDENT] 'prod'
[junit] | | | | \-[IDENT] 'classroom'
[junit] | | | \-[IDENT] 'Enrollment'
[junit] | | \-[ALIAS] 'e'
[junit] | \-[SELECT] 'select'
[junit] | +-[DISTINCT] 'distinct'
[junit] | \-[CONSTRUCTOR] '('
[junit] | +-[DOT] '.'
[junit] | | +-[DOT] '.'
[junit] | | | +-[DOT] '.'
[junit] | | | | +-[DOT] '.'
[junit] | | | | | +-[IDENT] 'com'
[junit] | | | | | \-[IDENT] 'org'
[junit] | | | | \-[IDENT] 'prod'
[junit] | | | \-[IDENT] 'util'
[junit] | | \-[IDENT] 'IdReference'
[junit] | +-[DOT] '.'
[junit] | | +-[DOT] '.'
[junit] | | | +-[IDENT] 'e'
[junit] | | | \-[IDENT] 'user'
[junit] | | \-[IDENT] 'id'
[junit] | \-[METHOD_CALL] '||'
[junit] | +-[IDENT] 'concat'
[junit] | \-[EXPR_LIST] 'concatList'
[junit] | +-[DOT] '.'
[junit] | | +-[DOT] '.'
[junit] | | | +-[IDENT] 'e'
[junit] | | | \-[IDENT] 'user'
[junit] | | \-[IDENT] 'givenName'
[junit] | +-[QUOTED_STRING] '' ''
[junit] | +-[DOT] '.'
[junit] | | +-[DOT] '.'
[junit] | | | +-[IDENT] 'e'
[junit] | | | \-[IDENT] 'user'
[junit] | | \-[IDENT] 'middleNames'
[junit] | +-[QUOTED_STRING] '' ''
[junit] | \-[DOT] '.'
[junit] | +-[DOT] '.'
[junit] | | +-[IDENT] 'e'
[junit] | | \-[IDENT] 'user'
[junit] | \-[IDENT] 'surname'
[junit] +-[WHERE] 'where'
[junit] | \-[AND] 'and'
[junit] | +-[EQ] '='
[junit] | | +-[DOT] '.'
[junit] | | | +-[DOT] '.'
[junit] | | | | +-[IDENT] 'e'
[junit] | | | | \-[IDENT] 'classroom'
[junit] | | | \-[IDENT] 'id'
[junit] | | \-[PARAM] '?'
[junit] | \-[LIKE] 'like'
[junit] | +-[DOT] '.'
[junit] | | +-[DOT] '.'
[junit] | | | +-[DOT] '.'
[junit] | | | | +-[DOT] '.'
[junit] | | | | | +-[IDENT] 'e'
[junit] | | | | | \-[IDENT] 'user'
[junit] | | | | \-[IDENT] 'roles'
[junit] | | | \-[IDENT] 'permissions'
[junit] | | \-[IDENT] 'actions'
[junit] | \-[QUOTED_STRING] ''%hostLecture%''
[junit] \-[ORDER] 'order'
[junit] +-[DOT] '.'
[junit] | +-[DOT] '.'
[junit] | | +-[IDENT] 'e'
[junit] | | \-[IDENT] 'user'
[junit] | \-[IDENT] 'surname'
[junit] +-[ASCENDING] 'asc'
[junit] +-[DOT] '.'
[junit] | +-[DOT] '.'
[junit] | | +-[IDENT] 'e'
[junit] | | \-[IDENT] 'user'
[junit] | \-[IDENT] 'givenName'
[junit] \-[ASCENDING] 'asc'
[junit] 2007-01-09 18:10:34,879 DEBUG [org.hibernate.hql.ast.ErrorCounter] - throwQueryException() : no errors
[junit] 2007-01-09 18:10:34,916 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] - select << begin [level=1, statement=select]
[junit] 2007-01-09 18:10:34,938 DEBUG [org.hibernate.hql.ast.tree.FromElement] - FromClause{level=1} : com.org.prod.classroom.Enrollment (e) -> enrollment0_
[junit] 2007-01-09 18:10:34,940 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,941 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user -> org.hibernate.type.ManyToOneType(com.org.prod.party.User)
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceShortcut() : property id in com.org.prod.classroom.Enrollment does not require a join.
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.DotNode] - Unresolved property path is now 'user.id'
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> id (class)]
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user.id -> org.hibernate.type.CustomType@41647f
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user.id -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> id (class)]
[junit] 2007-01-09 18:10:34,942 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,944 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,944 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,944 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user -> org.hibernate.type.ManyToOneType(com.org.prod.party.User)
[junit] 2007-01-09 18:10:34,944 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceEntityJoin() : generating join for user in com.org.prod.classroom.Enrollment {no alias} parent = [ ( . ( . enrollment0_.enrollment_id user ) givenName ) ]
[junit] 2007-01-09 18:10:34,950 DEBUG [org.hibernate.hql.ast.tree.FromElement] - FromClause{level=1} : com.org.prod.party.User (no alias) -> user1_
[junit] 2007-01-09 18:10:34,950 DEBUG [org.hibernate.hql.ast.tree.FromClause] - addJoinByPathMap() : e.user -> users user1_
[junit] 2007-01-09 18:10:34,950 DEBUG [org.hibernate.hql.ast.tree.FromElementFactory] - createEntityJoin() : Implied multi-table entity join
[junit] 2007-01-09 18:10:34,950 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,950 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> givenName (superclass)]
[junit] 2007-01-09 18:10:34,951 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : givenName -> org.hibernate.type.StringType@169c6f2
[junit] 2007-01-09 18:10:34,951 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> givenName (superclass)]
[junit] 2007-01-09 18:10:34,951 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user.givenName -> user1_1_.given_name
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user -> org.hibernate.type.ManyToOneType(com.org.prod.party.User)
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceEntityJoin() : generating join for user in com.org.prod.classroom.Enrollment {no alias} parent = [ ( . ( . enrollment0_.enrollment_id user ) middleNames ) ]
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> middleNames (superclass)]
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : middleNames -> org.hibernate.type.StringType@169c6f2
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> middleNames (superclass)]
[junit] 2007-01-09 18:10:34,961 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user.middleNames -> user1_1_.middle_names
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user -> org.hibernate.type.ManyToOneType(com.org.prod.party.User)
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceEntityJoin() : generating join for user in com.org.prod.classroom.Enrollment {no alias} parent = [ ( . ( . enrollment0_.enrollment_id user ) surname ) ]
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> surname (superclass)]
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : surname -> org.hibernate.type.StringType@169c6f2
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> surname (superclass)]
[junit] 2007-01-09 18:10:34,962 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user.surname -> user1_1_.surname
[junit] 2007-01-09 18:10:34,967 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,967 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> classroom (class)]
[junit] 2007-01-09 18:10:34,967 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : classroom -> org.hibernate.type.ManyToOneType(com.org.prod.classroom.Classroom)
[junit] 2007-01-09 18:10:34,967 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceShortcut() : property id in com.org.prod.classroom.Enrollment does not require a join.
[junit] 2007-01-09 18:10:34,967 DEBUG [org.hibernate.hql.ast.tree.DotNode] - Unresolved property path is now 'classroom.id'
[junit] 2007-01-09 18:10:34,968 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.classroom -> enrollment0_.classroom_id
[junit] 2007-01-09 18:10:34,968 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> id (class)]
[junit] 2007-01-09 18:10:34,968 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : classroom.id -> org.hibernate.type.CustomType@1cd427a
[junit] 2007-01-09 18:10:34,968 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.classroom.id -> enrollment0_.classroom_id
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e -> enrollment0_.enrollment_id
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.classroom.Enrollment (e) -> user (class)]
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : user -> org.hibernate.type.ManyToOneType(com.org.prod.party.User)
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceEntityJoin() : generating join for user in com.org.prod.classroom.Enrollment {no alias} parent = [ ( . ( . enrollment0_.enrollment_id user ) roles ) ]
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user -> enrollment0_.user_id
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.party.User (null) -> roles (class)]
[junit] 2007-01-09 18:10:34,970 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : roles -> org.hibernate.type.SetType(com.org.prod.party.User.roles)
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.FromElementFactory] - createManyToMany() : path = e.user.roles role = com.org.prod.party.User.roles associatedEntityName = com.org.prod.realm.Role
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.FromElement] - FromClause{level=1} : com.org.prod.realm.Role (no alias) -> role6_
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.FromClause] - addJoinByPathMap() : e.user.roles -> roles role6_
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.DotNode] - dereferenceCollection() : Created new FROM element for e.user.roles : user_role_maps role6_
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - Resolved : e.user.roles -> .
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.FromElement] - handling property dereference [com.org.prod.realm.Role (null) -> permissions (class)]
[junit] 2007-01-09 18:10:34,972 DEBUG [org.hibernate.hql.ast.tree.DotNode] - getDataType() : permissions -> org.hibernate.type.SetType(com.org.prod.realm.Role.permissions)
[junit] 2007-01-09 18:10:34,973 ERROR [org.hibernate.hql.PARSER] - illegal syntax near collection: permissions
[junit] 2007-01-09 18:10:34,974 DEBUG [org.hibernate.hql.ast.ErrorCounter] - illegal syntax near collection: permissions
[junit] illegal syntax near collection: permissions
[junit] at org.hibernate.hql.ast.tree.DotNode.checkLhsIsNotCollection(DotNode.java:451)
[junit] at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:201)
[junit] at org.hibernate.hql.ast.tree.DotNode.resolveFirstChild(DotNode.java:139)
[junit] at org.hibernate.hql.ast.HqlSqlWalker.lookupProperty(HqlSqlWalker.java:459)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.addrExpr(HqlSqlBaseWalker.java:4326)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1212)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4041)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3669)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1762)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1690)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
[junit] at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
[junit] at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
[junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
[junit] at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
[junit] at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
[junit] at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
[junit] at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
[junit] at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:832)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:362)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:830)
[junit] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:826)
[junit] at com.org.prod.framework.orm.hibernate.SimpleHibernateDAO.find(SimpleHibernateDAO.java:213)
[junit] at com.org.prod.classroom.eis.hibernate.HibernateClassroomDAO.getTeachersForLecture(HibernateClassroomDAO.java:252)
[junit] at com.org.prod.classroom.HibernateClassroomDAOSystemTest.testGetTeachers(HibernateClassroomDAOSystemTest.java:51)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[junit] at java.lang.reflect.Method.invoke(Method.java:585)
[junit] at junit.framework.TestCase.runTest(TestCase.java:154)
[junit] at junit.framework.TestCase.runBare(TestCase.java:127)
[junit] at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
[junit] at junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] at junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] at junit.framework.TestResult.run(TestResult.java:109)
[junit] at junit.framework.TestCase.run(TestCase.java:118)
[junit] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] at junit.framework.TestSuite.run(TestSuite.java:203)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:297)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:672)
[junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:567)
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.transaction.JDBCTransaction] - rollback
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.transaction.JDBCTransaction] - re-enabling autocommit
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.transaction.JDBCTransaction] - rolled back JDBC Connection
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.JDBCContext] - after transaction completion
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.ConnectionManager] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.impl.SessionImpl] - after transaction completion
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.impl.SessionImpl] - closing session
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.ConnectionManager] - performing cleanup
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.ConnectionManager] - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.JDBCContext] - after transaction completion
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.jdbc.ConnectionManager] - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
[junit] 2007-01-09 18:10:34,978 DEBUG [org.hibernate.impl.SessionImpl] - after transaction completion
[junit] 2007-01-09 18:10:34,978 INFO [com.org.prod.classroom.HibernateClassroomDAOSystemTest] - Rolled back transaction after test execution
Code: