Oracle JDBC driver

Problems with WiFi, SQLite ,Bluetooth, WiMax, Proxies, etc...

Oracle JDBC driver

Postby iamok » Wed Nov 04, 2009 11:44 pm

Hi all

I am trying to reach an Oracle 11g database from my Android phone.
I believe my application throws the "ClassNotFound" exception as soon
as I try to load the Oracle JDBC driver.

Im using Eclipse to develop the app. I have already added a reference to the
driver (Build Path > Configure Build Path > Referenced Libraries > Add External
Jars). The statement producing the exception is:


This is the code Im trying to execute:
package cis612.jdbcdatabase;

import java.sql.Connection;
import java.sql.SQLException;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import oracle.jdbc.*;

public class JDBCAndroid extends Activity {
public void onCreate(Bundle savedInstanceState) {

try {
} catch (SQLException e) {
Toast.makeText(this, e.getMessage(), 1).show();
} catch (ClassNotFoundException e) {
Toast.makeText(this, e.getMessage(), 1).show();

public void callOracleDatabase() throws SQLException,
ClassNotFoundException {

// Load the Oracle JDBC driver

Toast.makeText(getApplicationContext(), "Gotit", 1).show();

Once Poster
Once Poster
Posts: 1
Joined: Wed Nov 04, 2009 11:19 pm


Return to Networking & Database Problems

Who is online

Users browsing this forum: No registered users and 2 guests