Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing SBOM, results in Exception #4005

Closed
2 tasks done
kmoens opened this issue Jul 25, 2024 · 2 comments
Closed
2 tasks done

Importing SBOM, results in Exception #4005

kmoens opened this issue Jul 25, 2024 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@kmoens
Copy link

kmoens commented Jul 25, 2024

Current Behavior

I'm importing the following SBom bom-2024.03.01-SNAPSHOT.json, but this triggers an exception which I cannot link what the exact cause is. The SBOM itself appears valid, at least if I activate validation again (which is currently disabled for other reasons), it still imports.

javax.jdo.JDOUserException: The query returned more than one instance BUT either unique is set to true or only aggregates are to be returned, so should have returned one result maximum
    at org.datanucleus.api.jdo.JDOAdapter.getJDOExceptionForNucleusException(JDOAdapter.java:698)
    at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:456)
    at org.datanucleus.api.jdo.JDOQuery.executeUnique(JDOQuery.java:360)
    at org.dependencytrack.persistence.LicenseQueryManager.getLicenseByIdOrName(LicenseQueryManager.java:102)
    at org.dependencytrack.persistence.QueryManager.getLicenseByIdOrName(QueryManager.java:624)
    at org.dependencytrack.parser.cyclonedx.util.ModelConverter.convert(ModelConverter.java:572)
    at org.dependencytrack.parser.cyclonedx.util.ModelConverter.convertComponents(ModelConverter.java:462)
    at org.dependencytrack.tasks.BomUploadProcessingTask.inform(BomUploadProcessingTask.java:157)
    at org.dependencytrack.tasks.BomUploadProcessingTaskV2.inform(BomUploadProcessingTaskV2.java:151)
    at alpine.event.framework.BaseEventService.lambda$publish$0(BaseEventService.java:110)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.datanucleus.store.query.QueryNotUniqueException: The query returned more than one instance BUT either unique is set to true or only aggregates are to be returned, so should have returned one result maximum
    at org.datanucleus.store.query.Query.executeQuery(Query.java:2039)
    at org.datanucleus.store.query.Query.executeWithMap(Query.java:1911)
    at org.datanucleus.api.jdo.JDOQuery.executeInternal(JDOQuery.java:437)
    ... 11 common frames omitted

Steps to Reproduce

Import the attached SBOM.

Expected Behavior

Import successfull

Dependency-Track Version

4.11.3

Dependency-Track Distribution

Container Image

Database Server

PostgreSQL

Database Server Version

No response

Browser

Google Chrome

Checklist

@kmoens kmoens added defect Something isn't working in triage labels Jul 25, 2024
@nscuro nscuro added duplicate This issue or pull request already exists and removed defect Something isn't working in triage labels Jul 25, 2024
@nscuro
Copy link
Member

nscuro commented Jul 25, 2024

Duplicate of #3957, fixed in #3958

@nscuro nscuro closed this as not planned Won't fix, can't repro, duplicate, stale Jul 25, 2024
Copy link
Contributor

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants