Windows

Troubleshooting: EJB deployment fails in the build process on Windows

On a Windows build system, the EJB deployment process might fail due to an IOException with error code 87.

Problem

The Windows command prompt has a limitation on the length of the string used. In the Build and Deployment tool, the ejbDeploy Ant task that is used by the build process invokes a command that delegates the actual work to the EJBDeploy tool. This tool is part of WebSphere Application Server. A classpath that includes libraries from the WebSphere Application Server and the WebSphere Commerce installation directories is passed into the command. If the classpath is too long, the build process might fail with an error message similar to the following:

WC_installdir\wcbd\wcbd-build-common.xml:446: java.io.IOException:
Cannot run program "C:\IBM\WebSphere\AppServer\java\jre\bin\java.exe"
(in directory "WC_installdir\wcbd\working\compile\ejb\WebSphereCommerceServerExtensionsData"):
CreateProcess error=87, The parameter is incorrect.

For more information, see http://support.microsoft.com/kb/830473

Solution

To work around the limitation, use the Windows subst command in a command prompt to shorten the path to the WebSphere Application Server (or the WebSphere Application Server Test Environment) and the WebSphere Commerce installation directories. For example:

subst Y: C:\IBM\WebSphere\AppServer

or

subst Z: WC_installdir

Then, set the was.home or wc.home properties to the new values in WCBD_installdir/build.properties. For more information about the subst command, run the following command in a command prompt:

subst /?
Note: The subst command is not persistent. If the system is restarted, the virtual drives no longer exist and the subst commands must be run again. Therefore, you should include these commands in WCBD_installdir/setenv.bat so they are run in every build.