rwinch / spring-security-jira-to-gh

0 stars 0 forks source link

LDAP-300: DefaultObjectDirectoryMapper#verifyConversion produces NullPointerException in uberjar #271

Closed rwinch closed 10 years ago

rwinch commented 10 years ago

Migrated from LDAP-300

Follows on from LDAP-296.

After trying 2.0.1.RELEASE, I ran into another NPE. This is code which works fine when run normally through an IDE, but when packaged up using the Maven shade plugin, it fails with an NPE.

Exception in thread "main" java.lang.NullPointerException
    at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.verifyConversion(DefaultObjectDirectoryMapper.java:167)
    at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.addManagedClass(DefaultObjectDirectoryMapper.java:144)
    at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.getEntityData(DefaultObjectDirectoryMapper.java:107)
    at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.filterFor(DefaultObjectDirectoryMapper.java:447)
    at org.springframework.ldap.core.LdapTemplate.find(LdapTemplate.java:1824)
    at org.springframework.ldap.core.LdapTemplate.find(LdapTemplate.java:1857)
    at org.springframework.ldap.repository.support.SimpleLdapRepository.findAll(SimpleLdapRepository.java:119)
    at org.springframework.ldap.repository.support.SimpleLdapRepository.findAll(SimpleLdapRepository.java:43)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:344)
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:329)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    at com.sun.proxy.$Proxy22.findAll(Unknown Source)
    at au.net.iinet.hris_ldap.service.LdapSyncService.buildPermissions(LdapSyncService.java:128)
    at au.net.iinet.hris_ldap.service.LdapSyncService.main(LdapSyncService.java:104)
rwinch commented 10 years ago

Lee Standen said:

Versions, for reference

Spring Version 4.0.3.RELEASE Spring LDAP 2.0.1.RELEASE