0

I am doing multimedia application. my issue is i want to connect oracle database into my application through JDBC. whenever i tried to connect jdbc driver it shows

Dxwarning: Ignoring InnerClasses attribute for an anonymous inner class (oracle.jdbc.pool.OracleRuntimeLoadBalancingEventHandlerThread$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.

can anyone link the exact jar file for oracle JDBC for android application.

RAAAAM
  • 3,378
  • 19
  • 59
  • 108
  • This is wrong on so many levels... – Erich Kitzmueller Feb 14 '11 at 13:03
  • Its working perfectly on 2.2 SDK version. The thing i forgot to include OJDBC14.JAR in eclipse. – RAAAAM Feb 15 '11 at 04:11
  • @HariRam : could you let me show your code ? I've done the same things of you. But I get an Exception during the connection to the database. Could you show us your code ? It'd be great and very helpful if you managed to do what you said above... Thanks for all – Eriatolc Apr 20 '11 at 09:15
  • Have you import the oracle jar file in build in path.? – RAAAAM Apr 20 '11 at 11:42
  • Yes, I had. I did it with Eclipse. I made "add Jars" and I gave the jar to Eclipse. All my code is here : [ http://pastebin.archlinux.fr/432118 ]. I work with Android 2.3.3, is it important ? – Eriatolc Apr 20 '11 at 11:49
  • I verified your code, everthing is correct but i think you forgot to include class.Forname `Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();` – RAAAAM Apr 20 '11 at 12:05
  • Hope you are getting Fatal or arrayOutOFBound Exception, your application is not understanding your importing variable from database. I think there is a different among you database variable and your application variable. you just check where you made this error. – RAAAAM Apr 20 '11 at 12:10
  • If you got the answer post your error in comments, because the future user can rectify the exception. – RAAAAM Apr 20 '11 at 12:19

2 Answers2

0

You cannot import a JAR implementing java.* classes easily. And, JDBC would need to be ported to Android, since it probably relies upon classes in JavaSE that Android lacks. And, you would need to write your own JDBC driver for SQLite anyway, wrapping the API Android already supplies, since I suspect the existing JDBC driver uses JNI. And, when all of that is done, you will have an application that adds a lot of bloat, making it less likely people will download and retain your application.

source

Community
  • 1
  • 1
Tanmay Mandal
  • 39,873
  • 12
  • 51
  • 48
  • thank you, its connecting now.I forgot to include OJDBC14 jar file in eclipse. I can able to get data from oracle through textview. – RAAAAM Feb 14 '11 at 12:30
0

I'm very interested in this. I was trying something similar yesterday with the mysql driver (ultimately it will be an oracle connection though), everything I've googled says it's either a very bad idea to use jdbc with android or simply not possible.

Yet you've managed to connect to an oracle database. I'd be interested to know performance etc.

PDStat
  • 5,513
  • 10
  • 51
  • 86