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

Converting Errors #11

Closed
sdd4181 opened this issue Jun 9, 2022 · 5 comments · Fixed by #13
Closed

Converting Errors #11

sdd4181 opened this issue Jun 9, 2022 · 5 comments · Fixed by #13

Comments

@sdd4181
Copy link

sdd4181 commented Jun 9, 2022

I went through the documented setup, and running ./mvnw clean package succeeds. When trying to run the spdxcyclone I am getting issues.

I am running this on a windows vm with jdk 11.0.15, and I'm running spdxcyclone-0.0.1-SNAPSHOT-jar-with-dependencies.jar because all others exit with no main manifest attribute. I run this jar file identically to the usage command java -jar spdxcyclone-0.0.1-SNAPSHOT-jar-with-dependencies.jar ./cyclonedx.json ./spdx.json and get the following error.

Thank you for any help you can provide!

11:52:33.229 [main] ERROR org.spdx.jacksonstore.JacksonSerializer - Invalid ID SPDXRef-pkg-maven-com.google.errorprone-error_prone_annotations-2.2.0-type-jar.  Must be an SPDX Identifier or Anonymous
Exception in thread "main" java.lang.RuntimeException: org.spdx.library.InvalidSPDXAnalysisException: Invalid ID SPDXRef-pkg-maven-com.google.errorprone-error_prone_annotations-2.2.0-type-jar.  Must be an SPDX Identifier or Anonymous
        at org.spdx.jacksonstore.JacksonSerializer.lambda$1(JacksonSerializer.java:245)
        at java.base/java.util.stream.ReduceOps$4ReducingSink.accept(ReduceOps.java:220)
        at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1655)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
        at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
        at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:589)
        at org.spdx.jacksonstore.JacksonSerializer.getDocElements(JacksonSerializer.java:240)
        at org.spdx.jacksonstore.JacksonSerializer.docToJsonNode(JacksonSerializer.java:117)
        at org.spdx.jacksonstore.MultiFormatStore.serialize(MultiFormatStore.java:166)
        at com.sourceauditor.spdxcyclone.CycloneToSpdx.cycloneDxToSpdx(CycloneToSpdx.java:278)
        at com.sourceauditor.spdxcyclone.CycloneToSpdx.main(CycloneToSpdx.java:218)
Caused by: org.spdx.library.InvalidSPDXAnalysisException: Invalid ID SPDXRef-pkg-maven-com.google.errorprone-error_prone_annotations-2.2.0-type-jar.  Must be an SPDX Identifier or Anonymous
        at org.spdx.jacksonstore.JacksonSerializer.typedValueToObjectNode(JacksonSerializer.java:178)
        at org.spdx.jacksonstore.JacksonSerializer.lambda$1(JacksonSerializer.java:243)
        ... 12 more
goneall added a commit that referenced this issue Jun 9, 2022
As pointed out in issue #11 - the jar file to run needs to be the "with dependencies" version.
@goneall
Copy link
Member

goneall commented Jun 9, 2022

@sdd4181 I added PR #12 to improve the README for running the correct JAR file.

@goneall
Copy link
Member

goneall commented Jun 9, 2022

@sdd4181 Can you attached the cyclonedx.json file you are trying to convert?

@sdd4181
Copy link
Author

sdd4181 commented Jun 10, 2022

It wouldn't let me send json file formats so I zipped the 3 files I used and attached them below.
cycloneSBOM.zip

@goneall
Copy link
Member

goneall commented Jun 10, 2022

@sdd4181 I was able to duplicate this translating the file dubboMavenSBOMCycloneDX.json. Definitely an issue with this utility or one of the library dependencies.

I'll do some investigating over the next few days and update the issue.

@sdd4181
Copy link
Author

sdd4181 commented Jun 10, 2022

ok, thank you for your help!

goneall added a commit that referenced this issue Jun 11, 2022
Fixes #11

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants