Subject Re: [Firebird-Java] connection between Firebird and android
Author Mark Rotteveel
On 17-5-2013 11:50, hananebhm wrote:
> Hello
> i m working a project with firebird and android.My code is correct but when i try to run it gives me in logcat a lot of error of runTime:
> 05-17 09:43:57.394: E/AndroidRuntime(302): FATAL EXCEPTION: main
> 05-17 09:43:57.394: E/AndroidRuntime(302): java.lang.NoClassDefFoundError: org.firebirdsql.jdbc.FBDataSource
> 05-17 09:43:57.394: E/AndroidRuntime(302): at org.firebirdsql.jdbc.AbstractDriver.createDataSource(AbstractDriver.java:138)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:124)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at java.sql.DriverManager.getConnection(DriverManager.java:191)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at java.sql.DriverManager.getConnection(DriverManager.java:226)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at com.example.as.MainActivity.onCreate(MainActivity.java:25)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.os.Handler.dispatchMessage(Handler.java:99)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.os.Looper.loop(Looper.java:123)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at android.app.ActivityThread.main(ActivityThread.java:4627)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at java.lang.reflect.Method.invokeNative(Native Method)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at java.lang.reflect.Method.invoke(Method.java:521)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> 05-17 09:43:57.394: E/AndroidRuntime(302): at dalvik.system.NativeStart.main(Native Method)
> can you help me please?

The error suggests that something is wrong with the classpath setup of
your program, because it is missing the class
org.firebirdsql.jdbc.FBDataSource.

I don't have experience with android, but maybe someone else can help;
or post a question on the discussion pages of the Android Jaybird port:
http://sourceforge.net/projects/androidjaybird/

Mark
--
Mark Rotteveel