Menu

Problems on Setup

Brainstorm
2013-02-01
2013-03-26
  • Brainstorm

    Brainstorm - 2013-02-01

    Hello, im having difficulties when trying to setup a small android application using your driver port, im just not sure how to register the drive properly, i tried lots of different approaches and i keep getting either "no valid driver found" errors or a generic error with "org.firebirdsql.jdbc.FBDriver" (or "FirebirdDriver").

    Im using firebird 2.5, and Eclipse with various android versions (tried from 2.3 til 4.0).

    Do you have a sample project to share with the driver working for android?

    My regards,

     
  • Christian Mayer

    Christian Mayer - 2013-02-01

    Hi,

    register Server:
    Class.forName("org.firebirdsql.jdbc.FBDriver")
    get new Connection:
    DriverManager.getConnection("jdbc:firebirdsql:HOST/PORT:DATABASE");

    Copy all stuff under assets to the same folder in your project

    best regards

     

    Last edit: Christian Mayer 2013-02-01
  • Brainstorm

    Brainstorm - 2013-02-02

    We have tried that and DriveManager.registerDriver(DriverName), both give similar results, we even tried mixing them.
    Here is my code: http://dl.dropbox.com/u/34291967/Firebird_Connection.txt

     

    Last edit: Brainstorm 2013-02-02
  • Christian Mayer

    Christian Mayer - 2013-02-02

    This code works for me
    http://pastebin.com/9pa0Wx8T

    I'm using Netbeans and NBAndroid.
    I don't know if you have to or how to register the jar-file in the project-properties.

     
  • Brainstorm

    Brainstorm - 2013-02-05

    Hello again. We have not managed to get it to work with netbeans either.

    Would you have a sample project for netbeans that we can load and take a look so we can figure out what we could be doing wrong? It might give us a direction to the error at hand (we believe we are having trouble to get java to read our class once its loaded on android).

    Thanks.

     

    Last edit: Brainstorm 2013-02-05
  • Christian Mayer

    Christian Mayer - 2013-02-05

    Hi,

    shure. I'm uploading the full project of the example i've posted before.
    Let me know if this works, please.

     
  • Brainstorm

    Brainstorm - 2013-02-06

    We managed to get it working on Netbeans, thanks.

    Now we are trying to port it to Eclipse. However, we are not sure what the 2 files inside the /services/ folder are for:

    java.sql.Driver
    org.firebirdsql.gds.impl.GDSFactoryPlugin

    They are just plain text files? What is their use?

     

    Last edit: Brainstorm 2013-02-06
  • Christian Mayer

    Christian Mayer - 2013-02-06

    The folder is used for internal jaybird purposes, like Plugin-System for de different connection types (embedded, local, nativ, ...). In the big version of Jaybird this files are integrated in the jar-file. I moved the files to the assert folder, because you can't access resources in external jar-files in Android.

    If you are creating a Eclipse-Example don't be restraint and share, please :)

     
  • Brainstorm

    Brainstorm - 2013-02-07

    I see, we got it to work just fine now, thanks.
    Here is a sample project on eclipse:
    http://dl.dropbox.com/u/34291967/Connect_Android_Firebird.rar

     
  • Christian Mayer

    Christian Mayer - 2013-02-08

    Thanks Brainstorm.
    Will you keep this file on your dropbox or should i upload it here on sourceforge ?

    regards

     
  • Brainstorm

    Brainstorm - 2013-02-16

    Hello,
    Might aswell mirror it here on sourceforge, since it will help more people if its readily available for download.

    Att

     

    Last edit: Brainstorm 2013-03-08
  • Christian Mayer

    Christian Mayer - 2013-02-19

    Ok, thank you very much.

    regards

     
  • hanane

    hanane - 2013-03-26

    hello,
    i upload your project Brainstorm http://dl.dropbox.com/u/34291967/Connect_Android_Firebird.rar, but it gives error in the screen of the emulator: connection Failed java.lang.ClassNotFoundException:org.firebirdsql.jdbc.FBDriver
    when i look to the logCat there is no error.
    best regards,

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.