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 Instance Client

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

0

First, download the instance 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.

Building sudo - make[1]: *** [visudo] Error 1

Posted by Steve Racanovic | Posted in | Posted on 2:20 PM

0

I needed to build sudo today and when I started building it, I received this fatal error:

-bash-3.00# echo $PATH
/usr/sbin:/usr/bin:/sbin:/bin:/usr/sfw/bin:/usr/ccs/bin:/usr/local/bin
-bash-3.00# make
for d in compat common  plugins/sudoers src include doc plugins/sample plugins/sample_group; \
    do (cd $d && exec make all) && continue; \
    exit $?; \
done
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/compat'
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/common'
make[1]: Entering directory `/export/home/oracle/sudo-1.8.4/plugins/sudoers'
/bin/bash ../../libtool --mode=link gcc -o visudo visudo.o goodpath.o find_path.o error.o  libparsesudoers.la ../../common/libcommon.la ../../compat/libreplace.la  -lsocket -lnsl
libtool: link: gcc -o visudo visudo.o goodpath.o find_path.o error.o  ./.libs/libparsesudoers.a ../../common/.libs/libcommon.a ../../compat/.libs/libreplace.a -lsocket -lnsl
Undefined                       first referenced
 symbol                             in file
libintl_textdomain                  visudo.o
libintl_bindtextdomain              visudo.o
libintl_dgettext                    visudo.o
ld: fatal: Symbol referencing errors. No output written to visudo
collect2: ld returned 1 exit status
make[1]: *** [visudo] Error 1
make[1]: Leaving directory `/export/home/oracle/sudo-1.8.4/plugins/sudoers'
make: *** [all] Error 2
-bash-3.00# pwd
/export/home/oracle/sudo-1.8.4

After changing the path as follows, it worked:

-bash-3.00# export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/include:/usr/sfw/bin:/usr/local/sbin:/usr/local/bin

-bash-3.00# make

for d in compat common  plugins/sudoers src include doc plugins/sample plugins/sample_group; \

    do (cd $d && exec make all) && continue; \

    exit $?; \

done

-bash-3.00# make install

for d in compat common  plugins/sudoers src include doc; \

    do (cd $d && exec make pre-install) && continue; \

    exit $?; \

done

for d in compat common  plugins/sudoers src include doc; \

    do (cd $d && exec make install) && continue; \

    exit $?; \

done

/bin/bash ../../mkinstalldirs /usr/local/libexec \

    /usr/local/sbin /usr/local/bin \

    /etc /usr/local/share/doc/sudo \

    `echo /var/lib/sudo|sed 's,/[^/]*$,,'`

/bin/bash ../../install-sh -c -d -O 0 -G 0 -m 0700 /var/lib/sudo

if [ X".so" != X"" ]; then \

    /bin/bash ../../install-sh -c -b~ -O 0 -G 0 -m 0755 .libs/sudoers.so /usr/local/libexec; \

fi

/bin/bash ../../install-sh -c -b~ -O 0 -G 0 -M 0111 sudoreplay /usr/local/bin/sudoreplay

/bin/bash ../../install-sh -c -b~ -O 0 -G 0 -M 0111 visudo /usr/local/sbin/visudo

/bin/bash ../../install-sh -c -d -O 0 -G 0 -m 0750 \

    /etc/sudoers.d

test -r /etc/sudoers || \

    /bin/bash ../../install-sh -c -O 0 -G 0 -m 0440 \

        sudoers /etc/sudoers

#/bin/bash ../../install-sh -c -O 0 -G 0 -m 0555 ./sudoers2ldif /usr/local/share/doc/sudo

/bin/bash ../mkinstalldirs /usr/local/bin \

    /usr/local/libexec

/bin/bash ../install-sh -c -b~ -O 0 -G 0 -M 04111 sudo /usr/local/bin/sudo

rm -f /usr/local/bin/sudoedit

ln /usr/local/bin/sudo /usr/local/bin/sudoedit

if [ -f sesh ]; then /bin/bash ../install-sh -c -b~ -O 0 -G 0 -M 0111 sesh /usr/local/libexec/sesh; fi

if [ -f .libs/libsudo_noexec.so ]; then /bin/bash ../install-sh -c -b~ -O 0 -G 0 -m 0755 .libs/libsudo_noexec.so /usr/local/libexec/sudo_noexec.so; fi

