Thursday, March 11, 2010

Resolving java.lang.OutOfMemoryError: PermGen space in Weblogic

Hi,

To resolve the java.lang.OutOfMemoryError: PermGen space in Weblogic please add the following line

set USER_MEM_ARGS=-Xms512m -Xmx1024m -XX:MaxPermSize=128m

in :\Oracle\Middleware\user_projects\domains\dgmt_domain\bin\setDomainEnv.cmd

Thanks,


Enable Remote Debugging in Weblogic

Hi,

Remote debugging in Weblogic with Eclipse can be configured as follows:

In startWebLogic.cmd file, can be found at :\Oracle\Middleware\user_projects\domains\dgmt_domain\bin\startWebLogic.cmd,

Replace

set JAVA_OPTIONS =%SAVE_JAVA_OPTIONS%

With

set JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=1044,server=y,suspend=n %SAVE_JAVA_OPTIONS%

While starting the Weblogic you will see “Listening for transport dt_socket at address: 1044” then we are sure that debug is enabled on weblogic.

Thanks,


Tuesday, February 9, 2010

Spring MVC Training

Check out this SlideShare Presentation:

Thursday, October 22, 2009

Running your script at system startup on linux

Hi,

If you want to run your script at system startup e.g if you want to start jboss on system startup and stop on system shut down then create script and put it in "/etc/init.d" directory.

If you are using Debian then use 'update-rc.d' utility to install and remove System-V style init script links. Other distributions (such as Red Hat) use 'chkconfig'. You can see these utilities the you can locate files and check them.

If name of the script is say jboss then use following command

update-rc.d jboss defaults

If defaults is used, update-rc.d will make links to start the service in runlevels 2345, and stop the service in runlevels 016.

To start the script jboss in runlevels 0123 and stop in 456, run (as root):

update-rc.d jboss start 0123 stop 456

Read more: http://wiki.linuxquestions.org/wiki/Update-rc.d#ixzz0UjiBfsGM


For other distribution like red hat you can use chkconfig

Following tag needs to be added to your script so that it can be added to chkconfig
#!/bin/sh
#
# chkconfig: 2345 90 60

then you can add script by using command

chkconfig --add jboss

you can see all scripts configured by command

chkconfig --list

Regards,
Anand

Wednesday, October 14, 2009

Opening ports to outside world on linux machine

Hi,

If you want to open ports of linux machine to outside world through command line (It can be done through UI too) then follow the below steps:

Goto /etc/init.d/iptables

Add entry like: (this is for port 6667)

iptables -I INPUT -p tcp -m tcp --dport 6667 -j ACCEPT

Then restart iptables so that changes made gets effective

/etc/init.d/iptables restart

Thanks,
Anand