Installing OBIEE 11.1.1.7.0 fails when starting the managed server – b1_server1

Posted by Steve Racanovic | Posted in | Posted on 11:49 AM

0



I'm trying to install OBIEE 11.1.1.7.0 and the managed OBIEE server – b1_server1 – was always failing causing the install to fail. After several attempts and double checking all the system parameters it was still continually getting stuck and unable to start the managed server. The only error I could find is this:

Stopping Derby Server...
Starting AdminServer
  Starting the domain ...
progress in calculate progress1
Executing Task: Starting Managed Server: bi_server1
oracle.as.install.bi.wls.ServerLifeCycleException: Failed to achieve state RUNNING in 3600seconds.   The server is currently in state STARTING
 at oracle.as.install.bi.wls.ServerLifeCycle.waitForManagedWLSServerState(ServerLifeCycle.java:119)
 at oracle.as.install.bi.wls.ServerLifeCycle.startServerSynchronous(ServerLifeCycle.java:59)
 at oracle.as.install.bi.biconfig.standard.StartStopManagedServer.doExecute(StartStopManagedServer.java:55)
 at oracle.as.install.bi.biconfig.standard.AbstractProvisioningTask.execute(AbstractProvisioningTask.java:70)
 at oracle.as.install.bi.biconfig.standard.StandardProvisionTaskList.execute(StandardProvisionTaskList.java:66)
 at oracle.as.install.bi.biconfig.BIConfigMain.doExecute(BIConfigMain.java:113)
 at oracle.as.install.engine.modules.configuration.client.ConfigAction.execute(ConfigAction.java:375)
 at oracle.as.install.engine.modules.configuration.action.TaskPerformer.run(TaskPerformer.java:88)
 at oracle.as.install.engine.modules.configuration.action.TaskPerformer.startConfigAction(TaskPerformer.java:105)
 at oracle.as.install.engine.modules.configuration.action.ActionRequest.perform(ActionRequest.java:15)
 at oracle.as.install.engine.modules.configuration.action.RequestQueue.perform(RequestQueue.java:96)
 at oracle.as.install.engine.modules.configuration.standard.StandardConfigActionManager.start(StandardConfigActionManager.java:186)
 at oracle.as.install.engine.modules.configuration.boot.ConfigurationExtension.kickstart(ConfigurationExtension.java:81)
 at oracle.as.install.engine.modules.configuration.ConfigurationModule.run(ConfigurationModule.java:86)
 at java.lang.Thread.run(Thread.java:662)




One time when it was stuck trying to start the managed server, I decided to checked the entropy and noticed that it was low.

