Jdbc driver problem

by Alessio » Tue, 25 Aug 2009 01:09:12 GMT


Sponsored Links
 i all.
Like object i have some problem with jdbc driver.

I wanna connect to a database server (postgresql) without write some
php script server side to comunicate with client (android mobile
phone), so can i use this driver?

http://jdbc.postgresql.org/

I try it in a normal java program and it works very well but when I
use this library in android program I have this exception (logcat
paste):

08-24 08:15:11.072: INFO/ActivityManager(568): Starting activity:
Intent { flags=0x10000000 comp={com.prova.pgsql/
com.prova.pgsql.PGSQL} }
08-24 08:15:11.132: INFO/ActivityManager(568): Start proc
com.prova.pgsql for activity com.prova.pgsql/.PGSQL: pid=767 uid=10023
gids={}
08-24 08:15:11.152: DEBUG/AndroidRuntime(760): Shutting down VM
08-24 08:15:11.152: DEBUG/dalvikvm(760): DestroyJavaVM waiting for
non-
daemon threads to exit
08-24 08:15:11.172: DEBUG/dalvikvm(760): DestroyJavaVM shutting VM
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread shutting
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread has shut
down
08-24 08:15:11.172: DEBUG/jdwp(760): JDWP shutting down net...
08-24 08:15:11.172: DEBUG/jdwp(760): +++ peer disconnected
08-24 08:15:11.172: INFO/dalvikvm(760): Debugger has detached; object
registry had 1 entries
08-24 08:15:11.182: DEBUG/dalvikvm(760): VM cleaning up
08-24 08:15:11.232: DEBUG/dalvikvm(760): LinearAlloc 0x0 used 639228
of 4194304 (15%)
08-24 08:15:11.362: INFO/jdwp(767): received file descriptor 20 from
ADB
08-24 08:15:11.451: DEBUG/dalvikvm(541): GC freed 264 objects / 9912
bytes in 329ms
08-24 08:15:11.682: DEBUG/dalvikvm(541): GC freed 40 objects / 1696
bytes in 212ms
08-24 08:15:11.792: DEBUG/dalvikvm(541): GC freed 2 objects / 48 bytes
in 107ms
08-24 08:15:11.892: INFO/dalvikvm(767): Failed resolving Lorg/
postgresql/jdbc4/Jdbc4SQLXML; interface 131 'Ljava/sql/SQLXML;'
08-24 08:15:11.892: WARN/dalvikvm(767): Link of class 'Lorg/
postgresql/
jdbc4/Jdbc4SQLXML;' failed
08-24 08:15:11.892: ERROR/dalvikvm(767): Could not find class
'org.postgresql.jdbc4.Jdbc4SQLXML', referenced from method
org.postgresql.jdbc4.AbstractJdbc4Connection.createSQLXML
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: unable to resolve new-
instance 391 (Lorg/postgresql/jdbc4/Jdbc4SQLXML;) in Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: rejecting opcode 0x22 at
0x0000
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: rejected Lorg/
postgresql/
jdbc4/AbstractJdbc4Connection;.createSQLXML ()Ljava/sql/SQLXML;
08-24 08:15:11.892: WARN/dalvikvm(767): Verifier rejected class Lorg/
postgresql/jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: DEBUG/AndroidRuntime(767): Shutting down VM
08-24 08:15:11.892: WARN/dalvikvm(767): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-24 08:15:11.892: ERROR/AndroidRuntime(767): Uncaught handler:
thread main exiting due to uncaught exception
08-24 08:15:11.902: ERROR/AndroidRuntime(767): java.lang.VerifyError:
org.postgresql.jdbc4.AbstractJdbc4Connection
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.makeConnection(Driver.java:393)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.connect(Driver.java:267)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:192)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.Drive



Jdbc driver problem

by Alessio » Tue, 25 Aug 2009 01:09:17 GMT


 i all.
Like object i have some problem with jdbc driver.

I wanna connect to a database server (postgresql) without write some
php script server side to comunicate with client (android mobile
phone), so can i use this driver?

http://jdbc.postgresql.org/

I try it in a normal java program and it works very well but when I
use this library in android program I have this exception (logcat
paste):

