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

Error: Invalid or corrupt jarfile since 1.8.11 #13

Open
bdbogjoe opened this issue Jul 12, 2017 · 9 comments
Open

Error: Invalid or corrupt jarfile since 1.8.11 #13

bdbogjoe opened this issue Jul 12, 2017 · 9 comments

Comments

@bdbogjoe
Copy link

bdbogjoe commented Jul 12, 2017

here the steps to reproduce :

output : no main manifest attribute, in josso-core-1.8.10.jar (which is normal)

output : Error: Invalid or corrupt jarfile josso-core-1.8.11.jar

same issue with 1.8.12

@gbrigandi
Copy link
Member

Hi,
You're actually trying to "execute" the jar however this is not intended the intended use for this artifact. It essentially contains the core components for the JOSSO pieces (e.g. service provider interfaces) to build on (e.g. Agents).
Running "jar tvf josso-core-1.8.11.jar" instead of "java -jar josso-core-1.8.11.jar" should dump the contents of the jar.
Regards,
Gianluca.

@bdbogjoe
Copy link
Author

i know this jar is not executable, but why doing jar -jar for version 1.8.10 produce expected return and not 1.8.11 ?

don't know what is wrong with jar since 1.8.11, but i cannot compile anymore my app using these jar (using maven for info)

@gbrigandi gbrigandi reopened this Jul 21, 2017
@gbrigandi
Copy link
Member

What kind of errors are you getting at compile time ?

@bdbogjoe
Copy link
Author

bdbogjoe commented Aug 7, 2017

here my error :

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project wf-josso-core: Compilation failure: Compilation failure:
[ERROR] error reading /home/eric/.m2/repository/org/josso/josso-core/1.8.11/josso-core-1.8.11.jar; cannot read zip file
[ERROR] error reading /home/eric/.m2/repository/org/josso/josso-common/1.8.11/josso-common-1.8.11.jar; cannot read zip file
[ERROR] /home/eric/sources/josso/web/core/wf-josso-core/src/main/java/com/webbfontaine/josso/gateway/identity/ConfigStore.java:[9,45] package org.josso.gateway.identity.exceptions does not exist
....

It just cannot read the zip, but i can open the jar and looks fine, but maven cannot find class inside it
very strange error

same build with version 1.8.10 works fine

@bdbogjoe
Copy link
Author

i have still the issue with version 1.8.12, any news on this ?

@bdbogjoe
Copy link
Author

i created simple repo to illustrate the issue : https://github.com/bdbogjoe/josso-corrupt-jar

try to run gradle build and you will get error :

gradle clean build :clean
:compileJava
error: error reading /home/eric/.gradle/caches/modules-2/files-2.1/org.josso/josso-core/1.8.11/49343f813e124b049f87e479777e1a2fb144aa36/josso-core-1.8.11.jar; cannot read zip file
error: error reading /home/eric/.gradle/caches/modules-2/files-2.1/org.josso/josso-common/1.8.11/acae9dd38a7e336e6f80e266a7d0e21525357cde/josso-common-1.8.11.jar; cannot read zip file
/home/eric/sources.github/josso-corrupt-jar/src/main/java/Test.java:1: error: package org.josso.gateway does not exist
import org.josso.gateway.SSONameValuePair;
^
/home/eric/sources.github/josso-corrupt-jar/src/main/java/Test.java:5: error: cannot find symbol
SSONameValuePair test;
^
symbol: class SSONameValuePair
location: class Test
2 errors
:compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':compileJava'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 0.446 secs

@bdbogjoe
Copy link
Author

http://repository.josso.org/org/josso/josso-core/1.8.11/josso-core-1.8.11.jar.md5 : 49a0dc966f56e88bf9b96fb7776bc6b5

After downloading http://repository.josso.org/org/josso/josso-core/1.8.11/josso-core-1.8.11.jar the md5 is a3fc9d3d05f1bc0efb135fa465b3e0cf


http://repository.josso.org/org/josso/josso-core/1.8.10/josso-core-1.8.10.jar.md5 : 426a247c7fd69d63f3427f764e6ff464

After downloading http://repository.josso.org/org/josso/josso-core/1.8.10/josso-core-1.8.10.jar the computed md5 is 426a247c7fd69d63f3427f764e6ff464

As you can see the md5 of version 1.8.10 is correct, but not the 1.8.11

Can you please check ?

@anthonyMoreira
Copy link

Hi, we have the same problem over here. The md5 on the repo is not correct for the version 1.8.11. Please check ASAP.

@bdbogjoe
Copy link
Author

if i unzip and zip the jar again, it works fine, so definitely there is issue while creating this jar

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

3 participants