[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
157
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
141
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
132
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
183
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
173
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail
149

As soon as I ran rngd to increase entropy pool, the managed server started and continued to install.



[root@beast-wls-au ~]# rngd -r /dev/urandom -o /dev/random -f -t 1 &
[root@beast-wls-au ~]# 
[root@beast-wls-au ~]# 
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail 
3526
[root@beast-wls-au ~]# cat /proc/sys/kernel/random/entropy_avail 
3605
[root@beast-wls-au ~]# 


I'll have to look into an entropy generator to avoid this issue in the future.

I installed OBIEE 11.1.1.7.0 on OEL6_u6 which sit inside OVS 3.3.2

Receiving 'startWebLogic.sh: 1: eval: Syntax error: Unterminated quoted string Process exited.' in JDev when starting the Integrated Weblogic Server.

Posted by Steve Racanovic | Posted in | Posted on 3:40 PM

0

I'm using Linux Mint 16, and when I try to start the Integrated Weblogic Server (Run -> Start Server Instance) in JDeveloper I get this error:

*** Using port 7101 ***
/home/steve/.jdeveloper/system11.1.1.6.38.62.29/DefaultDomain/bin/startWebLogic.sh
[waiting for the server to complete its initialization...]
/home/steve/.jdeveloper/system11.1.1.6.38.62.29/DefaultDomain/bin/startWebLogic.sh: 1: eval: Syntax error: Unterminated quoted string
Process exited.



To workaround this, I changed the sha-bang in startWebLogic.sh script to run bash. i.e. #!/bin/bash

You also need to do the same for stopWebLogic.sh script to stop instance later.

Failed to locate the Google Cloud Messaging for Android Library file named "gcm.jar". (oracle.adfmf.framework.dt.deploy.android.deployers.ValidatePreferencesDeployer)

Posted by Steve Racanovic | Posted in | Posted on 3:27 PM

0

Using JDev 11.1.2.4.0 I tried deploying a simple app to the emulator when I received the following error:

[02:46:21 PM] Deployment cancelled.
[02:46:21 PM] ----  Deployment incomplete  ----.
[02:46:21 PM] Failed to locate the Google Cloud Messaging for Android Library file named "gcm.jar". (oracle.adfmf.framework.dt.deploy.android.deployers.ValidatePreferencesDeployer)


I then installed GCM (which now seems to be deprecated) from Andriod SDK Manager and it worked.


How to create an OCI connection in Jdev - Database Navigator

Posted by Steve Racanovic | Posted in , | Posted on 12:02 PM

0

I have been trying to create an OCI connection in the database navigator using Jdev 11.1.2.3. Following these docs:

http://docs.oracle.com/cd/E35521_01/user.111230/e17455/connect_work_databases.htm#OJDUG5131
http://docs.oracle.com/cd/E35521_01/user.111230/e17455/connect_work_databases.htm#OJDUG2432

I'm on a 64 bit platform. So the first thing I do is set JDev to use 64bit JDK by editing the jdev.conf file i.e.
...
# Directive SetJavaHome is not required by default, except for the base
# install, since the launcher will determine the JAVA_HOME.  On Windows
# it looks in ..\..\jdk, on UNIX it first looks in ../../jdk. If no JDK
# is found there, it looks in the PATH.
#
#SetJavaHome D:\Oracle\Jdev\111230-prod\jdk160_24
SetJavaHome C:\Program Files\Java\jdk1.6.0_39
...

I'll also add the parameters for JDBC driver and path to the OCI dll's.

 #For JDBC for OCI
AddVMOption -Doracle.jdbc.library=D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar
AddNativeCodePath D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0

When I start JDev, I receive a warning for the parameter AddNativeCodePath. And I'm unable to connect.

[sracanov@SRACANOV-AU D]$ jdev -verbose
WARNING: Unknown directive: AddNativeCodePath
savedArg0 = D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev.exe
VM to launch C:\Program Files\Java\jdk1.6.0_39\jre\bin\server\jvm.dll
Restarting the launcher with the 64bit version
Reading exe header from jvm.dll, Machine=8664
Jvm is 64bit
Checking toplevel for D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\..\..\ide\bin\launcher.dll = 0
About to relaunch with command line: D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev64.exe -verbose
WARNING: Unknown directive: AddNativeCodePath
 ...



It seems AddNativeCodePath is not recognised as a parameter. So I've comment out the line and start it by passing the library in that path environment variable.

[sracanov@SRACANOV-AU D]$ set path=D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0;%path%

[sracanov@SRACANOV-AU D]$ jdev -verbose
savedArg0 = D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev.exe
VM to launch C:\Program Files\Java\jdk1.6.0_39\jre\bin\server\jvm.dll
Restarting the launcher with the 64bit version
Reading exe header from jvm.dll, Machine=8664
Jvm is 64bit
Checking toplevel for D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\..\..\ide\bin\launcher.dll = 0
About to relaunch with command line: D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev64.exe -verbose
savedArg0 = D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev64.exe
VM to launch C:\Program Files\Java\jdk1.6.0_39\jre\bin\server\jvm.dll
JNI Option: -Xbootclasspath/a:C:\Program Files\Java\jdk1.6.0_39\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_39\lib\dt.jar
JNI Option: -Dsun.java2d.noddraw=true
JNI Option: -Dnetbeans.home=../../netbeans/platform/
JNI Option: -Dnetbeans.logger.console=true
JNI Option: -Dexcluded.modules=org.eclipse.osgi
JNI Option: -Dide.cluster.dirs=../../netbeans/netbinox/:../../netbeans/bridge/:../../
JNI Option: -Xmx800M
JNI Option: -Xms128M
JNI Option: -Xverify:none
JNI Option: -Doracle.ide.extension.HooksProcessingMode=LAZY
JNI Option: -Dorg.eclipse.equinox.simpleconfigurator.configUrl=file:bundles.info
JNI Option: -Dosgi.bundles=file:../ide/lib/oracle.ide.osgi.jar@3:start
JNI Option: -Dosgi.bundles.defaultStartLevel=1
JNI Option: -Dosgi.configuration.cascaded=false
JNI Option: -Dosgi.noShutdown=true
JNI Option: -Dorg.osgi.framework.bootdelegation=*
JNI Option: -Dosgi.parentClassloader=app
JNI Option: -Xbootclasspath/p:../../rdbms/jlib/ojdi.jar
JNI Option: -Dosgi.classloader.singleThreadLoads=true
JNI Option: -Dosgi.bundlefile.limit=2000
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n-collation.jar
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n-mapping.jar
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n-servlet.jar
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n-utility.jar
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.nlsrtl_11.1.0/orai18n.jar
JNI Option: -Xbootclasspath/a:../../../oracle_common/modules/oracle.xdk_11.1.0/xmlparserv2.jar
JNI Option: -Djavax.xml.parsers.DocumentBuilderFactory=oracle.xml.jaxp.JXDocumentBuilderFactory
JNI Option: -Djavax.xml.parsers.SAXParserFactory=oracle.xml.jaxp.JXSAXParserFactory
JNI Option: -Dorg.xml.sax.driver=oracle.xml.parser.v2.SAXParser
JNI Option: -Dide.feedback-server=ide.us.oracle.com
JNI Option: -Xbootclasspath/a:../../ide/lib/xml-factory.jar
JNI Option: -Djavax.xml.transform.TransformerFactory=oracle.ide.xml.SwitchableTransformerFactory
JNI Option: -XX:MaxPermSize=288M
JNI Option: -Xbootclasspath/p:../lib/lwawt.jar
JNI Option: -Xbootclasspath/p:../lib/apt-expose.jar
JNI Option: -Dsun.awt.keepWorkingSetOnMinimize=true
JNI Option: -XX:+HeapDumpOnOutOfMemoryError
JNI Option: -Doracle.jdeveloper.webservice.showAllOwsmPolicyTypes=false
JNI Option: -Doracle.jdeveloper.webservice.hidePropertyOverride=false
JNI Option: -Dsun.awt.disablegrab=true
JNI Option: -Xbootclasspath/p:../../rdbms/jlib/ojdi.jar
JNI Option: -Dide.patches.dir=jdev/lib/patches
JNI Option: -Doracle.jdbc.library=D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar
JNI Option: -Dide.startingArg0=D:\Oracle\JDev\111230-prod\jdeveloper\jdev\bin\jdev64.exe
JNI Option: -Dide.startingArg1=-verbose
JNI Option: -Dide.launcherProcessId=5428

...




I've used an instance client here which you can read about the setup here.

NT_STATUS_ACCESS_DENIED listing

Posted by Steve Racanovic | Posted in | Posted on 11:07 AM

0

My samba server stop working the other day and which left me stump and unable to connect.

[oracle@beast /]$  smbclient -L //sracanov-au3/My.Contents
Password:
Domain=[SRACANOV-AU3] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8]

        Sharename       Type      Comment
        ---------       ----      -------
        My.Contents     Disk      My Files
        IPC$            IPC       IPC Service (Samba Server Version 3.0.33-3.39.el5_8)
        oracle          Disk      Home Directories
