4/22/10

remove directory

If you need to remove a directory, or files and or folders under a directory, in say, Solaris you do like this,
say to remove cache under wstemp
rm -r wstemp/*
which removes files folders under wstemp recursively.
rm test.txt
deletes test.txt file
rm -i wstemp/*
inquires and prompts yes or no for each file
In Linux
rm -f - force removes a file
rm -fr - force removes directory

In DOS -
rmdir is the command to remove a directory.
rmdir dSample
removes if dSample dir is empty.
To force remove
rmdir /S dSample
removes dSample directory but inquires
rmdir /S /Q dSample
removes dSample directory and its sub directories quietly.

Enjoy your day.

4/12/10

Administrative console throws error 500 with java.lang.NullPointerExcetion

Last Sunday, one of my friend got this problem.

Admin Console, when accessed, throws error 500 with java.lang.NullPointerExcetion.
SystemOut.log has the following entries

5ea42ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/logon.jsp: init
5ea42ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/layouts/browser_detection.jsp: init
5ea02ee7 WebGroup I SRVE0180I: [adminconsole] [/admin] [Servlet.LOG]: /secure/console.jsp: init
5ea02ee7 WebGroup E SRVE0026E: [Servlet Error]-[]: java.lang.NullPointerException
at org.apache.jsp._console._jspService(_console.java:172)

I found this technote http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21177893 regarding NullPointerException, which states -
Resolving the problem
To resolve this issue:

1. Clean up the disk space problem.
2. Delete the /wstemp//preferences.xml file.
3. Try to login to administrative console. This should build a new preferences.xml with the correct data and should allow the user to login to administrative console.

My friend followed these steps and resolved the problem.