Uploaded image for project: 'LAMS Development'
  1. LAMS Development
  2. LDEV-2537

Illegal attempt to dereference collection

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Admin
    • Labels:
      None

      Description

      Added a user using 'create new user' link in 'group mgmt', then went to 'find users', typed in the username of the new user, and clicked 'delete user'. Got this exception, might be something to do with change to Hibernate 3.3:

       FATAL org.lamsfoundation.lams.web.util.CustomStrutsExceptionHandler - org.springframework.orm.hibernate3.HibernateQueryException: illegal attempt to dereference collection [group0_.group_id.users] with element property reference [userId] [select count(*) from org.lamsfoundation.lams.learningdesign.Group group where group.users.userId = :userID]; nested exception is org.hibernate.QueryException: illegal attempt to dereference collection [group0_.group_id.users] with element property reference [userId] [select count(*) from org.lamsfoundation.lams.learningdesign.Group group where group.users.userId = :userID]
              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:657)
              at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
              at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
              at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
              at org.lamsfoundation.lams.learningdesign.dao.hibernate.GroupDAO.getCountGroupsForUser(GroupDAO.java:73)
              at org.lamsfoundation.lams.usermanagement.service.UserManagementService.userHasData(UserManagementService.java:755)
              at org.lamsfoundation.lams.usermanagement.service.UserManagementService$$FastClassByCGLIB$$aa86f00b.invoke(<generated>)
              at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
              at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
              at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
              at org.lamsfoundation.lams.usermanagement.service.UserManagementService$$EnhancerByCGLIB$$48504cf9.userHasData(<generated>)
              at org.lamsfoundation.lams.admin.web.UserAction.remove(UserAction.java:301)

        Activity

        jundirl Jun-Dir Liew created issue -
        ernieg Ernie Ghiglione made changes -
        Field Original Value New Value
        Assignee Jun-Dir Liew [ jundirl ] Ernie Ghiglione [ ernieg ]
        ernieg Ernie Ghiglione made changes -
        Assignee Ernie Ghiglione [ ernieg ] Marcin Cieslak [ marcin ]
        marcin Marcin Cieslak made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        ernieg Ernie Ghiglione made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            marcin Marcin Cieslak
            Reporter:
            jundirl Jun-Dir Liew
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development