I\'ve got a few problems with my running projet but this one is the worst :
String url=\"jdbc:oracle:login/pwd@host:1521:etudom\";
Connection co = null;
Newer Oracle drivers (at least ojdbc6.jar
, maybe earlier ones as well) do not work on Android. They require several classes from the Java Standard Edition (Java SE) that are not available on the stripped down Android platform.
Update:
The error message is pretty clear:
Could not find class 'javax.management.MBeanServer'
This is a Java SE class that's missing on Android. It might want to have a look at the question Android Oracle Database JDBC6. This user was able to use ojdbc14.jar on Android.
Possibly he/she used the Oracle client differently, e.g. Class.forName("oracle.jdbc.OracleDriver");
instead of Class.forName("oracle.jdbc.driver.OracleDriver");
. Or he/she used a different connection string that internally uses different classes. Or it's an older driver even though is called ojdbc14.jar as well.
Anyhow there's no guarantee that it will ever work. Oracle Java client is build for Java SE and not for the Android Java, which only contains those classes that are normally used on a mobile device.