Search This Blog

Saturday, December 25, 2010

Monday, December 06, 2010

Soa Suite 11gR1 (11.1.1.3.0) installation guide for Windows

http://vtkrishn.wordpress.com/2010/09/25/soa-suite-11gr1-11-1-1-3-0-installation-guide-for-windows/

http://adfproject.googlecode.com/files/SOA_Installation_guide.doc

How to find the SOA Version

/home/ias/Oracle/Middleware/Oracle_SOA1/bin/soaversion.sh

*****************************************************************************
Oracle SOA Server version 11.1.1.3.0
          Build: 0
          Build time: Thu Apr 15 22:20:11 PDT 2010
          Build type: release
          Source tag: PCBPEL_11.1.1.3.0_GENERIC_100415.2045.2557

Oracle BAM Source Tag:ORABAM_11.1.1.3.0_GENERIC_100406.2108

Oracle BPM Source Tag: BPM_11.1.1.3.0_GENERIC_100415.1757.0684

Oracle Implementation-Version: Oracle Middleware 11.1.1 (ASKERNEL_11.1.1.3.0_
GENERIC_100411.1150, ADMINSERVER_11.1.1.3.0_GENERIC_100408.2100, J2EE
_11.1.1.3.0_GENERIC_100408.1504, JDEVADF_11.1.1.3.PS2_GENERIC_100408.
2356.5660, TOPLINK_11.1.1.3.0_GENERIC_100323.1800, ENTSEC_11.1.1.3.0_
GENERIC_100403.1733)

Thursday, November 11, 2010

Reducing the PDF Page Size when printing

Sometimes we need to print a pdf on a page that is lesser then A4 size. The main reason for this kind of printing is that size reduction. Carrying a A4 PAGE book is not that handy most of the times.

For this we need to reduce the size of the page while printing. Unfortunately in Acrobat PDF Reader this option is not present.

For this we can use the the PDF-XChange Viewer free edition.

Download the PDF-XChange Viewer from http://www.tracker-software.com/product/downloads/

Select File->Print option and Select the Page Scaling as => Custom Scale and Page Zoon as 75% and Select Auto-Center pages in sheets

Please refer to the screen below

image

After this you can cut the extra white space using a paper cutter.

Sunday, November 07, 2010

How to attach a pdf file to an email from a shell script

Write the following shell script ,

---
echo "Training Calendar on ` date +%d-%b-%Y` " > /tmp/mailmessage.txt
wget -O /tmp/blr.pdf http://xxx.xxxx.xxx.com/test.pdf
mutt -s "Training Calendar on ` date +%d-%b-%Y` " -a /tmp/trg_blr.pdf ravi.reddy@oracle.com < /tmp/mailmessage.txt
---

To change the from email address while using mutt
create a .muttrc in the users home directory if it doesnot exist, then enter the feild

set realname="ravi.reddy@oracle.com" this will change the name in the senders name .

Wednesday, September 15, 2010

How to Hide Username/Passwords in shell scripts

Please refer to this article for more details on this.

I have lot of shell scripts where I have to store my username and passwords for accessing the data. This is a big security rish as my passwords are exposed.

I need some executable which can convert my shell script to exe so that it will be difficult for the people to get my password.

Download the sources from http://www.datsi.fi.upm.es/%7Efrosal/sources/shc-3.8.6.tgz

Extract the tar file

tar xvfz shc-3.8.6.tgz

Make the executable

cd shc-3.8.6
make

cp shc to /usr/bin directory

I have a shell script which fetches some password protected pages , here
there is no other option for me other then embedding the password as the wget does
not support encrypted passwords

for example ,

cat getcookie.sh

#!/bin/ksh
/usr/bin/wget --keep-session-cookies --save-cookies=/home/ias/cookie.txt  -O /home/ias/dd.txt   --input-file=/home/ias/urls.txt --http-user=xx.xxx@test.com --http-password=xxxxxxx > /dev/null
cat /home/ias/cookie.txt  | grep test  | cut --fields=7 > /home/ias/cookie.txt

with the shc script I can convert the shell script as executable so that the passwords are hidden
from the people who has access to my unix system.

