I was trying to leverage Spring LDAP 2.0 within a self contained JAR project (basically, a WAR which is packaged in a JAR file using the maven shade plugin). When doing so, I get the following exception:
Caused by: java.lang.NullPointerException: null
at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.isAtLeast30(DefaultObjectDirectoryMapper.java:80)
Tracing this back, I determined the following call was failing:
Migrated from LDAP-295
I was trying to leverage Spring LDAP 2.0 within a self contained JAR project (basically, a WAR which is packaged in a JAR file using the maven shade plugin). When doing so, I get the following exception:
Caused by: java.lang.NullPointerException: null at org.springframework.ldap.odm.core.impl.DefaultObjectDirectoryMapper.isAtLeast30(DefaultObjectDirectoryMapper.java:80)
Tracing this back, I determined the following call was failing:
According to the Spring API documentation, it's perfectly valid for getVersion to return null, but this code doesn't check for that scenario.
There needs to be some fallback scenario for this code to handle that issue.