Skip to content

"Configuration exception: java.lang.NullPointerException" after upgrading to 2.3 #554

Description

@vdl-dsi-architecture

Just upgraded to 2.3, migrated config per the upgrade guide. The application doesn't start with

2026-08-05 08:54:55 - ERROR - Error opening LDAP connection "wrk-ldap" to ldaps://ldap-staging.vdl.intra/dc=liege,dc=work (java.lang.NullPointerException)
2026-08-05 08:54:55 - ERROR - org.lsc.exception.LscConfigurationException: Configuration exception: java.lang.NullPointerException

I can't find the stacktrace, and even though this is java 21, the NPE doesn't tell me which variable was null. I'm at loss as to what to look for without more information.

The config before migration:

<task>
  <name>userwork</name>
  <bean>org.lsc.beans.SimpleBean</bean>
  <ldapSourceService>
    <name>src-userwork</name>
    <connection reference="src-advdl" />
    <baseDn>cn=Users,DC=vdl,DC=intra</baseDn>
    <pivotAttributes>
      <string>cn</string>
    </pivotAttributes>
    <fetchedAttributes>
      <string>cn</string>
      <string>givenName</string>
      <string>company</string>
      <string>mail</string>
      <string>sn</string>
      <string>description</string>
      <string>userPrincipalName</string>
      <string>sAMAccountName</string>
      <string>telephoneNumber</string>
      <string>serialNumber</string>
      <string>employeeID</string>
      <string>otherMailbox</string>
      <string>altSecurityIdentities</string>
    </fetchedAttributes>
    <getAllFilter>
      <![CDATA[(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn=*))]]>
    </getAllFilter>
    <getOneFilter>
      <![CDATA[(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn={cn}))]]>
    </getOneFilter>
    <cleanFilter>
      <![CDATA[(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn={cn}))]]>
    </cleanFilter>
  </ldapSourceService>
  <ldapDestinationService>
    <name>dest-userwork</name>
    <connection reference="wrk-ldap" />
    <baseDn>ou=vdl,ou=ville,ou=people,dc=liege,dc=work</baseDn>
    <pivotAttributes>
      <string>cn</string>
    </pivotAttributes>
    <fetchedAttributes>
      <string>cn</string>
      <string>objectClass</string>
      <string>givenName</string>
      <string>mail</string>
      <string>sn</string>
      <string>uid</string>
      <string>description</string>
      <string>telephoneNumber</string>
      <string>userPassword</string>
      <string>gidNumber</string>
      <string>serialNumber</string>
      <string>employeeID</string>
      <string>employeeType</string>
      <string>organizationName</string>
      <string>userPrincipalName</string>
      <string>sshPublicKey</string>
    </fetchedAttributes>
    <getAllFilter>
      <![CDATA[(&(&(objectClass=officePerson)(!(cn=T1.*)))(cn=*))]]>
    </getAllFilter>
    <getOneFilter>
      <![CDATA[(&(&(objectClass=officePerson)(!(cn=T1.*)))(cn={cn}))]]>
    </getOneFilter>
  </ldapDestinationService>
  <propertiesBasedSyncOptions>
    <mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("cn") + ",ou=vdl,ou=ville,ou=people,dc=liege,dc=work"
    </mainIdentifier>
    <defaultDelimiter>;</defaultDelimiter>
    <defaultPolicy>FORCE</defaultPolicy>
    <conditions>
      <create>true</create>
      <update>true</update>
      <delete>true</delete>
      <changeId>true</changeId>
    </conditions>
    <dataset>
      <name>objectClass</name>
      <policy>FORCE</policy>
      <createValues>
        <string>"officePerson"</string>
        <string>"inetOrgPerson"</string>
        <string>"organizationalPerson"</string>
        <string>"person"</string>
        <string>"top"</string>
      </createValues>
    </dataset>
    <dataset>
      <name>uid</name>
      <forceValues>
        <string>srcBean.getDatasetFirstValueById("cn").toLowerCase()</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>userPassword</name>
      <forceValues>
        <string>"{SASL}" + srcBean.getDatasetFirstValueById("userPrincipalName")</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>organizationName</name>
      <forceValues>
        <string>srcBean.getDatasetFirstValueById("company")</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>employeeType</name>
      <forceValues>
        <string>"VDL"</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>sshPublicKey</name>
      <forceValues>
        <string>srcBean.getDatasetValuesById("altSecurityIdentities")</string>
      </forceValues>
    </dataset>
  </propertiesBasedSyncOptions>
