Oracle 9i Driver (classes12.zip) WL 6.1
I have added the classes12.zip into the CLASSPATH of WL and configured the connection pool to point to an Oracle 9i database. WL starts up with no problem, but here's my 2 questions:
1. How can I be sure that WL is really using the Oracle 9i JDBC driver instead of the 8i version (included with WL)? Is there a command that I can type to find out?
2. On some instance of WL, after I point it to an Oracle 9i WL automatically adds dll=ocijdbc9 to the properties text box, but on some WL instance it doesn't add the dll=ocijdbc9 to the properties text box. I am using type 3 driver and not type 2 driver so dll=ocijdbc9 doesn't really matter, just curious on why WL sometime automatically add the dll=ocijdbc9 and sometime it doesn't.
Any inputs from anyone will be greatly appreciated.
Thanks!
Robert
Hi Robert,
weblogic should work with any JDBC 2.0 compatible driver.
Generally certification means that the driver has passed all
weblogic tests and thus officiall support is provided for related
issues. In other words, the fact that driver for 9.2 has not been
certified for weblogic 6.1 doesn't mean that it can not be used
with 6.1.
Regards,
Slava Imeshev
"Robert Simpson" <[email protected]> wrote in message
news:3d949c5a$[email protected]..
Thank you Joe for your response. I really appreciate it! Two morequestions please....
>
I believe WL6.1sp2 is not certified to work with Oracle 9.2 and WL7.0sp1is certified to work with Oracle 9.2, am I right?
>
So the certification is referring to the internal WL type 2 driver(jdriver) and not referring Oracle 9.2 database and if that's the case, we
can still download the classes12.zip (Oracle JDBC driver), but since this is
a 3rd party JDBC driver, WL still do not officially certified it?
>
Bottomline if we want to use Oracle 9.2 we should use WL7.0sp1 since thisis officially certified by BEA. Am I right?
>
Thanks again!
Robert
Similar Messages
-
Oracle Driver classes12.zip oci8 Error
Oracle 9iR2 database.
I use oci8 in a java application.
I get the error: java.lang.UnsatisfiedLinkError: free_c_state at oracle.jdbc.oci8.OCIDBAccess.free_c_state(native method)
I changed the Oracle-Client on the computer where the
application is running. (from R1 to R2).
Since this time the error occurs.
Any idea?
Thanks in advance
peter eisertThank you for your promptly response.
----I have checked my oracle client computer once again:
LD_LIBRARY_PATH: /opt/oracle/product/901/lib
----In Java program:
DRIVER: oracle.jdbc.driver.OracleDriver
URL: jdbc:oracle:oci8:@fizt_zille.local
----and I get the following error messages, different than before. Do you have any new idea ?
java.lang.NoSuchFieldError: OCIEnvHandle
at oracle.jdbc.oci8.OCIDBAccess.make_c_state (Native Method)
at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:309)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:307)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:442)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:321)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177) -
Help!: JDBC driver classes12.zip
I use Oracle8i v. 8.1.6 release 2 under Linux platform (RH 7).
I found out that there's no 'classes12.zip' file (the JDBC Driver supports JDK1.2) in my $ORACLE_HOME/jdbc/lib. It only got:
classes111.zip
classes111_g.zip
jndi.zip
jta.zip
nls_charset11.zip
What should I do?
Is there any download/cure for this?
Thank you.Hi,
download at http://otn.oracle.com/software -
Java.lang.OutOfMemoryError using JDBC thin driver (classes12.zip)
I am facing a strange situation trying to reading an Oracle User Defined Type.
First I have defined the following UDT:
TYPE FILE_COMP AS OBJECT
NOME_FILE VARCHAR2(1024)
, FLAG_COMPRESS CHAR(1)
Then I wrote a Java class that implements the CustomDatum, CustomDatumFactory interfaces in order to read FILE_COMP columns from the database.
When I try to read data from the table I get the following error:
Exception occurred during event dispatching:
java.lang.OutOfMemoryError:
at oracle.jdbc.oracore.UnpickleContext.read_bytes(UnpickleContext.java:72)
at oracle.jdbc.oracore.UnpickleContext.apply_patches_per_type(UnpickleContext.java:159)
at oracle.jdbc.oracore.UnpickleContext.apply_patches(UnpickleContext.java, Compiled Code)
at oracle.jdbc.oracore.OracleTypeADT.unpickle(OracleTypeADT.java:728)
at oracle.jdbc.oracore.OracleTypeADT.unpickle(OracleTypeADT.java:684)
at oracle.jdbc.oracore.OracleTypeADT.unlinearize(OracleTypeADT.java:665)
at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:275)
at oracle.sql.STRUCT.getOracleAttributes(STRUCT.java:250)
at oracle.jpub.runtime.MutableStruct.getLazyDatums(MutableStruct.java, Compiled Code)
at oracle.jpub.runtime.MutableStruct.getAttribute(MutableStruct.java:76)
at sctra.ValConfig.FileCompDatum.getNomeFile(FileCompDatum.java)
at sctra.ValConfig.FileCompRenderer.getTableCellRendererComponent(FileCompRenderer.java, Compiled Code)
at javax.swing.JTable.prepareRenderer(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paintRow(Unknown Source)
at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)
at javax.swing.plaf.ComponentUI.update(Unknown Source)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source) ...
The strange thing is that all works fine if I run the same code against the test database (I have two databases, one for tests and one for operations).
The two databases are identical (same version, same content).
The only difference is that the operation database is 64 bit.sounds like you have a memory leak
i doubt MySQL has anything to do with it
make sure you are releasing database and other
resources properly?
if that's not the case, maybe you are literally
piling up too many records in memory? how many
records are you dealing with?Hi,
thanks for your answer. At this moment I found my (dumb ;-) mistake.
I tried to release database resources properly but it did not work because of a NullPointerException.
Regards
Hendrik -
ORA01002 with Oracle thin driver - not with JDriver
Hi,
I use weblogic 5.1 SP10. I was using the weblogic JDriver to create a connection
pool for my entity beans with BMP. I switched from the weblogic Jdrivers to using
the Oracle thin driver (classes12.zip) for my connection pool. Now i get a ORA-01002
(fetch out of sequence) for my ORACLE 8.1.6 SELECT FOR UPDATEs. I can solve this
by - explicitly setting autocommit to false for the connection. This is within
in the EJB transaction.
Why I have to do this with the Oracle thin driver and not with the Weblogic JDriver
Any thoughts on this are appreciated !From this I assume that you know what you are doing but I have to ask, are you
using the TxDataSource to obtain the connection in your BMP entity beans? If
so, I would talk to support...
Anand wrote:
Hi Robert,
I am using the TxDataSource in the workout.properties file.
eg:
weblogic.jdbc.TXDataSource.MyDBPool =MyDBPool
The connection pool is defined as below:
weblogic.jdbc.connectionPool.MyDBPool =\
driver=oracle.jdbc.driver.OracleDriver,\
url=jdbc:oracle:thin:@localhost:1521:MyDb,\
loginDelaySecs=1,\
initialCapacity=10,\
maxCapacity=20,\
capacityIncrement=2,\
allowShrinking=true,\
shrinkPeriodMins=15,\
refreshMinutes=10,testTable=dual,\
props=user=admin;password=password
Robert Patrick <[email protected]> wrote:
How are you obtaining the connection from the pool? Make sure you are
using a
TxDataSource...
Anand wrote:
Hi,
I use weblogic 5.1 SP10. I was using the weblogic JDriver to createa connection
pool for my entity beans with BMP. I switched from the weblogic Jdriversto using
the Oracle thin driver (classes12.zip) for my connection pool. Nowi get a ORA-01002
(fetch out of sequence) for my ORACLE 8.1.6 SELECT FOR UPDATEs. I cansolve this
by - explicitly setting autocommit to false for the connection. Thisis within
in the EJB transaction.
Why I have to do this with the Oracle thin driver and not with theWeblogic JDriver
Any thoughts on this are appreciated ! -
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.
-
Which Oracle Thin Driver Classes are used at runtime ?
Hi,
I am using Weblogic 6.1 sp1 on a WIN 2000 Professional Box and am trying to connect
to a Oracle 8.1.7 Database that is located on a Solaris Box. I am using the Oracle
Thin Driver (classes12.zip) supplied by Oracle.
The relevant portion of config.xml looks like this:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="12" LoginDelaySeconds="1" MaxCapacity="24"
Name="xxxConnectionPool" Password="xxxxxxxx"
Properties="user=user123" Targets="xxxserver" URL="jdbc:oracle:thin:@1.2.3.4:1521:xxxx"/>
The start script for the Server includes a CLASSPATH variable that includes both
weblogic.jar and classes12.zip (in that order)
The Database access code is from a singleton that is deployed with the beans and
looks like :
Context ctx = new InitialContext();
Object o = ctx.lookup("resonateDataSource");
dataSource = (DataSource)o;
Connection con = dataSource.getConnection();
PreparedStatement ps = con.prepareStatement(sqlXXX);
The actual subclasses of DataSource, Connection, PreparedStatement that are called
at runtime are from weblogic jDriver classes like weblogic.jdbc.rmi.SerialPreparedStatement,
weblogic.jdbc.rmi.SerialConnection etc and not from oracle thin driver.
Is this expected ? Why arent the corresponding classes from the Oracle Thin Driver
loaded ?
Thanks,
PraveenPraveen wrote:
Hi,
I am using Weblogic 6.1 sp1 on a WIN 2000 Professional Box and am trying to connect
to a Oracle 8.1.7 Database that is located on a Solaris Box. I am using the Oracle
Thin Driver (classes12.zip) supplied by Oracle.
The relevant portion of config.xml looks like this:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
InitialCapacity="12" LoginDelaySeconds="1" MaxCapacity="24"
Name="xxxConnectionPool" Password="xxxxxxxx"
Properties="user=user123" Targets="xxxserver" URL="jdbc:oracle:thin:@1.2.3.4:1521:xxxx"/>
The start script for the Server includes a CLASSPATH variable that includes both
weblogic.jar and classes12.zip (in that order)Hi. You should have the oracle zip first. This is because our stuff also contains an oracle zip, but
it's
older than the latest, and you want yours to be used. Whatever is first in the classpath is what will
be used.
The Database access code is from a singleton that is deployed with the beans and
looks like :...
The actual subclasses of DataSource, Connection, PreparedStatement that are called
at runtime are from weblogic jDriver classes like weblogic.jdbc.rmi.SerialPreparedStatement,
weblogic.jdbc.rmi.SerialConnection etc and not from oracle thin driver.
Is this expected ? Why arent the corresponding classes from the Oracle Thin Driver
loaded ?Yes it is expected. The oracle classes are loaded, and used under the covers. All access
to JDBC connections and JDBC objects via our pools and DataSources will be via a
wrapper object of ours. This is necessary to allow us to retain control over the pool and
User Transactions. Also, because the DataSource is supposed to work whether from
a serverside class or an external client JVM, there will have to be an intermediary JDBC
object that acts as a proxy from the external client to the real thin driver connection
in the server. One can't ship JDBC connections across the wire as-is.
Thanks,
Praveen -
Oracle jdbc driver class and classes12.jar whether deprecated.?
Hi All,
1. In one of the post, it has been told that oracle.jdbc.driver.OracleDriver will be deprecated and also recommended to used oracle.jdbc.OracleDriver.
According to that post, I changed the driver class name in my code as below:
Class.forName("oracle.jdbc.OracleDriver");
Then to check the driver name, I insert the below code:
Enumeration<Driver> driverEnum = DriverManager.getDrivers();
+while (driverEnum.hasMoreElements()){+
System.out.println("driver : "driverEnum.nextElement());+
+}+
Below is the output:
driver : oracle.jdbc.driver.OracleDriver@addbf1
Even after specifying the driver class name to be used as oracle.jdbc.OracleDriver, why it is taking oracle.jdbc.driver.OracleDriver..?
INFO : The Oracle JDBC Driver (classes12.jar) version is 10.2.0.4.0.
2. We are using classes12.jar for developing all JDBC code. In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?
Thanks in advance.In Oracle Database 11g Release 2 (11.2.0.2.0) JDBC Drivers, there is no classes12.jar. Is this deprecated? Which jar can be used instead of classes12.jar?For JDBC 4.0 features ojdbc6.jar with JDK 6.0.
For JDBC 3.0 support ojdbc 5.jar with JDK 5.0
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html -
Time out connection in the classes12.zip
Hello,
How can I change the time out connection to my database in Java ? I use the JDBC thin driver (classes12.zip) to connect to an 8.1.6 standard Oracle edition on an NT Server.
I tested a network problem connection removing the network cable and then my application waits 20 minutes to raise an exception.
Thanks
Guillaume FaconYou need to set a tcpip timeout at the os level. Oracle jdbc does not support timeouts.
-
Hello !
I work with Weblogic 701, oracle 9.2.0.1 database, oracle 9.2.0.2 client, and
oracle jdbc drivers classes12.zip
When I connect with the oci8 (not the thin) driver and try to execute the application,
I get this error :
java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\orageneric9.dll
already loaded in another classloader
I have to shutdown weblogic and start it again. If I redeploy my application,
I get the same error and I have to shutdown again ...
and when I connect with the thin driver and try to execute the extract method
on a XMLType object, I always have a sqlException.
I see on the web that the extract method can only be applied with the oci8 driver.
How can I do ???
ThxHi. Go to oracle's site and download the very latest appropriate thin
driver for your DBMS, and put the driver ahead of all weblogic stuff in the
classpath the server is going to use.
Joe
Partyboy wrote:
Hello !
I work with Weblogic 701, oracle 9.2.0.1 database, oracle 9.2.0.2 client, and
oracle jdbc drivers classes12.zip
When I connect with the oci8 (not the thin) driver and try to execute the application,
I get this error :
java.lang.UnsatisfiedLinkError: Native Library D:\oracle\ora92\bin\orageneric9.dll
already loaded in another classloader
I have to shutdown weblogic and start it again. If I redeploy my application,
I get the same error and I have to shutdown again ...
and when I connect with the thin driver and try to execute the extract method
on a XMLType object, I always have a sqlException.
I see on the web that the extract method can only be applied with the oci8 driver.
How can I do ???
Thx -
No connection pool with oracle thin driver
Hi all,
whenever I try to set up my server as target for an Oracle connection pool on OPracle
8.1.7, I get the following exception:
java.sql.SQLException: Illegal Arguments
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:189)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:193)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.java:698)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623)
The Oracle driver classes12.zip is the very first in my classpath, connection pool
settings are:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
Name="Oracle Connection Pool"
Properties="dll=ocijdbc8;USER=zapper;protocol=thin;PASSWORD=oracle"
TestTableName="CABIN" URL="jdbc:oracle:thin:@192.168.0.2:1521:eins"/>
Do I need any additional software besides the driver and weblogic??
Thx
ChristianYou're welcome :)
Regards,
Slava Imeshev
"Christian" <[email protected]> wrote in message
news:[email protected]...
>
That worked!
Thx
"Slava Imeshev" <[email protected]> wrote:
Hi Christian,
There is a couple of problems with the pool definition.
First, the connection pool and datasource names can't
contain spaces. Second, USER and PASSWORD
should be in lower case, i.e. user and password accordingly.
Regards,
Slava Imeshev
"Christian" <[email protected]> wrote in message
news:[email protected]...
Hi all,
whenever I try to set up my server as target for an Oracle connectionpool
on OPracle
8.1.7, I get the following exception:
java.sql.SQLException: Illegal Arguments
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:857)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:189)
at
oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:249)
atoracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
atweblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Connection
EnvFactory.java:193)
at
weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Connection
EnvFactory.java:134)
at
weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllocator.j
ava:698)
at
weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.java:282
at
weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.java:623
The Oracle driver classes12.zip is the very first in my classpath,connection pool
settings are:
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
Name="Oracle Connection Pool"
Properties="dll=ocijdbc8;USER=zapper;protocol=thin;PASSWORD=oracle"
TestTableName="CABIN" URL="jdbc:oracle:thin:@192.168.0.2:1521:eins"/>
Do I need any additional software besides the driver and weblogic??
Thx
Christian -
Oracle.jdbc.driver.OracleDriver not found in Sun ONE Studio
I get this message when I try to connect to the database while creating an EJB. I have tried adding the path to my CLASSPATH, and to adding it to the various CLASSPATHs within Sun ONE Studio. IDE_HOME is defined correctly but OracleDriver.class is still not found. Anyone know what my problem might be?
Thanks,
Michael A. MoranHi Sujatha,
Thanks for responding. My CLASSPATH is as follows:
madonna% echo $CLASSPATH
/export/oracle/jdbc/lib:/export/oracle/jlib:/export/oracle/jsp/lib:/export/oracle/sqlj/lib/runtime.zip:/export/oracle/oem_webstage:/export/oracle/lib/aurora_client.jar:/export/oracle/jdbc/lib/classes12.zip:/export/oracle/sqlj/lib/translator.zip:/export/oracle/sqlj/lib/runtime12.jar:/export/oracle/lib/vbjorb.jar:/export/oracle/lib/vbjapp.jar:/export/oracle/lib/mts.jar:/export/oracle/javavm/lib/aurora.zip:/export/oracle/javavm/utl/ejb/lib/vbj30ssl.jar:/export/oracle/jlib/javax-ssl-1_2.jar:/export/oracle/jlib/jssl-1_2.jar:/export/oracle/lib/servlet.jar:/export/oracle/lib/http_client.jar:/export/oracle/lib/http_server.jar:/export/oracle/oem_webstage/oracle/jdbc/OracleDriver.class:/export/oracle:/export/oracle/jdbc/lib/nls_charset12.jar
Which as you can see includes classes12.zip and /export/oracle/oem_webstage/oracle/jdbc/OracleDriver.class
I have also set all the IDE internal classpath variables to the same settings. It has no effect. I still get the same message.
Michael -
Petstore throws populateServlet error with Oracle thin driver
When i point connection pool to Oracle database, i get the following error. The
data is populated in the database, looks like when petstore is enumerating db
tables and make sure all tables exist, this error is happening. Some how, database
metadata coming as NULL. Has anybody tried petstore with Oracle JDBC driver?
thanks,
PopulateServlet Error:
java.lang.NullPointerException java.lang.NullPointerException at com.sun.j2ee.blueprints.tools.populate.web.PopulateServlet.checkTables(PopulateServlet.java:276)
at com.sun.j2ee.blueprints.tools.populate.web.PopulateServlet.doGet(PopulateServlet.java:127)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)I believe that you do not have weblogicaux.jar in your classpath.
-Selvan
Laurie Cohen wrote:
Im using Solaris 2.7 with WLS 5.1.0 and Commerce Server 2.0.1 with
current service packs on both. JDK 1.2.1_04 and the Oracle thin driver
(classes111.zip which I am told is the only one supported in this
configuration). Has anyone seen this problem? Is it that the driver is
using 1.1 and I only have 1.2 installed?
devapp01% java -classpath
/usr/local/weblogic/classes:/usr/local/weblogic/license utils.t3dbping
t3://localhost:7601 username password "" oracle.jdbc.driver.OracleDriver
jdbc:oracle:thin:@10.200.201.110:1521:q01c
Connecting to WebLogic with the WebLogic JDBC Driver
Exception in thread "main" java.lang.NoClassDefFoundError:
com/sun/java/util/collections/ArrayList
at weblogic.kernel.Kernel.declareProperties(Kernel.java:253)
at weblogic.kernel.Kernel.ensureInitialized(Kernel.java:107)
at weblogic.common.T3Client.<init>(T3Client.java:218)
at weblogic.common.T3Client.<init>(T3Client.java:269)
at weblogic.common.T3Client.<init>(T3Client.java:323)
at weblogic.jdbcbase.t3.Driver.connect(Driver.java:121)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:106)
at utils.t3dbping.main(t3dbping.java:115)
Thanks,
Laurie -
EJB - no suitable driver found for oracle jdbc driver
this is the exception i got when i run the client:
java.rmi.RemoteException: nested exception is: java.sql.SQLException: No suitable driver; nested exception is:
java.sql.SQLException: No suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:537)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:45)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.java:56)
at com.sun.enterprise.resource.Jdbc10XaAllocator.createResource(Jdbc10XaAllocator.java:66)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:177)
at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:126)
at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:137)
at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:74)
at bmp.TaxEJB.ejbCreate(TaxEJB.java:34)
at bmp.TaxEJB_RemoteHomeImpl.create(TaxEJB_RemoteHomeImpl.java:32)
at bmp._TaxEJB_RemoteHomeImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:520)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:210)
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
this is the implementation file (TaxEJB):
package bmp;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import java.util.*;
import javax.ejb.*;
public class TaxEJB implements EntityBean {
private String stateCode;
private float taxRate;
private EntityContext ctx;
private DataSource ds;
private String dbName = "jdbc/Oracle";
private Connection con;
public void setTaxRate(float taxRate) {
this.taxRate = taxRate;
public float getTaxRate() {
return this.taxRate;
public String ejbCreate(String stateCode, float taxRate)
throws CreateException {
if (stateCode == null) {
throw new CreateException("The State Code is required.");
try {
String sqlStmt = "INSERT INTO TaxTable VALUES ( ? , ? )";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setString(1, stateCode);
stmt.setFloat(2, taxRate);
stmt.executeUpdate();
stmt.close();
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
this.stateCode = stateCode;
this.taxRate = taxRate;
return stateCode;
public void ejbPostCreate(String stateCode, float taxRate) {}
public void setEntityContext(EntityContext context) {
this.ctx = context;
try {
InitialContext initial = new InitialContext();
ds = (DataSource)initial.lookup(dbName);
} catch (NamingException ne) {
throw new EJBException(ne);
public void unsetEntityContext() {
ctx = null;
public void ejbActivate() {
stateCode = (String)ctx.getPrimaryKey();
public void ejbPassivate() {
stateCode = null;
public void ejbLoad() {
try {
String sqlStmt = "SELECT stateCode, taxRate FROM TaxTable " +
"WHERE stateCode = ? ";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setString(1, stateCode);
ResultSet rs = stmt.executeQuery();
if (rs.next()) {
this.taxRate = rs.getFloat("taxRate");
stmt.close();
} else {
stmt.close();
throw new NoSuchEntityException("State Code: " + stateCode);
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
public void ejbStore() {
try {
String sqlStmt = "UPDATE TaxTable SET "
+ "taxRate = ? " + "WHERE stateCode = ?";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setFloat(1, taxRate);
stmt.setString(2, stateCode);
if (stmt.executeUpdate() != 1) {
throw new EJBException("Object state could not be saved");
stmt.close();
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
public void ejbRemove() {
try {
String sqlStmt = "DELETE FROM TaxTable WHERE stateCode = ? ";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setString(1, stateCode);
stmt.executeUpdate();
stmt.close();
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
public String ejbFindByPrimaryKey(String primaryKey)
throws FinderException {
try {
String sqlStmt = "SELECT stateCode "
+ "FROM TaxTable WHERE stateCode = ? ";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setString(1, primaryKey);
ResultSet rs = stmt.executeQuery();
if (!rs.next()) {
throw new ObjectNotFoundException();
rs.close();
stmt.close();
return primaryKey;
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
public Collection ejbFindInRange(float lowerLimit, float upperLimit)
throws FinderException {
try {
String sqlStmt = "SELECT stateCode from TaxTable "
+ "WHERE taxRate BETWEEN ? AND ?";
con = ds.getConnection();
PreparedStatement stmt = con.prepareStatement(sqlStmt);
stmt.setFloat(1, lowerLimit);
stmt.setFloat(2, upperLimit);
ResultSet rs = stmt.executeQuery();
ArrayList list = new ArrayList();
while (rs.next()) {
String id = rs.getString(1);
list.add(id);
stmt.close();
return list;
} catch (SQLException sqle) {
throw new EJBException(sqle);
} finally {
try {
if (con != null) {
con.close();
} catch (SQLException sqle) {}
this is the setting in resource.properties:
jdbcDataSource.5.name=jdbc/Oracle
jdbcDataSource.5.url=jdbc\:oracle\:thin\:@nicole\:1521\:NICOLE
jdbcDriver.1.name=oracle.jdbc.driver.OracleDriver
this is my classpath setting:
%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib\system\cloudscape.jar;%J2EE_HOME%\lib\system\cloudutil.jar;%J2EE_HOME%\lib\cloudscape\RmiJdbc.jar;%J2EE_HOME%\lib\system\classes12.jar;.
since i already declare classpath for oracle JDBC Driver (classes12.jar), why the program still can't found the oracle.jdbc.driver.OracleDriver? please help. thanks.Hi,
I m trying to connect ORACLE9i using JSP.But i encounter the error java.sql.SQlException no suitable driver found.My code is as follows.
<html>
<head><title>oracle</title></head>
<body>
<%@ page language="java"%>
<%@ page import="java.sql.*" %>
<%
String eid=new String();
String en=new String();
try
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch(ClassNotFoundException cnfe)
out.println("Failed to load Jdbc Odbc driver");
try{
Connection con = DriverManager.getConnection("jdbc:oracle:thin@localhost:1521:ORACLE9I","scott","tiger");
Statement ps = con.createStatement();
try{
ResultSet rs = ps.executeQuery("select * from empDetails");
while(rs.next())
out.println(rs.getString(1));
out.println(rs.getString(2));
rs.close();
}catch(SQLException se)
out.println(se);
ps.close();
con.close();
catch(Exception e)
out.println(e);
catch (Exception e){
out.println(e);
%>
</body></html>
Pls anyone give me a solution.Its really urgent. -
No classes12.zip included with Linux Oracle 8.1.7 client install??
I noticed on the linux client install - it includes a
lclasses11.zip, but this is not the JDBC classes that come with
Windows clients.
1.) What is the lclasses11 or 12.zip files for?
2.) Do I need to copy Windows client classes12.zip, etc to a
linux client? What aren't these included?
Thanks
CHrisHi,
I faced a problem that I want a Oracle8 driver for Linux, so I
can connect my DB that installed in NT from Linux, I see that
you face the same problem, I hope you find a solution, so could
you please help me in this, should I install Oracle in the
Linux, or not, from where can I install every thing.
Thanx,
Ahmed.
Maybe you are looking for
-
Hi Folks, I have an issue while creating a purchase order for some inventory items (not all items). System is populating a Note "**A new part number already exists**". Of course, it is not stopping to save and approve the PO, but still this note is i
-
Connecting directly to CompactRio from a Matlab program
Hello I'm working at Control lab of the Aerospace Faculty in Technion - Israel Institute of Technology in Haifa we are working on a new project that we require to establish Computerized control system for Vehicles and Quad-helicopters. we required to
-
I would like an immediate reaccredit of my account after buying an app that do not work, iWeb Theme Designs, v1.0, Éditeur : Vitalijus Vysniauskas (4 ).. this app is not compatible with iweb french
-
Premier Pro CC Crashing Frequently
Hello, I am having an issue in Premear Pro Creative Cloud, the software has become extreamly unstable and is cashing too frequently to be usable. I am editing a project cosnisting mainly of R3D files in a 1080p R3D sequence. The project files are a
-
What can I do if the mexican distributor don't change my still guaranteed ipad??
Dear all, I bought an ipad nine months ago. Sudenly the screen became so dark and I can't see anything but a kind of blury lines. I went to the wholesaler (Mac Store Masarik) in Mexico DF, and they were quite rude: "there is a dent in your ipad, Mac