Oracle jdbc driver with debug capability
I have been using MagicDraw UML to reverse engineer DDL and UML classes from Oracle databases. I recently loaded some public domain hydrology data using FEM, a geophysical data translation tool. After doing this, I get:
Parsing failed (Oracle - sample) ORA-00942: table or view does not exist
registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@331fd8]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@93068a]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@f18070]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@17b9223]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@107eafc]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@f2a824]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@53d29b]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@27d525]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@15d84e0]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@792357]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@1f92ac0]
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@517dc]
Oracle Jdbc tracing is not avaliable in a non-debug zip/jar file
SQLException: SQLState(42000) vendor code(942)
MagicDraw support has suggested that I use jar or zip that provides debug capability. Where can I find such a driver?
In the Downloads section, there are the regular JDBC drivers (i.e. ojdbc14.zip) and the debug JDBC drivers (i.e. ojdbc14_g.zip).
Justin
Distributed Database Consulting, Inc.
www.ddbcinc.com/askDDBC
Similar Messages
-
COnfiguring oracle JDBC Driver with Web Sphere
I have oracle 7.3.4(on Solaris) and IBM Web Sphere standard
Edition 2.03 (on NT) I want connect to Oracle ina Servlet. Can
any one help in configuring Oracle JDBC driver in Web
Sphere?
Thanks very much
Tom
nullI have oracle 7.3.4(on Solaris) and IBM Web Sphere standard
Edition 2.03 (on NT) I want connect to Oracle ina Servlet. Can
any one help in configuring Oracle JDBC driver in Web
Sphere?
Thanks very much
Tom
null -
Use of oracle.jdbc.driver now deprecated.
Hi all,
Just thought of sharing this note with us.,(if its new ..)
http://otn.oracle.com/docs/products/oracle9i/doc_library/901_doc/java.901/a90211/overvw.htm#1008871
Extract ...,
Beginning in Oracle9i, the Oracle extensions to JDBC are captured in the package oracle.jdbc. This package contains classes and interfaces that specify the
Oracle extensions in a manner similar to the way the classes and interfaces in java.sql specify the public JDBC API.
Your code should use the package oracle.jdbc instead of the package oracle.jdbc.driver used in earlier versions of Oracle. Use of the package
oracle.jdbc.driver is now deprecated, but will continue to be supported for backwards compatibility.
All that is required to covert your code is to replace "oracle.jdbc.driver" with "oracle.jdbc" in the source and recompile. This cannot be done piece-wise.
You must convert all classes and interfaces that are referenced by an application. Conversion is not required, but is highly recommended. Future releases of Oracle
may have features that are incompatible with use of the package oracle.jdbc.driver.
The purpose of this change is to enable the Oracle JDBC drivers to have multiple implementations. In all releases up to and including Oracle9i, all of the Oracle
JDBC drivers have used the same top level implementation classes, the classes in the package oracle.jdbc.driver. By converting your code to use
oracle.jdbc, you will be able to take advantage of future enhancements that use different implementation classes. There are no such enhancements in Oracle9i, but
there are plans for such enhancements in the future.
Regards
Elango.The two main things that would have to change
- driver : com.microsoft.sqlserver.jdbc.SQLServerDriver
- url: jdbc:microsoft:sqlserver://localhost:1433
It may be that this page will help you
http://msdn.microsoft.com/data/learning/jdbc/
You also need to make sure that the files Msbase.jar , Msutil.jar and Mssqlserver.jar are all available in the "classpath"
For a web app, that means these files should be in the WEB-INF/lib directory.
Good luck,
evnafets -
Oracle JDBC driver and CF MX 7 Standard edition
hi, guys.
is it possible to use Oracle JDBC driver with CF MX 7
Standard edition?
all our CF servers are Enterprise edition so we never ran
into any
problems connecting to Oracle servers.
however, there will be a couple of new CF servers with
relatively
simple jobs running and we're trying to determine if we can
use the
Standard edition instead.
I'd like to test this on my own, but CF MX 7 Standard edition
is not
available as a trial download.
if there's someone who's done this already, I'd love to hear
from
you.
can anyone shed a little light on this?
thank you very much!
JFor the date/timestamp issue, you might check thread
Oracle
Date/Timestamp issue or
CFMX
and Oracle 10G JDBC no longer retrieves timestamp with date
Phil -
Adding Oracle JDBC driver to Analyzer 6.5
Hi all,We're currently trying to establish an Oracle Relational Database connection from Analyzer 6.5 (running on DB2 as repository). Unfortunately Analyzer 6.5 did not include Oracle JDBC driver with the installation (it claims it did in the docs). Does anyone know how to add the Oracle JDBC driver (classes12.zip) to Analyzer 6.5 existing installation?ThanksGerd
Never mind. I found out the solution. Turns out that we had to rename classes12.zip to classes12.jar and add it to classpath and copy it to appserver/webapps/Analyzer6_server/WEB-INF/lib.I guess this applies to all JDBC drivers.
-
In Trouble with the Oracle JDBC Driver version - 10.1.0.5.0
Hi !
Without any problems i'm using the Oracle JDBC Driver version - 10.1.0.3.0 to access to the
Oracle database (Oracle Database 10g Release 10.2.0.1.0 - 64bit Production).
But exchanging the JDBC Driver 10.1.0.3.0 to 10.1.0.5.0 brings up the following problem:
the statement
con.prepareStatement(sql, resultSetType, resultSetConcurrency, resultSetHoldability)
(with parameters resultSetType = 1003, resultSetConcurrency = 1007, resultSetHoldability= 1)
returns null !
while using the Oracle JDBC Driver version - 10.1.0.3.0 the statement (with same parameters)
returns a correct PreparedStatement.
Every hint or idea is welcome.
Best regards,
ClausDuplicate post:
In Trouble with the Oracle JDBC Driver version - 10.1.0.5.0
Claus,
Pardon me if I am stating the obvious, but why don't you use the 10.2 JDBC driver with your 10.2 database? The driver is part of the database distribution. Otherwise, you can download the driver from the OTN Web site.
Good Luck,
Avi. -
Does oracle jdbc driver 9.0.1 work with sdk 1.4?
Hi All Experts...
Does oracle jdbc driver 9.0.1 work with sdk 1.4.1? Ever since i have moved to 1.4 i am having problems. I keep getting the No Suitable Driver error or NoClassDefFoundError. I have everything in the classpath and i have also tried command line but to no avail. The JVM just refuses to pick up the classes12.zip file from the classpath.
The oracle site mentions that the 9.0.1 driver is for jdk 1.2 & 1.3 but it does NOT mention that it is NOT for 1.4.1. The site very explicitly mentions that the 9.2 driver is for 1.4.1. SO i am a little confused.This question may be stupid, but nevertheless,If i have to upgrade my driver from 9.0.1 to 9.2 then does that mean that i have to upgrade my DB as well?
Experts..please help.. THanksThanks a lot, as usual, MOD.
Now only if i can get my JVM to pick up the classes12.zip file from the classpath. I dont know if you read my previous posting today. -
[Oracle JDBC Driver]This driver is locked for use with embedded application
Hi
I installed Sun Java Studio Enterprise 8, and am trying to connect to my Oracle database using the attached tutorial code.
The code compiles fine, but I get the following error whenever I run the file: [Oracle JDBC Driver]This driver is locked for use with embedded application
I don't understand what is happening.
Using the Runtime navigation panel on the upper left of the IDE screen, I can right-click and connect to the database, and navigate database files, using the Oracle JDBC Driver that came with JSE8.
Name: Oracle Driver
Driver: com.sun.sql.jdbc.oracle.OracleDriver
Database URL: jdbc:sun:oracle://JAZZPUP:1521;SID=REPO
If the driver is installed, and can be used to connect to a database by right-clicking on the database definition in the Runtime panel, why can't I connect to it just using java code in the IDE. I would expect both methods to work or to fail, not one of each using the same IDE.
Many thanks and take care,
Shayne
import java.sql.*;
public class CreateCoffees {
public static void main(String args[]) {
//String url = "jdbc:mySubprotocol:myDataSource";
String url = "jdbc:sun:oracle://JAZZPUP:1521;SID=REPO";
Connection con;
String createString;
createString = "create table COFFEES " +
"(COF_NAME VARCHAR(32), " +
"SUP_ID INTEGER, " +
"PRICE FLOAT, " +
"SALES INTEGER, " +
"TOTAL INTEGER)";
Statement stmt;
try {
//Class.forName("myDriver.ClassName");
Class.forName("com.sun.sql.jdbc.oracle.OracleDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
//con = DriverManager.getConnection(url, "myLogin", "myPassword");
con = DriverManager.getConnection(url, "login", "password");
stmt = con.createStatement();
stmt.executeUpdate(createString);
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
} //end class CreateCoffees
---There are two similar threads:
http://swforum.sun.com/jive/thread.jspa?threadID=61327&tstart=0
http://swforum.sun.com/jive/thread.jspa?threadID=51057&messageID=188210
To summarize - the DataDirectDriver that is shipped with the IDE seems to be locked to be used inside the IDE only because of some licensing issues etc..
That's weird, I agree. I will raise a question on reasons for such a behavior.
The solution would be to use Oracle's own driver, that is distributed at no charge from their web site - http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
HTH,
Kirill -
Which Oracle JDBC Driver to use with WSAD 5.1.2?
Hi,
I will appreciate if someone could help me with:
1) Whether I should select "Oracle JDBC Driver" or "Oracle JDBC Driver (XA)" as the JDBC Provider Type. The rest in the list (Thin & oci8 ) are deprecated.
2) When I go to create a datasource, for either of the above JDBC provider type, I get the options:
- User defined JDBC provider
- Oracle JDBC provider
- Oracle JDBC Thin Driver
- Oracle JDBC oci8 Driver
Why do I have the Thin and Oci8 option here, when those were shown as deprecated under JDBC Provider Type?
Please help to clear up this confusion.
-NimmiThis is what I did for my DS settings
1. select Oracle JDBC Driver
2. set Classes12.jar in Websphre classpath - (Oracle thin driver)
3. create DS with option User defined JDBC provider
means I have added Thin driver provided by Oracle , instead of deprecated Thin driver from IBM. -
CLassCastException with oracle.jdbc.driver.OracleCallableStatement
Hello,
I get a ClassCastException when I try to execute a Stored Procedure with WL6.1
and the JDriver.
I have a servlet who intanciate a Bean and call to his execute() method in this
way:
Context ctx = null;
Hashtable ht = new Hashtable();
Connection conn = null;
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(connPool);
conn = ds.getConnection();
conn.setAutoCommit(true);
SvcEmpEstObt empEstObt = new SvcEmpEstObt();
empEstObt.setMaxRows(100);
empEstObt.setConnection(conn);
//Get parameters from Http Get and set the JB
empEstObt.setEmpRut(request.getParameter("rut"));
empEstObt.setEmpTimeStamp(request.getParameter("timestamp"));
//Execute Service
empEstObt.execute();
/* ********* the execute() method of the jb is listed here */
public int execute() throws ClassNotFoundException, SQLException{
intreturnedRows = 0;
try {if (connection == null){
try {Class.forName(driver);
} catch (ClassNotFoundException e) {
System.err.println("ClassNotFoundException: " + e);
throw e;
connection = DriverManager.getConnection(url, user, password);
row = -1;
srv_message = String.valueOf(maxRows);
String sp = "{call SvcEmpEstObt_Pkg.SvcEmpEstObt(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}";
oracle.jdbc.driver.OracleCallableStatement procout = (oracle.jdbc.driver.OracleCallableStatement)
connection.prepareCall(sp); // The exception is here
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType, elemMaxLen);
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType, elemMaxLen);
// execute the call
procout.execute();
sqlWarning = procout.getWarnings();
srv_message = procout.getString(1);
returnStatus = new Integer(srv_message.substring(0,1)).intValue();
dagMessage = new DagMessage();
dagMessage.oracleMessage(srv_message);
// access the value using JDBC default mapping
empEstTitulo = procout.getString(4);
empEstUniv = procout.getString(5);
empEstNivel = procout.getInt(6);
curCodigo = (BigDecimal[]) procout.getPlsqlIndexTable(7);
curNombre = (String[]) procout.getPlsqlIndexTable(8);
curFecha = (String[]) procout.getPlsqlIndexTable(9);
curDuracion = (BigDecimal[]) procout.getPlsqlIndexTable(10);
// close the statement
procout.close();
if (curCodigo == null) {
return 0;
} else {
return curCodigo.length;
} catch (SQLException e) {
SQLException ex = e;
System.err.println("\n--- SQLException caught ---\n");
while (ex != null) {
System.err.println("Message: " + ex.getMessage ());
System.err.println("SQLState: " + ex.getSQLState ());
System.err.println("ErrorCode: " + ex.getErrorCode ());
ex = ex.getNextException();
System.out.println("");
throw e;
Does Someone has an idea why it happens ?Hans,
Could you give us the whole text of exception?
Regards,
Slava Imeshev
"Hans" <[email protected]> wrote in message
news:[email protected]...
>
It Works! Thanx a lot ....
I was working with a previous version of my App ... I fixed the problemand now
i can Cast to weblogic.jdbc.vendor.oracle.OracleCallableStatement,
But ...
I get the following Exception:
SQL Exception:
registerIndexTableOutParameter is not supported by the
underlying JDBC driver weblogic.jdbc.pool.Connection
What I need to do ?
/* this is what i`m trying to make */
weblogic.jdbc.vendor.oracle.OracleCallableStatement procout =(weblogic.jdbc.vendor.oracle.OracleCallableStatement)
connection.prepareCall(sp);
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType,elemMaxLen);
>
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType,elemMaxLen);
>
>
"Hans" <[email protected]> wrote:
Thanx Slava,
But I have the same problem again...
I replace oracle.jdbc.driver.OracleCallableStatement with
weblogic.jdbc.vendor.oracle.OracleCallableStatement
and I get the same ClassClastException in
weblogic.jdbc.vendor.oracle.OracleCallableStatement procout =
(weblogic.jdbc.vendor.oracle.OracleCallableStatement)
connection.prepareCall(sp);
Any ideas ??
"Slava Imeshev" <[email protected]> wrote:
Hi Hans,
You can not cast returned object to
oracle.jdbc.driver.OracleCallableStatement
when accessing oracle db via connection pool.
It can be casted to weblogic.jdbc.vendor.oracle.OracleCallableStatement.
Here is a list of methods supported by this interface:
void clearParameters() throws java.sql.SQLException;
void registerIndexTableOutParameter(int i, int j, int k, int l) throws
java.sql.SQLException;
void registerOutParameter(int i, int j, int k, int l) throws
java.sql.SQLException;
java.sql.ResultSet getCursor(int i) throws java.sql.SQLException;
java.io.InputStream getAsciiStream(int i) throws
java.sql.SQLException;
java.io.InputStream getBinaryStream(int i) throwsjava.sql.SQLException;
java.io.InputStream getUnicodeStream(int i) throwsjava.sql.SQLException;
>>>
Regards,
Slava Imeshev
"Hans" <[email protected]> wrote in message
news:[email protected]...
Hello,
I get a ClassCastException when I try to execute a Stored Procedurewith
WL6.1
and the JDriver.
I have a servlet who intanciate a Bean and call to his execute()
method
in
this
way:
Context ctx = null;
Hashtable ht = new Hashtable();
Connection conn = null;
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFact
or
y");
try {
ctx = new InitialContext(ht);
javax.sql.DataSource ds = (javax.sql.DataSource)ctx.lookup(connPool);
conn = ds.getConnection();
conn.setAutoCommit(true);
SvcEmpEstObt empEstObt = new SvcEmpEstObt();
empEstObt.setMaxRows(100);
empEstObt.setConnection(conn);
file://Get parameters from Http Get and set the JB
empEstObt.setEmpRut(request.getParameter("rut"));
empEstObt.setEmpTimeStamp(request.getParameter("timestamp"));
file://Execute Service
empEstObt.execute();
/* ********* the execute() method of the jb is listed here */
public int execute() throws ClassNotFoundException, SQLException{
intreturnedRows = 0;
try {if (connection == null){
try {Class.forName(driver);
} catch (ClassNotFoundException e) {
System.err.println("ClassNotFoundException: " + e);
throw e;
connection = DriverManager.getConnection(url, user, password);
row = -1;
srv_message = String.valueOf(maxRows);
String sp = "{call SvcEmpEstObt_Pkg.SvcEmpEstObt(?, ?, ?, ?, ?, ?,?, ?,
oracle.jdbc.driver.OracleCallableStatement procout =(oracle.jdbc.driver.OracleCallableStatement)
connection.prepareCall(sp); // The exception is here
procout.registerOutParameter(1, Types.VARCHAR);
procout.setString(1, srv_message);
procout.setString(2, empRut);
procout.setString(3, empTimeStamp);
procout.registerOutParameter(4, Types.VARCHAR);
procout.registerOutParameter(5, Types.VARCHAR);
procout.registerOutParameter(6, Types.INTEGER);
int elemSqlType = OracleTypes.INTEGER;
int elemMaxLen = 0;
procout.registerIndexTableOutParameter(7, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 30;
// register the OUT parameter
procout.registerIndexTableOutParameter(8, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.VARCHAR;
elemMaxLen = 21;
// register the OUT parameter
procout.registerIndexTableOutParameter(9, maxRows, elemSqlType,elemMaxLen);
elemSqlType = OracleTypes.INTEGER;
elemMaxLen = 0;
// register the OUT parameter
procout.registerIndexTableOutParameter(10, maxRows, elemSqlType,elemMaxLen);
// execute the call
procout.execute();
sqlWarning = procout.getWarnings();
srv_message = procout.getString(1);
returnStatus = new Integer(srv_message.substring(0,1)).intValue();
dagMessage = new DagMessage();
dagMessage.oracleMessage(srv_message);
// access the value using JDBC default mapping
empEstTitulo = procout.getString(4);
empEstUniv = procout.getString(5);
empEstNivel = procout.getInt(6);
curCodigo = (BigDecimal[]) procout.getPlsqlIndexTable(7);
curNombre = (String[]) procout.getPlsqlIndexTable(8);
curFecha = (String[]) procout.getPlsqlIndexTable(9);
curDuracion = (BigDecimal[]) procout.getPlsqlIndexTable(10);
// close the statement
procout.close();
if (curCodigo == null) {
return 0;
} else {
return curCodigo.length;
} catch (SQLException e) {
SQLException ex = e;
System.err.println("\n--- SQLException caught ---\n");
while (ex != null) {
System.err.println("Message: " + ex.getMessage ());
System.err.println("SQLState: " + ex.getSQLState ());
System.err.println("ErrorCode: " + ex.getErrorCode ());
ex = ex.getNextException();
System.out.println("");
throw e;
Does Someone has an idea why it happens ? -
Which oracle jdbc driver to use with jdk1.5.0_12
Hi everyone, which is the correct oracle jdbc driver I need to use if I'm using jdk1.5.0_12 in Netbeans 6, because I've just only found confusing info over the net, could someone plz help me?
And where I need to put my classes.jar file once I download it because the db I'm working with is on a server and I'm using TOAD to work with it.
Thanks for readingthe driver version depends on the database version you're connecting to rather than the Java version you're using (though later drivers have higher requirements for the minimal Java version they will work with).
As to where to put it, anywhere on your application's classpath would work. If you don't know what that is, I refer you to The Java Tutorial and the documentation.
P.S. There's no "classes.jar". The actual filenames (more than one possibly depending on server version and required capabilities) depend on the driver version and can be found in the Oracle JDBC documentation for your server version. -
Problem with Oracle jdbc driver and jdk1.4
Hi
I have some java code which uses Oracle jdbc driver.
This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
I have that exception :
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle/jdbc/dbaccess/DBError.check_error(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)
at java/sql/DriverManager.getConnection(DriverManager.java:529)
at java/sql/DriverManager.getConnection(DriverManager.java:179)
at SimpleQuery.<init>(SimpleQuery.java:21)
at SimpleQuery.main(SimpleQuery.java:56)
when I try a getConnection...
I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
Any Idea ?
ThanksHave you tried the drivers shipped with Oracle9i Db R2? they should work against JDK 1.4
Kuassi
Hi
I have some java code which uses Oracle jdbc driver.
This code works with java 1.1.8, 1.2 & 1.3 but not with java 1.4 !
I have that exception :
java.sql.SQLException: The Network Adapter could not establish the connection
at oracle/jdbc/dbaccess/DBError.check_error(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)
at java/sql/DriverManager.getConnection(DriverManager.java:529)
at java/sql/DriverManager.getConnection(DriverManager.java:179)
at SimpleQuery.<init>(SimpleQuery.java:21)
at SimpleQuery.main(SimpleQuery.java:56)
when I try a getConnection...
I've tried all the jdbc drivers provided by Oracle, but it's still the same problem !
Any Idea ?
Thanks -
Not able to work with multiple Databases using oracle.jdbc.driver.OracleDr
Hi all,
I am using the following Oracle Driver in Weblogic 6.1 sp 4
oracle.jdbc.driver.OracleDriver / jdbc:oracle:thin:
Driver. I am not able to select rows from two different table, which resides in two different Databases.
The Exception is :
SQL Exception Connection has already been created in this tx context for pool named CDPool. Illegal attempt to create connection
nother pool: MultiTransactionTest
Start server side stack trace:
java.sql.SQLException: Connection has already been created in this tx context for pool named CDPool. Illegal attempt to create c
on from another pool: MultiTransactionTest
at weblogic.jdbc.jts.Driver.getExistingConnection(Driver.java:288)
at weblogic.jdbc.jts.Driver.connect(Driver.java:123)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:214)
at weblogic.jdbc.common.internal.RmiDataSource_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java: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)
End server side stack trace
Can any one help me to fix this issue?
-Thanks & Regards,
Shamil.SShamil S wrote:
Hi all,
I am using the following Oracle Driver in Weblogic 6.1 sp 4
oracle.jdbc.driver.OracleDriver / jdbc:oracle:thin:
Driver. I am not able to select rows from two different table, which resides in two different Databases.
The Exception is :
SQL Exception Connection has already been created in this tx context for pool named CDPool. Illegal attempt to create connection
nother pool: MultiTransactionTestHi. You can't domultiple DBMSes in one transaction unless you use an XA driver and
an XA transaction. Your workarounds are:
1 - Use an XA driver, datasource, and tx
2 - If you're just reading, you can use non-transactional datasources. Do make sure you
always close your connections...
Joe
>
Start server side stack trace:
java.sql.SQLException: Connection has already been created in this tx context for pool named CDPool. Illegal attempt to create c
on from another pool: MultiTransactionTest
at weblogic.jdbc.jts.Driver.getExistingConnection(Driver.java:288)
at weblogic.jdbc.jts.Driver.connect(Driver.java:123)
at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:214)
at weblogic.jdbc.common.internal.RmiDataSource_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:305)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:93)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java: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)
End server side stack trace
Can any one help me to fix this issue?
-Thanks & Regards,
Shamil.S -
Hi,
I am writing a J2EE application which (in theory, at least)
connects to an Oracle 9i database.
I have written a simple Java test app utilising only the
java.sql package classes (e.g. Connection, ResultSet) to directly
connect to the database. As long as the classes12.zip is in the
CLASSPATH it works fine.
Now I have written an Enterprise application (SessionBean,
Remote and Home interface and Client) which I am attempting to
deploy via deploytool.
If I include just the client jar and EJB jar in the application
it deploys okay but when I run the application (using runclient)
it produces the following error:
java.lang.NoClassDefFoundError: oracle/jdbc/OracleDriver
(It is nested within other error output but that is the core
issue).
However if I try to include the JAR libraries into the app
(classes12.jar and nls_charset.jar from $ORACLE_HOME/jdbc/lib),
then I get the following output from deploytool when I hit the
"deploy" (or "redeploy") button:
Deployment error: invalid entry compressed size
(expected 14411 but got 14580 bytes)
Can someone please tell me what is going on???
How can I deploy the J2EE application including the Oracle
JDBC Driver???
My only other option at the moment is to place all the function-
-ality in the client and not use the J2EE framework.
Any help is greatly appreciated.
Regards,
Ben New
Leftclick Software Development
[email protected]OK Ben,
I admit I'm a bit confused. Let me see if I understand where you're
coming from.
You have written a J2EE application that includes a session bean,
correct? If so, your session bean needs to be deployed to an EJB
container. What container are you using? The Oracle 9i database
has an embedded EJB container which (theoretically) you can use.
However, as far as I know, Oracle recommends you use OC4J as the
EJB container. So again I ask, what EJB container are you using?
If, as you say, you are new to EJB, then I think you should
immediately start working wiht OC4J as your EJB container.
Did you look at the tutorial link I gave in my previous post? It
explains -- step by step -- how to create, deploy and run a J2EE
application using OC4J as the EJB container. It also has links to
introductory material for people without little knowledge of J2EE
and EJB.
I have 9iAS Enterprise Edition and 8.1.7.1.0 database server (and
OC4J) installed on my SUN machine. I cannot find any of the
utilities you mention -- "j2eeadmin","runclient" or "deploytool".
What Oracle software have you installed? What are the versions?
What platform are you using?
A J2EE application (according to the specification from SUN)
consists of modules. A module can either be a client module or an
EJB module. A client module can either be a java application client
or a web-based client (servlet or JSP). A J2EE application usually
contains one client module and one EJB module. A J2EE application
needs to be deployed to a J2EE container.
Hopefully the J2EE picture is becoming clearer. I think you need
to read some introductory material regarding J2EE if you intend
to become proficient at it.
I feel that you are under the impression that a J2EE application
is a glorified JDBC application. It isn't (as far as I'm aware).
Good Luck,
Avi. -
sorry Got the solution...!!!!
Hi
I am trying to connect to oracle database on the server, oracle client installed on working m/c, I have placed classes111.zip (from oracle 8) in jdk1.1.8demojrelibext folder and I have set the classpath to the ext folder. The code
try
Class.forName("oracle.jdbc.driver.OracleDriver");
catch(Exception e)
when I run this code , error as
[[ java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver ]]
Please reply what are settings I should to to load this oracle driver,
Thanks
Mayank
Message was edited by:
user560333I currently have this same problem. How did you solve yours see my post Cant find suitable driver.
Maybe you are looking for
-
How do you determine when to use a LAN or a PUBLIC IP for connections?
I'm using CFStreamCreatePairWithSocketToHost to connect to a server. I have a public IP address of example.dyndns.com which points to my home office router. On my home office router I forward port 1234 to a specific server (192.168.2.55) That specifi
-
Applets on linked page won't open
This is probably a really basic question, but I'm stumped. I have two domains and both have applets. When I use a text hyperlink to go to the other site, the .class files don't seem to be made available. Is that what getAppletContext() .showDocument(
-
Can I batch print PDF files with Adobe Acrobat Reader X
can I batch print PDF files with Adobe Acrobat Reader X? I have tried from Windows Exploer (Windows XP) and it looks like the files are opening but they do not print. Pat
-
Using DW MX 2004 on old computer
Here is the situation: I work on a G4 and have used this version of DreamWeaver 7 MX without issue for 3 years. My G5 is malfunctioning so I fire up my old G4. Unfortunately, when I attempt to use this full educational version, I get a message statin
-
[SOLVED] No sound for optical / spdif output with alsa
When running speaker-test I get no sound from my speakers no matter what options I try in alsamixer. Here is some info: aplay -l **** List of PLAYBACK Hardware Devices **** card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdev