Weblogic EJB Compiler Options

Published:
Reading time:
About 1 min

We fixed a problem today by setting options for the Weblogic EJB compiler that is used to compile EJBs on the server at deploy time. Of course we should be using WL appc, but even then we’ll probably need to use the same options.

Now I need a nice wiki to document these myself, but without one I’ll simply post it here.

The Problem


When deploying many large EJBs to Weblogic, without pre-compiling with WL appc, you may find the deploy failing when the server attempts to compile the EJBs. A search through the logs will reveal some Out of Memory errors.

The Fix


* Open the Weblogic server console (usually http://localhost:7001/console/)
* Expand Servers and click on your server name (defaults to myserver)
* Under Configuration|General expand Advanced Options
* Set the following to increase JVM heap size for the compiler:
Extra EJB Compiler Options: -J-ms128m -J-mx256m
of course modify for your own needs