*
The moose likes Linux / UNIX and the fly likes Oracle connection in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Oracle connection in Linux" Watch "Oracle connection in Linux" New topic
Author

Oracle connection in Linux

Amit Mahesh
Greenhorn

Joined: Mar 30, 2011
Posts: 3
Hi,
I am getting error while connecting to Oracle from Websphere Server 6.1 in Linux.
I copied the Oracle client from AIX box and paste it to Linux box.

Error:
The test connection operation failed for data source TEST on server testEntApp_01 at node ws_nodename with the following exception: java.sql.SQLException: java.lang.UnsatisfiedLinkError: ocijdbc10 (/oracle/product/10.2.0/libocijdbc10.so: invalid ELF header

I google to understand what does "invalid ELP header" mean, but didn't find any convincing information.

Any help will be appreciated.

Thanks.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

"Websphere Techie" please see yuor private messages concerning an important administrative matter. Once that is cleared up, we can provide some hints.


JBoss In Action
Amit Mahesh
Greenhorn

Joined: Mar 30, 2011
Posts: 3
Thanks. I did change the name. I am new to the forum and learning things here.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

The issue is that your libocijdbc10.so file is bad. It could be a bitness issue (you are running a 64-bit JVM and the .so is 32-bit). Or it could be that the .so is just corrupt.

If this file is part of the "client for AIX" that you copied, then no wonder it doesn't work. You should instead install the correct version of Oracle for your Linux machine.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15958
    
  19

"ELF" is a file format used for binary executable files in modern-day versions of Linux. ELF files for AIX cannot be expected to run under Linux anymore than Windows DLL files could be. AIX is not Linux, it's Unix, and Unix binary files are rarely that interchangeable even with other flavors of Unix.

Java programs would normally use the Oracle Type 4 JDBC driver. Type 4 drivers are 100% java, and therefore can be copied freely between machines regardless of what OS is in use. However, non-java programs require binary drivers, which cannot be copied freely, since they're not "Write Once/Run Anywhere" like Java is. The Oracle binary utilities such as SQL*PLUS are 100% OS-dependent, and you shouldn't even think about trying to copy them. Use the Oracle installer to install the appropriate client code for the OS that's going to be running it.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle connection in Linux
 
Similar Threads
Help please...
Environment problem: ORA-01722: invalid number
WAS 6.1 Migration from AIX to Linux
connecting Oracle on linux to windows
JNLP jws problem HELP!