[BDB 11gR2 Beta] [#18298] First Questions about DBD 11gR2

Luis Paolini git at gempi.com.br
Sun Mar 14 20:20:45 PDT 2010


Hi Brian,

 

      Thanks for the document which describes some gotchas working with
non-Oracle databases and ADF Business components.

      I still had no luck connecting to SQLite using JDBC driver from a
JDeveloper Application.

      I tried to create a database connection using two different
approaches.

      The first one, using Database Navigator, as described in the document
you sent to me.

 

      

 

      

 

 

      The Second one, I just create a POJO to connect to SQLite.

 

  public Connection getConnection(){

    Connection conn = null;

    SQLite.Database db = null;

    

    try {

       Class.forName("SQLite.JDBCDriver").newInstance();

       conn =
(Connection)DriverManager.getConnection("jdbc:sqlite:/D:/Downloads/Oracle/Be
rkeley_Beta/db-5.0.11/db-5.0.11/build_windows/Win32/Debug/test.db");

       java.lang.reflect.Method m =

         conn.getClass().getMethod("getSQLiteDatabase", null);

       db = (SQLite.Database) m.invoke(conn, null);

     } catch (Exception e) {

      e.printStackTrace();

     }

    return conn;

  }

 

Error Message:

Unable to load sqlite_jni: java.lang.UnsatisfiedLinkError:
D:\Downloads\Oracle\Berkeley_Beta\db-5.0.11\db-5.0.11\build_windows\Win32\De
bug\sqlite_jni.dll: Can't find dependent libraries

 

Before running both cases, I did two configurations on JDeveloper.

 

1.  Added the library sqlite.jar in the classpath

2.  Added the parameter
-Djava.library.path=D:\Downloads\Oracle\Berkeley_Beta\db-5.0.11\db-5.0.11\bu
ild_windows\Win32\Debug

in the Launch Setting (Java Options).

 

   I’m running JDeveloper 11.1.1.2.0

 

Regards,

 

Luis

 

 

-----Original Message-----
From: Brian Fry [mailto:brian.fry at oracle.com] 
Sent: sexta-feira, 5 de março de 2010 19:00
To: Sandra Whitman
Cc: Luis Paolini; 'George Feinberg'; 'Dave Segleau'; 'Kent Rollins';
'Fernando Targa'; 'Sleepycat Software Support';
bdb-beta-feedback at oss.oracle.com
Subject: Re: [BDB 11gR2 Beta] [#18298] First Questions about DBD 11gR2

 

SQLite is not tested (certified) in the currently available release. 

However, we generally support any SQL92 database with a JDBC driver. 

Since it has not been certified, there may be bugs that we don't know 

about. If you encounter bugs, I can work with you to get them logged so 

our engineers can work on them.

 

Can you confirm which JDeveloper version you are using (Help > About)?

 

You may also want to refer to this document which describes some gotchas 

working with non-Oracle databases and ADF Business components:

 

http://www.oracle.com/technology/products/jdev/11/how-tos/multidatabaseapp.h
tml

 

-- Brian

 

 

On 3/5/2010 5:44 AM, Sandra Whitman wrote:

> 

> Thank you for the update Luis,

> 

> I'll check into the data types.  As for the ADF question, we are still 

> investigating what is supported.  Perhaps someone else on the email 

> list will have more information on that.

> 

> Best Regards,

> Sandra

> 

> Luis Paolini wrote:

>> 

>> Hi Sandra,

>> 

>> 

>> 

>>       Now that SQLite is ok, I took some time to play with some SQL 

>> Statements in order

>> 

>> to create tables that I could use in my ADF Project.

>> 

>>       I have a question about the way that SQLite handles datatypes.

>> 

>>       In some tables I need to create date and timestamp columns. I 

>> learnt that SQLite does not

>> 

>> have a specific datatype to store this type of information, but a 

>> function can be used

>> 

>> to define the format for storage. I'll look for information about 

>> this process but if have some

>> 

>> please send to me.

>> 

>>       I also tried to use the SQLite jdbc.jar to configure a 

>> JDeveloper JDBC connection to SQLite but

>> 

>> is not working.

>> 

>>       This is what I did:

>> 

>> 

>> 

>>       1. Create a new ADF Desktop Application.

>> 

>>       2. In the Model project, start the wizard to create Business 

>> components from Tables.

>> 

>> 

>> 

>> 

>>       3. Click to create a new connection

>> 

>> 

>> 

>> 

>> 

>> 

>>       4. In the connection type select Generic JDBC

>> 

>> 

>> 

>> 

>> 

>>       5. Create a new Driver Class using SQLite jdbc.jar

>> 

>> 

>> 

>> 

>> 

>> 

>>       6. Creat a URL pointing to test database, but the test 

>> connection fails.

>> 

>> 

>> 

>> 

>> 

>>       Could you help me on these steps?

>> 

>> 

>> 

>> Regards,

>> 

>> 

>> 

>> Luis

>> 

>> 

>> 

>> -----Original Message-----

>> 

>> From: Sandra Whitman [mailto:sandra.whitman at oracle.com]

>> 

>> Sent: quarta-feira, 3 de março de 2010 17:23

>> 

>> To: Luis Paolini

>> 

>> Cc: 'George Feinberg'; 'Dave Segleau'; 'Kent Rollins'; 'Fernando 

>> Targa'; 'Sleepycat Software Support'; bdb-beta-feedback at oss.oracle.com

>> 

>> Subject: Re: [BDB 11gR2 Beta] [#18298] First Questions about DBD 11gR2

>> 

>> 

>> 

>> Hi Luis,

>> 

>> 

>> 

>> I just wanted to follow up and see how you are doing.  Are you able to

>> 

>> SQLite with an ADF project?

>> 

>> 

>> 

>> Thanks,

>> 

>> Sandra

>> 

>> 

>> 

>> Luis Paolini wrote:

>> 

>> >

>> > George,

>> 

>> >

>> >

>> >

>> >                 As you suggested, I executed some SQL statements from

>> 

>> > the SQLITE console and looks like that everything is fine.

>> 

>> >

>> >                 The test.db file was created and the test.db-jornal

>> 

>> > directory was populated with a few files (_db.001  to _db.006,

>> 

>> > _db.register and log.0000000001).

>> 

>> >

>> >                 So, am I good to go?

>> 

>> >

>> >                 Now, I will create some tables and try to use them in

>> 

>> > a ADF project, creating business components based on them.

>> 

>> >

>> >

>> >

>> > Regards,

>> 

>> >

>> >

>> >

>> > Luis

>> 

>> >

>> >

>> >

>> >

>> >

>> > *From:* George Feinberg [mailto:george.feinberg at oracle.com] 

>> <mailto:%5Bmailto:george.feinberg at oracle.com%5D>

>> 

>> > *Sent:* domingo, 28 de fevereiro de 2010 10:47

>> 

>> > *To:* Luis Paolini

>> 

>> > *Cc:* 'Fernando Targa'; 'Kent Rollins'; 'Dave Segleau'; 'Sleepycat

>> 

>> > Software Support'; bdb-beta-feedback at oss.oracle.com 

>> <mailto:bdb-beta-feedback at oss.oracle.com>; 'Sandra Whitman'

>> 

>> > *Subject:* Re: [BDB 11gR2 Beta] [#18298] First Questions about DBD 

>> 11gR2

>> 

>> >

>> >

>> >

>> > Luis,

>> 

>> >

>> >

>> >

>> > Have you had any luck executing SQL from the test?

>> 

>> >

>> > If it builds successfully it should work and it appears that it

>> 

>> >

>> > it partially there.  A test.db file should have been created

>> 

>> >

>> > as well as the test-db-journal directory.

>> 

>> >

>> >

>> >

>> > Regards,

>> 

>> >

>> > George

>> 

>> >

>> >

>> >

>> > On Feb 26, 2010, at 6:57 AM, Luis Paolini wrote:

>> 

>> >

>> >

>> >

>> > Hi George,

>> 

>> >

>> >

>> >

>> >                 I followed your instructions and had success building

>> 

>> > the db library, db_sql and db_sql_jdbc projects, but when I executed

>> 

>> >

>> > the command for test in build_windows/Win32/Debug I got a SQLITE

>> 

>> > prompt and the test.db-journal directory was created but it is empty.

>> 

>> >

>> >                 Should I execute any command on SQLITE prompt?

>> 

>> >

>> >                 See below the files created in

>> 

>> > build_windows\Win32\Debug directory.

>> 

>> >

>> >

>> >

>> > <image001.png>

>> 

>> >

>> >

>> >

>> > Regards,

>> 

>> >

>> >

>> >

>> > Luis

>> 

>> >

>> >

>> >

>> >

>> >

>> > __________ Information from ESET NOD32 Antivirus, version of virus

>> 

>> > signature database 4904 (20100301) __________

>> 

>> >

>> > The message was checked by ESET NOD32 Antivirus.

>> 

>> >

>> > http://www.eset.com

>> 

>> >

>> >

>> >

>> > __________ Information from ESET NOD32 Antivirus, version of virus

>> 

>> > signature database 4904 (20100301) __________

>> 

>> >

>> > The message was checked by ESET NOD32 Antivirus.

>> 

>> >

>> > http://www.eset.com

>> 

>> > 

>> ------------------------------------------------------------------------

>> 

>> >

>> > _______________________________________________

>> 

>> > BDB-BETA-FEEDBACK mailing list

>> 

>> > BDB-BETA-FEEDBACK at oss.oracle.com 

>> <mailto:BDB-BETA-FEEDBACK at oss.oracle.com>

>> 

>> > http://oss.oracle.com/mailman/listinfo/bdb-beta-feedback

>> 

>> 

>> 

>> 

>> 

>> __________ Information from ESET NOD32 Antivirus, version of virus 

>> signature database 4913 (20100303) __________

>> 

>> 

>> 

>> The message was checked by ESET NOD32 Antivirus.

>> 

>> 

>> 

>> http://www.eset.com

>> 

>> 

>> 

>> 

>> 

>> 

>> 

>> 

>> 

>> __________ Information from ESET NOD32 Antivirus, version of virus 

>> signature database 4917 (20100305) __________

>> 

>> 

>> 

>> The message was checked by ESET NOD32 Antivirus.

>> 

>> 

>> 

>> http://www.eset.com

>> 

>> 

>> 

>> 

>> 

>> __________ Information from ESET NOD32 Antivirus, version of virus 

>> signature database 4917 (20100305) __________

>> 

>> The message was checked by ESET NOD32 Antivirus.

>> 

>> http://www.eset.com

 

 

__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4919 (20100305) __________

 

The message was checked by ESET NOD32 Antivirus.

 

http://www.eset.com

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100315/64cefb44/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 58340 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100315/64cefb44/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 26021 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100315/64cefb44/attachment-0003.png 


More information about the BDB-BETA-FEEDBACK mailing list