GitHub sync fails: "NumberFormatException: Cannot parse null string"
search cancel

GitHub sync fails: "NumberFormatException: Cannot parse null string"

book

Article ID: 414192

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation

Issue/Introduction

When using the Git-based repository feature (Version Control), the synchronization or pull operation fails when the commit being pulled contains user objects that have no privileges assigned. This issue is often observed after syncing users from an LDAP directory, as these users may initially be created without any specific Automic privileges.

The JCP log will show an exception trace similar to the following:

U00045014 Exception 'java.lang.RuntimeException: "Cannot parse null string"' at 'com.automic.repository.api.impl.RepositoryServiceImpl.initFromExistingBranch():250'. 
U00045015 The previous error was caused by 'java.lang.NumberFormatException: "Cannot parse null string"' at 'java.lang.Long.parseLong():674'.

Environment

Component: Automation Engine
Function: Github repository sync
Affected Versions: 24.2.0, 24.4.0, and any other versions prior to 24.4.2.

Cause

The root cause of this issue is a defect in how the repository sync feature processes USER object XML files. When a user is created with no privileges, the corresponding XML file in the repository (<user_name>.xml) is missing the <privilege> tag entirely.

During a sync or pull operation, the Automation Engine attempts to parse the value of this tag. Since the tag is absent, the code tries to parse a null value into a Long data type, which results in a java.lang.NumberFormatException. This exception stops the entire synchronization process.

Resolution


Resolution

This is a known defect that has been resolved in a later version of the Automation Engine.

Fixed in Version: Automation.Engine 24.4.2
Upgrading to version 24.4.2 or a newer version will permanently resolve this issue. The fix ensures that user objects without assigned privileges are handled correctly during repository operations.

Workaround

To allow the repository sync to complete, the problematic user objects must be temporarily removed.

In the client where you are performing the sync, delete the users that have no privileges (these are often the users recently synced from LDAP).
Perform the GitHub repository sync/pull operation. It should now complete successfully.
After the sync is complete, you can re-add the users or run the LDAPSync again to recreate them.