Thick Driver Vs Thin Driver
Hello,
Could you please tell me what is the difference between Thin Driver and Thick Driver? Which we should use?
Is Type 1 and Type 2 Driver is Thick Driver? Please mention.
This have any aricle, please give the URL Thank you.
Thank you in Advance
balachandar
Look into this article. There is no such term called thick JDBC driver. But there are 4 types of JDBC drivers, You can google for more infomation.
http://www.stardeveloper.com/articles/display.html?article=2003082701&page=1
Regards
Bahadur Singh
Similar Messages
-
JDBC Thin Driver 8.17 Release 2
Is the Oracle Direct Driver (JDBC Thin Driver 8.17 Release 2) compatible with other oracle versions like 8.15 and 8.16? Is it backward compatible to older releases. I have tried it and it does work, but I want to make sure there are no known problems going backwards because we have several versions in our shop.
Thanks
BrianRong Lu (guest) wrote:
: I am using Oracle JDBC thin driver 8.0.5.0.0 to query Oracle
: 8.0.5 via SQL net. The problem I met is every time I try to
: retrieve data for varchar2 (over 2k), it get truncated and
only
: return the first 2k without throwing any warning or exception.
: I tried getString(), getAsciiStream() and getBinaryStream(),
and
: the results are still the same. The SQL Net works fine, since
it
: successfully returns over 2k varchar2 type data when programing
: with PERL.
check the following oracle jdbc faq link :
http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm
#_36_
null -
where do you load the thin driver in a machine with oracle8 enterprise version and how do you call the driver in the program
You have to download Oracle's JDBC type 4 driver, or thin driver, for your specific machine. After installing it, on the client machine, you can access the API through Java's java.sql package. The documentation that comes with the driver is a great place to start.
I hope this helps you,
Mabel -
My questions are regarding to use weblogic thin driver. The first question is if we need dll=ocijdbc8 in properties in config.xml. It looks to me ocijdbc8 is for thick driver only? The second question is why the server automatically add the "dll=ocijdbc8" into the config.xml after restart the server even I clearly removed it out?? The third question is the thin drive with wls 6.1 sp2 support oracle 9.2???
Many thanks if bea or somebody else could answer my questions quickly!
Thanks,
DanniSpiridonov Michael wrote:
"Mitesh Patel" <[email protected]> wrote in message
news:[email protected]..
2) which version of WLS and SP support oracle 9.2.0.1?WLS 61sp3 and onwards supports 9.2.0.1.
What I am trying to say here is that we started bundaling 920 jDriver
from 610sp3. However, default driver is changed from 817 to 920 from
610sp4 and 70sp2 and onwards.
Thanks,
Mitesh
>
>
Are you sure? Here is result of
<code>databaseMetaData.getDriverName()</code> and
<code>databaseMetaData.getDriverVersion()</code> for SP3:
Driver Name - Oracle JDBC driver
Driver Version - 8.1.7.0.0
and here is for SP4 and onwards:
Driver Name - Oracle JDBC driver
Driver Version - 9.2.0.1.0
Thanks,
Mitesh -
Exception with WLS 6.1.3 & Oracle 9.2 thin driver
I'm testing out an upgrade from the Oracle thin driver that ships with WLS
6.1
to the Oracle 9.2 thin driver. My database server is running Oracle 8.1.7.
The only configuration change I made was to put the 9.2 classes12.zip at the
beginning of ths classpath. The line of my code where the exception is
being
throw is the first attempt at performing a resultSet.getLong() call. Has
anyone
gotten this combination to work yet? Any ideas on the error? I'd really
like to test out the native LOB support in the new drivers.
TIA - Gordon
<Oct 14, 2002 2:59:02 PM EDT> <Error> <Audit> <- Login failed because
loginName:
buyerOrgAdmin1034621942027 was not found.
com.eoriginal.engine.core.session.bas
icAccess.OrgUserDataAccessSessionBean_rngrwj_Impl::findUserAccountInfo,
java.lan
g.ArrayIndexOutOfBoundsException
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3181)
at oracle.sql.LnxLibThin.lnxsni(LnxLibThin.java:6571)
at oracle.sql.NUMBER.toLong(NUMBER.java:373)
at
oracle.jdbc.dbaccess.DBConversion.NumberBytesToLong(DBConversion.java
:2915)
at
oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:
4373)
at
oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.ja
va:529)
at
oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1540)
at weblogic.jdbc.jts.ResultSet.getLong(ResultSet.java:518)
at
weblogic.jdbc.rmi.internal.ResultSetImpl.getLong(ResultSetImpl.java:4
77)
at
weblogic.jdbc.rmi.internal.ResultSetStraightReader.getLong(ResultSetS
traightReader.java:142)
at
weblogic.jdbc.rmi.SerialResultSet.getLong(SerialResultSet.java:450)
at
com.eoriginal.engine.core.session.basicAccess.OrgUserDataAccessSessio
nBean.findUserAccountInfo(OrgUserDataAccessSessionBean.java:1272)
at
com.eoriginal.engine.core.session.basicAccess.OrgUserDataAccessSessio
nBean_rngrwj_EOImpl.findUserAccountInfo(OrgUserDataAccessSessionBean_rngrwj_
EOIm
pl.java:475)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean.valida
teLogin(LoginSessionBean.java:135)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean.valida
teLogin(LoginSessionBean.java:94)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh
EOImpl.validateLogin(LoginSessionBeanmoz7fh_EOImpl.java:37)
at
com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh
EOImplWLSkel.invoke(Unknown Source)
at
weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:274)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
(com.eoriginal.engine.core.session.basicAccess.LoginSessionBean_moz7fh_Impl:
:va
lidateLogin)>Have you tried the thick (oci) driver?
We're looking to upgrade too.
"Richard" <[email protected]> wrote:
>
I try to connect to an Oracle 9.2.0 on Windows XP with the jdbc thin
driver. I
use weblogic server 7.0 SP1 (same problem with weblogic server 7.0.0).
I try direct connection (without pool) or with the weblogic pool, and
I get the
same error :
java.lang.ArrayIndexOutOfBoundsException
at oracle.security.o3logon.C0.r(C0)
at oracle.security.o3logon.C0.l(C0)
at oracle.security.o3logon.C1.c(C1)
at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientH
elper)
at oracle.jdbc.ttc7.O3log.<init>(O3log.java:289)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:246)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:201)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:140)
at weblogic.jdbc.common.internal.ResourceAllocator.makeResources(Resourc
eAllocator.java:931)
at weblogic.jdbc.common.internal.ResourceAllocator.finishInit(ResourceAl
locator.java:457)
at weblogic.jdbc.common.internal.ResourceAllocator.<init>(ResourceAlloca
tor.java:316)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:292)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.
java:282)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.j
ava:270)
The same test works well with an Oracle 9.0 !
I have already try with this differents drivers :
8.1.7, 9.0 and 9.2 and I always have the same problem. -
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. -
Error in creating Connection Pool using Oracle Thin Driver
Hi,
I am trying to create a connection pool in WS 5.1 with sp #6 using Oracle Thin Driver (oracle.jdbc.driver.OracleDriver) on a Sun box. But I am able to create the pool using weblogic.jdbc.oci.Driver. I get an DBMS Driver exception when I use thin driver. I have LD library path and weblogic class path set correctly. WL shows the following exception :
weblogic.common.ResourceException: weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
java.sql.SQLException: Io exception: The Network Adapter could not establish the
connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
Any help on this is greatly appreciated.
Thanks,
RamuHi Ramu,
Please post your connection pool setting here. You might have missed some
port/server info. The driver is unable to connect to the db server here.
sree
"Ramu" <[email protected]> wrote in message
news:3d5bbc3a$[email protected]..
>
Yes. I am trying to create a connection pool in weblogic and I have theweblogic
class path setup correctly. It points to classes111.zip andnls_charset11.zip.
>
-Ramu
"Neo Gigs" <[email protected]> wrote:
Did you setup the JDBC library classpath correctly?
For me, e.g. Oracle 7.3.4, the classpath should be:
export CLASSPATH = /oracle7.3.4/jdbc/lib/classes.zip:%CLASSPATH%
Noted that the JDBC classpath must be the first classpath element in
the export
statement.
Neo -
BLOB insert behavior with thin driver using standard JDBC2.0 and ORACLE-JDBC2.0API
We have a problem with a BLOB insert to an oracle 8.1.7 DB using Oracle 8.1.7 JDBC thin driver.We get socket read/write error after inserting 32k of data using the standard JDBC2.0 API but using the Oracle JDBC2.0API (using OracleResultSet) it goes fine. We have a requirement to use the standard JDBC2.0 so that our code works with multiple database vendors. Is there another way to get in the blob data with standard JDBC API & using thin driver...?
thanks,
Madhu
Here is my sample test program that does both standard & oracle specific JDBC Blob test insert.
import java.sql.*;
import java.io.*;
import oracle.sql.BLOB;
import oracle.jdbc.driver.OracleResultSet;
public class testBLOB {
//trying to insert a huge file to a BLOB
static String fileName = "/kernel/genunix";
public static void main(String[] args) {
String driverName = "oracle.jdbc.driver.OracleDriver";
String dbURL = "jdbc:oracle:thin:@localhost:1521:test"; //thin driver
String user = "BlobTest";
String passwd = "BlobTest";
Connection con=null;
try {
Class.forName(driverName);
con=DriverManager.getConnection(dbURL, user,passwd);
catch (Exception e) {
e.printStackTrace();
close(con);
int i = 0;
while (i < args.length) {
if (args.equals("-f"))
fileName = args[++i];
i++;
System.out.println("The file being Stored is: "+fileName);
createTable(con);
insertUsingOracleAPI(con);
insertUsingJDBC20API(con);
//readDB(con);
static String getFileName() {
return fileName;
public static void close(Connection con) {
try {
if (con != null) {
con.close();
catch (Exception e) {
System.exit(-1);
public static void createTable(Connection con) {
Statement stmt ;
try {
stmt = con.createStatement();
stmt.execute("DROP TABLE basic_blob_table");
stmt.close();
catch (SQLException sqlEx) {
System.out.println("Dropped the Table");
try {
stmt = con.createStatement();
stmt.execute("CREATE TABLE basic_blob_table ( x varchar2(30), b blob)");
stmt.close();
catch (SQLException sqlEx) {
sqlEx.printStackTrace();
close(con);
System.out.println("Created the Table");
public static void insertUsingOracleAPI(Connection con) {
OutputStream os = null;
Statement stmt = null;
ResultSet rs = null;
FileInputStream is = null;
try {
con.setAutoCommit(false);
stmt = con.createStatement();
stmt.execute("INSERT INTO basic_blob_table VALUES( 'OracleAPI', empty_blob())");
System.out.println("Inserted the dummy Row");
rs = stmt.executeQuery("Select * from basic_blob_table where x='OracleAPI'");
if (rs != null && rs.next()) {
BLOB blob = ((OracleResultSet)rs).getBLOB(2);
File file = new File(getFileName());
is = new FileInputStream(file);
os = blob.getBinaryOutputStream();
byte[] chunk = new byte[1024];
int length = -1;
while((length = is.read(chunk)) != -1)
os.write(chunk, 0,length);
System.out.println("Inserted the File " + getFileName() );
catch (Exception e) {
e.printStackTrace();
finally {
try {
if (os != null) {
os.flush();
os.close();
if (is != null)
is.close();
stmt.close();
con.commit();
con.setAutoCommit(true);
catch (Exception e) {}
public static void insertUsingJDBC20API(Connection con) {
PreparedStatement stmt = null;
FileInputStream is = null;
try {
stmt = con.prepareStatement("INSERT INTO basic_blob_table VALUES(?,?)");
File file = new File(getFileName());
is = new FileInputStream(file);
stmt.setString(1,"JDBC20API");
stmt.setBinaryStream(2,is,(int)file.length());
stmt.executeUpdate();
catch (Exception e) {
e.printStackTrace();
finally {
try {
if (is != null)
is.close();
stmt.close();
catch (Exception e) {}
nullThanks for the response.
I understand what you are saying...
that readers don't block writers in Oracle (the same is true in SQL Server 2000).
However, I don't see how my test case is working correctly with Oracle (the exact same code acting as I'm thinking it should with SQL Server, but I still think it is acting incorrectly with Oracle).
I have transaction A do this:
update <table> set <column2>=<value> where <column1>='1'
then I use Thread.sleep() to make that program hang around for a few minutes.
Meanwhile I sneak off and start another program which begins transaction B. I have transaction B do this:
select * from <table> where <column1>='1'
and the read works immediately (no blocking... just as you have said) however, transaction A is still sleeping, it has not called commit() or rollback() yet.
So what if transaction A were to call rollback(), the value read by transaction B would be incorrect wouldn't it ?
Both A and B use setAutoCommit(false) to start their transactions, and then call setTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED).
Isn't that supposed to guarantee that a reader can only read what is committed ?
And if a row is in "flux"... in the process of having one or more values changed, then the database cannot say what the value will be ?
I can almost see what you are saying.
In letting the reader have what it wants without making it wait, I suppose it could be said that Oracle is holding true to the "only let committed data be read"
So if that's it, then what if I want the blocking ?
I want an entire row to be locked until whoever it in the middle of updating, adding, or removing it has finished.
Do you know if that can be done with Oracle ? And how ?
Thanks again for helping me. -
8.1.6 thin driver and Netscape plug in 1.2.2
Hi.
I'm trying to use the latest Oracle thin driver in an applet
using Netscapes plug-in 1.2.2.
I am getting the error below when I call
DriverManager.getConnection
The error seems to be a security error.
The code and driver works fine in a standalone application under
JDK 1.2.
The database I am connecting to is the same machine as the web
server and I am not using a firewall so there should be no
security violations. I have tried using both DNS name and IP
address for the target machine but I always get the same error.
Has anyone been able to use the 8.1.6 thin driver in an applet on
Netscape?
Thanks in advance, Sean.
-------Error message ------
java.lang.ExceptionInInitializerError:
java.security.AccessControlException: access denied
(java.util.PropertyPermission JdbcTrace read)
at
java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown
Source)
at java.lang.System.getProperty(Unknown Source)
at
oracle.jdbc.driver.OracleLog.<clinit>(OracleLog.java:604)
at
oracle.jdbc.dbaccess.DBConversion.<init>(DBConversion.java:87)
at
oracle.jdbc.ttc7.TTCConversion.<init>(TTCConversion.java:75)
at
oracle.jdbc.ttc7.TTC7Protocol.connect(TTC7Protocol.java:1126)
at
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:182)
at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:
156)
at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDrive
r.java:231)
at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:208)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at JDBCTest.init(JDBCTest.java:10)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
nullIt appears that your may be turning tracing on which is in turn requiring access to properties on the local file system. Use JDK 1.2.2's policytool to add a policy for either the Codebase, or sign your applet and then by Codebase and Sign By, adding a PropertyPermission, A Target of *, and an Action of read.
-
Memory leak in weblogic 6.0 sp2 oracle 8.1.7 thin driver
Hi,
I have a simple client that opens a database connection, selects from
a table containing five rows of data (with four columns in each row)
and then closes all connections. On running this in a loop, I get the
following error after some time:
<Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
<OutOfMemoryError in
Adapter
java.lang.OutOfMemoryError
<<no stack trace available>>
>
<Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
failed
java.lang.OutOfMemoryError
I am running with a heap size of 64 Mb. The java command that runs
the client is:
java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
-Djava.naming.f
actory.initial=weblogic.jndi.WLInitialContextFactory
-Djava.naming.provider.url=
t3://garlic:7001 -verbose:gc Test
The following is the client code that opens the db connection and does
the select:
import java.util.*;
import java.sql.*;
import javax.naming.*;
import javax.sql.*;
public class Test {
private static final String strQuery = "SELECT * from tblPromotion";
public static void main(String argv[])
throws Exception
String ctxFactory = System.getProperty
("java.naming.factory.initial");
String providerUrl = System.getProperty
("java.naming.provider.url");
Properties jndiEnv = System.getProperties ();
System.out.println ("ctxFactory : " + ctxFactory);
System.out.println ("ProviderURL : " + providerUrl);
Context ctx = new InitialContext (jndiEnv);
for (int i=0; i <1000000; i++)
System.out.println("Running query for the "+i+" time");
Connection con = null;
Statement stmnt = null;
ResultSet rs = null;
try
DataSource ds = (DataSource) ctx.lookup
(System.getProperty("eaMDataStore", "jdbc/eaMarket"));
con = ds.getConnection ();
stmnt = con.createStatement();
rs = stmnt.executeQuery(strQuery);
while (rs.next ())
//System.out.print(".");
//System.out.println(".");
ds = null;
catch (java.sql.SQLException sqle)
System.out.println("SQL Exception : "+sqle.getMessage());
finally
try {
rs.close ();
rs = null;
//System.out.println("closed result set");
} catch (Exception e) {
System.out.println("Exception closing result set");
try {
stmnt.close ();
stmnt = null;
//System.out.println("closed statement");
} catch (Exception e) {
System.out.println("Exception closing result set");
try {
con.close();
con = null;
//System.out.println("closed connection");
} catch (Exception e) {
System.out.println("Exception closing connection");
I am using the Oracle 8.1.7 thin driver. Please let me know if this
memory leak is a known issue or if its something I am doing.
thanks,
rudyRepost in JDBC section ... very serious issue but it may be due to Oracle or
to WL ... does it happen if you test inside WL itself?
How many iterations does it take to blow? How long? Does changing to a
different driver (maybe Cloudscape) have the same result?
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"R.C." <[email protected]> wrote in message
news:[email protected]...
Hi,
I have a simple client that opens a database connection, selects from
a table containing five rows of data (with four columns in each row)
and then closes all connections. On running this in a loop, I get the
following error after some time:
<Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
<OutOfMemoryError in
Adapter
java.lang.OutOfMemoryError
<<no stack trace available>>
>
<Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
failed
java.lang.OutOfMemoryError
I am running with a heap size of 64 Mb. The java command that runs
the client is:
java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
-Djava.naming.f
actory.initial=weblogic.jndi.WLInitialContextFactory
-Djava.naming.provider.url=
t3://garlic:7001 -verbose:gc Test
The following is the client code that opens the db connection and does
the select:
import java.util.*;
import java.sql.*;
import javax.naming.*;
import javax.sql.*;
public class Test {
private static final String strQuery = "SELECT * from tblPromotion";
public static void main(String argv[])
throws Exception
String ctxFactory = System.getProperty
("java.naming.factory.initial");
String providerUrl = System.getProperty
("java.naming.provider.url");
Properties jndiEnv = System.getProperties ();
System.out.println ("ctxFactory : " + ctxFactory);
System.out.println ("ProviderURL : " + providerUrl);
Context ctx = new InitialContext (jndiEnv);
for (int i=0; i <1000000; i++)
System.out.println("Running query for the "+i+" time");
Connection con = null;
Statement stmnt = null;
ResultSet rs = null;
try
DataSource ds = (DataSource) ctx.lookup
(System.getProperty("eaMDataStore", "jdbc/eaMarket"));
con = ds.getConnection ();
stmnt = con.createStatement();
rs = stmnt.executeQuery(strQuery);
while (rs.next ())
//System.out.print(".");
//System.out.println(".");
ds = null;
catch (java.sql.SQLException sqle)
System.out.println("SQL Exception : "+sqle.getMessage());
finally
try {
rs.close ();
rs = null;
//System.out.println("closed result set");
} catch (Exception e) {
System.out.println("Exception closing result set");
try {
stmnt.close ();
stmnt = null;
//System.out.println("closed statement");
} catch (Exception e) {
System.out.println("Exception closing result set");
try {
con.close();
con = null;
//System.out.println("closed connection");
} catch (Exception e) {
System.out.println("Exception closing connection");
I am using the Oracle 8.1.7 thin driver. Please let me know if this
memory leak is a known issue or if its something I am doing.
thanks,
rudy -
Problem w/ 8.1.6 Thin Driver and Oracle 8.0.5
I am attempting to connect to two data hosts.
One is Oracle 8.1.6, the other is Oracle 8.0.5. The DB Admin insists the user name and passwords are the same for both.
I am using the v8.1.6 100% Java thin driver under both JDK v1.2 and v1.3. My OS is Windows2K Professional.
I can always connect to the 8.1.6 database but never to the 8.0.5 database under any circumstances. The error I receive when attempting to connect to the 8.0.5 database is:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=134238208)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
Does any one have some insights here?
My test code fragment is as follows:
try{
Class.forName( "oracle.jdbc.driver.OracleDriver" ).newInstance();
String dbURL = "";
//dbURL = "jdbc:oracle:thin:@host1:1521:data_source_8_1_6";
dbURL = "jdbc:oracle:thin:@host2:1521:data_source_8_0_5";
Connection con = DriverManager.getConnection(dbURL, "test_user", "test_user");
java.sql.Statement stmt = con.createStatement();
String sq1String = "SELECT * FROM DUAL";
java.sql.ResultSet res = stmt.executeQuery(sq1String);
int rows = 0;
while(res.next()) {
rows++;
System.out.println("rows = " + rows);
catch(Exception e) {
System.out.println(e);
nulltnsping is working correctly. We can ping the host and it is listening on port 1521. Likewise, there are other applications inhouse using this datasource.
Since first posting my question, I have also tried running the test program on WinNT. Same problem arises.
Other suggestions? -
I have downloaded oracle 8.1.6.0 jdbc thin driver(named classes12.zip) to run with jdk1.3 to access oracle 8.0.5, but when I compile and run the jdbccheckup.java downloaded from oracle website like this:
javac -classpath d:\jdbc\classes12.zip jdbccheckup.java
(compile succeed)
java -classpath d:\jdbc\classes12.zip jdbccheckup
an error occured:
Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
Why??????Try this isntead.
java -classpath d:\jdbc\classes12.zip;. jdbccheckup
an error occured:
Exception in thread "main" java.lang.NoClassDefFoundError:jdbccheckup
Why?????? -
JDBC thin driver Oracle 8.1.5 on Solaris
I have a problem where a query is running slow when using a JDBC driver but it runs fine when executed through SQL Plus. I've traced the JDBC connection and TKPROF shows that the query plan and says it's taking 3.4 Seconds to run. But, the query is taking more than a minute to run via the JDBC driver. The query joins 4 tables and does do full tablescans. But still executes in 3 or 4 seconds.
Here is where things get strange. If I rebuild a particular index, and do an explain plan or trace the session, it uses the index and runs in .89 seconds. This query normally returns 4 rows or less. None of the columns are Blobs. Any idea why it would run so much slower using a JDBC driver?
nullI have the same problem in my project.
The environment is:
OS: Solaris 8
JDK: 1.2.2
DB: Oracle 8.1.5
JDBC driver: thin(included in Oracle 8.1.5)
The problem was solved when I replaced the JDBC driver with thin
8.1.6 or 8.1.7 (download from otn.oracle.com). There was no
error when I read 10000+ records. -
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.
nullIt 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. -
Error configuring the Oracle 8.1.7 XA Thin driver with WLS 6.1 SP1
I am trying to configure the Oracle 8.1.7.0 thin driver and am getting an SystemException
when the pool tries to test the connection at server startup. It looks like the
start() method is failing. I have put Oracle's Classes12.zip, jndi.zip, and the
jta.zip on the classpath immediately after the weblogic.jar entry. Is this a
classpath issue? Can someone that has this working please help me. Thanks in
advance. Steve
The following is the JDBC Pool entry in the config.xml file:
<JDBCConnectionPool
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="0" LoginDelaySeconds="1" MaxCapacity="20"
Name="oraclePoolSun3500XAThin" Properties="user=sschaber;url=jdbc:oracle:thin:@199.191.94.4:1521:ORCLT;password=sschaber;dataSourceName=oraclePoolSun3500XAThin"
RefreshMinutes="5" ShrinkPeriodMinutes="30"
Targets="memphisserver" TestConnectionsOnRelease="true"
TestConnectionsOnReserve="true" TestTableName="Dual" URL="jdbc:oracle:thin:@199.191.94.4:1521:ORCLT"/>
Also, here is the entire exception being thrown:
<Apr 5, 2002 1:33:08 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin> <javax.transaction.SystemException:
start() failed on resource 'oracle.jdbc.xa.client.Or
acleXAResource' null
at weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo.java:998)
at weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.java:234)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:374)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:915)
at weblogic.common.internal.ResourceAllocator.trigger(ResourceAllocator.java:1114)
at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:65)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Apr 5, 2002 1:33:08 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin> <This
connection will now be refreshed.>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC> <Connection for XA pool "oraclePoolSun3500XAThin"
refreshed.>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin> <A connection
from pool oraclePoolSun3500XAThin was tested during reserve with a select
count(*) from Dual and failed:>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin> <javax.transaction.SystemException:
start() failed on resource 'oracle.jdbc.xa.client.Or
acleXAResource' null at weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo.java:998)
at weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.java:234)
at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:374)
at weblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:915)
at weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.java:465)
at weblogic.common.internal.ResourceAllocator.reserveUnused(ResourceAllocator.java:376)
at weblogic.common.internal.ResourceAllocator.trigger(ResourceAllocator.java:1103)
at weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigger.java:238)
at weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java:229)
at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:65)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin> <This
connection will now be refreshed.>This still does not work for me. I must be missing something here. Any help would
be appreciated.
Thanks,
Steve
"Sree Bodapati" <[email protected]> wrote:
Hi Steve,
I see the initial capacity is set to zero , can you push it up to atleast
few connections and see if it helps, and Let me know.
thanks
sree
"Steve Schaber" <[email protected]> wrote in message
news:[email protected]...
I made sure that we have the latest version of the classes12.zip file(8.1.7).
Also, moved the classes12.zip, jndi.zip, and the jta.zip file beforethe
weblogic.jar
file in the classpath. I am still getting the same error.
Steve
"Sree Bodapati" <[email protected]> wrote:
Put the classes12.zip and other zip files before the weblogic.jar
file
in
the classpath. ensure that you have the latest classes12.zip filefrom
oracle.
sree
"Steve Schaber" <[email protected]> wrote in message
news:[email protected]...
I am trying to configure the Oracle 8.1.7.0 thin driver and am gettingan
SystemException
when the pool tries to test the connection at server startup. It
looks
like the
start() method is failing. I have put Oracle's Classes12.zip,
jndi.zip,
and the
jta.zip on the classpath immediately after the weblogic.jar entry.Is
this a
classpath issue? Can someone that has this working please help
me.
Thanks in
advance. Steve
The following is the JDBC Pool entry in the config.xml file:
<JDBCConnectionPool
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="0" LoginDelaySeconds="1" MaxCapacity="20"
Name="oraclePoolSun3500XAThin"
Properties="user=sschaber;url=jdbc:oracle:thin:@199.191.94.4:1521:ORCLT;pass
word=sschaber;dataSourceName=oraclePoolSun3500XAThin"
RefreshMinutes="5" ShrinkPeriodMinutes="30"
Targets="memphisserver" TestConnectionsOnRelease="true"
TestConnectionsOnReserve="true" TestTableName="Dual"URL="jdbc:oracle:thin:@199.191.94.4:1521:ORCLT"/>
Also, here is the entire exception being thrown:
<Apr 5, 2002 1:33:08 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin><javax.transaction.SystemException:
start() failed on resource 'oracle.jdbc.xa.client.Or
acleXAResource' null
at
weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo..
java:998)
at
weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.j
ava:234)
at
weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTra
nsactionImpl.java:374)
atweblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:915)
at
weblogic.common.internal.ResourceAllocator.trigger(ResourceAllocator.java:11
14)
at
weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
er.java:238)
at
weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
:229)
atweblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:65)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Apr 5, 2002 1:33:08 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin><This
connection will now be refreshed.>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC> <Connection for XA pool"oraclePoolSun3500XAThin"
refreshed.>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin><A
connection
from pool oraclePoolSun3500XAThin was tested during reserve with
a
select
count(*) from Dual and failed:>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin><javax.transaction.SystemException:
start() failed on resource 'oracle.jdbc.xa.client.Or
acleXAResource' null at
weblogic.transaction.internal.ServerResourceInfo.xaStart(ServerResourceInfo..
java:998)
at
weblogic.transaction.internal.ServerResourceInfo.enlist(ServerResourceInfo.j
ava:234)
at
weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTra
nsactionImpl.java:374)
atweblogic.jdbc.common.internal.ConnectionEnv.test(ConnectionEnv.java:915)
at
weblogic.common.internal.ResourceAllocator.reserve(ResourceAllocator.java:46
5)
at
weblogic.common.internal.ResourceAllocator.reserveUnused(ResourceAllocator.j
ava:376)
at
weblogic.common.internal.ResourceAllocator.trigger(ResourceAllocator.java:11
03)
at
weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
er.java:238)
at
weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
:229)
atweblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:65)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
<Apr 5, 2002 1:33:10 PM CST> <Info> <JDBC Pool oraclePoolSun3500XAThin><This
connection will now be refreshed.>
Maybe you are looking for
-
Recording sound from computer?
Ok so I have a file that is .vrf (Ventrilo sound) and Sb doesn't open it. But if i play the sound can Sb record it off the computer (via Stereo Mix)? I know Audacity will record sounds off my computer, but i was wondering if Sb would. and if so how?
-
Help with PDF Printer Driver Issues?
Hi, My pdf printer driver is no longer working - I have CS3. It actually doesn't work in any CS3 program. I have uninstalled and reinstalled the entire suite, and it will just put in a (copy) which also doesn't work. I CAN save as pdf, but I can't pr
-
Best way to see staff transactions?
How can the head of the resource management department check to see how many and what type of transactions his staff has created or modified during a given period of time? Can he create a list of all the users and the transactions they worked on?
-
LMS 4.2 -- Now Available -- Licensing?
Hi all, I just discoverd that Cisco Prime LMS 4.2 is downloadable. Does anybody of you know, whether 4.2 can be installed "over" 4.1 with license of LMS 4.1, or do we have to obtain an new license for LMS 4.1 (as needed for upgrade LMS 4.01 to LMS 4.
-
How to start learning OA Framework?
Hello Please guide me where and how to start learning OA Framework? Please let me know the notes/patch required to install JDeveloper to start learning OAF and Developer guide to learn OAF.. Thanks...