Search This Blog

Tuesday, December 14, 2004

Using the GDB

gdb $ORACLE_HOME/jdk/bin/java 15155
info threads
thread apply all where
detatch
EOF
done

Monday, December 13, 2004

Tracing Methods in Java

Install the Weblogic JRockit JVM in your PC.

after this set the path
PATH=d:\jrockit\bin;%PATH%

And make sure the correct JVM is loaded ,

java -version , This should display ,
BEA WebLogic JRockit(TM) 1.4.2_04 JVM

java -Xjvmpi:entryexit=on -Xverbose:codegen -Xverboselog:c :\jvm.txt -jar oc4j.jar

Make sure you delete the jvm.txt before running this.






Friday, December 10, 2004

Deploy OC4J Portal After the install

This is the procedure for deploying the portal ,

1. Run the script ,

/home/ias904/mid/assistants/opca/launch.sh

2. Then create a file , say dd.txt with the following

UltrasearchAdmin=UltrasearchAdmin,/home/test/mid1/ultrasearch/webapp/ultrasearch_admin.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,ultrasearch/webapp/config,jlib/repository.jar,jlib/uix2.jar,jlib/ohw.jar,jlib/regexp.jar,j2ee/home/jazn.jar,jdbc/lib/nls_charset12.zip,RemoveEarfile
UltrasearchQuery=UltrasearchQuery,/home/test/mid1/ultrasearch/sample.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,ultrasearch/webapp/config,RemoveEarfile
UltrasearchPortlet=UltrasearchPortlet,/home/test/mid1/ultrasearch/webapp/ultrasearch_portlet.ear,OC4J_Portal,ultrasearch/lib/ultrasearch_query.jar,portal/jlib/ptlshare.jar,portal/jlib/pdkjava.jar,jdbc/lib/nls_charset12.zip,RemoveEarfile
portal=portal,/home/test/mid1/portal/jlib/portal.ear,/home/test/mid1/j2ee/properties/oc4j_portal.properties,OC4J_Portal,portal/jlib/wwjni.jar,j2ee/home/jazn.jar,portal/jlib/ptlshare.jar,opmn/jlib/optic.jar,RemoveEarfile
portal=jpdk,/home/test/mid1/portal/jlib/jpdk.ear,OC4J_Portal,portal/jlib/pdkjava.jar,portal/jlib/portaltools.jar,portal/jlib/ptlshare.jar,portal/jlib/tidy.jar
portal=portalTools,/home/test/mid1/portal/jlib/portalTools.ear,OC4J_Portal,portal/jlib/portaltools.jar,portal/jlib/pdkjava.jar,portal/jlib/ptlshare.jar,portal/jlib/tidy.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile
portal=portalHelp,/home/test/mid1/portal/jlib/portalHelp.ear,OC4J_Portal,jlib/regexp.jar,jlib/ohw.jar,RemoveEarfile
syndserver=syndserver,/home/test/mid1/syndication/j2ee/syndserver.ear,OC4J_Portal,syndication/lib/jr_dav.jar,jlib/regexp.jar,jlib/repository.jar,jlib/ldapjclnt9.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile,JAZN=LDAP
syndserver=syndprovider,/home/test/mid1/syndication/j2ee/syndprovider.ear,OC4J_Portal,syndication/lib/jr_dav.jar,jlib/regexp.jar,portal/jlib/pdkjava.jar,portal/jlib/portaltools.jar,portal/jlib/ptlshare.jar,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,RemoveEarfile,JAZN=LDAP
orauddi=orauddi,/home/test/mid1/uddi/j2ee/orauddi.ear,OC4J_Portal,jlib/uix2.jar,jlib/share.jar,jlib/ohw.jar,jlib/regexp.jar,jlib/repository.jar,jlib/ldapjclnt9.jar,RemoveEarfile,JAZN=LDAP
orauddi=oraudrepl,/home/test/mid1/uddi/j2ee/oraudrepl.ear,OC4J_Portal,jlib/repository.jar,jlib/ldapjclnt9.jar,RemoveEarfile,JAZN=LDAP

