Invalid Signature File Digest for Manifest Main Attributes

Grails Class GantBinding / java.lang.SecurityException: Invalid Signature File Digest for Manifest Main Attributes

2012-08-10

Error executing script Clean: Could not instantiate custom Metaclass for class: org.codehaus.gant.GantBinding. Reason: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

Description

Error executing script Clean: Could not instantiate custom Metaclass for class: org.codehaus.gant.GantBinding. Reason: java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

Encountered with: Grails 1.2.1 while building the AdminTool [Dandelion] for the Cinnamon ECMS

Source of the problem:

Dandelion requires safran.jar (the Cinnamon client lib), which was build with an ant-task including the command. This command mistakenly added iText-2.0.8 to the jar.

As the binary jar of iText-2.x has been signed, it cannot be safely repackaged into another jar.

Solution

Avoid repackaging the iText-jar with . Add it directly to the classpath (or include it in the jar’s classpath by using the Manifest file)