Home
Analytics
SQLite Data Source
nt4boy
<p>Hi,</p>
<p>I've used the old Birt 2.5 for years and with an SQL source so understand its fundamentals reasonably.</p>
<p>I now wish to write some reports for an SQLite db and spent all day trying to get it setup as a data source without success.</p>
<p>So have now downloaded and installed Eclipse Mars1 BIRT Designer Version 4.5.0.v201506092134 </p>
<p>Also got sqlite-jdbc-3.8.11.2.jar</p>
<p>Been to Preferences...Driver definition and point to the lib jar file.</p>
<p> </p>
<p>But have failed totally to connect to my .db file.</p>
<p>Testing the connection I get</p>
<p>java.sql.SQLException: [SQLITE_CANTOPEN] Unable to open the database file (out of memory)</p>
<p> </p>
<p> </p>
<p>I feel I am missing some fundamental piece of this puzzle somewhere.</p>
<p> </p>
<p>Any guidance gratefully received.</p>
Find more posts tagged with
Comments
Clement Wong
<p>On my Windows 7 64-bit environment, I ran a quick test and was able to connect to a very simple SQLite database, and run/view a report.</p>
<p> </p>
<p>I first downloaded SQLite Tools for Windows (<a data-ipb='nomediaparse' href='
https://www.sqlite.org/2016/sqlite-tools-win32-x86-3100200.zip'>sqlite-tools-win32-x86-3100200.zip</a>)
and created a database via sqlite3.</p>
<p> </p>
<p>Then, I downloaded sqlite-jdbc-3.8.11.2.jar from <a data-ipb='nomediaparse' href='
https://bitbucket.org/xerial/sqlite-jdbc/downloads'>https://bitbucket.org/xerial/sqlite-jdbc/downloads</a>
. </p>
<p> </p>
<p>Next, I downloaded the latest BIRT All in One Eclipse 64-bit, and pointed the -vm setting in eclipse.ini to my Java 1.8.0_45's javaw.exe. Opened the directory ...eclipse\plugins\org.eclipse.birt.report.data.oda.jdbc_4.5.0.v201506092134\drivers directory and moved sqlite-jdbc-3.8.11.2.jar in.</p>
<p> </p>
<p>Finally, I launched Eclipse and created a new project/report. In the Data Source, I used:</p>
<p> </p>
<p>Driver class: org.sqlite.JDBC (v3.8)</p>
<p>Database URL: jdbc:sqlite:C:/sqlite/ex1.db</p>
<p> </p>
<p>And was able to Test Connection.</p>
<p> </p>
<p>In the Data Set, I was able to enter a query to select from my table and Preview.</p>
<p> </p>
<p> </p>
<p>1. In your environment, what OS are you on? What Java version are you running?</p>
<p>2. Have you tried a very simple SQLite db (1 table, 1 or 2 rows), and does that have any memory issues?</p>
<p>3. Have you tried increasing your Eclipse.ini -Xmx setting? The default is "-Xmx1024m".</p>
nt4boy
<p>Simples...</p>
<p>thank you Clement.</p>
<p> </p>
<p>the magic trick or missing link was putting the jar file in the plugin folder.</p>
<p>The other instructions I'd followed for adding it via the GUI that also required jni.dll in the jre bin evidently not appropriate.</p>
<p> </p>
<p> </p>
<p>This method truly works.</p>
<p> </p>
<p>I think the memory error was what ever I'd nearly installed complaining, </p>
<p> </p>
<p>OS stuff for the record (64 bit W7 jre 7u80)</p>
<p> </p>
<p>Thanks a million</p>