/bin/bash ../mkinstalldirs /usr/local/include

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo_plugin.h /usr/local/include

/bin/bash ../mkinstalldirs /usr/local/share/doc/sudo \

    /usr/local/man/man1m /usr/local/man/man4

mkdir /usr/local/man

mkdir /usr/local/man/man1m

mkdir /usr/local/man/man4

for f in ../ChangeLog ../README  ../NEWS ./HISTORY ./CONTRIBUTORS  ./LICENSE ./TROUBLESHOOTING ./UPGRADE  ./sample.*; do /bin/bash ../install-sh -c -O 0 -G 0 -m 0444 $f /usr/local/share/doc/sudo; done

#for f in ../README.LDAP ./schema.*; do /bin/bash ../install-sh -c -O 0 -G 0 -m 0444 $f /usr/local/share/doc/sudo; done

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo.man /usr/local/man/man1m/sudo.1m

ln /usr/local/man/man1m/sudo.1m /usr/local/man/man1m/sudoedit.1m

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudo_plugin.man /usr/local/man/man1m/sudo_plugin.1m

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoreplay.man /usr/local/man/man1m/sudoreplay.1m

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./visudo.man /usr/local/man/man1m/visudo.1m

/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoers.man /usr/local/man/man4/sudoers.4

#/bin/bash ../install-sh -c -O 0 -G 0 -m 0444 ./sudoers.ldap.man /usr/local/man/man4/sudoers.ldap.4

-bash-3.00# which sudo

/usr/local/bin/sudo

-bash-3.00# which visudo

/usr/local/sbin/visudo

-bash-3.00#

Reloading jspx page from a commandLink

Posted by Steve Racanovic | Posted in | Posted on 2:23 PM

0

A simple example to reload a jspx page from a commandLink. [Jdev 11.1.1.4.0]

1. Run testpage.jspx.


2. Click in Reload Page link.





Using '-jarsasdbobjects -prependjarnames' parameters and calling the loaded class from a Java Stored Procedure

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

0

An example using loadjava/dropjava with '-jarsasdbobjects -prependjarnames' parameters and trying to access the class in the jar from a java stored procedure.