Domain=[SRACANOV-AU3] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        AU-ORACLE            EDJONES
[oracle@beast /]$ smbclient //sracanov-au3/My.Contents -Uoracle%password
Domain=[SRACANOV-AU3] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8]
smb: \> dir
NT_STATUS_ACCESS_DENIED listing \*

                58681 blocks of size 16777216. 33764 blocks available
smb: \>

After thoroughly checking the configuration files again and user details I was still in the same place. I eventually found the issue was in SELinux, and once I'd disable it, it worked again.

[root@sracanov-au3 My.Contents]# setsebool -P smbd_disable_trans 1
[root@sracanov-au3 My.Contents]# service smb restart
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@sracanov-au3 My.Contents]#

[oracle@beast /]$ smbclient //sracanov-au3/My.Contents -Uoracle%password
Domain=[SRACANOV-AU3] OS=[Unix] Server=[Samba 3.0.33-3.39.el5_8]
smb: \> dir
  .                                   D        0  Fri Apr 13 12:36:46 2012
  ..                                  D        0  Thu Apr 12 10:09:40 2012
  My.Software                         D        0  Tue May  1 10:46:18 2012
  My.Projects                         D        0  Fri Apr 13 11:35:45 2012
  My.Technical.Docs                   D        0  Fri Apr 13 12:36:44 2012
  My.Registry                         D        0  Fri Apr 13 11:23:37 2012
  My.VMWare.Images                    D        0  Thu Apr 12 11:00:59 2012
  My.Thunderbird                      D        0  Fri Apr 13 11:22:39 2012
  My.Music                            D        0  Fri Apr 13 11:35:58 2012
  My.Bookmarks                        D        0  Fri Apr 13 12:36:46 2012
  My.Docs                             D        0  Fri Apr 13 10:30:31 2012
  My.Pictures                         D        0  Fri Apr 13 12:36:45 2012
  My.Backups                          D        0  Tue May  1 15:59:25 2012

                58681 blocks of size 16777216. 33764 blocks available
