Oracle proxy authetication and thin driver
Hello,
I am using 10g, and bea 81 sp3, I am trying to setup proxy authetication. All the references I find for proxy authetication are using OCI driver. Is proxy authetication supported using oracle 10g thin driver (ojdbc14.jar)? Can anyone tell me, what drivers are support proxy authetication under oracle 10g?
Also application servers like bea will not give you oracledata source if you use bea to setup oracle connection pool, is there a easy work around that?
appreciate,
Shailesh
Replace this line:
DriverManager.registerDriver(new racle.jdbc.OracleDriver());with this one:
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Similar Messages
-
Proxy Authetication adn thin driver
Hello,
Can any one provide sample for proxy authetication using oracle 10g thin driver?
All I saw oci samples, and documentation says, thin can also perform proxy authetication...
Thanks in advance,
ShaileshHi,
yes you can use thin friver as well. I am using the 10.1.3 product stack and this works for me.
Frank -
Problem with oracle 9i personal and thin driver
hi all,
this is the code i test the connection of thin driver and oracle 9i personal database.
but i got the error below, could someone tell me where i did wrong.
thank you...
import java.sql.*;
import java.math.*;
import java.io.*;
import java.awt.*;
import oracle.jdbc.driver.*;
class JdbcTest
public static void main(String arg[])
try
// load oracle driver
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
//connect to the local database
Connection connection = DriverManager.getConnection
("jdbc:oracle:thin:@myhost:1521:ORCL","scott","tiger");
Statement statement = connection.createStatement();
ResultSet resultset = statement.executeQuery("SELECT ename FROM emp");
//print the name out
while(resultset.next())
System.out.println(resultset.getString(1));
//close the resultset, statement, and connection
resultset.close();
statement.close();
connection.close();
catch(SQLException sqle)
System.err.println(sqle);
} C:\CODE-JDBC\ORACLE\TEST-CONNECT>java JdbcTest
java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionReplace this line:
DriverManager.registerDriver(new racle.jdbc.OracleDriver());with this one:
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); -
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 -
Oracle 8.1.7 Thin Driver Resultsets
A simple question I hope.
We are using the Oracle 8.1.7 thin driver to connect Weblogic 6.0sp2 to an Oracle
8 db. My question is regarding how the resultset is passed to the server. Is
there cacheing? If so, is the cache recycled..i.e. for a 1000 row set are rows
fed to the server 100 at a time? Or is the entire resultset passed at once.
A general description of this transation or pointers to documentation would be
greatly appreciated. Thanks for your consideration,
JasonJason Carter wrote:
A simple question I hope.
We are using the Oracle 8.1.7 thin driver to connect Weblogic 6.0sp2 to an Oracle
8 db. My question is regarding how the resultset is passed to the server. Is
there cacheing? If so, is the cache recycled..i.e. for a 1000 row set are rows
fed to the server 100 at a time? Or is the entire resultset passed at once.
A general description of this transation or pointers to documentation would be
greatly appreciated. Thanks for your consideration,
JasonHi. This is entirely an oracle DBMS and driver question. From what I can glean from
oracle documentation, there is a settable driver property which sets how many rows
the driver gets in one request. This implies the DBMS and driver will cooperate to
get a given result set in chunks.
Joe -
Hi,
I'm using the build-in Oracle 8.1.6 thin driver that comes with
weblogic.jar of WebLogic 6.0 SP2. It doesn't store CLOBs. Here I have
to use the class weblogic.jdbc.common.OracleClob. Why?
WebLogic 5.1 SP 9 + Oracle 8.1.6 thin driver (external) does. Here I
use the class oracle.sql.CLOB.
Must I use a OCI driver?
Thanks,
JuergenI'd also recommend to switch to 8.1.7 thin driver. It's more stable.
Regards,
Slava Imeshev
"NhaBep" <[email protected]> wrote in message
news:3b71bbcf$[email protected]..
>
You can use thin driver to persist CLOB. One thing you must be sure to setautocommit
to false. Hope this help.
[email protected] (Juergen) wrote:
Hi,
I'm using the build-in Oracle 8.1.6 thin driver that comes with
weblogic.jar of WebLogic 6.0 SP2. It doesn't store CLOBs. Here I have
to use the class weblogic.jdbc.common.OracleClob. Why?
WebLogic 5.1 SP 9 + Oracle 8.1.6 thin driver (external) does. Here I
use the class oracle.sql.CLOB.
Must I use a OCI driver?
Thanks,
Juergen -
Proxy Connection with thin driver
Hello,
I am using 10g, and bea 81 sp3, I am trying to setup proxy authetication. All the references I find for proxy authetication are using OCI driver. Is proxy authetication supported using oracle 10g thin driver (ojdbc14.jar)? Can anyone provide me an example using thin driver?
appreciate any help,
ShaileshSee the following link for documentation on proxy authentication. http://download-uk.oracle.com/docs/cd/B19306_01/java.102/b14355/proxya.htm
Also, the release note for 10gR2 JDBC driver installation includes the following text:
Proxy Authentication
In Oracle 10g R1 we introduced proxy authentication for the
OCI driver. In this release we introduce a common proxy
authentication api that is supported by both the Thin and
OCI drivers. We strongly recommend that you use the common
api instead of the OCI specific api. -
WebLogic 5.1.0 & Oracle 8.1.7 thin driver for jdk 1.3.1
We're currently using Oracle 8.1.6, and need to upgrade to 8.1.7.
Platform: Solaris 2.6
WebLogic: 5.1 Service Pack 9
JDK : 1.3.1
Regarding the thin drivers, my understanding is that w/ 8.1.7, we can use either
8.1.7 OR 9.0.1 thin drivers. Has anyone seen issues using either thin driver
w/ Oracle 8.1.7 and WebLogic?
Thanks in advance!
-Chad BakerRegarding the thin drivers, my understanding is that w/ 8.1.7, we can use either
8.1.7 OR 9.0.1 thin drivers. Has anyone seen issues using either thin driver
w/ Oracle 8.1.7 and WebLogic?Chad,
We've used both thin drivers successfully under WebLogic 5.1, and
have been using the 9.0.1 thin driver under Weblogic 6.1 without any
problems. We moved to the 9.0.1 driver because it's the first driver
version to implement
PreparedStatement.setTimestamp(Timestamp,Calendar).
Recently, we started looking at using JMS and may need to use
distributed
transactions, and we're concerned about transaction support in the
thin
driver. Various WebLogic docs, like
http://e-docs.bea.com/wls/docs61///notes/issues.html#1048698, mention
that 8.1.7 has XA threading issues that cause problems in distributed
transactions. In one place, they mention that they may have a
workaround, but it's unclear what the status of that is. And it looks
like they definitely haven't gotten to testing
the 9.0.1 driver. If you're interested in distributed transactions,
you might want to investigate that first.
Jim -
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 -
Compatability of oracle 8i/9i to thin driver
Hi,
I am new to JDBC. will you please tell me whether Oracle 8i / 9i is compatable to use JDBC thin driver.
If so, what is the SID name i need to give. Let's say i have installed oracle 9i on my machine. and set the class path to "classes12.jar". where i need to create SID name. what SID name i need to give there.
If i am using JDBC 2nd driver :
con = DriverManager.getConnection ("jdbc:oracle:oci8:@orcl", "scott", "tiger");
what i need to give at "oci8" and "orcl".... or these are required to be give as it is..?
though it's a simple question please answer my question.jdbc:oracle:thin:@youmachinename:1521:myDbSID
here after @ mention your database url , 1521 is default port number and after port number mention your SID -
How can I do "2PC" WLS6.0 + oracle 8.1.6 (thin driver )
Access oracle db by sys user and execute initjvm.sql and initxa.sql.
And then grant "select" priviledge on dba_pending_transactions to users that you
want to use to make dbpool.
"jongho cha" <[email protected]> wrote:
>
Hi gurus ^^
I'm trying to do two phase commit with wls6.0 and oracle 8.1.6.
and I used oracle thin driver ( supports jdbc2.0 )
part from my config.xml --
<JDBCTxDataSource EnableTwoPhaseCommit="true"
JNDIName="testTXDataSource" Name="testTXDataSource"
PoolName="testPool" Targets="myserver"/>
<JDBCConnectionPool CapacityIncrement="2"
DriverName="oracle.jdbc.xa.client.OracleXADataSource"
InitialCapacity="1"
LoginDelaySeconds="0"
MaxCapacity="10"
Name="testPool" Properties="user=uskeic;password=dba;url=jdbc:oracle:thin:@remote_oracle_db_ip:1521:dbname;dataSourceName=testPool"
ShrinkPeriodMinutes="15" ShrinkingEnabled="false"
Targets="myserver" TestConnectionsOnReserve="true"
TestTableName="dual" URL="jdbc:oracle:thin:@remote_oracle_db_ip:1521:dbname"/>
is it right configuration ?
basically , it looks like there's no problem when the WLS starts.
but if I get Conncetion from txDatasource and createStatement from the
connection
, I got some Exception
it tells like ..
java.sql.SQLException: ORA-06550: column 1, row14:PLS-00201: 'JAVA_XA.XA_START'
specifier must be defined
ORA-06550: column 1, row8:PL/SQL: Statement ignored
and blah blah blah...
my code starts here ,,
Connection con = null ;
XAConnection xaCon = null ;
Statement stmt = null ;
UserTransaction tx = (UserTransaction)ctx.lookup("javax.transaction.UserTransaction");
tx.begin();
Context jndiContext = JNDIService.getInitialContext();
XADataSource xaDataSource = (XADataSource)jndiContext.lookup( txDataSourceName
xaCon = xaDataSource .getXAConnection();
con = xaCon.getConnection(); // OK so far
stmt = con.createStatement() ; // Error HERE !!!
// ..... and do another DB works for testing 2PC
tx.commit();
you know, it's not a complete code . actually , it's like a psuedo code
but the way of getting connection and create statement follows my entire
code.
Can any one help me ? ^^;
Thanks in advance . -
Oracle server side jdbc thin driver throws ORA-01017
We upgraded our database to 11.2.0.1 from 9.2.0.6.
When we try to connect to an external database from Oracle JVM using server side jdbc thin driver, it throws invalid user id/password error.
The below test code simulates the issue and is not working on the upgraded instance. The same code is working in fine in other 11.2.0.1 instances. It worked fine before upgrade. In all cases, we are connecting to the same target database instance which is also in 11.2.0.1. It fails only on this database.
SEC_CASE_SENSITIVE_LOGON is set to false.
Any inputs will be highly appreciated.
Code:_
create or replace and compile java source named TestConn as
import java.sql.SQLException;
import oracle.jdbc.OracleDriver;
import oracle.jdbc.OracleConnection;
import java.sql.DriverManager;
public class TestConn {
public static String runTest() {
String msg = "Start";
OracleConnection tempOC = null;
try {
String pUrl = "jdbc:oracle:thin:@dev:1521:dev";
String pUser = "tst_user";
String pPwd = "dummy";
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
tempOC = (OracleConnection)DriverManager.getConnection(pUrl, pUser, pPwd);
msg = "Success";
} catch (SQLException sqle) {
System.out.println(sqle.toString());
sqle.printStackTrace();
msg = "Failure";
return msg;
CREATE OR REPLACE FUNCTION test_conn RETURN VARCHAR2
AS LANGUAGE JAVA
NAME 'TestConn.runTest() return java.lang.String';
set serverout on
declare
c varchar2(4000);
begin
dbms_java.set_output(5000);
c:=test_conn();
dbms_output.put_line(c);
end;
/ Error Message_
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:388)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:381)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:564)
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:431)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:366)
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:359)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
at java.sql.DriverManager.getConnection(DriverManager.java)
at java.sql.DriverManager.getConnection(DriverManager.java)
at TestConn.runTest(TESTCONN:22) Edited by: sskumar on Mar 6, 2011 1:12 PMAt the time our issue was resolved, the bug was not published. And, I was told, there was no information in metalink about the isue. I am not sure whether they published some thing in the last few weeks.
This is what resolved our issue.
Step 1: alter system set java_jit_enabled=FALSE;
Step 2: Try your test case. If it is the same issue as ours, your test case will be successful. If it succeeds, Go to step 3. If it does not succeed, it is a different issue.
Step 3: alter system set java_jit_enabled=TRUE;
Step 4: Run your test case. If it is the same issue, it is expected to fail. Go to Step 5 in case of failure.
Step 5: Delete all rows from table java$mc$
Step 6: Restart the database
Step 7: Run your test case. It is expected to be successful. -
Oracle Proxy Authentication and WLS 8.1/CMP
Hey folks,
Is there any way to configure WLS 8.1 to automatically set the Oracle CLIENT_IDENTIFIER
variable or use Oracle Proxy Authentication on JDBC connections? I'm interested
in using Oracle auditing with my CMP entity beans, but would like to capture the
app tier user identity, instead of the data source pool user.
Thanks."Brent Smith" <[email protected]> wrote in message
news:3fa15807$[email protected]..
>
Hey folks,
Is there any way to configure WLS 8.1 to automatically set the OracleCLIENT_IDENTIFIER
variable or use Oracle Proxy Authentication on JDBC connections? I'minterested
in using Oracle auditing with my CMP entity beans, but would like tocapture the
app tier user identity, instead of the data source pool user.
I would ask in the weblogic.developer.interest.jdbc newsgroup. -
Oracle 817 client and MS driver for oracle
Hello
I had installed oracle 8.17 client on my machine.
Suddenly, my datasource with "MS driver for oracle" seems not to be working.
I uninstalled 8.17 and installed 8.16.
No matter, what I do, I cannot get the datasource setup with "MS driver for oracle" work
Anyone has similar experience
-AswathWhat error message are you seeing? I've never seen any conflict between the Oracle and Microsoft drivers.
You could try downloading the latest version of the MDAC (Microsoft Data Access Components) from Microsoft <http://www.microsoft.com/data>. That will have the latest version of the Microsoft driver.
I'm assuming that you have already tried deleting and re-creating your DSN. If you haven't, that would be a good first step.
Justin -
Oracle 8.1.6 Thin Driver with Multiple Result Sets
We're using Oracle 8.1.6 on NT using the latest driver release.
Java 1.2.2
We're experiencing problems with resultSet.next when we have multiple result sets open. What appears to be happening when you've read the last result set entry do a .next() call which should result in a false value we actually get java.sql.SQLException: ORA-01002: fetch out of sequence.
This seems to us that the driver is trying to go beyond the end of the result set.
We've checked JDBC standards (and examples on this site) and the code we've got is compliant. We've also found that the code produces the correct results under Oracle 7.3.4 and 8.0.4.
I can also say that there is no other activity on the db, so there are no issues such as roll back segments coming into play.
Any solutions, help, advice etc would be gratefully appreciated!
nullPhil,
By "multiple result sets open", do you mean you are using REF Cursors, or do you have multiple statements opened, each with its own ResultSet? If you could post an example showing what the problem is, that would be very helpful.
You don't happen to have 'for update' clause in your SQL statement, do you?
Thanks
Maybe you are looking for
-
Since installing 10.6 on my wifes MacBook Pro I can no longer see the printers over the network. MBP is connected via airport to an Airport Extreme which is connected to my G5 via ethernet cables. 2 ethernet printers (Konica Minolta 9100 & 7300) conn
-
Planning in distributed environment
Would like to know with following environment how planning works... Lets say Shared services and Essbase are installed in Machine 1. These 2 are commonly used for multiple planning instances Planning instance 1 is in Machine 2 with locale US Planning
-
Parse xml in inputstreamobject and decode base64
Hello I have got a http-package with content-type text/xml, from a HttpURLConnection object. From the HttpURLConnection object i get an InputStreamObject. Now i'm looking for the easiest to parse the xml, that is in the Inputstream object. The xml ju
-
Limiting the file size on Export Action
Hi, Is there an easy way of limiting the file sizes created by the Export action by simpoly stating the limit, for example 5MB? Thanks, Ronen
-
Upgrading SSL Service Module in Cat6500
Hi, I'm trying to upgrade a SSL Service Module in one of our 6500. Following the guide at http://www.cisco.com/en/US/products/hw/switches/ps708/products_configuration_guide_chapter09186a00805e34ed.html After booting on the maintenance partition and t