08-24 08:15:11.072: INFO/ActivityManager(568): Starting activity:
Intent { flags=0x10000000 comp={com.prova.pgsql/
com.prova.pgsql.PGSQL} }
08-24 08:15:11.132: INFO/ActivityManager(568): Start proc
com.prova.pgsql for activity com.prova.pgsql/.PGSQL: pid=767 uid=10023
gids={}
08-24 08:15:11.152: DEBUG/AndroidRuntime(760): Shutting down VM
08-24 08:15:11.152: DEBUG/dalvikvm(760): DestroyJavaVM waiting for non-
daemon threads to exit
08-24 08:15:11.172: DEBUG/dalvikvm(760): DestroyJavaVM shutting VM
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread shutting
down
08-24 08:15:11.172: DEBUG/dalvikvm(760): HeapWorker thread has shut
down
08-24 08:15:11.172: DEBUG/jdwp(760): JDWP shutting down net...
08-24 08:15:11.172: DEBUG/jdwp(760): +++ peer disconnected
08-24 08:15:11.172: INFO/dalvikvm(760): Debugger has detached; object
registry had 1 entries
08-24 08:15:11.182: DEBUG/dalvikvm(760): VM cleaning up
08-24 08:15:11.232: DEBUG/dalvikvm(760): LinearAlloc 0x0 used 639228
of 4194304 (15%)
08-24 08:15:11.362: INFO/jdwp(767): received file descriptor 20 from
ADB
08-24 08:15:11.451: DEBUG/dalvikvm(541): GC freed 264 objects / 9912
bytes in 329ms
08-24 08:15:11.682: DEBUG/dalvikvm(541): GC freed 40 objects / 1696
bytes in 212ms
08-24 08:15:11.792: DEBUG/dalvikvm(541): GC freed 2 objects / 48 bytes
in 107ms
08-24 08:15:11.892: INFO/dalvikvm(767): Failed resolving Lorg/
postgresql/jdbc4/Jdbc4SQLXML; interface 131 'Ljava/sql/SQLXML;'
08-24 08:15:11.892: WARN/dalvikvm(767): Link of class 'Lorg/postgresql/
jdbc4/Jdbc4SQLXML;' failed
08-24 08:15:11.892: ERROR/dalvikvm(767): Could not find class
'org.postgresql.jdbc4.Jdbc4SQLXML', referenced from method
org.postgresql.jdbc4.AbstractJdbc4Connection.createSQLXML
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: unable to resolve new-
instance 391 (Lorg/postgresql/jdbc4/Jdbc4SQLXML;) in Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: rejecting opcode 0x22 at
0x0000
08-24 08:15:11.892: WARN/dalvikvm(767): VFY: rejected Lorg/postgresql/
jdbc4/AbstractJdbc4Connection;.createSQLXML ()Ljava/sql/SQLXML;
08-24 08:15:11.892: WARN/dalvikvm(767): Verifier rejected class Lorg/
postgresql/jdbc4/AbstractJdbc4Connection;
08-24 08:15:11.892: DEBUG/AndroidRuntime(767): Shutting down VM
08-24 08:15:11.892: WARN/dalvikvm(767): threadid=3: thread exiting
with uncaught exception (group=0x4000fe70)
08-24 08:15:11.892: ERROR/AndroidRuntime(767): Uncaught handler:
thread main exiting due to uncaught exception
08-24 08:15:11.902: ERROR/AndroidRuntime(767): java.lang.VerifyError:
org.postgresql.jdbc4.AbstractJdbc4Connection
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.makeConnection(Driver.java:393)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
org.postgresql.Driver.connect(Driver.java:267)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverManager.getConnection(DriverManager.java:192)
08-24 08:15:11.902: ERROR/AndroidRuntime(767): at
java.sql.DriverMana


Sponsored Links


Jdbc driver problem

by Mark Murphy » Tue, 25 Aug 2009 01:44:21 GMT


 > Like object i have some problem with jdbc driver.

Android does not include JDBC.


Write a Web service in PHP and connect to that Web service from Android
using HttpURLConnection or HttpClient.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
Android App Developer Books:  http://commonsware.com/books.html 



--~--~---------~--~----~------------~-------~--~----~



Jdbc driver problem

by Alessio » Wed, 26 Aug 2009 15:21:51 GMT


 i'll do that.

Ty





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to add my own item to input field menu

Hi,

1) How to add my own menu item to the input field menu which operates
on the selected word like "add 'word' to dictionary" menu item that
comes with Android ?

Image URL for reference : 
http://www.the-gadgeteer.com/wp-content/uploads/2009/01/android-g1-38.jpg

Thanks in advance

--~--~---------~--~----~------------~-------~--~----~

2. the if_nameindex is missing

Hi,

I'm porting a linux (FC9) user space application to Android. The
original code uses if_nameindex() which lists out all the network
interfaces and their indices. the data structure "struct if_nameindex"
and function prototype if_nameindex() are defined in /usr/include/net/
if.h. However, these data structure and function are not included in
the Android Cupcake source tree.

Does anybody know if there is any replacement available in the Android
source tree for this data structure and its functions? I see the
if_nametoindex() and if_indextoname() functions are available in
Android. why were the data structure "struct if_nameindex" and
function if_nameindex() removed from Android?

Thanks,
Debbie

--~--~---------~--~----~------------~-------~--~----~

3. Emote Button in Soft Keyboard Input

4. Upgrade to Donut causes syncing problems

5. Multiple Screen Support, 1.5 and 1.6

6. How can I contact to Android calendar app license?

7. Problem with network location provider