Monday, August 5, 2013

ClassFormatException Invalid byte tag in constant pool: 60 with Grails in Tomcat 7.0.42

The Problem

I encountered this error when deploying my grails application to the latest version of Tomcat 7.0.42.

The stacktrace is shown below:

 SEVERE: Unable to process Jar entry [com/ibm/icu/impl/data/LocaleElements_zh__PINYIN.class] from Jar [jar:file:/usr/local/apache-tomcat-7.0.42/webapps/mutations/WEB-INF/lib/icu4j-2.6.1.jar!/] for annohas been forcibly unregistered.  
 org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 60  
     at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(  
     at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(  

The offending jar file was the

The Solution

I updated the BuildConfig.groovy file to remove any dependencies to the offending JAR file and updated the dependency to use the latest version of the icu4j which at the time was version 51.1. To do that I inserted this code:

   inherits("global") {  
           excludes "icu4j"  
   dependencies {  
           runtime ''  


Grails version: 2.2.4
Tomcat version: 7.0.42

No comments:

Post a Comment