1

I have a Struts application for which my organization has been using IBM RAD as the IDE. In this project, we have a Java EE Application project and a Java EE Web Application project. In the Java EE Application project, we have added commons-lang3-3.1.jar as a Utility JAR. We are taking a reference of this project in the web application.

However, when using StringUtils class in the web application, we are facing NoClassDefFoundError exception. However, we also similarly added Guava Cache and are able to access classes inside this Jar.

Has anyone faced similar problem? For now, I am using the StringUtils class found in Apache Axis. I have paced the axis.jar at WEB-INF\lib folder of the web application.

Does anyone know why this is happening? How can this be solved? (The current version of IBM RAD I am using is 8.5. There are few differences between standard Eclipse and IBM RAD (based on Eclipse IDE). As such I am mentioning that we are using IBM RAD.)

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Rakesh Garia
  • 109
  • 1
  • 11
  • Is anyone looking at this? – Rakesh Garia Jul 24 '15 at 06:30
  • `NoClassDefFoundError` means that a class which was available at compile time is no longer available at runtime. Are you sure that you're importing the correct class in your web application? Maybe you're compiling against `org.apache.commons.lang.StringUtils`, but the shared jar only has `org.apache.commons.lang3.StringUtils` (note the different package names). – britter Oct 03 '15 at 10:08

0 Answers0