Run the shc command

shc -f getcookie.sh

This creates the getcookie.sh.c and getcookie.sh.x where .c is the c source file and .x is the executable.

Now run the getcookie.sh.x executable and change the password from the original getcookie.sh script.

Please refer to the http://blogs.koolwal.net/2009/01/20/howto-encrypting-a-shell-script-on-a-linux-or-unix-based-system/
for more details on this.

Saturday, September 11, 2010

How to Upgrade samsung galaxy firmware

Actually many firmware are available for each area (Europe, Asia and America). Last firmware version are:


Europe: I5800XWJH2
Asia: I5801DDJG6
America: I5800LVIJG8

You can download the ODIN Multi Downloader from

http://download968.mediafire.com/skeyfniqhphg/gnzzbkix0nd/Odin4_03-Spica_ops.zip

Flashing with ODIN it's very simple (sorry for picture):

screenshot.32

Before running this utility you need to set the samsung phone in the download firmware mode , for this press

Home+VolDown+Power and hold this for about 30 seconds to 1 minute

In the ODIN screen ,

1) Select "One Package"
2) Select OPS file for I5801 (apollo.ops)

Create apollo.ops file with the following contents ,

0,boot
1,Sbl
2,logo
3,efs
4,zImage
5,factoryfs
6,datafs
7,cache
8,
9,modem


3) In one package select the firmware that you want to flash. (I5801DDJG6.tar) Download the firmware from http://uploading.com/files/1314471a/I5801DDJG6.rar/


4) Start


In about five minutes your mobile will be upgrades.

Tuesday, September 07, 2010

Setup XMail Server on Windows

Please refer to the link http://www.halfdone.com/Articles/XMailInstall/ for more details on this.

Here are the simplified steps to configure the XMail Server’s on Windows Machine

1. Download the XMail Server from http://www.xmailserver.org     

2. Extract this to a directory say C:\xmail-1.27

3. Copy the exe’s and dll’s to C:\xmail-1.27\MailRoot\bin directory

4. Create the HKEY_LOCAL_MACHINE\SOFTWARE\GNU\XMAIL. Create the Sting (REG_SZ) values called MAIL_ROOT and MAIL_CMD_LINE. For the value of MAIL_ROOT put in the "MailRoot folder" location like C:\xmail-1.27\MailRoot. For MAIL_CMD_LINE you can leave it blank or put in "-Pl -Sl -Ql -Fl -Cl -Ll"

screenshot.28

5. Here we are using the default domain , that is xmailserver.test , so no need to modify the configuration files.

6. Run xmcrypt.exe to create an encoded password. It's used in the format of XMCRYPT.EXE <password>.

xmcrypt.exe welcome1

1100161115041616120a1701

7. Open the file C:\xmail-1.27\MailRoot\ctrlaccounts.tab and enter the following values "admin" <tab>   "120009060a080054"

8.  User and alias creation

Check the domain

ctrlclnt -s localhost -u admin -p welcome1 domainlist "xmailserver.test"

Create two domain users

ctrlclnt -s localhost -u admin -p welcome1 useradd "xmailserver.test" test1 welcome1 U
ctrlclnt -s localhost -u admin -p welcome1 useradd "xmailserver.test" test2 welcome1 U

Check the users

ctrlclnt -s localhost -u admin -p welcome1 userlist "xmailserver.test"

Create aliases for these two users

ctrlclnt -s localhost -u admin -p welcome1  aliasadd  "xmailserver.test" test1 ravi1
ctrlclnt -s localhost -u admin -p welcome1  aliasadd  "xmailserver.test" test2 ravi2

Check the aliases for these users

ctrlclnt -s localhost -u admin -p welcome1 aliaslist

9. Set up the POP3 email server and SMTP Outgoing server from Thunderbird. For the POP3 accounts set the SMTP Server as the localhost:25

screenshot.30

Monday, August 16, 2010

How to find the Patch Set Version that has been applied on your Oracle_Home

For the OAS 10g release you can run the following.

cd $ORACLE_HOME/j2ee/home

$ORACLE_HOME/jdk/bin/java -jar  oc4j.jar -version
Oracle Containers for J2EE 10g (10.1.3.4.0)  (build RELEASE.26167)

