com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership

Atlassian JIRA | Rafael Sperafico [Atlassian] | 1 year ago
  1. 0

    [BAM-16069] "Named query not known: atluser.externalEntity_hasMembership" when using LDAP for users with AD integration - Atlassian JIRA

    atlassian.com | 12 months ago
    com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership
  2. 0

    {code} 2015-06-24 09:01:40,855 ERROR [http-bio-8443-exec-10] [DefaultUserAccessor] org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasExternalMembership(HibernateGroupManager.java:399) at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasMembership(HibernateGroupManager.java:357) at com.atlassian.user.impl.cache.CachingGroupManager.hasMembership(CachingGroupManager.java:170) at com.atlassian.user.impl.delegation.DelegatingGroupManager.hasMembership(DelegatingGroupManager.java:256) at sun.reflect.GeneratedMethodAccessor1117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.crowd.integration.atlassianuser.DynamicDelegationAccessor$DelegatingInvocationHandler.invoke(DynamicDelegationAccessor.java:125) at com.sun.proxy.$Proxy32.hasMembership(Unknown Source) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:487) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:511) at sun.reflect.GeneratedMethodAccessor948.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:2 {code}

    Atlassian JIRA | 1 year ago | Esther Asenjo [Atlassian]
    com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership
  3. 0

    {code} 2015-06-24 09:01:40,855 ERROR [http-bio-8443-exec-10] [DefaultUserAccessor] org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasExternalMembership(HibernateGroupManager.java:399) at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasMembership(HibernateGroupManager.java:357) at com.atlassian.user.impl.cache.CachingGroupManager.hasMembership(CachingGroupManager.java:170) at com.atlassian.user.impl.delegation.DelegatingGroupManager.hasMembership(DelegatingGroupManager.java:256) at sun.reflect.GeneratedMethodAccessor1117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.crowd.integration.atlassianuser.DynamicDelegationAccessor$DelegatingInvocationHandler.invoke(DynamicDelegationAccessor.java:125) at com.sun.proxy.$Proxy32.hasMembership(Unknown Source) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:487) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:511) at sun.reflect.GeneratedMethodAccessor948.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:2 {code}

    Atlassian JIRA | 1 year ago | Esther Asenjo
    com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    h4. Summary When an user with AD account logs in into Bamboo, the application logs are polluted with Hibernate related exceptions, related to a Hibernate query called _atluser.externalEntity_hasMembership_ which cannot be found. h4. Steps to Reproduce - Create a remote application link in Bamboo with an external application. - Log into Bamboo with an external user (AD integration). h5. Expected Results - Application logs are clear and no exceptions are raised. h5. Actual Results - Application logs are polluted with the following exception. In this case, Bamboo is figuring out if the application switcher icon (AKA _hamburguer_ icon) is to be displayed, by checking if the external user has certain memberships. The below exception is thrown in the atlassian-bamboo.log file: {code} 2015-06-24 09:01:40,855 ERROR [http-bio-8443-exec-10] [DefaultUserAccessor] org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasExternalMembership(HibernateGroupManager.java:399) at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasMembership(HibernateGroupManager.java:357) at com.atlassian.user.impl.cache.CachingGroupManager.hasMembership(CachingGroupManager.java:170) at com.atlassian.user.impl.delegation.DelegatingGroupManager.hasMembership(DelegatingGroupManager.java:256) at sun.reflect.GeneratedMethodAccessor1117.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.crowd.integration.atlassianuser.DynamicDelegationAccessor$DelegatingInvocationHandler.invoke(DynamicDelegationAccessor.java:125) at com.sun.proxy.$Proxy32.hasMembership(Unknown Source) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:487) at bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:511) at sun.reflect.GeneratedMethodAccessor948.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:2 {code} h4. Workaround There's no workaround for this issue, a new version of Bamboo will be released.

    Atlassian JIRA | 1 year ago | Rafael Sperafico [Atlassian]
    com.atlassian.user.impl.RepositoryException: org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership
  6. 0

    Hi, This is not entirely a UPM bug, but you guys probably have the best expertise in figuring it out, so raising it here. Bamboo customers using LDAP have started getting the following exception spewed into their logs. We have seen no negative side effects though. Its just scaring people and causing support load. {code} 2012-03-28 13:11:22,392 ERROR [PluginSchedulerTask-upmPluginNotificationJob] [LDAPSingleStringPager] Could not close connection com.atlassian.user.impl.RepositoryException: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not found from bundle [com.atlassian.upm.atlassian-universal-plugin-manager-plugin]] at com.atlassian.user.impl.ldap.repository.DefaultLdapContextFactory.getLDAPContext(DefaultLdapContextFactory.java:91) at com.atlassian.user.impl.ldap.search.page.AbstractLDAPPager.preload(AbstractLDAPPager.java:79) at com.atlassian.user.search.page.AbstractPrefetchingPager.hasNext(AbstractPrefetchingPager.java:37) ... Caused by: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not found from bundle [com.atlassian.upm.atlassian-universal-plugin-manager-plugin]] at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.<init>(Unknown Source) at javax.naming.directory.InitialDirContext.<init>(Unknown Source) at com.atlassian.user.impl.ldap.repository.DefaultLdapContextFactory.getLDAPContext(DefaultLdapContextFactory.java:87) ... 39 more Caused by: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not found from bundle [com.atlassian.upm.atlassian-universal-plugin-manager-plugin] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:103) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source) ... 45 more Caused by: java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:772) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1690) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634) at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594) at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 50 more {code} This same bug is hitting other plugins/products as well. e.g. https://jira.atlassian.com/browse/BAM-9680

    Ecosystem JIRA | 5 years ago | Brydie McCoy
    com.atlassian.user.impl.RepositoryException: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.ldap.LdapCtxFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.ldap.LdapCtxFactory not found from bundle [com.atlassian.upm.atlassian-universal-plugin-manager-plugin]]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.user.impl.RepositoryException

      org.springframework.orm.hibernate3.HibernateSystemException: Named query not known: atluser.externalEntity_hasMembership; nested exception is org.hibernate.MappingException: Named query not known: atluser.externalEntity_hasMembership

      at com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasExternalMembership()
    2. com.atlassian.user
      DelegatingGroupManager.hasMembership
      1. com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasExternalMembership(HibernateGroupManager.java:399)
      2. com.atlassian.user.impl.hibernate3.HibernateGroupManager.hasMembership(HibernateGroupManager.java:357)
      3. com.atlassian.user.impl.cache.CachingGroupManager.hasMembership(CachingGroupManager.java:170)
      4. com.atlassian.user.impl.delegation.DelegatingGroupManager.hasMembership(DelegatingGroupManager.java:256)
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1117.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    4. com.atlassian.crowd
      DynamicDelegationAccessor$DelegatingInvocationHandler.invoke
      1. com.atlassian.crowd.integration.atlassianuser.DynamicDelegationAccessor$DelegatingInvocationHandler.invoke(DynamicDelegationAccessor.java:125)
      1 frame
    5. com.sun.proxy
      $Proxy32.hasMembership
      1. com.sun.proxy.$Proxy32.hasMembership(Unknown Source)
      1 frame
    6. bucket.user
      DefaultUserAccessor.hasMembership
      1. bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:487)
      2. bucket.user.DefaultUserAccessor.hasMembership(DefaultUserAccessor.java:511)
      2 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor948.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      3. java.lang.reflect.Method.invoke(Method.java:606)
      3 frames
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
      3 frames
    9. Spring Tx
      TransactionInterceptor$1.proceedWithInvocation
      1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
      1 frame