Tuesday, March 22, 2016

How to fix java.lang.OutOfMemoryError: PermGen space” error when running BC tester

When I upgraded from jdeveloper 11.1.1.4 to 11.1.1.7 I started getting


java.lang.OutOfMemoryError: PermGen space when running the BC tester.

The BC tester is run by right clicking on an application module and selecting "Run" or "Debug"


To fix this,  right click on the Model project and select Project Properties.

Then select Run/Debug/Profile and edit Default Run Configuration

In the Java options box add

XX:MaxPermSize=512m -Xmx1000M

default size was  128m


This setting is only used when running the BC tester.   When you start up the application a similar setting in the ViewController Project is used.






How to connect to localhost jdeveloper mbean server using jconsole


Weblogic runs a built-in JMX server.  You can also add your own mbeans for managing your application.

JConsole is a JMX browser that comes with Java.


Here is the command line that I use to connect to the integrated web logic server running with jdeveloper.  You will need to adjust the parameters for your own JDK and Jdeveloper installation.


jconsole -J-Djava.class.path=c:/java/jdks/jdk1.7.0_51/lib/jconsole.jar;c:/java/jdks/jdk1.7.0_51/lib/tools.jar;C:/java/ide/JDev11.1.1.7/wlserver_10.3/server/lib/wljmxclient.jar -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote

When you run this you will get connection dialog

In Remote Process Enter
service:jmx:rmi:///jndi/iiop://localhost:7101/weblogic.management.mbeanservers.runtime 
For username/password enter the values you configured for the integrated weblogic server when you installed jdeveloper







You may get Connection failed because it attempts to connect over secure connection.  Click the "Insecure" button and you should connect and see the page below