Troubleshooting
Problem
If ANT script launched with non IBM supported launcher other than ws_ant, java.lang.NoClassDefFoundError exception can be thrown.
Symptom
If ANT build script is invoked with launcher(from Apache, maven, ...) and not from IBM provided ws_ant.sh(bat) launcher, the following exception might be thrown:
[time stamp] 00000001 AbstractShell E WASX7120E:
Diagnostic information from exception with text
"com.ibm.websphere.management.application.client.AppDeploymentException:
[Root exception is java.lang.NoClassDefFoundError:
javax.annotation.sql.DataSourceDefinition]
Cause
Starting from WAS v8.0 release, ws_ant.sh(bat) launcher script includes "-Djava.endorsed.dirs" java system property to set the path for java endorsed jar files to implement "Java Endorsed Standards Override Mechanism" by Oracle http://docs.oracle.com/javase/7/docs/technotes/guides/standards/).
Since non IBM supported ANT launcher scripts do not include this path, it causes java.lang.NoClassDefFoundError exception
Environment
All
Resolving The Problem
The recommendation is to use IBM supported ANT launcher script ws_ant.sh(bat) to launch ant scripts. If customers can not use ws_ant for some reason, they need to fix their tool by setting "-Djava.endorsed.dirs" path to $WAS_HOME/endorsed_apis directory.
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21672068