Technology Network Community
Oracle Database
Fusion Middleware
Development Tools
Server & Storage Systems
Enterprise Management
Berkeley DB Family
Cloud Computing
Big Data
Business Intelligence
Migration and Modernization
E-Business Suite
PeopleSoft Enterprise
JD Edwards World
JD Edwards EnterpriseOne
User Productivity Kit Pro (UPK) and Tutor
Governance, Risk & Compliance (GRC)
Master Data Management (MDM)
Oracle CRM On Demand
On Demand: SaaS and Managed Applications
AutoVue Enterprise Visualization
Agile PLM
Endeca Experience Management
Fusion Applications
Archived Forums



General Questions

JDBC connection to Oracle10g

I wrote a simple code in getting connection from java to oracle 10g.I have set the classpath correctly. here is the code. here is the code..  package sql; import java.sql.*; class TestConnection  { 	public static void main(String[] args)  	{ 		try 		{ 			Class.forName("oracle.jdbc.driver.OracleDriver"); 			Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:XE","system","abhishek"); 			Statement stm=con.createStatement();		 			System.out.println("Connection established successfully"); 			con.close(); 		} 		catch(Exception e) 		{ 			e.printStackTrace(); 		} 	} }  At runtime iam getting this exception.... java.sql.SQLException: Io exception: Got minus one from a read call         at oracle.jdbc.driver.DatabaseError.throwSqlException( :112)         at oracle.jdbc.driver.DatabaseError.throwSqlException( :146)         at oracle.jdbc.driver.DatabaseError.throwSqlException( :255)         at oracle.jdbc.driver.T4CConnection.logon(         at oracle.jdbc.driver.PhysicalConnection.<init>( 414)         at oracle.jdbc.driver.T4CConnection.<init>(         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtensio         at oracle.jdbc.driver.OracleDriver.connect(         at java.sql.DriverManager.getConnection(Unknown Source)         at java.sql.DriverManager.getConnection(Unknown Source)         at sql.TestConnection.main(  iam unable to get rid of the problem please help me ....

I did not see the following import in your code.  import oracle.jdbc.*;  If the problem persist, please knock Jdeveloper forum.  -aijaz

Related Links

XP and 8.1.7 client certification
Materialized View not refreshing
Memory allocation for SGA
Open database error
problem storing chinese characters
Oracle Data Guard 9i
Date and Time Format global for a database?
Java Pet Store
Bug in SQL*Plus with 8.1.6 instance.
"shared memory realm" error -- cross-posted in "installation"
Oracle 9i new instance create scripts
Modify connect_timeout in tnsnames.ora ?
Oracle service won't start...
Oracle9i database
CKPT fails on startup with Error 220