Thin driver connection in oracle8i(8.1.5) on Linux with JDK1.2.2
JDBC Development team quote:
You can download the JDK 1.2 version of the 8.1.6 Thin driver from this site. It is 100% Pure Java and will run on Linux.
As you replied, I downloaded 8.1.6 Thin driver(classes12.zip) and nls_charset12.zip. Then, as instructed in readme file of 8.1.6, I modified CLASSPATH and add LD_LIBRARY_PATH.
I wrote a test program, and it compiled without errors. But when I excuted it, I got the error message below:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
M=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Is there any other installation procedures I missed?
Below is the test program I used:
import java.sql.*;
import oracle.jdbc.driver.*;
public class Test
public static void main (String args [])throws SQLException
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(ClassNotFoundException e){
System.out.println("Cannot load the Driver");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@host:port:sid","id", "password");
Statement stmt = conn.createStatement ();
ResultSet rset = stmt.executeQuery ("select sysdate from dual");
while (rset.next ())
System.out.println (rset.getString (1));
I'd appreciate if you give me some insight.
null
It seems like the database listener is not setup properly. Please double check the listener is up and it's listening to the port you specified.
Thanks.
Similar Messages
-
Jdbc driver for oracle8i(8.1.5) on Linux with JDK1.2.2
I am looking for a JDBC Driver.
Does anybody know where I can get it?
Thanks in advance.
nullJava Development Quote:
You can download the JDK 1.2 version of the 8.1.6 Thin driver from this site. It is 100% Pure Java and will run on Linux.
As you replied, I downloaded 8.1.6 Thin driver(classes12.zip) and installed it in the Linux server where Oracle 8.1.5 resides at.
I wrote a test program, and it compiled without errors. But when I excuted it, I get the error message below:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
M=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Below is the test program I used:
import java.sql.*;
import oracle.jdbc.driver.*;
public class Test
public static void main (String args [])throws SQLException
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
try{
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(ClassNotFoundException e){
System.out.println("Cannot load the Driver");
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@207.207.148.132:1521:DR_DEV","crunchy", "imcrunchy");
// Create a Statement
Statement stmt = conn.createStatement ();
// Select the ENAME column from the EMP table
ResultSet rset = stmt.executeQuery ("select sysdate from dual");
// Iterate through the result and print the employee names
while (rset.next ())
System.out.println (rset.getString (1));
I'd appreciate if you give me some insight. -
JDBC thin driver connection problems using cybersafe authentication
Hi
i am trying to use jdbc thin driver to connect to oracle 8.1.7 DB using ASO and cybersafe authentication.
Question:
Does the oracle jdbc thin driver in 8.1.7.0.0 support third-party authentication features supported by Oracle Advanced Security--such
as those provided by RADIUS, Kerberos, or SecurID
i am getting the following error.
Exception in thread "main" java.sql.SQLException: invalid arguments in call
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:146)
at ASOJdbc.main(ASOJdbc.java:43)
Following is the program i am trying.
public class ASOJdbc {
public static void main(String args[]) throws SQLException {
String url = "jdbc:oracle:thin:@son1129:1521:sonias";
Connection con;
String query = "select EMPNO, ENAME from EMP";
Statement stmt;
// ASO Stuff
Properties props = new Properties();
try {
props.put("oracle.net.authentication_services", "CYBERSAFE");
props.put("oracle.net.authentication_gssapi_service", "oracle/[email protected]");
props.put("oracle.net.encryption_types_client", "DES");
props.put("oracle.net.encryption_types_server", "DES");
props.put("oracle.net.crypto_seed", "4fhXXXX");
} catch (Exception e) { e.printStackTrace();
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
// ASO
con = DriverManager.getConnection(url, props);
stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
stmt.close();
con.close();
jdk version: jdk 1.3.1
Oracle jdbc driver information, which i obtained as per Note 94091.1
=============
Database Product Name is Oracle
Database Product Version is Oracle8i Enterprise Edition Release 8.1.7.1.1 - Production With the Partitioning option
JServer Release 8.1.7.1.1 - Production
JDBC Driver Name is Oracle JDBC driver
JDBC Driver Version is 8.1.7.0.0
JDBC Driver Major Version is 8
JDBC Driver Minor Version is 11. What JDBC Thin client Driver are you using? (version) If you don't know, open up the Manifest.
2. the JDBC/OCI driver is a thick driver. It uses the oracle client, and therefore should read the tnsnames.ora
3. You have yet to give us any ORA- errors, which would help immensely in troubleshooting. -
Jdbc thin driver connect oracle as internal
I need to connect to Oracle as Internal using jdbc driver, is there a way we can do this using jdbc thin driver. Actually I don't want to pass username and password as it will be harcoded in a properties file.
Please let me know.Hi Minol,
Have a look at this code example that shows how to Connect to Database as internal ( as sysdba ). In this code sample the properties are hard-coded, you can supply these Properties by loading them from a properties file.
Connecting to Oracle Database with DBA privileges
http://myjdbc.tripod.com/basic/codeindex.html
The code snippet to load properties from a properties file
//Import IO related classes
import java.io.IOException;
// Necessary support classes
import java.util.Properties;
import java.util.Enumeration;
import java.util.ResourceBundle;
* This method reads a properties file which is passed as
* the parameter to it and load it into a java Properties
* object and returns it.
* @param file File path
* @return Properties The properties object
* @exception IOException if loading properties file fails
* @since 1.0
public static Properties loadParams(String file)
throws IOException {
// Loads a ResourceBundle and creates Properties from it
Properties prop = new Properties();
ResourceBundle bundle = ResourceBundle.getBundle(file);
// Retrieve the keys and populate the properties object
Enumeration enum = bundle.getKeys();
String key = null;
while (enum.hasMoreElements()) {
key = (String) enum.nextElement();
prop.put(key, bundle.getObject(key));
return prop;
}Regards
Elango. -
Oracle 7 - JDBC Thin driver - connect - compatibility
When logging on to an Oracle server v.7.2.3.0.0 with JDBC-thin
driver (classes111.zip), I get the message:
ORA-01017 invalid username/ password; logon denied
even if the password, username and connection string is correct.
The connection worked OK until some work was performed on the
database and some changes with SQL*Net was done.
I thought the driver worked OK with all versions of SQL*Net
listeners?
The database can be connected to with SQL*Plus.
nullI have the same problem trying to connect to database cache on iAS with iAS.
-
Thin Driver Connection Timeout
I am having some odd problems with the JDBC thin driver (8.1.6). The problem is that when I attempt to make a connection to a server that isn't available or that has bad login information it takes several minutes to time out. I tried using the DriverManager's setLoginTimeout() method but it seems to ignore it.
The problem is that when somebody using my system gets slow response time (when the database is loaded, for example) -- they keep clicking refresh and very quickly my JServ session limit is reached and the web server starts sending HTTP 500s...that's bad mmmkay.
The java.sql docs say that setLoginTimeout is in seconds, I am passing 15 as the value but it clearly is taking at least 5 minutes to time out.
Any thoughts? I am using Sun's 1.2 JDK on Linux (2.2.16 kernel).
slagWould it be appropriate to submit a TAR on this issue? I'm thinking that it would be much easier for someone to just make a post here but I can go the long way ...
slag -
Oracle JDBC Thin-Driver: Connection still valid (db still open)?
Hi,
I've got a problem with my program. The app opens a connection to an Oracle Database usingt the Oracle JDBC Thin.Driver. Everything works just fine but I can't figure out a way how to find out wheter the connection is still valid, e.g. if the database is still open?
connection.isClosed() return always false :(
Any help is appreciated.
Thanks,
SpauldingHi oracle_guru,
unfortunately it's not that easy. :(
You can't just check for
if(conn == null)since the connection won't realize when the db shuts down.
Therefore I created a connection-watcher-thread which uses a prepared statement to check every once in while if the connection is still valid.
Nevertheless, thanks for you reply,
Spaulding -
Problem with thin driver connection from servlet
i'm using a servlet and i'm trying to connect to Oracle using the syntax below. but i get an error.
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@qit-uq-cbiw:1526:orcl", "scott", "tiger");
// @machineName:port:SID, userid, password
the error...
Class oracle.jdbc.driver.OracleDriver not found.
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
^
1 error
i guess the question is, what should be in place of
oracle.jdbc.driver.OracleDriver());Here is what I use:
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.getConnection(url, userName, password);Which would appear to be the same as what you use. So your syntax is probably OK. This driver exists in a file provided by Oracle as classes12.zip or classes12.jar. On a normal Oracle9i install on Windows this is located C:\oracle\ora90\jdbc\lib, where C: is your Oracle installation drive. I would check to be sure that your classpath points to this specific file (not just the directory).
Also, if you are using an OLD version of Oracle, this file could be named classes111.zip or classes111.jar.
Joel -
Oci8,thin driver incompatibility for oracle8.0.3.0.0
we tried to connect using the oci8,thin,oci7
drivers downloaded from ur site. our oracle enterprise edition version is 8.0.3.0.0.
where can we find oci8,thin for the oracle version 8.0.3.0.0.
the error that comes is
java.lang.UnsatisfiedLinkError: no oci733jdbc in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1249)
at java.lang.Runtime.loadLibrary0(Runtime.java:470)
at java.lang.System.loadLibrary(System.java:768)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:93)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at ImageSqlIns.main(ImageSqlIns.java:17)
nullwe tried to connect using the oci8,thin,oci7
drivers downloaded from ur site. our oracle enterprise edition version is 8.0.3.0.0.
where can we find oci8,thin for the oracle version 8.0.3.0.0.
the error that comes is
java.lang.UnsatisfiedLinkError: no oci733jdbc in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1249)
at java.lang.Runtime.loadLibrary0(Runtime.java:470)
at java.lang.System.loadLibrary(System.java:768)
at oracle.jdbc.oci7.OCIDBAccess.logon(OCIDBAccess.java:138)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:93)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:146)
at java.sql.DriverManager.getConnection(DriverManager.java:457)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at ImageSqlIns.main(ImageSqlIns.java:17)
null -
Hi,
I am trying to open a connection from Java using JDK 1.1.6 and the Oracle JDBC Thin drivers. My Oracle drivers register just fine. However, I get an exception which I catch saying "Security.couldn't connect to HOST with origin from." HOST is my local server name where I'm running Oracle 8.0.4.0.0 and OAS 4.0.8. My connection statement in my .java code is:
Connecttion conn =
DriverManager.getConnection("jdbc:oracle:thin@HOST:1521:orcl,"scott","tiger")
I can connect just fine using sqlplus with the scott/tiger@orcl descriptor.
How can I resolve this?<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by JDBC Development Team:
Not sure whether this is the cause of the problem. There should be a ":" before the "@" sign in the connect string. That is,
"jdbc:oracle:thin:@host"
Please do let us know if this doesn't fix the problem
<HR></BLOCKQUOTE>
Thank you for pointing out the missing : before the @ symbol. I made that change. Still, I get the same message when the applet loads in my browser page. If I load the applet in appletviewer then I get the error message "checkconnect.networkhost1". -
ORA-03115 when connect to Oracle8.0.5.1 on Linux
My JDeveloper with JDBC(upgraded today) connects OK to Oracle8
on NT and SUN. But there is error with Oracle8 for Linux.
What's wrong?
nullHi,
You may wish to try high-performance Openlink drivers in order
to provide connectivity to your Linux version of Oracle.
Drivers can be downloaded at http://www.openlinksw.com
-Stephen
Marcus Vogel (guest) wrote:
: Hi,
: I'm always getting an ORA-3115 error when accessing an Oracle
: database (8.0.5.1) on a SuSe 6.1 Linux server via JDBC.
: The connect works fine, but when i do a SELECT it always
brings
: the error ORA-3115 'unsupported network datatype...' or ORA-
3120
: 'two task conversion routine: integer overflow'.
: The same Java Applet with the same JDBC driver works fine with
: Oracle 7.3.4 (on DEC) and with 8.1.5 (on Solaris).
: Anybody got an idea where to look at?
null -
JDBC Thin Driver Won't Honor Autocommit=FALSE
I have the following code, which intializes a JDBC thin driver connection, and sets the autocommit to false. However, as soon as the statement is executed, it commits on its own. What's going wrong here? I can tell that it is committing, because the calendar events all disappear, even if the code is terminated before committing, or in an endless loop.
odsSecondary = new OracleDataSource();
odsSecondary.setDatabaseName("####");
odsSecondary.setDriverType("thin");
odsSecondary.setUser("####");
odsSecondary.setPassword("####");
odsSecondary.setPortNumber(1521);
odsSecondary.setServerName("####");
connectionSecondary = odsSecondary.getConnection();
connectionSecondary.setAutoCommit(false);
Statement stmtSecondary = connectionSecondary.createStatement();
stmtSecondary.executeUpdate("truncate table cal_events");The truncate command always issues a commit. refer to the oracle SQL documentation
-
Which Oracle Thin Driver Classes are used at runtime ?
Hi,
I am using Weblogic 6.1 sp1 on a WIN 2000 Professional Box and am trying to connect
to a Oracle 8.1.7 Database that is located on a Solaris Box. I am using the Oracle
Thin Driver (classes12.zip) supplied by Oracle.
The relevant portion of config.xml looks like this:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="12" LoginDelaySeconds="1" MaxCapacity="24"
Name="xxxConnectionPool" Password="xxxxxxxx"
Properties="user=user123" Targets="xxxserver" URL="jdbc:oracle:thin:@1.2.3.4:1521:xxxx"/>
The start script for the Server includes a CLASSPATH variable that includes both
weblogic.jar and classes12.zip (in that order)
The Database access code is from a singleton that is deployed with the beans and
looks like :
Context ctx = new InitialContext();
Object o = ctx.lookup("resonateDataSource");
dataSource = (DataSource)o;
Connection con = dataSource.getConnection();
PreparedStatement ps = con.prepareStatement(sqlXXX);
The actual subclasses of DataSource, Connection, PreparedStatement that are called
at runtime are from weblogic jDriver classes like weblogic.jdbc.rmi.SerialPreparedStatement,
weblogic.jdbc.rmi.SerialConnection etc and not from oracle thin driver.
Is this expected ? Why arent the corresponding classes from the Oracle Thin Driver
loaded ?
Thanks,
PraveenPraveen wrote:
Hi,
I am using Weblogic 6.1 sp1 on a WIN 2000 Professional Box and am trying to connect
to a Oracle 8.1.7 Database that is located on a Solaris Box. I am using the Oracle
Thin Driver (classes12.zip) supplied by Oracle.
The relevant portion of config.xml looks like this:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="12" LoginDelaySeconds="1" MaxCapacity="24"
Name="xxxConnectionPool" Password="xxxxxxxx"
Properties="user=user123" Targets="xxxserver" URL="jdbc:oracle:thin:@1.2.3.4:1521:xxxx"/>
The start script for the Server includes a CLASSPATH variable that includes both
weblogic.jar and classes12.zip (in that order)Hi. You should have the oracle zip first. This is because our stuff also contains an oracle zip, but
it's
older than the latest, and you want yours to be used. Whatever is first in the classpath is what will
be used.
The Database access code is from a singleton that is deployed with the beans and
looks like :...
The actual subclasses of DataSource, Connection, PreparedStatement that are called
at runtime are from weblogic jDriver classes like weblogic.jdbc.rmi.SerialPreparedStatement,
weblogic.jdbc.rmi.SerialConnection etc and not from oracle thin driver.
Is this expected ? Why arent the corresponding classes from the Oracle Thin Driver
loaded ?Yes it is expected. The oracle classes are loaded, and used under the covers. All access
to JDBC connections and JDBC objects via our pools and DataSources will be via a
wrapper object of ours. This is necessary to allow us to retain control over the pool and
User Transactions. Also, because the DataSource is supposed to work whether from
a serverside class or an external client JVM, there will have to be an intermediary JDBC
object that acts as a proxy from the external client to the real thin driver connection
in the server. One can't ship JDBC connections across the wire as-is.
Thanks,
Praveen -
I download oracle jdbc-thin driver to access oracle database
server,but it doesn't support unicode,why and how to resolve it?
thanks!!
nullActually, the usage of the client-side and of the server-side thin driver is the same: the URL in both cases is specified in the same way.
The only difference is that you do not need to register the server-side Oracle JDBC driver with the Driver manager (though it will be a no-op if you do it).
When you want to run code in the server that executes in a particular session, you will use the server-side (or kprb) driver that gives you the connection associated with your session.
You have to use the server-side thin driver to establish a connection to a different database - something that is not the connection associated with your database
session.
Server-side thin driver connections can be used with JDBC as well as with SQLJ code.
null -
Can Time Machine backup USB Drive connected to Airport Extreme Base Station
I need a new N based wireless router. I would prefer to get just the $179 Base Station and not the $299 Time Capsule. I already have a nice external USB 500GB drive that I would connect to the AEBS. So, once I have this new wireless router/base station installed at home and I have the external USB drive connected to it, can my new Macbook Air with a USB connected 400GB drive be used to backup what is on the Macbook Air and also backup the 500GB USB drive info that is connected to the extreme base station?
Thanks
tjI found this when searching Apple's web site but it is old, October 2007, and said it could not be done. Has this changed since then?
Here is what I found.
Mac OS X 10.5: Time Machine doesn't back up to AirPort Disks
* Last Modified on: October 26, 2007
* Article: 306833
Time Machine in Mac OS X 10.5 Leopard can be used to back up to many kinds of Mac OS Extended-formatted drives, but it does not support AirPort Extreme's AirPort Disk feature.
Time Machine can back up to another Mac running Leopard with Personal File Sharing, or to a Leopard Server volume, or an Xsan storage device.
Maybe you are looking for
-
How to use SEARCH-API provided by portal30 default schema
I want information about the search api provided by the default portal30 schema. How can i use that for my specific requirement. i want to manipulate it's search limits is it possible ??? Can i customize the specification provided in this api
-
Hi There, We are using Jtable to show data using DefaultTableModel. Now we have to implement some hidden columns in this existing JTable. For this we have tried many ways but not succeeded. 1. We have use width=0 and setting header caption ="" but it
-
I want to share a DVD from my IMAC to MACBOOK AIR. any Suggestions
I am trying to share a DVD from my IMAC to my MACBOOK air. Any suggestions?
-
MacBook Pro is slow in loading pages. Lots of spinning beach balls. What to do?
MacBook Prois slow in loading pages from the internet. Lots of spinning beach balls. What should I do?
-
Passing Variable back to batch script
I need to pass the result of a sql script back to the calling batch script. How would I do this? This is what I have tried Batch Script return_code = 'sqlplus loginname/pass@database path/sqlscript.sql' echo $return_code sqlscript Declare v_locked va