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. About the SetFrameRate at Android Camera Input MIO

Hi,
SetFrameRate at Camera Input MIO does not negotiate with the camera
driver for the preview framerate, it just postpone the Camera Input
MIO to receive video frame from buffer queue when recording is
started.
The preview framerate could be different from what we ask for
recording (encoding), doesnt this condition cause any problem? Ex.
Camera client sends preview frame to buffer for Camera Input MIO at 30
fps, but the app asks recording at 20 fps.
--~--~---------~--~----~------------~-------~--~----~

2. Animating resizing of TextView

I have a textView that changes size dynamically and I want to animate
the resizing.
Here are my steps:
(1) use TextView.layout to set the initial size - editText.layout(0,
0, 200, 50);
(2) use startAnimation(scale) to scale the textView in the Xdirection
(to animate resize)
      <scale
        android:fromXScale="1.0" android:toXScale="1.5"
        android:fromYScale="1.0" android:toYScale="1.0"
        android:pivotX="0%" android:pivotY="0%"
        android:duration="600" />
(3) Set the new size of the textview using layout() - editText.layout
(0, 0, 300, 50);

If I use ScaleAnimation, the text in the view get stretched or
squeezed. Is there a way to animate the resizing of the textview
without causing the text to get stretched or squeezed?

-George
--~--~---------~--~----~------------~-------~--~----~

3. FTP on android

4. Change Spinner content on fly

5. how expensive findViewById ??

6. XML With Xliff

7. Apps labeled as Tetris Clones removed from Android Market