[oracle@sracanov-au2 ~]$ cat > HelloWorld1.java
public class HelloWorld1 {
   public static void main(String[] args){
       System.out.println(new HelloWorld1());
   }
   public String toString(){
       return "Hello World 1";
   }
   public static String getHello(){
       return "Hello World 1 !!!";
   }
}
Quit
[oracle@sracanov-au2 ~]$ javac HelloWorld1.java
[oracle@sracanov-au2 ~]$ java HelloWorld1
Hello World 1
[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger -jarsasdbobjects -prependjarnames HelloWorld1.java
[oracle@sracanov-au2 ~]$ cat > java_objects.sql
COL object_name format a30
COL object_type format a15
SELECT object_name, object_type, status FROM user_objects WHERE object_type IN ('JAVA SOURCE', 'JAVA CLASS', 'JAVA RESOURCE') ORDER BY object_type, object_name;
Quit
[oracle@sracanov-au2 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 6 14:38:01 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      INVALID
HelloWorld1                    JAVA SOURCE     INVALID

SQL> CREATE OR REPLACE FUNCTION HW RETURN VARCHAR2 as LANGUAGE JAVA NAME 'HelloWorld1.getHello() return String';

 2  /

Function created.

SQL>  select HW() from dual;

HW()

--------------------------------------------------------------------------------

Hello World 1 !!!

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      VALID
HelloWorld1                    JAVA SOURCE     VALID

SQL> exec dbms_java.dropjava('HelloWorld1');

PL/SQL procedure successfully completed.

SQL> @java_objects.sql

no rows selected

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger HelloWorld1.java
[oracle@sracanov-au2 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 7 13:18:44 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      INVALID
HelloWorld1                    JAVA SOURCE     INVALID

SQL> CREATE OR REPLACE FUNCTION HW RETURN VARCHAR2 as LANGUAGE JAVA NAME 'HelloWorld1.getHello() return String';

 2  /

Function created.

SQL> select HW() from dual;

HW()

--------------------------------------------------------------------------------

Hello World 1 !!!

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      VALID
HelloWorld1                    JAVA SOURCE     VALID

SQL>

[oracle@sracanov-au2 ~]$ mkdir Test
[oracle@sracanov-au2 ~]$ cp HelloWorld1.java HelloWorld2.java
[oracle@sracanov-au2 ~]$ sed -i 's/1/2/g' HelloWorld2.java
[oracle@sracanov-au2 ~]$ sed '1i\package Test;' HelloWorld2.java > Test/HelloWorld2.java
[oracle@sracanov-au2 ~]$ rm HelloWorld2.java
[oracle@sracanov-au2 ~]$ javac -cp .:./Test Test/HelloWorld2.java
[oracle@sracanov-au2 ~]$ java -cp .:./Test Test/HelloWorld2
Hello World 2
[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger -jarsasdbobjects -prependjarnames Test/HelloWorld2.java
[oracle@sracanov-au2 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 7 14:07:30 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> CREATE OR REPLACE FUNCTION HW RETURN VARCHAR2 as LANGUAGE JAVA NAME 'Test.HelloWorld2.getHello() return String';

 2  /

Function created.

SQL> select HW() from dual;

HW2()

--------------------------------------------------------------------------------

Hello World 2 !!!

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      VALID
Test/HelloWorld2               JAVA CLASS      VALID
HelloWorld1                    JAVA SOURCE     VALID
Test/HelloWorld2               JAVA SOURCE     VALID

SQL> exec dbms_java.dropjava('Test/HelloWorld2');

PL/SQL procedure successfully completed.

SQL> @java_objects.sql

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

HelloWorld1                    JAVA CLASS      VALID
HelloWorld1                    JAVA SOURCE     VALID

SQL> exec dbms_java.dropjava('HelloWorld1');

PL/SQL procedure successfully completed.

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@sracanov-au2 ~]$ cat > Manifest.txt
Main-Class: Test.HelloWorld2
Quit
[oracle@sracanov-au2 ~]$ jar cvfm Test.jar Manifest.txt ./Test/*class
adding: META-INF/ (in=0) (out=0) (stored 0%)
adding: META-INF/MANIFEST.MF (in=29) (out=31) (deflated -6%)
adding: Test/HelloWorld2.class (in=594) (out=355) (deflated 40%)
Total:
------
(in = 623) (out = 738) (deflated -18%)
[oracle@sracanov-au2 ~]$ java -jar Test.jar
Hello World 2
[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger Test.jar
[oracle@sracanov-au2 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Thu Sep 8 10:02:16 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @java_objects

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

Test/HelloWorld2               JAVA CLASS      INVALID
META-INF/MANIFEST.MF           JAVA RESOURCE   VALID

SQL> CREATE OR REPLACE FUNCTION HW RETURN VARCHAR2 as LANGUAGE JAVA NAME 'Test/HelloWorld2.getHello() return String';

  2  /

Function created.

SQL> select HW() from dual;

HW()

--------------------------------------------------------------------------------

Hello World 2 !!!

SQL> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@sracanov-au2 ~]$ dropjava -u scott/tiger Test.jar
[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger -jarsasdbobjects -prependjarnames Test.jar
[oracle@sracanov-au2 ~]$ sqlplus scott/tiger

SQL*Plus: Release 11.2.0.2.0 Production on Mon Sep 12 10:33:50 2011

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @java_objects

OBJECT_NAME                    OBJECT_TYPE     STATUS

------------------------------ --------------- -------

Test.jar///Test/HelloWorld2    JAVA CLASS      INVALID
/233d8437_MANIFESTMF           JAVA RESOURCE   VALID

SQL> CREATE OR REPLACE FUNCTION HW RETURN VARCHAR2 as LANGUAGE JAVA NAME 'Test.jar///Test/HelloWorld2.getHello() return String';

  2  /

Function created.

SQL> select HW() from dual;

HW()

--------------------------------------------------------------------------------

Hello World 2 !!!

SQL>


Note: I also used the parameters to load an individual class here which is not necessary. So '-jarsasdbobjects -prependjarnames' or 'loadjava' does not do any parsing on the file type.i.e.

[oracle@sracanov-au2 ~]$ cat > somefile
blah blah
Quit
[oracle@sracanov-au2 ~]$ loadjava -u scott/tiger -jarsasdbobjects -prependjarnames somefile
[oracle@sracanov-au2 ~]$