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
including the JAR files cause our project to fail. Bad MANIFEST.MFs? #554
Comments
Hi @fredg1 - I had a look at the manifest, and I don't know what in it could cause the problem. Can you create a minimal example and attach it, or upload to github and I can try that? The |
test.zip The jar won't work, but go in
Nope. The error is literally just that. Adding
tried |
Thanks @fredg1 I can reproduce on Linux with your zip, but using ant directly and not using ant.bat. I will try and see what I can figure out here and report back. |
@jonahgraham @fredg1 the problem is the signatures in the META-INF folder copied over. jarsigner -verify -verbose test.jar |
+1 I had just come to the same conclusion - @fredg1 see https://stackoverflow.com/questions/999489/invalid-signature-file-when-attempting-to-run-a-jar for some suggestions, you can hopefully adapt them to ant - its too bad that java didn't just say that :-) with output:
This is not something to change in LSP4J so I am closing this issue. |
Well... sorry for disturbing you, and thanks for your time |
I'm glad that we were able to help. I hope your LSP feature integration goes well! |
I wasn't sure if this was going to get solved, so meanwhile, I was trying to compile and build from source myself. Issue is, Xtext wasn't really working, so instead, I was manually converting eve rything from Xtext to Java It... uh... was taking quite some time, and I'm quite glad I won't have to go all the way 😨 |
what problems did you face with Xtend? |
(Keep in mind, I know nothing about Xtext. All I know is from contextual clues from looking at the files) I don't quite remember how it started, but if I recall correctly, there was some internal class that wasn't loading, which when looking it up, I saw that you had to upgrade your gradle version to fix it... However, the version change meant that some features were now no longer supported. First, I had to transition from the Now, it's stuck at saying
And I have no idea what it's even referring to |
by the way, how is it that this problem hasn't come up before? Looking at your link, it seems like this issue is caused by adding a signed jar (a jar with .RSA, .DSA and/or .SF files in META-INF/) as a dependency, and doesn't care about the building method. But then, wouldn't there have been more instances of inexperienced people adding it as a dependency and getting this problem? And for the future, should there be a note/warning about this somewhere in this repository? |
@fredg1 as a newcomer your perspective is very valuable. Can you write something and submit a PR in a location that you may have found the information? |
the problem basically affects all signed jars and is not lsp4j specific. |
We are working on a project built with ANT and I am trying to add a Language Server feature to it.
If I add the lsp4j source code of this repository (including the dependencies) to the project, everything is fine.
I can launch the project from my IDE (vscode), and building the project produces a .jar that can be ran properly.
However
The project has a "no 3rd party source code" policy (i.e. 3rd party stuff must be imported as a .jar) (which comes from, and I quote, "years of sheer pain and frustration" with them).
If I try to add lsp4j's .jar(s), I can still run the project just fine from vscode, but when I build, the resulting build fails to run (with java -jar <filename>) with the error
The building process doesn't get interrupted, and looking at it, nothing goes wrong during it. Only the resulting .jar has a defect.
There's not even any reference to lsp4j yet. The only change is its inclusion in the libraries.
I tried to isolate the issue by going step-by-step
Someone with more knowledge of java than me guessed that the cause would lie in the jars' MANIFEST.MF
Can you take a look, please?
The text was updated successfully, but these errors were encountered: