Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] MD5 hash is not as expected.

On 11 Apr 2012, at 08:45, Barrie Treloar wrote:

> One of my internally created bundles is failing to be downloaded correctly.
> 
> I can see the artifacts being downladed into
> ~/.m2/repository/p2/bundles/<artifact>/<version>
> 
> And then I get this error, which causes the file to be deleted:
> [ERROR] Internal error: java.lang.RuntimeException: "Messages while
> trying children repositories.": ["": ["Problems downloading artifact:
> osgi.bundle,my.artifact,15.0.0.": ["MD5 hash is not as expected.
> Expected: e4c9ecabc2025def58fb4c37c72f9a43 and found
> 8d80c26cbaea34122db6fe1f980f6bda."]]]
> 
> I haven't had enough time yet to track down which bit is deleting the jar file.
> I'll do that tomorrow.
> If someone knows the answer and can kick start my investigation that
> would great!
> 
> I can't tell whether my artifact is being corrupted on the download or
> whether nexus is returning a wrong MD5 Hash on the P2 proxied
> repository.
> I know the actual bundle MD5 is correct, I've verified that, but
> perhaps the P2 capabilities is causing a problem.
> 
> But without the incorrect jar, I cant do anything.

I delete the MD5 entry from the artifacts.jar since P2 really throws wobblies if this is invalid. By deleting it from the artifacts.jar before publishing it to a repository it generally fixes the problem.

This often happens when you are post-processing the JAR (e.g. signing it, Pack200 etc.) but after the P2 metadata step has completed. I have written a small XSLT to strip out the md5 from the XML (though you can use a command line tool like 'sed' if you haven't reflowed the content) as a specific post-processing step.

Alex



Back to the top