</task>

and after :

<task>
  <name>userwork</name>
  <bean>org.lsc.beans.SimpleBean</bean>
  <ldapSourceService>
    <name>src-userwork</name>
    <connection reference="src-advdl" />
    <baseDn>cn=Users,DC=vdl,DC=intra</baseDn>
    <pivotAttributes>
      <string>cn</string>
    </pivotAttributes>
    <fetchedAttributes>
      <string>cn</string>
      <string>givenName</string>
      <string>company</string>
      <string>mail</string>
      <string>sn</string>
      <string>description</string>
      <string>userPrincipalName</string>
      <string>sAMAccountName</string>
      <string>telephoneNumber</string>
      <string>serialNumber</string>
      <string>employeeID</string>
      <string>otherMailbox</string>
      <string>altSecurityIdentities</string>
    </fetchedAttributes>
    <allEntriesFilter>
      <![CDATA[
          "(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn=*))"
        ]]>
    </allEntriesFilter>
    <oneEntryFilter>
      <![CDATA[
          "(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn=" + pivotAttributes["cn"] + "))"
        ]]>
    </oneEntryFilter>
    <cleanEntryFilter>
      <![CDATA[
          "(&(& (objectClass=person) (!(userAccountControl:1.2.840.113556.1.4.803:=2)) (| (mail=*@liege.be) (serialNumber=*) (employeeID=*) (cn=appuser*) ) (sn=*) )(cn=" + pivotAttributes["cn"] + "))"
        ]]>
    </cleanEntryFilter>
  </ldapSourceService>
  <ldapDestinationService>
    <name>dest-userwork</name>
    <connection reference="wrk-ldap" />
    <baseDn>ou=vdl,ou=ville,ou=people,dc=liege,dc=work</baseDn>
    <pivotAttributes>
      <string>cn</string>
    </pivotAttributes>
    <fetchedAttributes>
      <string>cn</string>
      <string>objectClass</string>
      <string>givenName</string>
      <string>mail</string>
      <string>sn</string>
      <string>uid</string>
      <string>description</string>
      <string>telephoneNumber</string>
      <string>userPassword</string>
      <string>gidNumber</string>
      <string>serialNumber</string>
      <string>employeeID</string>
      <string>employeeType</string>
      <string>organizationName</string>
      <string>userPrincipalName</string>
      <string>sshPublicKey</string>
    </fetchedAttributes>
    <allEntriesFilter>
      <![CDATA[
          "(&(&(objectClass=officePerson)(!(cn=T1.*)))(cn=*))"
        ]]>
    </allEntriesFilter>
    <oneEntryFilter>
      <![CDATA[
          "(&(&(objectClass=officePerson)(!(cn=T1.*)))(cn=" + pivotAttributes["cn"] + "))"
        ]]>
    </oneEntryFilter>
  </ldapDestinationService>
  <propertiesBasedSyncOptions>
    <mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("cn") + ",ou=vdl,ou=ville,ou=people,dc=liege,dc=work"
    </mainIdentifier>
    <defaultDelimiter>;</defaultDelimiter>
    <defaultPolicy>FORCE</defaultPolicy>
    <conditions>
      <create>true</create>
      <update>true</update>
      <delete>true</delete>
      <changeId>true</changeId>
    </conditions>
    <dataset>
      <name>objectClass</name>
      <policy>FORCE</policy>
      <createValues>
        <string>"officePerson"</string>
        <string>"inetOrgPerson"</string>
        <string>"organizationalPerson"</string>
        <string>"person"</string>
        <string>"top"</string>
      </createValues>
    </dataset>
    <dataset>
      <name>uid</name>
      <forceValues>
        <string>srcBean.getDatasetFirstValueById("cn").toLowerCase()</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>userPassword</name>
      <forceValues>
        <string>"{SASL}" + srcBean.getDatasetFirstValueById("userPrincipalName")</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>organizationName</name>
      <forceValues>
        <string>srcBean.getDatasetFirstValueById("company")</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>employeeType</name>
      <forceValues>
        <string>"VDL"</string>
      </forceValues>
    </dataset>
    <dataset>
      <name>sshPublicKey</name>
      <forceValues>
        <string>srcBean.getDatasetValuesById("altSecurityIdentities")</string>
      </forceValues>
    </dataset>
  </propertiesBasedSyncOptions>
</task>

This is on RHEL 8 with lsc.2.3-1.el8 with java-21-openjdk-21.0.12.0.8-1.1.el8_10.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions