Problem in jdbc connect thru oracle
hi all
i hv installed oracle 8i on win2k
i wanna connect thru jdbc
but i am getting error below
i donno whr i got struck?
plz help me
thnx in advance
bye
////////// details ///////////////////////
import java.sql.*;
///win2000,oracle 8i
/// try to fix whr i hv done mistake
import java.io.*;
class JDBC1
public static void main(String[] args)
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver ");
//// i tried all below connections
Connection cn=DriverManager.getConnection("jdbc:odbc:santhu:PLSExtProc","scott","tiger"); /// oracle_sid=santhu hv given
//Connection cn= DriverManager.getConnection("jdbc:odbc:PLSExtProc","scott","tiger"); /// PLSExtProc it is given in tnsnames.ora file
//Connection cn=DriverManager.getConnection("jdbc:odbc:oracle:PLSExtProc","scott","tiger"); /// driver name i hv given as oracle and one more as santhu--both for oracle driver
Statement st=cn.createStatement();
ResultSet rs=st.executeQuery("select * from dept");
int dno;
String dname;
while(rs.next())
dno=rs.getInt("deptno");
dname=rs.getString("dname");
System.out.println(dno+dname);
catch(Exception e)
System.out.println(e);
/// compiled successfully
/// but runtime error::SQLException---data source name not found no default driver specified
//// saying tns-12538 error
/// tnsping-----error is coming.........
/// lsnrctl start --------is not working
//// lsnrctl status ------is also not working
/// in services i hv set oraclelistener to auotmatic start
/// in net8 configuration assistent everything is ok
/// try to do it today...ok na
// i put classpath to home dir of oracle
///////////listener.ora file //////////////////////////////
# LISTENER.ORA Network Configuration File: D:\Oracle\Ora81\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Vaman)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vaman)(PORT = 2481))
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Oracle\Ora81)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = santhu)
(ORACLE_HOME = D:\Oracle\Ora81)
(SID_NAME = santhu)
/////////////////tnsnames.ora file///////////////////
# LISTENER.ORA Network Configuration File: D:\Oracle\Ora81\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Vaman)(PORT = 1521))
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = vaman)(PORT = 2481))
(PROTOCOL_STACK =
(PRESENTATION = GIOP)
(SESSION = RAW)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = D:\Oracle\Ora81)
(PROGRAM = extproc)
(SID_DESC =
(GLOBAL_DBNAME = santhu)
(ORACLE_HOME = D:\Oracle\Ora81)
(SID_NAME = santhu)
////////////////////////////////////////////////
Class.forName("oracle.jdbc.OracleDriver");
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@<hostname>:1521:<database name>", "scott", "tiger");
You can find OracleDriver in classes12.jar (<ORA_HOME>/jdbc).
Check your tnsnames.ora file for <hostname> and <database name>. For example, if you had a following entry in tnsnames.ora file:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SOMEHOST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
you would write:
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@SOMEHOST:1521:XE", "scott", "tiger");
Similar Messages
-
Problems with JDBC Connection, invalid Oracle-URL
H,
i can't use a JBDC Connection. Maybee i tried a wrong oracle url syntac
This Url jdbc:oracle:thin@bilent:1521:bilent throws an error
java.sql.SQLException: invalid Oracle-URL
The following parameter worked
Driver :thin
hostname:bilent
JDBC Port:1521
SID:bilent
What is wrong in the oracle url?
THANKSHi,
You are missing ":" after thin and host name. Your URL should be
jdbc:oracle:thin:@bilent:1521:bilent-Arun -
Problem in getting jdbc connection with oracle for win 98
This is my code given below
import java.sql.*;
public class Oconnection
Connection conn;
Statement st;
PreparedStatement pst,pstissue,pstret,pstbook;
public Oconnection()
try
Class.forName("oracle.jdbc.driver.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","system","manager");
catch(Exception ex)
System.out.println(ex.getMessage());
ex.printStackTrace();
public static void main(String args[])
new Oconnection();
*****************************************************8
Error
C:\Library>java Oconnection
Io exception: The Network Adapter could not establish the connection
java.sql.SQLException: Io exception: The Network Adapter could not establish the
connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:324)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:266)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:365)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
at java.sql.DriverManager.getConnection(DriverManager.java:517)
at java.sql.DriverManager.getConnection(DriverManager.java:177)
at Oconnection.<init>(Oconnection.java:17)
at Oconnection.main(Oconnection.java:39)
I am using Oracle for win95 or i think it is oarcleforwin98 .
The sid of my database i found through query given was orcl, what changes should i do in the code so that it works.
should i use another driver coz i am using latest driver from oracle.com which is for oracle 8i. if a need a driver change where can i download it from please help mehttp://forum.java.sun.com/thread.jsp?thread=291584&forum=48&message=1305045
-
Hi,
I'm using jdeveloper 3.2 and connect with no problem using the connection wizard with the following parameters:
Connection name - santanatst1
connection type - JDBC
user - castle1
password - 12345
role - normal
select a jdbc driver - Oracle JDBC OCI-8
select a connection method - Existing TNS Names
host ID - santana.coid.com
sid - orclde
port - 1526
network protocol - TCP
row prefetch - 10
batch value - 1
However, my code below results in the following error:
SQLException:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
"C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw.exe" -mx50m -classpath "
C:\Program Files\Oracle\JDeveloper 3.2\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;
C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;
C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;
C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar" catspackage.catsTables
String DSN="orclde@santana:1526";
String UserName = "castle1";
String PassWord = "12345";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:orclde@santana:1526";
// String url="jdbc:odbc:"+DSN;
Connection con=DriverManager.getConnection(url,UserName,PassWord);
any help would be great!
DAZED and CONFUSEDTry
class.forName("oracle.jdbc.driver.OracleDriver");
-A
Hi,
I'm using jdeveloper 3.2 and connect with no problem using the connection wizard with the following parameters:
Connection name - santanatst1
connection type - JDBC
user - castle1
password - 12345
role - normal
select a jdbc driver - Oracle JDBC OCI-8
select a connection method - Existing TNS Names
host ID - santana.coid.com
sid - orclde
port - 1526
network protocol - TCP
row prefetch - 10
batch value - 1
However, my code below results in the following error:
SQLException:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
"C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\bin\javaw.exe" -mx50m -classpath "
C:\Program Files\Oracle\JDeveloper 3.2\myclasses;C:\Program Files\Oracle\JDeveloper 3.2\lib\jdev-rt.zip;
C:\Program Files\Oracle\JDeveloper 3.2\jdbc\lib\oracle8.1.7\classes12.zip;
C:\Program Files\Oracle\JDeveloper 3.2\lib\connectionmanager.zip;
C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\rt.jar" catspackage.catsTables
String DSN="orclde@santana:1526";
String UserName = "castle1";
String PassWord = "12345";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String url="jdbc:odbc:orclde@santana:1526";
// String url="jdbc:odbc:"+DSN;
Connection con=DriverManager.getConnection(url,UserName,PassWord);
any help would be great!
DAZED and CONFUSED -
JDBC connection to Oracle 10g RAC periodically times out
I've been banging my head against the wall for months now and can't figure out why this is and what's causing it.
We have 6x CF8 servers in our environment. 3 of which work perfectly and the other 3 have the following problem. All 6 machines were installed at the same time and followed the exact same installation plan.
When I configure Oracle RAC data source, some of the machines time-out connecting to Oracle from time-to-time.
Config:
Solaris 9 on both CF and Oracle
CF8 Enterprise with the latest updater.
Apache 2 (not that it's relevant)
6 machines, load-balanced (not clustered), identical install and configuration.
data source config:
JDBC URL: jdbc:macromedia:oracle://10.0.0.3:1521;serviceName=dbname.ourdomain.com;AlternateServers= (10.0.0.4:1521);LoadBalancing=true
DRIVER CLASS: macromedia.jdbc.MacromediaDriver
The problem:
Every few minutes, CF starts hanging requests that deal with a specific RAC only data source. After about 30 seconds, all requests bail and generate this error in cfserver.log:
A non-SQL error occurred while requesting a connection from dbsource.
Timed out trying to establish connection
This happens with any RAC data source on the "bad" servers while the "good" servers don't have this problem. The "bad" server doesn't have any problems with direct (non-rac) Oracle data source.
Already tried:
Moving server connections around on a switch (rulling out bad switch port)
Copying driver from the healthy server (but it's the same installer anyway)
Changed from RAC to normal Oracle type data source - works perfectly. So at the moment I have 3 servers connecting to a specific oracle instance and the other 3 connecting to RAC.
Tried googling and searching forums and even Oracle metalink - nothing I could see relevant to this.
It's a shame that after spending a ton of money on CF8 upgrades and Oracle RAC, we can't really utilize fail-over on the database connection.
Any takers?
Thanks,
HenryI have the following in my CLASSPATH:
C:\Ora10g1\product\10.2.0\db_1\jdbc\lib\jdbc.jar;
C:\Ora10g1\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar;
C:\Ora10g1\product\10.2.0\db_1\jlib\jndi.jar;
C:\Ora10g1\product\10.2.0\db_1\jlib\orai18n.jar;
Still 'Cannot find type 'oracle.jdbc.pool.OracleDataSource'
Thanks -
JDBC connection to Oracle 8.16 from Weblogic 6.1
I am trying to connect to an Oracle DB using the JDBC thin driver to Weblogic 6.1
I am getting the following error when starting up the Weblogic server:
"oracle.net.TNSAddress.SOException"
Anyone have an idea as to why I am getting this.
Thanks
Lathell McKellerIf the url fix does not work - try updating your jdbc drivers for oracle 8 (get the latest one). There is a chance that using the older oracle 7 drivers you might encounter some problems.
Regards,
Michael Bogecho -
Problem with JDBC driver for Oracle 10g
Hi.
I've successfully accessed a MySQL database via a DataSource from a servlet (that uses a DAO). However, when I try to do the same with an Oracle 10g Database, I get the error message:
Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
I'm using J2SE1.5.0/5.0 and ojdbc14.jar, the latter of which I downloaded this afternoon as the latest driver JAR available on the Oracle site. As with the MySQL driver, I've placed it in the commons\lib folder within Tomcat. (I've also, of course, made the necessary modifications to server.xml and web.xml.)
Upon examining the ReadMe file at the top of the Oracle download page, I found that the oracle.jdbc.driver package is now deprecated and all references to oracle.jdbc.driver should be replaced with oracle.jdbc. However, I got a similar error message when I tried this modification. Upon examining the contents of ojdbc.jar, I found that the driver was there and that it was, in fact, still oracle\jdbc\driver\OracleDriver!
It appears as though the Oracle site has not been updated with a driver that matches its latest documentation. However, this does not explain why the driver is not even being loacted when it is in the correct place. Can anybody shed any light on this? Any help would be much appreciated.
Thanks in anticipation.
Cheers.
JanI've successfully accessed a MySQL database via a
DataSource from a servlet (that uses a DAO). However,
when I try to do the same with an Oracle 10g
Database, I get the error message:
Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
That's different from a ClassNotFoundException.
>
I'm using J2SE1.5.0/5.0 and ojdbc14.jar, the latter
of which I downloaded this afternoon as the latest
driver JAR available on the Oracle site. So you got ojdbc14.jar or ojdbc14_g.jar under the 10g drivers?
As with the
MySQL driver, I've placed it in the commons\lib
folder within Tomcat. I think it's a better idea to put in the WEB-INF/lib directory of your Web app rather than commons/lib. WAR files are a very good idea, too.
(I've also, of course, made the
necessary modifications to server.xml and web.xml.)So you're using a JNDI data source? It sounds to me like that's where the problem is.
You should not have to edit the server.xml at all. If you put the <ResourceParams> in a context XML file with the same name as your WAR file into the TOMCAT_HOME/webapps directory it'll be picked up automatically. (It might also be accessible in the META-INF directory for your app, but I haven't done it that way.)
Upon examining the ReadMe file at the top of the
Oracle download page, I found that the
oracle.jdbc.driver package is now deprecated and all
references to oracle.jdbc.driver should be replaced
with oracle.jdbc.
However, I got a similar error
message when I tried this modification. Upon
examining the contents of ojdbc.jar, I found that the
driver was there and that it was, in fact, still
oracle\jdbc\driver\OracleDriver! The fully-resolved class name you should be using MUST match the class that's in the ojdbc14.jar that you're using. Look in the JAR for the definitive answer: the one that I downloaded is still using the oracle.jdbc.driver package for OracleDriver.class. Ignore the docs - use the name that's in the JAR.
It appears as though the Oracle site has not been
updated with a driver that matches its latest
documentation. That often happens with docs.
However, this does not explain why the
driver is not even being loacted when it is in the
correct place. Can anybody shed any light on this?
Any help would be much appreciated.I think the problem lies in your web.xml and server.xml
I'd recommend that you decouple the JDBC from the Web app for now. See if you can connect to Oracle using a simple desktop app and leave the Web piece out of the equation for now. Once you can do that, you'll be certain that the parameters you're using are correct and you can turn your attention to getting the Tomcat configuration right.
PS - I'm using Oracle 9.2.0.1 and Tomcat successfully right now, so it can be done. -
JDBC Connectivity to Oracle 8i Database
I'am facing problem in connecting to Oracle 8i server using oci8 JDBC driver provided by Oracle.
The statemnet that gives me error is --
Connection conn = DriverManager.getConnection ("jdbc:oracle:oci8:@" + "MIS", "scott", "tiger");
This throws an exception
java.lang.UnsatisfiedLinkError : make_c_state.
Can anyone please tell me where i'am going wrong?
Thanx in advanceReally need to know the platform on which you're trying to execute the code. Each client will need to have the standard Oracle client software installed (with the NET8 configuration application, which provides the 'drivers')
On Oracle's metalink see some responses
http://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=NOT&p_id=121922.1
Overview
This example provides a minimal test program used to verify that the client
environment is set up properly for running the JDBC OCI driver in order to avoid
receiving the 'unsatisfied link error' caused by an incorrect LD_LIBRARY_PATH.
Program Notes
Simply copy the code below to a file called Test.java. Compile and run the
file from the client environment that you intend to use for your JDBC
applications.
References
[NOTE:118756.1]
Caution
The sample program in this article is provided for educational purposes only
and is NOT supported by Oracle Support Services. It has been tested
internally, however, and works as documented. We do not guarantee that it
will work for you, so be sure to test it in your environment before relying
on it.
Program
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - - - - - -
public class Test {
public static void main (String [] args)
try
System.loadLibrary("ocijdbc8");
System.out.println("Successfully Loaded");
} catch(Exception e)
System.out.println("LD_LIBRARY_PATH is not properly set");
e.printStackTrace();
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - - - - - -
http://metalink.oracle.com/metalink/plsql/ml2_documents.showFrameDocument?p_database_id=NOT&p_id=118756.1
which is:
I'm getting Unsatisfied Link Error with Oci 8 Driver ?
First, make sure that the jdbc-oci shared object (libocijdbc8 or liboci80Xjdbc.so etc.) and ${ORACLE_HOME}/lib are in your path. Then, try this Sample Program. Some times, even after the shared object is loaded successfully, you may get errors such as make_c_state symbol not found. This may happen if your CLASSPATH has classes.zip from JRE 1.1.7 or JDK 1.1.6 and your running java binaries from jdk 1.1.3 or so. Make sure everything (LD_LIBRARY_PATH, CLASSPATH, java binaries) is in SYNC. -
JDBC connect to Oracle, IO exception, Help!
I am trying to connect to Oracle server via JDBC, but encountered IO exception problem, could anyone provide me any help? code is as follows:
String url ="jdbc:oracle:thin:@IP:1521:oracleSID"
Class.forName ("oracle.jdbc.driver.OracleDriver");
con = DriverManager.getConnection (url,usr,pwd);
the exception info is:
java.sql.SQLException:IOException: The network adapter could not establish the connection
require for help to solve this problem, many thanks!import java.io.*;
import java.sql.*;
import java.text.*;
import oracle.jdbc.driver.*;
public class viewtable
Connection con;
Statement st;
public viewtable (String args[]) throws ClassNotFoundException,FileNotFoundException,IOException,SQLException
url="jdbc:oracle:thin:system/manager@IP:1521:SID";
Class.forName ("oracle.jdbc.driver.OracleDriver");
try
con=DriverManager.getConnection(url);
st = con.createStatement ();
doexample ();
st.close ();
con.close ();
}catch(SQLException e)
System.err.println(e.getMessage());
public void doexample () throws SQLException
ResultSet rs = st.executeQuery("select * from sales");
if(rs!=null) {
while(rs.next())
int a = rs.getInt("no"); System.out.println("NO = "+a);
rs.close();
public static void main (String args[])
System.out.println ("Oracle Exercise 1 \n");
try
viewtable test = new viewtable(args);
} catch (Exception ex)
System.err.println ("Exception caught.\n"+ex);
ex.printStackTrace ();
the above is the full code, please check the problem....many thanks -
I am trying to do a connection thru an oracle wallet with the string:
Custon JDBC URL:
jdbc:oracle:oci:/@pm102139
This has worked in the past , but now returns:
Status: Failed - Test failed : no ocijdbc11 in java.library.path
version: 1.5.5.59.69
Build: Main - 5969
Oracle 10.2.0.4.0 in Solaris 10
$java -version
java version "1.5.0_22"
thanks.Could this have anything to do with Patch 9352164 10.2.0.4.4 PSU? This has been installed since it last worked.
thanks. -
Jdbc connection using oracle thin driver( using jdk1.4 and oracle8 )
hello ..
while i was tring to connection using oracle thin driver and jdk1.4 am getting the below error message. i have set the class path for the driver also. am using oracle8 personal edition and jdk1.4.
[java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:404)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:468)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:314)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Connexa.main(Connexa.java:18)[/b]
Press any key to continue...
my program is....
import java.sql.*;
import java.io.*;
import java.util.*;
import oracle.jdbc.driver.*;
// needed for new BFILE class
import oracle.sql.*;
public class Connexa {
public static void main (String args []) throws Exception {
Statement stmt=null;
try{
// Load the Oracle JDBC driver
//DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Class.forName("oracle.jdbc.driver.OracleDriver");
// Connect to the database
// You can put a database name after the @ sign in the connection URL.
Connection conn =
DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:orcl","scott","tiger");
//Connection conn =
// DriverManager.getConnection ("jdbc:odbc:datasource", "system", "manager");
stmt = conn.createStatement ();
catch (SQLException e)
e.printStackTrace();The code itself is fine; the problem is with one of:
1) the connection URL
2) intermediate networking
3) the database itself
1) your connection URL is "jdbc:oracle:thin:@127.0.0.1:1521:orcl"
- is Oracle really running on the default port, 1521
- is the installation SID really "orcl"
2) lots of possibilities, but only a couple are likely
- is TCP/IP configured and running on your host
- is there a persoanl firewall rpduct running? perhaps it's blocking the connection
3) Is Oracle running?
Is the listener running? -
Error while creating a JDBC connection to Oracle 11g using WLS 6.1
Hi
I am trying to connect to Oracle 11g database on Weblogic 6.1 server.
First of all i would like to know if this is compatible?
The environement that i have is this
1. JDK 1.3
2. Database 11g is on remote system
3. Oracle client on my local system ( Connecting to the 11g DB through the client works fine)
4. Weblogic server 6.1
5. Currently the application is connected to Oracle 10g DB and working fine(We are attempting to move it to 11g)
Below are the steps that i followed to create the connection:
1. Made an entry for the datasource in config.xml under <WLS_DOMAIN>/config folder as below
<JDBCConnectionPool DriverName="oracle.jdbc.driver.OracleDriver"
MaxCapacity="4" Name="CADConnectionPool"
Properties="user=abc_proxy;password=proxy_abc;dll=ocijdbc8;protocol=thin"
RefreshMinutes="5" ShrinkPeriodMinutes="10" Targets="CAsvr"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="dual" URL="jdbc:oracle:thin:@gen11t-ora.db.lab.xyz.com:1530:GEN11T"/>
2. Restarted the server.
3. Ran the application and get the following error on the server console:
<Aug 22, 2011 12:39:42 AM CDT> <Error> <JDBC> <Cannot startup connection pool "C
ADConnectionPool" weblogic.common.ResourceException:
Could not create pool connection. The DBMS driver exception was:
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:193)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:705)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:650)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:360)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:285)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:239)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:199)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy31.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2977)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:372)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy42.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
at weblogic.management.Admin.finish(Admin.java:644)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
at weblogic.Server.main(Server.java:35)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:209)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:705)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:650)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:360)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:285)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:239)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:199)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy31.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2977)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:372)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy42.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
at weblogic.management.Admin.finish(Admin.java:644)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
at weblogic.Server.main(Server.java:35)
Can't load scjd12.dll, file not found java.library.path=C:\jdk1.3.1_11\bin;.;C:\WINDOWS\system32;C:\WINDOWS;.\bin;C:\P
rogram Files\Lotus\Notes\Data;C:\Program Files\Lotus\Notes;C:\Program Files\Java
\jre1.5.0_17\bin;C:\Program Files\Java\j2re1.4.2_06\bin;C:\Oracle\bin;C:\Program
Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\sys
tem32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\nls;C:\WINDOWS\sys
tem32\nls\ENGLISH;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Rational
\common;C:\Program Files\Rational\ClearCase\bin;C:\apache-ant-1.6.5\bin;C:\jdk1.
3.1_11\bin;C:\Program Files\Citrix\ICAService\;C:\Program Files\Citrix\System32\
;Z:.
<Aug 22, 2011 12:38:06 AM CDT> <Info> <JDBC> <Sleeping in createResource()>
<Aug 22, 2011 12:38:07 AM CDT> <Error> <JDBC> <Cannot startup connection pool "c
ispool" weblogic.common.ResourceException:
Could not load 'com.neon.jdbc.Driver
If this is a type-4 JDBC driver, it could occur if the JDBC
driver is not in the system CLASSPATH.
If this is a type-2 JDBC driver, it may also indicate that
the Driver native layers(DBMS client lib or driver DLL)
have not been installed properly on your system
or in your PATH environment variable.
This is most likely caused by one of the following:
1. The native layer SO, SL, or DLL could not be found.
2. The file permissions on the native layer SO, SL, or DLL
have not been set properly.
3. The native layer SO, SL, or DLL exists, but is either
invalid or corrupted.
For more information, read the installation documentation
for your JDBC Driver, available from:
http://e-docs.bea.com
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(Con
nectionEnvFactory.java:212)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(Con
nectionEnvFactory.java:134)
at weblogic.common.internal.ResourceAllocator.makeResources(ResourceAllo
cator.java:705)
at weblogic.common.internal.ResourceAllocator.<init>(ResourceAllocator.j
ava:282)
at weblogic.jdbc.common.internal.ConnectionPool.startup(ConnectionPool.j
ava:650)
at weblogic.jdbc.common.JDBCService.addDeployment(JDBCService.java:107)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(Depl
oymentTarget.java:360)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Dep
loymentTarget.java:285)
at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeploy
ments(DeploymentTarget.java:239)
at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(
DeploymentTarget.java:199)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy31.updateDeployments(Unknown Source)
at weblogic.management.configuration.ServerMBean_CachingStub.updateDeplo
yments(ServerMBean_CachingStub.java:2977)
at weblogic.management.mbeans.custom.ApplicationManager.startConfigManag
er(ApplicationManager.java:372)
at weblogic.management.mbeans.custom.ApplicationManager.start(Applicatio
nManager.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMB
eanImpl.java:636)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl
.java:621)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(Configurat
ionMBeanImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
57)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
25)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy42.start(Unknown Source)
at weblogic.management.configuration.ApplicationManagerMBean_CachingStub
.start(ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
at weblogic.management.Admin.finish(Admin.java:644)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
at weblogic.Server.main(Server.java:35)
Would like some help on this asap as the project is in critical stage.
ThanksThe driver being used by your weblogic is too old and incompatible with the DBMS. Upgrade the driver.
-
How to configure JDBC connection in oracle BI publisher with teradata datab
Hi,
I am going to use Oracle BI publisher to create report.
Our database is Teradata.
How to create database connection for Teradata in BI publisher.
How to create JDBC connection.
What should be the Database Driver Class?
What should be the connection string format?
Please provide me the suggetion.
Thanks,
Santanu MannaHi;
I suggest please refer below which could be helpful on your issue:
How To Generate XML Output (Excel, HTML, PDF) for FSG Reports [ID 804913.1]
E-XMLP: BI Publisher Report RTF Template to Excel output is not same as PDF,RTF or HTML format.[Article ID 1515711.1]
BI Publisher Enterprise Excel Output File Size is Too Large [ID 1271544.1]
Regard
Helios -
HELP! Jdbc connection to oracle ClassNotFoundException classpath issues..
Okay I am a newbie to this but all the other posts concerning this just say add the classes12.jar to my classpath.
I am using websphere 5.0
connecting to a 9i db.
after trying to find out what my classpath is ( websphere 5.0 makes it difficult to see it) i found this:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="var"
path="SERVERJDK_50_PLUGINDIR/jre/lib/rt.jar"
rootpath="SERVERJDK_SRCROOT" sourcepath="SERVERJDK_50_PLUGINDIR/src.jar"/>
<classpathentry kind="src" path="Java Source"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/j2ee.jar"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/servletevent.jar"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/ivjejb35.jar"/>
<classpathentry kind="var" path="WAS_50_PLUGINDIR/lib/runtime.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/string.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxen-full.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/utility.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/jspsql.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/xalan.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/datetime.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/mailer.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/dom.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/jstl.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/standard.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/jdbc2_0-stdext.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/saxpath.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/sax.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/dbbeans.jar"/>
<classpathentry kind="lib" path="Web Content/WEB-INF/lib/jaxp-api.jar"/>
<classpathentry kind="lib" path="C:/oracle/ora92/jdbc/lib/classes12.jar"/>
<classpathentry kind="output" path="Web Content\WEB-INF\classes"/>
</classpath>
to me it looks like it is in my classpath.. (if thats what this is).
I have imported the classes12.jar file several times through out my project to no avail.
the error i get it here:
Error: It Screwed up agian java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
SystemOut O Connecting ... cisinv
Error: java.sql.SQLException: No suitable driver
SystemErr R Exception: null
from this code:
package Business;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
* @author jeffreak
* To change this generated comment edit the template variable "typecomment":
* Window>Preferences>Java>Templates.
* To enable and disable the creation of type comments go to
* Window>Preferences>Java>Code Generation.
public class beanDbConnect {
* Constructor for beanDbConnect.
public beanDbConnect() {
super();
private Connection con = null;
private Statement cmd = null;
private ResultSet rs = null;
public Connection connect()
//Declare variable
boolean blnSuccessfulOpen = false;
Driver driver;
String driverName;
String serverAddress;
//Begin try block
try
//Load JdbcOdbcDriver
driverName = "oracle.jdbc.driver.OracleDriver";
//oracle.jdbc.driver.OracleDriver
System.out.println("Loading ..." + driverName);
//try{
Class.forName(driverName).newInstance();
//catch (Exception err)
// System.err.println("Error: new instance: " + err.toString());
System.out.println("Database loaded successfully");
//catch (ClassNotFoundException e)
catch (Exception e)
System.err.println("Error: It Screwed up agian " + e.toString());
blnSuccessfulOpen = false;
try
//Instantiate connection to bean-defined DSN
//serverAddress = ("jdbc:oracle:thin:scott/tiger@localhost:1243:" + dbInstance);
System.out.println("Connecting ... " );
String serverName = "**********";//changed for post
String portNumber = "1521";
String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + "cisinv";
con = DriverManager.getConnection(url, "scott", "tiger");
System.out.println("Ready.");
blnSuccessfulOpen = true;
catch (SQLException e)
System.err.println("Error: " + e.toString());
//End try block
return con;
}//end connect()
Please help. ive been working on it for days =(.If you're running a Web app, put all JARs that your app needs in the WEB-INF/lib directory. That's always in the CLASSPATH.
I don't know WebSphere. Do you really have to edit something to add all those CLASSPATH entries?
In Tomcat, all I'd have to do is put a WAR file in the webapps directory.
Your code needs some work. You're not following Sun's Java coding standards. Capitalize your class name, for starters.
Is the username and password for your database still "scott" and "tiger"? Nice security there.
Your connect method makes a database connection. Do you leave it to users to close it? (You do close your connections when you're done with them, don't you?)
I'd make Connection a data member and create it in a constructor. I'd write a close method to close it up.
Doesn't WebSphere do connection pooling? Do you really want to write your own class to handle this?
MOD -
Problem creating JDBC dataview to oracle on Windows
Hi,
I'm trying to configure a JDBC dataview to an Oracle 10g database on DSEE 6.3.1 running Windows 2008
Here are the command I used:
dpconf create-jdbc-data-source -b MYDBSID -B jdbc:oracle:thin://dbhost:1510: \
-J file://e:\dsee\ojdbc14.jar \
-S oracle.jdbc.driver.OracleDriver mydb
echo "password" > e:\dsee\instances\mydb.pwd
dpconf set-jdbc-data-source-prop mydb db-user:myuser \
db-pwd-file:e:\dsee\instances\mydb.pwd \
is-enabled:true is-read-only:true \
dpconf create-jdbc-data-source-pool mypool
dpconf attach-jdbc-data-source mypool mydbAnd when trying to create the view with this command:
dpconf create-jdbc-data-view myview mypool o=example.comHere is what I get:
[LDAP: error code 1 - Unable to apply configuration changes: Exception catched while initializing
JDBC driver oracle.jdbc.driver.OracleDriver in configuration entry cn=mydb,cn=data sources,cn=config --
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver. Check that [Ljava.lang.String;@100
bac2 is a valid URL to a jar file containing class oracle.jdbc.driver.OracleDriver]".
{code}
I guess that it doesn't find the jdbc driver for Oracle but the file is there in e:\dsee\ojdbc14.jar
I tried to copy it to e:\dsee\dps6\lib but it doesn't work better.
Any idea ?
Frederic.I found the solution by adapting the path to the jdbc jar file:
dpconf set-jdbc-data-source-prop ehldb driver-url:file:///e:/dsee/ojdbc14.jarAdding a third slash after file: and using backslashes instead of slashes solved my problem.
Frederic.
Maybe you are looking for
-
HP Pavillion g7 Notebook needing Windows 7 64 Bit USB Controller Drivers
Hi, I have a HP Pavillion g7 Notebook which originally came with Windows 8. I have downgraded to Windows 7 64 bit but I can not find the universal serila bus controller drivers for this version of Window. I have a Intel(R) 7 Series/C216 Chipset Famil
-
In iTunes I would like to set it to bookmark where I am holding in a song on my iPOD. Let's say I want to play a song that I listen to yesterday and stopped playing it in the middle on my iPOD. Today, I want to listen, on my iPOD, to the same song
-
OBIEE 11g time series: regression on ago / todate function ?
Hello, We are testing the migration to OBIEE 11G. We are currently in 10.3 version We have a problem on AGO / TO_DATE OBIEE functions that returns null results on existing reports. In 10.3 version, these functions work properly with the actual TIME d
-
RemoteApp Disconnected - Server 2012 R2
I have a single 2012 R2 Standard server setup with all the RDS roles (RD Gateway, Broker, Session Host, Licensing, etc). I am able to publish apps and connect just fine only if the clients have the following setting: Local Policies > Security Options
-
Organize and browse photos Chronologically
I recently moved from PSE 5 through PSE 7 (2 months using version that came with my Epson Scanner), and then to PSE9. Now I'm coming accross some of fhe idosyncronisities of the Organizer that are discussed in other threads. I'm also seeing where man