MaintainJ Blog

June 21, 2009

MaintainJ with WebLogic and Eclipse

Filed under: Uncategorized — maintainj @ 12:47 am

Some users reported issues while deploying MaintainJ.war from Eclipse or Eclipse based IDE like WebLogic workshop. If you face such issues, here is what you should do.

1. Deploy MaintainJ.war directly to WebLogic server instead of deploying from Eclipse. You can either drop the Maintainj.war in WebLogic ‘autodeploy’ folder or install from admin console.

2. Then go to http://localhost:7001/MaintainJ/ and complete the installation steps 1 & 2.

3. After Step 2, you will be asked to start WebLogic server with startWebLogic_with_mnj.cmd. As you are launching the server from Eclipse, you cannot use this script to start the server. But you can use this script to change the server settings. In Eclipse ‘Servers’ view, double click the WebLogic server profile. Under ‘Server’ tab, you will see ‘Startup script’, which points to your current startup script. Click the ‘Edit’ link beside that and the script will be opened.

4. Copy lines 5, 6 and 7 from startWebLogic_with_mnj.cmd to the current startup script before the line calling startWebLogic.cmd. The file should look similar to this after the copy.

set DOMAIN_HOME=C:\Programs\Weblogic\bea10\user_projects\domains\JRockit
set MJ_LIB=C:\Programs\Weblogic\bea10\user_projects\domains\JRockit\maintainj
set JAVA_OPTIONS=”-javaagent:%MJ_LIB%\aspectjweaver.jar” -Daj.weaving.verbose=true -Xmx509m %JAVA_OPTIONS%
set EXT_PRE_CLASSPATH=%MJ_LIB%\MaintainJAspect.jar;%MJ_LIB%;
call “%DOMAIN_HOME%\bin\startWebLogic.cmd” %*

5. Save and restart WebLogic and follow the instructions on MaintainJ.war instrumentation wizard.

6. If you want to start WebLogic without MaintainJ, you just need to comment out the 3 lines added.

Choudary Kothapalli.

Powered by WordPress