smb: \>

A Connection Example of JDBC THIN, THICK or SQLPLUS using Oracle Instant Client

Posted by Steve Racanovic | Posted in | Posted on 12:10 PM

0

First, download the instant client you which to use from - http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html

The following steps demonstrate how to use it with simple connection.

1. I downloaded and extracted the following zips file;

- instantclient-basic-win-x86-64-11.1.0.7.0.zip
- instantclient-sqlplus-win-x86-64-11.1.0.7.0.zip

to: D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0


[sracanov@SRACANOV-AU D]$ ll
 Volume in drive D is Data
 Volume Serial Number is 12FC-9B4B

 Directory of D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0

07/02/2012  01:47 PM              .
07/02/2012  01:47 PM              ..
29/10/2008  07:09 AM            14,336 adrci.exe
29/10/2008  07:09 AM             4,648 adrci.sym
29/10/2008  07:09 AM               335 BASIC_README
29/10/2008  07:09 AM            47,104 genezi.exe
29/10/2008  07:09 AM            26,272 genezi.sym
12/01/2006  11:36 PM               342 glogin.sql
15/10/2008  07:11 AM         1,060,864 mfc71.dll
15/10/2008  07:11 AM           348,160 msvcr71.dll
29/10/2008  07:06 AM           659,968 oci.dll
29/10/2008  07:06 AM           426,200 oci.sym
07/10/2008  11:58 PM           132,608 ocijdbc11.dll
07/10/2008  11:58 PM            22,712 ocijdbc11.sym
26/10/2008  01:10 PM           468,480 ociw32.dll
26/10/2008  01:10 PM            73,024 ociw32.sym
07/10/2008  11:00 PM         1,890,262 ojdbc5.jar
07/10/2008  11:00 PM         1,988,193 ojdbc6.jar
14/10/2008  11:47 PM         1,527,296 orannzsbb11.dll
14/10/2008  11:47 PM           382,728 orannzsbb11.sym
27/10/2008  01:41 PM         1,330,176 oraocci11.dll
29/10/2008  07:09 AM           421,472 oraocci11.sym
29/10/2008  07:08 AM       126,414,336 oraociei11.dll
29/10/2008  07:08 AM         7,200,336 oraociei11.sym
29/10/2008  07:09 AM           426,496 orasql11.dll
29/10/2008  07:09 AM            35,744 orasql11.sym
02/10/2008  11:24 PM         1,685,504 Orasqlplusic11.dll
02/10/2008  11:24 PM           757,760 sqlplus.exe
29/10/2008  07:10 AM           135,976 sqlplus.sym
29/10/2008  07:10 AM               339 SQLPLUS_README
29/10/2008  07:09 AM              vc71
07/02/2012  01:47 PM              vc8
              28 File(s)    147,481,671 bytes
               4 Dir(s)  41,876,062,208 bytes free


2. Use sqlplus.exe and connect to the database.


[sracanov@SRACANOV-AU D]$ sqlplus scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sracanov-au3.au.oracle.com)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Mar 14 11:10:17 2012

Copyright (c) 1982, 2008, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[sracanov@SRACANOV-AU D]$