or you can also do

cd $ORACLE_HOME/inventory/ContentsXML

cat comps.xml | grep patchset

This shows the o/p as

cat comps.xml | grep patchset
<PATCHSET NAME="oracle.as.j2ee.patchset" VER="10.1.3.4.0" BUILD_NUMBER="0" RELEASE="Production" INV_LOC="PatchSets/oracle.as.j2ee.patchset/10.1.3.4.0/3/" XML_INV_LOC="PatchSets21/oracle.as.j2ee.patchset/10.1.3.4.0/" ACT_INST_VER="10.1.0.6.0" DEINST_VER="10.1.0.2.0" INSTALL_TIME="2009.Mar.17 09:21:56 IST">
      <INFO NAME="helpDir" VAL="PatchSets/oracle/as/j2ee/patchset/v10_1_3_4_0/help/"/>
      <INFO NAME="resourceClass" VAL="PatchSets.oracle.as.j2ee.patchset.v10_1_3_4_0.resources.CompRes"/>
      <REF NAME="oracle.as.j2ee.patchset" VER="10.1.3.4.0" HOME_IDX="5"/>

For the FMW 11g release perform the following

cd $ORACLE_HOME/inventory/ContentsXML

cat comps.xml | grep patchset

This shows the o/p as

<PATCHSET NAME="oracle.as.soa.top.patchset" VER="11.1.1.3.0" BUILD_NUMBER="0" RELEASE="Production" INV_LOC="PatchSets/oracle.as.soa.top.patchset/11.1.1.3.0/1/" XML_INV_LOC="PatchSets21/oracle.as.soa.top.patchset/11.1.1.3.0/" ACT_INST_VER="11.1.0.8.0" DEINST_VER="11.1.0.0.0" INSTALL_TIME="2010.Aug.06 21:53:00 IST">
      <INFO NAME="helpDir" VAL="PatchSets/oracle/as/soa/top/patchset/v11_1_1_3_0/help/"/>
      <INFO NAME="resourceClass" VAL="PatchSets.oracle.as.soa.top.patchset.v11_1_1_3_0.resources.CompRes"/>
      <REF NAME="oracle.as.soa.top.patchset" VER="11.1.1.3.0" HOME_IDX="5"/>

For the DB you can issue the command ,

$ORACLE_HOME/bin/sqlplus and note down the version details for example ,

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Aug 16 14:24:29 2010

or you can connect to the DB and find out the version details.

Tuesday, August 03, 2010

How to Install WebLogic Standalone Server

1. Download the WebLogic stand alone zip file from the location ,

http://download.oracle.com/otn/nt/middleware/11g/wls1033_dev.zip

2. Extract this zip to a directory say C:\wlsdev

3. Set the following env variables

set JAVA_HOME=C:\jdk16
set MW_HOME=c:\wlsdev

4. Run the installation configuration script in the MW_HOME directory
(This step is required to be run only once. If you move the installation to
another location/machine, you need to rerun this step)  configure.cmd
5. Create the domain using the script by running the utility

c:\wlsdev\wlserver\common\bin\config.cmd

6. Create a domain say testdomain in the directory
C:\wlsdev\user_projects\domains\testdomain

7. Start the WLS server by running the command

C:\wlsdev\user_projects\domains\testdomain\startWebLogic.cmd

Friday, July 02, 2010

How to find a file is 32bit or 64 bit on Windows

Download the utility file.exe from
http://www.vowles-home.demon.co.uk/utils/file.zip

Now run the command

file pidgin-2.6.6.exe

pidgin-2.6.6.exe, DOS/Win, i386 32bit executable, GUI, PE format

file c:\wordpad.exe

c:\wordpad.exe, DOS/Win, x86-64 64bit executable, GUI, PE format

file c:\TeraCopyExt64.dll

c:\TeraCopyExt64.dll, DOS/Win, x86-64 64bit executable, dll, GUI, PE format

file c:\TeraCopyExt.dll

c:\TeraCopyExt.dll, DOS/Win, i386 32bit executable, GUI, PE Modifed

Thursday, June 03, 2010

