ERROR: OutofMemory

0 Likes

Problem:

ERROR: OutofMemory

Resolution:

Information in this Brief applies to:

  • StarTeam StarTeam Extensions, Notification Agent 5.2.196 Patch #3 and higher
  • All OS

Problem:

When running Notificatgion Agent as a service, Notification Agent will fail with error "...java.lang.OutOfMemoryError"

Workaround:

Assuming Notification Agent is already running as a service.

1. Remove the service.

Run the command:

JavaService.exe -uninstall NotificationAgent

See the users guide for more information;

2. To increase memory allocation for this service you must modify the NotificationAgentService.bat file typically found at:

C:\Program Files\...\Notification Agent\Java Service

The contents of NotificationAgentService.bat is:

Adding the -Xmx256M option in the command line ( see RED ) will increase the memory that java can used for Notification Agent, in this case to 256M, you cannot exceed the amount of RAM on the system and be aware of the needs of other applicaions.

The default value is 64M.

echo off
REM Make sure that the paths in this batch file fit the
REM instance of Notification Agent being run as a service.
REM 1st path: the Java Runtime Environment on your computer
REM 2nd path: (class path) the Notification Agent .jar file
REM (agent.jar)
REM 3rd path: (class path) the StarTeam SDK Runtime .jar file
REM (starteam53.jar)
REM 4th path: (part of library path) the folder that
REM contains agent.jar
REM 5th path: (part of library path) the folder that stores
REM the Java version of the StarTeam SDK Runtime
REM file (starteam53.jar)
REM 6th path: (service path) the .nac file (Notification
REM Agent configuration file) for the instance
REM of the agent being run as a service
REM 7th path: (System out path) the Notification Agent
REM installation folder and newly created log
REM 8th path: (System err path) the Notification Agent
REM installation folder and newly created log
REM 9th path: (current path) the Notification Agent
REM installation folder
echo on

JavaService.exe -install NotificationAgent "C:\Program Files\Borland\Java\Sun1.4.2_01\bin\client\jvm.dll" -Djava.class.path="C:\Program Files\Borland\StarTeam Notification Agent\agent.jar";"C:\Program Files\Borland\StarTeam Notification Agent\starteam53.jar" -Djava.library.path="C:\Program Files\Borland\StarTeam Notification Agent";"C:\Program Files\Borland\StarTeam SDK 6.0\lib" -Xmx256 -start com.starbase.starteam.workflow.NARuntime.NotificationAgentFrame -params -service "C:\Program Files\Borland\StarTeam Notification Agent\localhost_49201.nac" -stop com.starbase.starteam.workflow.NARuntime.NotificationAgentFrame -method stopAgent -out "C:\Program Files\Borland\StarTeam Notification Agent\NAService.log" -err "C:\Program Files\Borland\StarTeam Notification Agent\NAService.log" -current "C:\Program Files\Borland\StarTeam Notification Agent"
pause

3. To start the Notification Agent as a service run:

NotificationAgentService.bat

Old KB# 28461
Comment List
Related
Recommended