3. Run the following command to deploy the above applications in OC4J_Portal


/home/test/mid1/jdk/bin/java -Djava.io.tmpdir=/tmp -mx512M -classpath /home/test/mid1/dcm/lib/dcm.jar:/home/test/mid1/dcm/lib/oc4j_deploy_tools.jar -Doracle.ias.sysmgmt.logging.logdir=/home/test/mid1/j2ee/home/log oracle.j2ee.tools.deploy.Oc4jDeploy -oraclehome /home/ias904/mid -verbose -inifile /tmp/dd.txt

4. Create the DAD from EM for the /pls/portal ,

restart the OHS and OC4J_Portal ,

The above steps will configure the portal after the install , (when you choose not to install the Portal at the install time )

Tuesday, November 30, 2004

Useful Unix/Windows Commands

This summary is not available. Please click here to view the post.

Wednesday, November 24, 2004

How to use the DoNotReGenerateWrapperCode OC4J option

First run the OC4J with the option ,

java -DKeepWrapperCode=true -jar oc4j.jar

This generates the .java files in say c:\oc4j904\j2ee\home directory

Now edit the appropiarte file , and add your own code and some System.out.println codes etc ,after this just save the files.

Now start the OC4J container , with the following options

java -DDoNotReGenerateWrapperCode=true -DKeepWrapperCode=true -jar oc4j.jar

After this redeploy the application again , you will see messages like ,

04/11/24 18:00:47 Skip re-gen of EmpHome_EntityHomeWrapper19.java
04/11/24 18:00:47 Skip re-gen of Dept_EmpLocal_ORCollection11.java
04/11/24 18:00:47 Skip re-gen of DeptHome_EntityHomeWrapper29.java
04/11/24 18:00:47 Skip re-gen of DeptLocalHome_EntityHomeWrapper27.java

Now run your application.

Monday, November 08, 2004

Applying Opatch on linux for IAS 9.0.4.1

Download the patch from metalink or ARU

p2617419_10102_GENERIC.zip

extract this patch in a directory say $HOME
unzip -d . p2617419_10102_GENERIC.zip

Set the Environment variables
export PATH=$PATH:$HOME/OPatch
export LD_ASSUME_KERNEL=2.4.19

Set the environment variables for the home where you want to
apply the patch set for example ORACLE_HOME , PATH and LD_LIBRARY_PATH etc , and then run the command

opatch lsinventory

After thie copy the patch file for example say ,
p3985227_9041_GENERIC.zip

unzip -d . p3985227_9041_GENERIC.zip
cd 3985227

and then run the command
opatch apply

To check the one-off patches applied run the command ,

opatch lsinventory


Opatch on Windows ,

Download the patch from metalink or ARU
p2617419_10102_GENERIC.zip

and extract this in to a directory say ,
d:\ set PATH=d:\Opatch;%PATH%

set ORACLE_HOME=d:\ias9041

opatch lsinventory -detail
And then go to the directory say ,
cd f:\temp1\3952464
and run the command ,
opatch.bat apply
After this check the output of the command ,
opatch lsinventory -detail

To apply the patch on a Stand Alone OC4J use the following steps ,

set PERL5LIB=d:\ias9041\perl\5.6.1\lib
set ORACLE_HOME=c:\oc4j9041
cd f:\temp1\3952464
and run the command ,

d:\ias9041\perl\5.6.1\bin\MSWin32-x86\perl.exe d:\OPatch\opatch.pl apply -no_inventory -jdk d:\jdk14\bin -oh c:\oc4j9041 -verbose

Important Links

My Open BUGS

All Open BUGS

All Windows and Linux RDBMS Dumps

\\incq058ad

Thursday, October 28, 2004

VNC Setup on linux

