Troubleshooting
Problem
WebSphere Application Server v6.x ws_ant.bat error: The java class is not found: occurred on a Microsoft Windows 2003 machine on which WebSphere Application Server v6.1.0.23 was just installed.
Symptom
WebSphere Application Server v6.1.0.23 ws_ant.bat error occurred as shown without any class name mentioned.
The java class is not found:
Although wsEjbDeploy was in the ws_ant script, running just the ws_ant.bat without any arguments, results in the the same error.
Cause
In this case, the error occurred because there was no default profile created for this WebSphere Application Server v6.1 install.
Note: WebSphere Application Server 6.1.0.23 has a known defect APAR PK45126: STOPSERVER ANT API CASED JAVA CLASS IS NOT FOUND, but this is not the problem
Environment
This error could occur on any Operating System and any server edition.
Diagnosing The Problem
Consider below the scenario/results from WebSphere Application Server (WAS) 6.1.0 on any supported Windows platform:
No profile:
{WAS v6.1 HOME Install dir}\bin>manageprofiles -listProfiles
[]
{WAS v6.1 HOME Install dir}\bin>ws_ant.bat
The java class is not found:
Create a default profile with default options:
{WAS v6.1 HOME Install dir}\bin> manageprofiles -create -templatePath {WAS v6.1 HOME Install dir}\profileTemplates\default
INSTCONFSUCCESS: Success: Profile AppSrv01 now exists. Please consult {WAS v6.1 HOME Install dir}\profiles\AppSrv01/logs/AboutThisProfile.txt for more information about this profile.
Note: In the case of WebSphere Application Server Network Deployment edition, There are two profile templates that are used to create one cell (which is actually two profiles). the templates are WAS_HOME/profileTemplates/cell/dmgr and WAS_HOME/profileTemplates/cell/default. Contact IBM WebSphere server support if assistance is needed
Rerun, and get a "meaningful" error message. In this case a buildfile was not provided, and the default build.xml was not there:
{WAS v6.1 HOME Install dir}\bin>ws_ant.bat
Buildfile: build.xml does not exist!
Build failed
Running something similar to this should show if there is no default profile.
Resolving The Problem
Creating a profile resolves this specific scenario. This applies to nay WAS server version.
Note: As of WebSphere Application Server v7.0.0.x there is an improved/informative error message instead of just: The java class is not found:
Note: ws_ant cannot be used in IBM Rational Application Developer (RAD). It can only be used with WAS outside of RAD.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21381935