tags:

views:

446

answers:

2

I have a .war file of an application. It works, but I need to update some inner jars (only minor version changes)

While I can operate on .war archives using the midnight commander, the files can't be executed anymore: java.lang.SecurityException: SHA1 digest error.

I tried repacking it using the jar command, but I get it wrong: The archive contains new META-INF, and no WEB-INF (which is needed).

Thank you for proposed solutions!

A: 

I don't understand... can't you simply build a new war?

Sandman
No, it's not my war ;)
ivan_ivanovich_ivanoff
+1  A: 

The names should be META-INF and WEB-INF, without an "O".

Are you modifying the jar files in WEB-INF/libs? Because it sounds like you have tampered with a signed archive, and normally the war itself is unsigned.

If you alter a signed jar file, the signature is invalidated. Either re-sign the code with your code-signing key, or remove the invalidated signature information from the META-INF.

erickson
Thank you, it worked. Sandly the update (in my case from ant-1.7.0 to ant-1.7.1 didn't solve the problem "dirset doesn't support the 'erroronmissingdir' attribute"). Never mind.
ivan_ivanovich_ivanoff