WebMethods Workflow Server javalangOutOfMemoryError when Generating

webMethods version= 6.1.5
Server platform= Netfinity 5500 Windows 2000

After modifying and saving the changes I made to a workflow project [with Workflows, Tasks, Controllers, and Implementation Modules] with Workflow Designer I did the following:

  • Start webMethods Workflow Generator.
  • In the Workflow Generator window I make sure Deployment Server is
    set to the correct Workflow_Server:5001. In the Project Name drop-
    down window I select the Workflow Project I modify.
  • In the Workflow Generator I click Generate → Auto Generate →
    Generate All [Generates, Compiles, and Deploys the workflow
    project I modify]. In the Logic Validator popup window I click
    “Skip validation” and I wait until it is complete.

HOWEVER, the Generation of the modify workflow project never completes, I have try several times and I keep getting popup windows, with the following messages:

- WrapperLocalRepository .getProject: not found project for  
   projectID 'proj.14' 
- [WKT .020.0025] unexpected exception: [WKT .020.0025] unexpected 
   exception: null.. 

Most of the times I get the following popup message:

- Wed Oct 19 14:01:47 EDT 2005 Can not generate code. See  
   launcher*.txt and codegen.log files for details.  Errors:  
   failed to generate code for Workflow "Strike Auth/Engr Req" 

The following text is from the codegen.log file in the Workflow Server
C:\Program Files\webMethods6\WorkflowClient\log
codegen.log, launcherlog0.txt, and launcherlog1.txt

Wed Oct 19 14:01:36 EDT 2005 ControllerId: getDataController.task.Task_ProjectHeader 
Wed Oct 19 14:01:36 EDT 2005 Expanding class name DataController --> com.wm.zeus.pd.generatedprojects.DRPDStrike.pq__Task_Sourcedpr_tternname_hxai_frm_sourced_products$DataController
Wed Oct 19 14:01:36 EDT 2005 Component: DataController code: 0 
Wed Oct 19 14:01:36 EDT 2005 ContainerGenerator.generateComponents: compFiles = 0 
Wed Oct 19 14:01:36 EDT 2005 Try to generate property file with name : pq__Task_Sourcedpr_tternname_hxai_frm_sourced_products_Node_frm_sourced_products.properties
Wed Oct 19 14:01:36 EDT 2005 From context.addProperties method : pq__Task_Sourcedpr_sapproval_hxa65a_frm_sourced_products_Node_frm_sourced_products.properties
Wed Oct 19 14:01:36 EDT 2005 Expanding class name frm_sourced_products --> com.wm.zeus.pd.generatedprojects.DRPDStrike.pq__Task_Sourcedpr_tternname_hxai_frm_sourced_products$frm_sourced_products
Wed Oct 19 14:01:36 EDT 2005 Component: frm_sourced_products code: 0 
Wed Oct 19 14:01:36 EDT 2005 The class name of html panel component: com.wm.zeus.pd.layout.basic.GUIPanelComponent 
Wed Oct 19 14:01:36 EDT 2005 The class name of html panel object: com.wm.zeus.pd.layout.basic.BasicGuiPanelObject 
Wed Oct 19 14:01:36 EDT 2005 Try to create html file
Wed Oct 19 14:01:36 EDT 2005 HTML: [name=GUI_Panel_Element_Frm_sourced_products_3.html,charset=iso-8859-1]
Wed Oct 19 14:01:36 EDT 2005 ContainerGenerator.generateComponents: compFiles = 2
Wed Oct 19 14:01:36 EDT 2005 Try to generate property file with name : pq__Task_Sourcedpr_tternname_hxai_frm_sourced_products_Node_FrontEndSourcedProducts_Cntr.properties
Wed Oct 19 14:01:36 EDT 2005 From context.addProperties method : pq__Task_Poststrik_tatusform_exal_frm_post_strike_status_Node_FrontEndPostStrike_Cntr.properties
Wed Oct 19 14:01:36 EDT 2005 Expanding class name Controller_Frontendso_ducts_cntr --> com.wm.zeus.pd.generatedprojects.DRPDStrike.Controller_Frontendso_ducts_cntr
Wed Oct 19 14:01:37 EDT 2005 ContainerGenerator.generateComponents: compFiles = 0
Wed Oct 19 14:01:37 EDT 2005 Try to generate property file with name : pq__Task_Sourcedpr_tternname_hxai_frm_

To solved or workaround the memory leak [Java Memory leak] caused when Generating a Workflow Project dirctly from Workflow Generator do the following:

<> From Workflow Designer click Tools -> Generate. This will bring up the Workflow Generator pointing to the Workflow Server the Designer is connected to [driwmdev:5001] and pointing to the correct Workflow Project you are working on.

<> By Generating within Designer you will use less Java Heap, hence, avoiding the memory leak problem.

Thanks.

To solved or workaround the memory leak [Java Memory leak] caused when Generating a Workflow Project dirctly from Workflow Generator do the following:

<> From Workflow Designer click Tools -> Generate. This will bring up the Workflow Generator pointing to the Workflow Server the Designer is connected to Workflow Server and pointing to the correct Workflow Project you are working on.

<> By Generating within Designer you will use less Java Heap, hence, avoiding the memory leak problem.

Thanks.

According to Adrian…: Assuming there is no problem with the project itself (requiring Technical Services support), the generator can have the heap size increased by doing the following on your WorkflowServer:

Backup and edit ‘etc\classrv.properties’.
Locate the section ‘# Definitions for Generator’.
Change and add to the section so it resembles the following:

‘classrv.app.Generator.javaParams = 3
classrv.app.Generator.javaParams.0 = -Xms16M
classrv.app.Generator.javaParams.1 = -Xmx128M
classrv.app.Generator.javaParams.2 = -Dwm.zeus.pd.rtgen.usejavaw=TRUE’

The WorkflowClient uses these parameters, acquired through the classloader when it starts the Generator. The example above sets the maximum heap size for the Generator to 128M.

If you have the backup of your package and you have only your package on the workflow server do the following.

Remove every thing from /data/repository/xmlRepRoot
and also all WF11*.jar files from /lib folder.

Redeploy your project and try compiling.

Risk: It is not recomended approach.