How to Configure Exchange Connector

1. Try to get hold of a system where exchange and active directory are installed.

2. Install AD Connector on the OIM Server and provision a user (For testing purpose)

3. Install Microsoft Exchange connector on the OIM Server. Please note that you need the Remote Manager only when you are using the exchange server 2007. Otherwise you do not need to any thing on the OIM Server.

4. Create a IT Resource for Exchange and leave all the attributes as blank.

5. Run the “Exchange Mail Store Lookup Reconciliation” task , before running this task scheduler change the “AD IT resource” attribute to the AD Connector that you created in the step no:2.

6. This schedule task populates the “Lookup.ExchangeReconciliation.MailStore” lookup values. For example in my case it populated my mail box name as “celvpint0309-ADInstance~CN=Mailbox Store (MSBOX),CN=First Storage Group,CN=InformationStore,CN=MSBOX,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=MSExchange2003Org,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=vm,DC=oracle,DC=com”

7. Now provision the AD User to the Exchange System. Only mandatory fields are Email Alias Name and the mail store name.

8. Now log in to the AD Server machine and check the AD User. For the exchange user you will see more attributes in the AD User TAB.

Thursday, May 20, 2010

How to use the ADAM Connector with OIM

1. Download the ADAM Installer from the microsoft site ADAMSP1_x86_English.exe

2. Install the ADAM Executables

3. Click on the menu option Create ADAM Instance

image

image 

image

image

image

image

image image

image

image

4. Now open the ADAM ADSI Edit Program and connect to the ADAM Server

Use the port number as 50000 and the Naming Context as O=Oracle,c=in

5. Create a user under the directory tree “O=Oracle,c=in” with the username as Admin and set the password as Welcome1.

6. Add this user to the group “CN=Administrators,CN=Roles,O=Oracle,C=in”

image

7. Create an Organization Unit with the name say BDE

8. From the OIM Create a IT Resource and change the following values

image

AdminFQDN=CN=Admin,O=BDE,CN=BDE,DC=idc,DC=oracle,DC=com      RootContext=o=BDE,cn=BDE,dc=idc,dc=oracle,dc=com                        AtMap ADGroup=AtMap.ADAMGroup 
AtMap ADUser=AtMap.ADAM 
isADAM=yes 

9. Open the Lookup.ADReconciliation.Organization and add the Organization to the LOV “OU=BDE,O=Oracle,cn=India”

10. Create a user in OIM and provision this user to the ADAM Resource

Monday, April 19, 2010

Find out Zero Byte Files

import java.io.*;
import java.util.*;

import java.util.zip.*;

public class FindZeroByteFiles {
    public FindZeroByteFiles() {
    }

    public static void main(String[] args) {
        FindZeroByteFiles findZeroByteFiles = new FindZeroByteFiles();
        File f1 = new File(args[0]);
  traverse(f1);
    }
    public static void traverse(File f) {
          String s1 = f.getAbsolutePath();

if (f.isFile())
         {
            long i =  filesize(s1)    ;
            if (i==0 ) {
                System.out.println(s1);
            }
         }

          if (f.isDirectory()) {
            String[] children = f.list();
            for (int i=0; i<children.length; i++) {
              traverse(new File(f, children[i]));
            }
          }
        }

    public static long  filesize(String filename)  {
        long  i = 0;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
            File f = new File(filename);
          if(f.exists()){
           long file_size = f.length();
            //  System.out.println("Size of the file : " + file_size);
               i = file_size;
           }
      return i;
    }
}

Run this program with the following arguments.

java  -client -classpath C:\ravi FindZeroByteFiles d:\Test

Thursday, March 25, 2010

How to JailBreak and Unlock iphone

I recently bought an iphone 3g in ebay. The phone came up AT&T sim card and locked.

The phone is having 3.1.2(7D11) firmware and 05.11.07 baseband.

I initially tried to use the blackra1n. I used the following article to
jailbreak and unlock my iphone 3g version. It is extremely easy to use this utility. You just need to connect your iphone to the computer and run the blackrain utility.

http://www.iphonedownloadblog.com/2009/11/03/tutorial-jailbreak-iphone-3-1-2-blackra1n/

