spdx / tools

SPDX Tools
Apache License 2.0
127 stars 69 forks source link

NoSuchMethodError when runtime #282

Open nam-np opened 2 years ago

nam-np commented 2 years ago

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.

goneall commented 2 years ago

@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