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

Unclear error message #314

Closed
rnjudge opened this issue Mar 9, 2023 · 4 comments
Closed

Unclear error message #314

rnjudge opened this issue Mar 9, 2023 · 4 comments

Comments

@rnjudge
Copy link
Contributor

rnjudge commented Mar 9, 2023

I am trying to validate a document that I believe should validate. I get the error:

$ java -jar spdx-tools-2.2.8-jar-with-dependencies.jar Verify /home/rose/ternenv/tern/ubuntu.spdx 
WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.
14:51:52.177 [main] ERROR org.apache.jena.riot - [line: 1, col: 1 ] Content is not allowed in prolog.
Unable to parse the file: File /home/rose/ternenv/tern/ubuntu.spdx is not a recognized RDF/XML or tag/value format. While verifying for Tag/Value format: Error converting tag/value to RDF/XML format: Invalid license expression.  Expecting more operands.. While verifying for RDF/XML format: [line: 1, col: 1 ] Content is not allowed in prolog.

How do I know which license expression the "invalid license expression" is referring to? Also.. what does "content not allowed in prolog" mean?

I attached the file in question (note the .txt file format was added only to upload the doc to this issue)
ubuntu.spdx.txt

@goneall
Copy link
Member

goneall commented Mar 10, 2023

@rnjudge - Try the tools-java version of the tools. I don't know if would be any better, but we're only fixing security issues in this version. If it has the same issue in tools-java, let me know and I'll take a look.

@rnjudge
Copy link
Contributor Author

rnjudge commented Mar 10, 2023

Thanks @goneall! I do get a slightly more clear error message but still not sure what "expecting more operands" means here:

Analysis exception processing SPDX file: Invalid license expression.  Expecting more operands.
License expression: 'LGPL-2.1+, GPL-2.0+, LGPL-2.0+'

@goneall
Copy link
Member

goneall commented Mar 10, 2023

@rnjudge From the message, it looks like there is a license expression which is using comma's which are not allowed. If these are conjunctive license sets, AND should be used. Disjunctive OR should be used.

Let me know if that correlates with what you see in the file you're trying to verify.

@rnjudge
Copy link
Contributor Author

rnjudge commented Mar 14, 2023

Thank you @goneall! I appreciate your help.

@rnjudge rnjudge closed this as completed Mar 14, 2023
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

No branches or pull requests

2 participants