Tuesday, June 19, 2007

: bad interpreter: No such file or directory

When I run a bash script, it gives the following error:

: bad interpreter: No such file or directory

It turn out that the carriage return was not properly converted to *nix format, since it was written using Notepad in Windows.

Quick fix:
$ dos2unix filename -- convert to *nix format
$ unix2dos filename -- convert to Windows/DOS format

Wednesday, June 06, 2007

Checking Oracle Application Server version

I was trying to find the exact version of Oracle Application Server installed months ago. A simple task, but may not be straight forward if you don't know where to find it. ..

After searching for a while, the fastest way to find it is to check the installation report. You can find it at: <ORACLE_HOME>/install/readme.txt

As a bonus, it also shows where is the exact URL to the Enterprise Manager (no more port guessing!) and the name of admin user (ias_admin? oc4jadmin?).

Tuesday, June 05, 2007

Start OC4J with user thread option

When starting an OC4j using datasource, this error may arise: "Javax.naming.NamingException: Not in an application scope - start Orion with the -userThreads switch if using user-created threads"

Solution:
If using stand alone OC4J, start it with -userThreads parameter. For example: java -jar oc4j.jar -userThreads

If using Oracle Application server, add the oc4j.userThreads=true parameter to <ORACLE_HOME>/j2ee/home/config/oc4j.properties