This is how my database listener looks like:


[oracle@sracanov-au3 dbhome_1]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 14-MAR-2012 11:17:49

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                13-MAR-2012 10:22:16
Uptime                    1 days 0 hr. 49 min. 33 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         /u01/app/oracle/product/11.2.0/dbhome_1/log/diag/tnslsnr/sracanov-au3/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sracanov-au3.au.oracle.com)(PORT=1521)))
Services Summary...
Service "linux11gr2.au.oracle.com" has 1 instance(s).
  Instance "linux11gr2", status READY, has 1 handler(s) for this service...
Service "linux11gr2XDB.au.oracle.com" has 1 instance(s).
  Instance "linux11gr2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@sracanov-au3 dbhome_1]$


3. Download the simple standalone java client from Doc 467804.1 - How To Determine The Exact JDBC Driver Version (9.x - 11.x) For Standalone Programs (Doc ID 467804.1)


[sracanov@SRACANOV-AU D]$ cd /d C:\Users\sracanov\Downloads

[sracanov@SRACANOV-AU C]$ ll
 Volume in drive C is System
 Volume Serial Number is 3E06-1C2F

 Directory of C:\Users\sracanov\Downloads

07/02/2012  11:47 AM              .
07/02/2012  11:47 AM              ..
07/02/2012  11:45 AM             3,401 JDBCInfo.java
               1 File(s)          3,401 bytes
               2 Dir(s)  146,445,778,944 bytes free

[sracanov@SRACANOV-AU C]$ java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)

[sracanov@SRACANOV-AU C]$

There are 2 crucial points here:
A) - I'am using JDK 1.6, so I must use ojdbc6.jar driver.
B) - I am using 64bit JDK. My platform is 64bit. As per the files downloaded *win-x86-64-11.1.0.7.0*. (If platform is 64bit, use 64bit JDK and Client. This needs to be correct for OCI to work. Due to dll's. Thin will run with 32bit).

My platform:


[sracanov@SRACANOV-AU C]$ systeminfo | findstr /B /C:"OS Name" /C:"System Type"
OS Name:                   Microsoft Windows 7 Professional
System Type:               x64-based PC

If you dont have the correct JDK as per your platform, you can download it from here - http://www.oracle.com/technetwork/java/javase/downloads/index.html

4. Now compile and run using JDBC THIN to connect.


[sracanov@SRACANOV-AU C]$ javac -cp .;D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar JDBCInfo.java

[sracanov@SRACANOV-AU C]$ java -cp .;D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar JDBCInfo jdbc:oracle:thin:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)
(HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

Database
==============
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

JDBC
==============
Oracle JDBC driver: 11.1.0.7.0-Production

Connection URL
==============
jdbc:oracle:thin:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

JVM
===
Sun Microsystems Inc.
Java HotSpot(TM) 64-Bit Server VM
20.5-b03
1.6.0_30

LOCALE
===========
en_AU

CLASSPATH
=========
.
D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar

LIBRARYPATH
===========
C:\Program Files\Java\jdk1.6.0_30\bin
C:\windows\Sun\Java\bin
C:\windows\system32
C:\windows
.
C:\windows\SYSTEM_BIN
C:\windows\SYSTEM_EXE
C:\Program Files\Windows Resource Kits\Tools
C:\windows\SYSTEM_EXE\unixutils\bin
C:\windows\SYSTEM_EXE\unixutils\usr\local\wbin
C:\Program Files\WinSCP3
C:\Program Files\cvsnt
C:\Program Files\GNU\WinCvs 2.0\
C:\Program Files\GnuWin32\bin
C:\Program Files\Java\jdk1.6.0_30\bin
C:\Program Files (x86)\apache-ant-1.7.0\bin
\bin
\bin
C:\windows
C:\windows\system32
.

[sracanov@SRACANOV-AU C]$

5. Now to use JDBC OCI to connect.


[sracanov@SRACANOV-AU C]$ set path=D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0;%path%
[sracanov@SRACANOV-AU C]$ java -cp .;D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar JDBCInfo jdbc:oracle:oci:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(
HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

Database
==============
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

JDBC
==============
Oracle JDBC driver: 11.1.0.7.0-Production

Connection URL
==============
jdbc:oracle:oci:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

JVM
===
Sun Microsystems Inc.
Java HotSpot(TM) 64-Bit Server VM
20.5-b03
1.6.0_30

LOCALE
===========
en_AU

CLASSPATH
=========
.
D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar

LIBRARYPATH
===========
C:\Program Files\Java\jdk1.6.0_30\bin
C:\windows\Sun\Java\bin
C:\windows\system32
C:\windows
D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0
.
C:\windows\SYSTEM_BIN
C:\windows\SYSTEM_EXE
C:\Program Files\Windows Resource Kits\Tools
C:\windows\SYSTEM_EXE\unixutils\bin
C:\windows\SYSTEM_EXE\unixutils\usr\local\wbin
C:\Program Files\WinSCP3
C:\Program Files\cvsnt
C:\Program Files\GNU\WinCvs 2.0\
C:\Program Files\GnuWin32\bin
C:\Program Files\Java\jdk1.6.0_30\bin
C:\Program Files (x86)\apache-ant-1.7.0\bin
\bin
\bin
C:\windows
C:\windows\system32
.

[sracanov@SRACANOV-AU C]$

NOTE:

- If I was using 32bit JDK:

[sracanov@SRACANOV-AU C]$ set path=C:\Program Files (x86)\Java\jdk1.6.0_26\bin

[sracanov@SRACANOV-AU C]$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)

[sracanov@SRACANOV-AU C]$ java -cp .;D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar JDBCInfo jdbc:oracle:thin:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)
(HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

Database
==============
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

JDBC
==============
Oracle JDBC driver: 11.1.0.7.0-Production

Connection URL
==============
jdbc:oracle:thin:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))

