#1775  NPE during upgrade from 9.4.7 -> 10.2.0 with custom authenticator
Released
andrzej opened 2 months ago

During upgrade from version 9.4.7 to version 10.2.0 NullPointerException is being thrown in line 6220 of DataMigrator.java (method migrate156). Most likely userSearchBaseElement variable is null in our case, as our authenticator plugin is not using userSearchBase property at all. It is not possible to fix that by modification of Settings.xml as it fails to load as our authenticator class is missing that field.

Would it be possible to make this following part of the code conditional?, ie. in the following way:

var userSearchBaseElement = valueElement.element("userSearchBase");
if (userSearchBaseElement != null) {
    valueElement.addElement("userSearchBases").addElement("string").setText(userSearchBaseElement.getText().trim());
    userSearchBaseElement.detach();
}

it should make upgrade of this field executed only if this field actually exists.

OneDev changed state to 'Closed' 2 months ago
Previous Value Current Value
Open
Closed
OneDev commented 2 months ago

State changed as code fixing the issue is committed (61528cbc)

Referenced from commit 2 months ago
OneDev changed state to 'Released' 2 months ago
Previous Value Current Value
Closed
Released
OneDev commented 2 months ago

State changed as build #4767 (10.2.1) is successful

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
10.2.0, 10.1.1
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1775
Please wait...
Page is in error, reload to recover