Illegal type in constant pool

Posted: 2007-09-03

After adding

CATALINA_OPTS=-javaagent:/path/to/aspectweaver-1.5.3.jar

tomcat started failing - giving an "Illegal type in constant pool" about log4j.

This seems mainly to be due to lib differences.

To get this running on tomcat 5.5.23 I had to:

  1. copy the log4j jar from my webapp to the common/lib dir (log4j was not present here before)
  2. copy the commons-logging-api jar to the bin directory (replacing the version that was here before).

It seems that aspectjweaving can cause increased sensitivity to classloading/versioning problems.