tools
tools copied to clipboard
NoSuchMethodError when runtime
When I run function printDoc(), I found log:
java.lang.NoSuchMethodError: 'void org.spdx.tag.CommonCode.printDoc(org.spdx.rdfparser.model.SpdxDocument, java.io.PrintWriter, java.util.Properties)
My Environment:
openjdk 11.0.11 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
Can you help me solve the problem. Thank you.
@nam-np There is a newer version of the SPDX tools you might want to try: tools-java. There are 2 libraries the newer version uses - SPDX Java Library and spdx-java-tagvalue-store.
Here's a link to the same function in the new library: https://github.com/spdx/spdx-java-tagvalue-store/blob/d270d103942d8428a74784ddf8d57cbd430912c4/src/main/java/org/spdx/tag/CommonCode.java#L82