But after unlocking I found various problems like GPS not working and ssh to the iphone is not working etc. I found that all these problems are due to some bugs in the blackra1n jail breaking code.

Because of these problems I decided to use some other jail broken solutions so that I can get back my GPS and other stuff that were broken with the blackra1n.

Here is the procedure that I followed for this.

First I downloaded the utility from the site
http://downloads.ih8sn0w.com/f0recast-1.1.exe

Connect your iphone to the computer and run this utility.

Here is the screen shot from that utility.

screenshot.8

From here I found that I can use any jail broken utility so I decided
use redsn0w for this as this is from iphone dev team.

As my phone was already jailbroken I want to restore to the base settings.

I downloaded the 3.1.2 firmware from the location given below ( Please note that you need to check your firmware version from iphone using Settings-> General -> Version , my version is 3.1.2(7D11) and download the correct version only.


so I downloaded the corresponding the firmware version from the location

http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7468.20100202.pbnrt/iPhone1,2_3.1.3_7E18_Restore.ipsw

After downloading connect your iphone to the itunes and Press the Shift button and Click on Restore button , this will ask
for the iphone firmware file and here select the file iPhone1,2_3.1.3_7E18_Restore.ipsw.

iTunes will automatically put the iphone in the restore mode and reboots the iphone. After this operation iphone will be in the factory condition with locked. In this mode you will be only able to make emergency calls only. Do not get panic at thing point of time. We need to jailbreak this to get the iphone screen back.

Download redsnow 9.2 from the following link

http://xs1.iphwn.org/rs//redsn0w-win_0.9.2.zip

extract this file to a directory and copy the file iPhone1,2_3.1.3_7E18_Restore.ipsw  to the same directory.

Now run the program redsn0w.exe and click on the browse button and select the  iPhone1,2_3.1.3_7E18_Restore.ipsw
file.

Here is the screen shot for that ,

screenshot.9

Now click on the next button and select the option's
Install Cydia etc.

screenshot.14

After this follow the exact steps mentioned in the screen, You need to enter the iphone in to DFU mode and the redSn0w does the rest. If you are not a expert of iphone you may need to try this 3 or 4 times.

screenshot.15

screenshot.16

After this operation your phone is Jail Broken.

Now you need to unlock the phone. Please use the following link to unlock the phone using the blacksn0w.

Ensure that you have a wi-fi connection in your home before trying this. Enable the wi-fi connection on your iphone so that you can download the unlock utility using this wi-fi connection.

This is also extremely easy you , you can follow the url given below for more details on this.

http://www.aboutonlinetips.com/unlock-iphone-3g-3gs-os-3-1-2-using-blacksn0w-via-cydia/

Step 1 - Start ‘Cydia’ on your iPhone springboard.
Step 2 - Select ‘Manage’ tab at the bottom of your iPhone screen and then select ‘Sources’.
Step 3 - Select ‘Edit’ and then select ‘Add’. Now enter a url source. Type ‘http://blackra1n.com’ and select on ‘Add Source’. Once Cydia has added the source click on ‘Return to Cydia’ button.
Step 4 – Once the installation is completed. Search for ‘blacksn0w’ in Cydia and install it.
Step 5 - Reboot your iPhone. Your iPhone 3G or 3GS on 3.1.2 firmware will be unlocked automatically.

Disabling Windows 2003 Internet explorer security settings

Windows Server 2003 shipped with security locked down by default.  Part of this locking down is Internet Explorer Enhanced Security which is an extra layer of protection when surfing the internet using Internet Explorer (more information can be found by going here on a Windows Server 2003 [test] machine). 

Click Start, put your mouse over Control Panel, and click Add/Remove Programs

Now click Add/Remove Windows Components

After a few seconds a window will pop-up.  Click the check mark next to Internet Explorer Enhanced Security Configuration (to make it unchecked).  If you'd like to only disable it for Administrators or only for Users you can click Details and do so.

Press Next, after this internet explorer will work in the same way that is used to work with Windows XP.

Monday, March 22, 2010

How to use Custom ringtones in iPhone

1. Get access to the mp3 or wav file that you want to convert to a ringtone. In my example, I am looking for a rock drummer loop as a ringtone for my friend who is a monkey percussionist.

2. Drag the file into iTunes

3. Select the file in iTunes and then select Convert Selection to AAC in the Advanced menu.

4. Select your new AAC file and select Show in Finder in the File menu

5. In finder, select the file and select Get Info from the File menu and iPhone features

6. Change the file extension from .m4a to .m4r

7. Confirm when the dialog asks if you really want to make the change

8. Drag the new file back into iTunes. The original files will remain but the ringtone will disappear. (It is actually being moved to following location: ~/Music/iTunes/iTunes Music/Ringtones )

9. Connect your iPhone and select the Ringtone tab in iTunes. Select the new ringtone that has been created.

10. Now simply sync your iphone with iTunes.

11. Now you can select the Ringtone you wish.

Monday, March 08, 2010

How to find out the OIM code that gets executed when you click a link on the OIM WebConsole

1. Most of the code is present in the file
C:\oim9102-Jboss\oim-server\xellerate\webapp\xlWebApp.war

2. Extract this file to a temporary directory

3. From the WebConsole note down the URL
i.e.  http://localhost:8080/xlWebApp/AboutXl.do

4. Open the file tiles-defs.xml and look for the entry "AboutXl" in this file

From this we can find out that this is the JSP tjspAboutXlTiles.jsp that gets executed

<definition name="site.AboutXl.page" extends="site.mainLayout">
        <put name="title" value="global.window.title.aboutOIM" />
        <put name="body" value="/tiles/tjspAboutXlTiles.jsp" />
  </definition>

5. Open the file struts-config.xml and look for the entry "tjspAboutXl"

Here you will find the entries as

  <action type="com.thortech.xl.webclient.actions.tcAboutXlAction"
           name="AboutXlForm"
           scope="request"
                 path="/AboutXl" >
    <forward name="success" path="/pages/tjspAboutXl.jsp" />           
    </action>
6. Open the com.thortech.xl.webclient.actions.tcAboutXlAction.class file and here you will find this is
calling some EJB code

if (localActionForward != null)
        return localActionForward;
      HttpSession localHttpSession = paramHttpServletRequest.getSession();
      tcAboutXlForm localtcAboutXlForm = (tcAboutXlForm)paramActionForm;
      Hashtable localHashtable = new Hashtable();
      tcHelpOperationsIntf localtcHelpOperationsIntf = getHelpOperIntf(paramHttpServletRequest.getSession(), null);
      localHashtable = (Hashtable)localtcHelpOperationsIntf.getHelpAbout();
      localtcAboutXlForm.setAboutXl(localHashtable);
      logger.debug(LoggerMessages.getMessage("LeftMethodDebug", "tcAboutXlAction/execute"));
      return paramActionMapping.findForward("success");
7. tcHelpOperationsIntf is the Interface and the corresponding class for this is
tcHelpOperationsBean.java file.

This is actual EJB code it is calling

public Map getHelpAbout()
    throws tcAPIException
  {
    logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcHelpOperationsBean/getHelpAbout"));
    Hashtable localHashtable = new Hashtable();
    localHashtable.put("Version", "9.1.0.1865.28");
    localHashtable.put("Build", "1865.28");
    String str = "select xsd_value as build from xsd where xsd_code='XL_BUILD_NUMBER'";
....
..

How OIM find's out the Version Details

OIM checks the version information from 3 places

1. It checks from the database by issuing the following query

select XSD_VALUE from XSD where XSD_CODE='XL_BUILD_NUMBER';

XSD_VALUE
--------------------------------------------------------------------------------
9.1.0.1866.25

2.  OIM-HOME\config\Version.prop file , this file contains the following entries

#Wed Feb 17 21:14:42 PST 2010
build.number=9.1.0.1866.25
product.version=9.1.0.2

3. There is a third place where this information is hardcoded in the EJB code.

When you click on the OIM WebConsole Help->About this is the EJB code that gets executed. This class is present in the xlDataObjectBeans.jar file.

Check the file tcHelpOperationsBean.java in the com.thortech.xl.ejb.beansimpl package.

com.thortech.xl.ejb.beansimpl.tcHelpOperationsBean.class file contans the version info

public Map getHelpAbout()
    throws tcAPIException
  {
    logger.debug(LoggerMessages.getMessage("EnteredMethodDebug", "tcHelpOperationsBean/getHelpAbout"));
    Hashtable localHashtable = new Hashtable();
    localHashtable.put("Version", "9.1.0.1866.25");
    localHashtable.put("Build", "1866.25");
    String str = "select xsd_value as build from xsd where xsd_code='XL_BUILD_NUMBER'";

....
..

Friday, March 05, 2010

OIM is accepting connections from local host only

1. Open the file C:\oim9102-Jboss\jboss-4.2.3.GA\server\default\deploy\jboss-web.deployer\server.xml
2. Change the line 
<Connector port="8080" address="${jboss.bind.address}" 
to 
<Connector port="8080" address="0.0.0.0" 
After this restart the JBoss server

Friday, February 26, 2010

How to TRACE JDBC Statements from a JDBC Program

1. Copy the jar file ojdbc14_g.jar in to the classpath. In the case of JBOSS application Server copy the file in to the directory D:\OIM9101-Jboss\jboss-4.2.3.GA\server\default\lib.

Please note that if there is a ojdbc14.jar you need to remove this file first.

2. Add the following java arguments to your java program

-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=OracleLog.properties 

If you are using JBOSS App Server then use the following

set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m -XX:PermSize=128m -Doracle.jdbc.Trace=true -Djava.util.logging.config.file=OracleLog.properties 

3. The OracleLog.properties  file contains the following entries

#### Console Handler ######

#java.util.logging.ConsoleHandler.level = ALL
#java.util.logging.ConsoleHandler.formatter =
#java.util.logging.SimpleFormatter
#handlers = java.util.logging.ConsoleHandler

#### File  Handler ######

oracle.jdbc.handlers=java.util.logging.FileHandler
java.util.logging.FileHandler.level=ALL
java.util.logging.FileHandler.pattern=jdbc.log
java.util.logging.FileHandler.count=1
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter

# Uncomment and/or change the levels for more detail
#oracle.jdbc.level = FINEST
#oracle.jdbc.connector.level = FINE
#oracle.jdbc.driver.level = FINEST
#oracle.jdbc.internal.level = FINEST
#oracle.jdbc.oci.level = FINE
#oracle.jdbc.oracore.level = FINE
#oracle.jdbc.pool.level = FINE
#oracle.jdbc.rowset.level = FINEST
#oracle.jdbc.util.level = FINEST
#oracle.jdbc.xa.level = FINE
#oracle.jdbc.xa.client.level = FINE
#oracle.jpub.level = FINE
#oracle.net.level = FINE
#oracle.sql.level = FINEST
#.level=CONFIG
#oracle.level=CONFIG
# This is the setting needed for sql debug
oracle.jdbc.driver.level=CONFIG
#oracle.jdbc.pool.level=CONFIG
#oracle.jdbc.util.level=CONFIG
#oracle.sql.level=CONFIG

#oracle.jdbc.driver.level=FINE

6. Run your JDBC Program , assuming you statement is

select pty_key , pty_value from pty  where pty_keyword = :1

This is the Bind Parameter value

INFO: OraclePreparedStatement.setString(paramIndex=1, x=XL.MaxLoginAttempts)

Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=XL.MaxLoginAttempts)
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.OracleStatement doExecuteWithTimeout
CONFIG: SQL: "select pty_key , pty_value from pty  where pty_keyword = :1"
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.T4CPreparedStatement allocateTmpByteArray
SEVERE: oracle.jdbc.driver.T4CPreparedStatement.allocateTmpByteArray : Re-allocate byte array of size : 80
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.OracleResultSetImpl findColumn
INFO: OracleResultSetImpl.findColumn(columnName=pty_value)
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.OracleResultSetImpl getString
INFO: OracleResultSetImpl.getString(columnIndex=2)
Feb 27, 2010 12:00:41 PM oracle.jdbc.driver.OracleResultSetImpl close
INFO: OracleResultSetImpl.close()