A WinProcess32.create() error occurs while deploying a large number of enterprise beans

Technote (FAQ)
Problem
When deploying multiple enterprise beans using the WebSphere® Application Server V3.5 deploy tool, the generated deploy command can become quite long. If the command line length limit is exceeded, a WinProcess32.create() error can result.
Cause
This problem is due to a known design limitation of the WebSphere Application Server V3.5 deploy tool.

One of the deployment steps calls out to javac, using the exec() method, to compile all the generated .java files for each enterprise bean. Assuming that at least four .java files are generated for each enterprise bean and that these files are all passed as fully qualified path names to the javac in one command line, the command line can become very long.

The Java exec() method calls out to the operating system process creation function and that function usually has a limit on the length of the command line. For Windows® systems, if that length is exceeded, a trap occurs, which typically flows back as a Java I/O exception in process creation, and so on.

Solution

If the enterprise beans use inheritance or associations, they must be deployed in Visual Age for Java. Inheritance and associations are Visual Age for Java-specific features and the WebSphere deploy tool does not support them.


Tutorial for using deploy tool in batch mode

Assume a single enterprise bean 'Inc' in the inc.jar file with the following files:

com/ibm/ejs/examples/Inc/Inc.class (remote interface)
com/ibm/ejs/examples/Inc/Inc.ser
com/ibm/ejs/examples/Inc/IncBean.class (bean class)
com/ibm/ejs/examples/Inc/IncBeanFinderHelper.class
com/ibm/ejs/examples/Inc/IncHome.class (home interface)
com/ibm/ejs/examples/Inc/IncKey.class (key class)
  1. Set up a shell environment as per .../AppServer/bin/debug/adminserver.bat

    All the path and class path settings are located here to run the deploy tool, rmic, and javac. Add any user-specific class paths now.


  2. Run: java com.ibm.ivj.ejb.tools.deployment.EJBDeploy inc.jar . -trace -codegen

    "." is the specified working directory, and ./__ejbjar is the directory where the generated code is placed.


  3. Add ./__ejbjar to the class path.


  4. Run: rmic -keep -iiop com.ibm.ejs.examples.Inc.EJSRemoteIncHome
    rmic -keep -iiop com.ibm.ejs.examples.Inc.EJSRemoteInc

    Process these classes for each enterprise bean using rmic. The usual naming pattern is:

    EJSRemote<EJBRemoteClassName>Home and EJSRemote<EJBRemoteClassName>. Here, <EJBRemoteClassName> is "Inc". Apply the same naming pattern to your enterprise beans.


  5. Compile all the source .java files in the ./__ejbjar/ directory tree.


  6. Add the .class files from step 5 to create the deployed .jar file.


The following log is a sample trace log of the deploy tool operation on the Inc.jar file as an example of what the deploy tool does from input .jar file submission to the creation of a deployed .jar file:



This example is provided so that you can use it to create scripts for automating the deployment of multiple enterprise beans.

Note that step 2 can be done on a large .jar file with multiple enterprise beans without any performance loss or occurrence of the trap error. Steps 4 and 5 can be done on individual or select enterprise beans to avoid performance problems.











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, EJB Container
Operating system(s): Windows
Software version: 3.5
Software edition: Advanced
Reference #: 1040783
IBM Group: Software Group
Modified date: 2004-12-01