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

George Feinberg george.feinberg at oracle.com
Thu Feb 25 12:36:05 PST 2010


Luis,

Sandra is out today so I'll help.
I just tried what was sent to you for instructions and they worked, with
some modifications:

1.  I added the db_sql_jdbc project and changed the Linker->General->Output File to $(OutDir)/sqlite_jni.dll
For good measure I also changed
Linker->Debugging->Generate Program Database File
and
Linker->Advanced->Import Library
similarly to add "sqlite_jni"
I don't think these are necessary but I did them.

2.  I had to build the db library first in the solution (project "db").  At this time
the db_sql project depends on this so it's necessary.  This step may have been missing
from your instructions.
3.  I then built the db_sql project 
4.  I then built the db_sql_jdbc project
5.  The command for testing is, in build_windows/Win32/Debug (or Release if you built that):
	java -classpath jdbc.jar -Djava.library.path=. SQlite.Shell test.db


That worked.  The test.db and test.db-journal were populated correctly.
 I happen to be using Visual Studio 2008 Express on Windows 7 but if anything
VS2005 will be smoother since there are no project file conversions required.

If you start over you should start with a clean directory.  Also make sure that your
PATH does not accidentally point to any old DB- or SQLite-related dlls.

Regards,
George


On Feb 25, 2010, at 6:47 AM, Luis Paolini wrote:

> Hi Sandra,
>  
>       Thanks for the detailed instructions.
> I followed the steps below and got an error on step 8 (building the solution).
>      
>       Here are some details for each step.
>  
> 0)  From the "Building the Java API" section of the Building Berkeley DB for Windows documentation:
>  
> I configured the directories according to my java jdk installation.
> C:\Program Files\Java\jdk1.6.0_16\include, C:\Program Files\Java\jdk1.6.0_16\include\win32 and
> C:\Program Files\Java\jdk1.6.0_16\bin
>  
>       2) Apply the attached patch 18298_win_jdbc.diff
>      
>       I installed the patch application and executed the command:
>       D:\Downloads\Oracle\Berkeley_Beta\db-5.0.11\db-5.0.11>"C:\Program Files\GnuWin32\bin\patch.exe" -p1 -i 18298_win_jdbc.diff
>  
>       I’m not sure if I had to modify the file 18298_win_jdbc.diff before running the patch. (Something related to Windows end-of-line
> Endings)
>      
>       3) Copy the attached "Constants.java" file into the sql/jdbc/SQLite/ directory.
>      
>       Just copied the file “Contants.java” into D:\Downloads\Oracle\Berkeley_Beta\db-5.0.11\db-5.0.11\sql\jdbc\SQLite
>  
>       4) Open the build_windows/Berkeley_DB.sln file in Visual Studio
>  
>       Opened build_windows/Berkeley_DB.sln file in Visual Studio
>  
>       5) Select "File->Add->Existing Project", and add "build_windows/db_sql_jdbc.vcproj" into the solution.
>  
>       Just added build_windows/db_sql_jdbc.vcproj" into the solution.
>  
> 6) Right-click db_sql_jdbc in the solution explorer, and select "Properties".
>  
> Ok.
>  
> 7) In Linker->General. Set the "Output File" to be "$(OutDir)/sqlite_jni.dll" (it is "$(OutDir)/.dll" before you change it).
>  
> Configured the “Output File” to be "$(OutDir)/sqlite_jni.dll"
>  
> 8) Either build the solution, or the "db_sql" project.
>  
> After building the solution I got the following summary:
> ========== Build: 57 succeeded, 1 failed, 0 up-to-date, 10 skipped ==========
>  
> Looking for the fail, I got this:
> 5>Linking...
> 5>LINK : fatal error LNK1181: cannot open input file 'libdb_sql50d.lib'
> 5>Build log was saved at "file://d:\Downloads\Oracle\Berkeley_Beta\db-5.0.11\db-5.0.11\build_windows\Win32\Debug\db_sql_jdbc\BuildLog.htm"
> 5>db_sql_jdbc - 1 error(s), 1 warning(s)
>  
>       The BuildLog.htm file is attached.
>  
>       After that I tried to rebuild the “db_sql” project and I got the following summary:
> ========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========
>  
> 9) Build the db_sql_jdbc project. The project assumes you have Java (1.6) installed in your path.
>  
> Finally, I Built the db_sql_jdbc project and got the following summary
>  
> ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
>  
>  
> Testing:
>      
> I executed the command java -classpath jdbc.jar -Djava.library.path=. SQLite.Shell test.db
> The SQLite console was opened.
> The directory test.db-journal was created by it was empty.
>  
>  
> Regards,
>  
> Luis
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/bdb-beta-feedback/attachments/20100225/2d026d88/attachment.html 


More information about the BDB-BETA-FEEDBACK mailing list