You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to convert this v2.3 SBOM to v3, the folowing error message is written:
Error converting: Error converting SPDX file: class org.spdx.core.InvalidSPDXAnalysisException Error parsing JSON field for ID SPDXRef-nginx-source: Unexpected SPDX error parsing license string
The license string in question is BSD-2-Clause, which is a valid SPDX license string. The error message does not elaborate why the license is invalid and it is not clear if the correct license is read.
There was an incorrect import in the SPDX Java Library which masked the more detailed error message.
Here's the full message:
Error converting: Error converting SPDX file: class org.spdx.core.InvalidSPDXAnalysisException Error parsing JSON field for ID SPDXRef-nginx-source: Unknown license nginx-1.29.0/LICENSE. Must be a listed license or have the syntax LicenseRef-([0-9a-zA-Z\.\-\_]+)\+?$ License expression: 'nginx-1.29.0/LICENSE'
I'll create a separate issue and pull request to fix the error message issue.
Activity
goneall commentedon Jul 28, 2025
There was an incorrect import in the SPDX Java Library which masked the more detailed error message.
Here's the full message:
I'll create a separate issue and pull request to fix the error message issue.
goneall commentedon Jul 28, 2025
It looks like this PR already fixes the error message: spdx/Spdx-Java-Library#339
goneall commentedon Jul 28, 2025
Looking at the source sbom, the issue is with line 142 - the
licenseInfoInFilesis intended to list out the license expressions for each file.bitmotivator commentedon Jul 28, 2025
Wow, thank you for the quick response @goneall !
goneall commentedon Oct 15, 2025
Looks like this is fixed with spdx/Spdx-Java-Library#339
Closing the issue
I'll be creating a new release soon