JVM
===
Sun Microsystems Inc.
Java HotSpot(TM) Client VM
20.1-b02
1.6.0_26

LOCALE
===========
en_AU

CLASSPATH
=========
.
D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar

LIBRARYPATH
===========
C:\Program Files (x86)\Java\jdk1.6.0_26\bin
C:\windows\Sun\Java\bin
C:\windows\system32
C:\windows
C:\Program Files (x86)\Java\jdk1.6.0_26\bin
.

[sracanov@SRACANOV-AU C]$
[sracanov@SRACANOV-AU C]$
[sracanov@SRACANOV-AU C]$ set path=D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0;C:\Program Files (x86)\Java\jdk1.6.0_26\bin

[sracanov@SRACANOV-AU C]$ java -cp .;D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ojdbc6.jar JDBCInfo jdbc:oracle:oci:scott/tiger@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(PORT=1521)(
HOST=sracanov-au3.au.oracle.com))(CONNECT_DATA=(SERVICE_NAME=linux11gr2.au.oracle.com)))
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\Oracle\JDBC\instantclient\x86-64\11.1.0.7.0\ocijdbc11.dll: Can't find dependent libraries
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3178)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3174)
        at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:233)
        at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:508)
        at oracle.jdbc.driver.T2CConnection.(T2CConnection.java:133)
        at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
        at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:275)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:206)
        at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:156)
        at JDBCInfo.main(JDBCInfo.java:58)

[sracanov@SRACANOV-AU C]$

- Thin works fine.

- OCI will run into dependent libraries issue on the platform. So you need to use the correct JDK.

- Set the envionment variable for your library on the system used. http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html

"Set the library loading path in your environment to the directory in Step 2 ("instantclient"). On many UNIX platforms, LD_LIBRARY_PATH is the appropriate environment variable. On Windows, PATH should be used."

Manually applying a JDBC patch for a Custom OC4J.

Posted by Steve Racanovic | Posted in , | Posted on 4:04 PM

0

If you have followed doc 420303.1 to upgrade your JDBC driver and found this driver has issues where you need to apply a patch for it. You may want to follow this example to apply the one off patch.