cat cd ~/.vnc/xstartup

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
#startkde &
exec gnome-session &

Start the vncserver with the following ,

vncserver -depth 16 -geometry 800x600

Create an alias in $HOME/.bash_profile

alias startvnc='vncserver -depth 16 -geometry 800x600'


Wednesday, September 29, 2004

How to take the Windows Process Thread Dump

1. Download the Debugging Tools for Windows 32-bit Version from the URL

http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx

Install the 32-bit Debugging Tools for Windows.
The 32-bit version is the best choice unless you are debugging an application
on an Intel IA-64 processor. In this case you should use the 64-bit package.

2. After installing the above tool , download the pslist.exe from

http://www.sysinternals.com/ntw2k/freeware/pslist.shtml

3. Download the usedump.exe utility from the microsoft site ,

http://download.microsoft.com/download/win2000srv/Utility/3.0/NT45/EN-US/Oem3sr2.zip

Extract this to a directory say

c:\windebug

Now you have all the tools to take the dumps ,

Please follow the procedure below for taking the dumps ,

1. if you want to take take the Apache process dump ,

pslist -d Apache

PsList 1.23 - Process Information Lister
Copyright (C) 1999-2002 Mark Russinovich
Sysinternals - www.sysinternals.com

Thread detail for INDL224AD:


Apache 2000:
Tid Pri Cswtch State User Time Kernel Time Elapsed Time
2056 8 6755 Wait:UserReq 0:00:01.572 0:00:01.492 0:45:34.562
2060 8 3 Wait:UserReq 0:00:00.000 0:00:00.000 0:45:34.221

Apache 2528:
Tid Pri Cswtch State User Time Kernel Time Elapsed Time
2412 9 4218 Ready 0:00:00.600 0:00:00.090 0:28:55.535
2084 8 4 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:55.505
2096 8 467 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.914
2440 9 263 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.814
1756 8 7 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.804
2092 8 30 Wait:DelayExec 0:00:00.000 0:00:00.000 0:28:54.794
2112 8 10 Wait:UserReq 0:00:00.000 0:00:00.000 0:28:54.794
..........
....
..

In this case the first process is a parent process , we are not interested in this , we are more
bothered about the second process.

For the oracle.exe you can use the command ,

pslist -d oracle

2. Now go to the directory
c:\windebug\userdump and run the setup.exe ,

3. This will install the userdump.exe in C:\WINNT\system32
4. Now issue the command ,

userdump 2528 f:\temp1\apache.dmp

5. Now open the windbg tool , from

Start -> Program Files -> Debuuging Tool For Windows -> WinDbg

6. Now choose the option ,

File -> Open Crash Dump

And select the file f:\temp1\apache.dmp

6. After this select the menu option ,
View -> Call Stack and

View -> process and threads and select the each thread it will show what the thread was doing.


Sunday, September 26, 2004

How the DCM and OPMN gets the database users and passwords from OID

The RepAPI reads the file
$OH/config/ias.properties

It gets the values like ,

OIDhost=incq128ad.idc.oracle.com
OIDport=3060
OIDsslport=3131
SSLOnly=false

This try to connect to the OID using the above and looks for the database defined in ,

InfrastructureDBCommonName=ORCL

For example , cn=ORCL,cn=OracleContext

From the above it gets the connect string from the attribute , "orclnetdescstring"

After this REP Api issues the SSL ldap queryto find out ,

orclReferenceName=,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext

for example ,

orclReferenceName=ORCL,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext

From the above it gets the value for the DCM and portal password etc ,

OrclResourceName=DCM,orclReferenceName=ORCL,cn=IAS Infrastructure Databases,cn=IAS,cn=Products,cn=OracleContext here it looks
for the attribute ,

"orclpasswordattribute" , usin this info the DCM connects to the database using the thin JDBC driver ,

Similiary the opmn will also connect to the database when the depandancies against the database are used.