Categories

Main
Database
Java
Microsoft.NET
Adabas
DB2
Informix
Microsoft SQL Server
MySQL
Oracle
Pervasive.SQL
PostgreSQL
Sybase
Other
ASP
ColdFusion
Crystal Reports
Delphi, C etc
JAVA
Microsoft.NET
Perl and the DBI
PHP
ANSI SQL
Unix Shell Scripts
Visual Basic
XML & XSLT
Corel Paradox
FileMaker
Microsoft Access
Microsoft Excel
Other PC Databases
Applications & Tools
Database Concepts & Design
EJB programming & troubleshooting
EJB design
General J2EE
XML & Web services
Web tier: servlets, JSP, Web frameworks
Performance and scalability
Industry news
TSS feedback
Mobicents Contributors
Mobicents Users
JSLEE Resource Adaptor Types
Planning JavaOne 2008
Sun Tech Days
Other Java conferences
Binary Web Services and XML
Metro and JAXB
GlassFish
GlassFish Plugins
Project jMaki
GlassFish WebTier
Mural
Java Development Tools
Java WS & XML Community News
JAXP
Java SE
6uN Early Access
Java Quick Starter
Java SE Snapshots: Project Feedback
JCK Forum
Feedback and Suggestions
JDK Distros
JDK Open Source
General JSR Discussion
JCP 2.6
JXTA Community Forum
ME Interest
ME Cool Apps
ME General Help
ME Feedback & Suggestions
ME Application Developer Interest
Blu-ray Disc Java
ME Developer Days
Squawk
Mobile Developer Alliance
OpenCable
LWUIT
JavaFX Script Language Discussion
OpenJFX General Discussion
Scene Graph
General Performance Discussion
Your Java Career
NetBeans 6.0
Servlets
JSP
JSF
Portals and Portlets
EJB and Other Java EE Technologies
Distributed Java
Object Relational Mapping
JDBC
Web Services
Swing / AWT / SWT / JFace
JNLP and Web Start
Java Micro Edition
Sockets and Internet Protocols
Threads and Synchronization
Performance
Applets
I/O and Streams
Other Java APIs
Game Development
Java in General (beginner)
Java in General (intermediate)
Java in General (advanced)
Programmer Certification (SCJP)
Developer Certification (SCJD)
Associate Certification (SCJA)
Web Component Certification (SCWCD)
EJB Certification (SCBCD)
Mobile Application Certification (SCMAD)
Architect Certification (SCEA)
Web Services Certification (SCDJWS)
XML Certification
Product and Other Certifications
Mock Exam Errata
Sun Certification Results
Authors' Corral
Book Reviews
Events
Bunkhouse Porch
Teachers' Lounge
Testing
OO, Patterns, UML and Refactoring
IDEs, Version Control and other tools
Ant, Maven and Other Build Tools
Linux / UNIX
Mac OS
HTML and JavaScript
XML and Related Technologies
Agile and Other Processes
General Computing
Security
Groovy
Scala
Other Languages
Struts
Application Frameworks
Other Open Source Projects
BEA/Weblogic
IBM/Websphere
Oracle/OAS
Apache/Tomcat
JBoss
Other Java Products and Servers
JavaRanch
Cattle Drive (java college)
Moderators Only
Trash Can
Jobs Offered
Jobs Wanted
Jobs Discussion
Meaningless Drivel
Programming Diversions
Blatant Advertising
Java Announcements
New To Java
Advanced Java
Java Applets
Networking
Threads and Synchronization
Java 2D
AWT / Swing
SWT / JFace
CLDC and MIDP
CDC and Personal Profile
Sun Java Wireless Toolkit
Enterprise JavaBeans
JavaServer Pages (JSP) and JSTL
Java Servlet
JavaServer Faces
Web Frameworks
Database
XML
Lucene
NetBeans
Eclipse
IntelliJ IDEA
JCreator
Other IDEs
Java Tutorials
Java Tips
Jobs Discussion
Jobs Offered
Jobs Wanted
Professional Certification
Forum Lobby
Java Blogs
Introductions
Reviews / Advertising
Suggestions & Feedback

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

Oracle/OAS


java. lang. Class Not FoundException:


Iam using oracle10g at the backend.I tried a simple JDBC program to check the jdbc connection with the database.I have set the path for oracle bin folder in the System Variable "Path"I have given the path for ojdbc14.jar file in the system variable "Classpath"Here is the code.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: 8080rcl","system","abhishek");Statement stm=con.createStatement();System.out.println("Connection established successfully");con.close();}catch(Exception e){e.printStackTrace();}}}The code compiled fine and raised an exception at runtimejava. lang. ClassNot FoundException: oracle. jdbc.driver. OracleDriverat java. net. URLClass Loader$1.run (Unknown Source)-------------------at sql.OracleTest.main(OracleTest.java:11)give the solution for this problem.thanks in advance--------------------Abhishek

   
   
   
 

      It still is a classpath issue. When you run java, it is at that point that you need the Oracle JDBC Driver in the classpath. A System variable usually doesn't do the trick.Mark--------------------How to Ask Questions the Smart Way FAQ  "I believe you can have both. and sometimes, in order to have both, you need both." - Myself

   
   

   
   
      Thanks for your reply.I have set the Oracle JDBC Driver at runtime.This time iam getting different error..java.sql.SQLException: Io exception: Got minus one from a read callat oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:255)at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)at java.sql.DriverManager.getConnection(Unknown Source)at java.sql.DriverManager.getConnection(Unknown Source)at sql.OracleTest.main(OracleTest.java:12)How to resolve this problem?--------------------Abhishek


Related Links

return int to Oracle
Incomplete page loading in IE
oracle stored procedure problem in 9i
insert a table within a table
oracle9ias
How to retrieve data in xml format through stored procedure in oracle 9?
oracle developer
Setting oc4j in winnt
Not all variables bound In OC4J Release-3
Is the 1Z0-001 based on Oracle 8i or 9i?
in sql*plus how can I define the path to run sql script?
oracle connectivity
How to create dynamic sql?
Jdev9.0.3 & Oracle9i(SQLException: Io exception: The Network Adapter could not estab)
PL/SQL
Please help me with problem moving servlet from ApacheTomCat to Oracle AS