[oracle@beast JDBC_UPGRADE]$ pwd
/home/u01/app/oracle/product/1013AS_blue/j2ee/JDBC_UPGRADE
[oracle@beast JDBC_UPGRADE]$ ll
total 104
drwxr-xr-x  2 oracle oinstall  4096 Feb 21 11:25 applib
drwxr-x---  9 oracle oinstall  4096 Feb 21 11:26 application-deployments
drwxr-xr-x  2 oracle oinstall  4096 Feb 21 11:25 applications
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 11:31 config
drwxr-xr-x  4 oracle oinstall  4096 Feb 21 11:25 connectors
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 11:26 log
-rw-r--r--  1 oracle oinstall 26445 Feb 21  2012 p13403295_10205_Generic.zip
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 11:26 persistence
drwxr-x---  3 oracle oinstall  4096 Feb 21 11:31 shared-lib
drwxr-x---  3 oracle oinstall  4096 Feb 21 11:26 tldcache
[oracle@beast JDBC_UPGRADE]$ unzip -d patches p13403295_10205_Generic.zip > /dev/null
[oracle@beast JDBC_UPGRADE]$ ll
total 112
drwxr-xr-x  2 oracle oinstall  4096 Feb 21 11:25 applib
drwxr-x---  9 oracle oinstall  4096 Feb 21 11:26 application-deployments
drwxr-xr-x  2 oracle oinstall  4096 Feb 21 11:25 applications
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 12:07 config
drwxr-xr-x  4 oracle oinstall  4096 Feb 21 11:25 connectors
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 11:26 log
-rw-r--r--  1 oracle oinstall 26445 Feb 21  2012 p13403295_10205_Generic.zip
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 12:12 patches
drwxr-xr-x  3 oracle oinstall  4096 Feb 21 11:26 persistence
drwxr-x---  3 oracle oinstall  4096 Feb 21 11:31 shared-lib
drwxr-x---  3 oracle oinstall  4096 Feb 21 11:26 tldcache
[oracle@beast JDBC_UPGRADE]$
[oracle@beast JDBC_UPGRADE]$ cd shared-lib/oracle.jdbc/10.2.0.5.0/
[oracle@beast 10.2.0.5.0]$ ll
total 1544
-rw-r-----  1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
[oracle@beast 10.2.0.5.0]$ cp ojdbc14.jar ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ ll
total 3088
-rw-r-----  1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
-rw-r-----  1 oracle oinstall 1569316 Feb 21 11:35 ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ jar uvf ojdbc14.p13403295.jar ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/*
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/(in = 0) (out= 0)(stored 0%)
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/(in = 0) (out= 0)(stored 0%)
adding: ../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/ns/(in = 0) (out= 0)(stored 0%)
adding:
 
../../../patches/13403295/files/jdbc/lib/ojdbc14.jar/oracle/net/ns/NetException.class(in
 = 4557) (out= 1969)(deflated 56%)
[oracle@beast 10.2.0.5.0]$ ll
total 3088
-rw-r-----  1 oracle oinstall 1569316 Feb 21 11:31 ojdbc14.jar
-rw-r--r--  1 oracle oinstall 1572093 Feb 21 11:39 ojdbc14.p13403295.jar
[oracle@beast 10.2.0.5.0]$ cd ../../../config
[oracle@beast config]$ cp server.xml server.xml.old.1
[oracle@beast config]$ opmnctl stopproc process-type=JDBC_UPGRADE
opmnctl: stopping opmn managed processes...
[oracle@beast config]$ grep -l ojdbc14.jar server.xml | xargs sed -i 's/ojdbc14.jar/ojdbc14.p13403295.jar/g'
[oracle@beast config]$ opmnctl startproc process-type=JDBC_UPGRADE
opmnctl: starting opmn managed processes...
[oracle@beast config]$ cd ..
[oracle@beast JDBC_UPGRADE]$ rm p13403295_10205_Generic.zip
[oracle@beast JDBC_UPGRADE]$ 

Note: 


1. The jar command will update the driver jar with the patches. If your using another driver i.e. ojdbc5.jar, then ensure you grab the classes from the ojdbc5.jar directory i.e. ../../../patches/13403295/files/jdbc/lib/ojdbc5.jar/*

2. In server.xml we simply make the following change:
[oracle@beast config]$ diff server.xml server.xml.old.1
125c125
<               <code-source path="ojdbc14.p13403295.jar"/>
---
>               <code-source path="ojdbc14.jar"/>
[oracle@beast config]$ 
 
Once the oc4j instance has started up again, it will use the patched jar - ojdbc14.p13403295.jar. We can simply switch back to original if needed.