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. Current Status of Tethering Apps?

Anyone know what the current status is with regard to publishing free
or paid tethering apps to the Android Market? Some sources I've looked
at say that various tethering apps were banned last year. Were they
initially filtered from the market for TMobile users, or outright
banned? And I notice PdaNet in the market right now. Are Google and
TMobile okay with this app?

Also, in the case where one of your apps is banned, does this affect
any other apps you might also be distributing through the market?

-- 

2. Questions on Graphics/Resolutions

Good day everyone,

I have a few questions related to resolutions and graphics:
1. Is there a maximum resolution that Android supports?
1a. Will the layout engine support large resolutions such as
1280x1024?
1b. Will the layout engine support a resolution like 1920 * 1200?
1c. Will SurfaceFlinger be able to push that many pixels?
1d. Are there any plans to support such large resolutions on the road
map?
2. Are the widgets/views drawn by Android accelerated?
2b. Is there a way to accelerate them?
3. Are the Open GL Java bindings always accelerated? Or does it depend
on the EGL configure and the OEM?
4. Are there any plans to enforce a minimum set of hardware on the
Android platform?

Thanks everyone!
Jason

-- 

3. DDMS GPS doesn't work: Send -120,35 loc = lm.getLastKnownLocation() returns null

4. Testing app on real device

5. How to download from git repositories ?

6. How to move objects graphically on a view in Eclipse

7. Slow Translate and Alpha Animations