<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: Use the latest HSQLDB within my Project</title><link>https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project</link><description>&lt;p&gt;I use an HSQLDB environment when my ivy Application is tested with Selenium Unit tests. The HSQLDB driver which is packed with ivy is the outdated version 1.8. With this version the &lt;code&gt;concat()&lt;/code&gt; and &lt;code&gt;group_concat()&lt;/code&gt; SQL functions are not (correctly) implemented and therefore some SQL statements can not be executed.&lt;/p&gt;
&lt;p&gt;I tried to use HSQLDB 2.3.2 by adding the jar &lt;em&gt;jre/lib/ext&lt;/em&gt; folder and selecting the driver "other" within the "Databases Configuration Editor". But if I do that the Designer can no longer be started as the System-DB of the Designer relies on HSLDB 1.8.&lt;/p&gt;
&lt;p&gt;Is there any way to use a newer HSQLDB in my test environment?&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 15 Sep 2014 16:38:40 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project/962</link><description>&lt;p&gt;If you want to create a repacked version of HSQLDB by your own (may be to pack a newer version) proceed as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a &lt;strong&gt;repack JAR&lt;/strong&gt; as described on &lt;a href="http://repackage.org/"&gt;repackage.org&lt;/a&gt;. E.g. trough JarJar. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Move all classes from &lt;code&gt;org.hsqldb&lt;/code&gt; into a new Package like &lt;code&gt;org.hsldb234&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Adjust the &lt;strong&gt;java.sql.Driver service&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extract the file &lt;code&gt;META-INF/services/java.sql.Driver&lt;/code&gt; from the repacked JAR&lt;/li&gt;
&lt;li&gt;Open it in a Text-Editor and adjust the full qualified name of the JDBCDriver implementation so that it matches your new package structure. E.g. &lt;code&gt;org.hslqdb234.jdbc.JDBCDriver&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Put the manipulated service file back into the JAR (e.g by Overwriting the content with 7-ZIP)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the &lt;strong&gt;JDBC URL&lt;/strong&gt; to avoid conflicts with other versions that work with the same URL&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Extract the file &lt;code&gt;org/hsqldb234/DatabaseURL.class&lt;/code&gt; from the repacked JAR&lt;/li&gt;
&lt;li&gt;Open this class in the &lt;a href="http://sourceforge.net/projects/classeditor/"&gt;Java Class File Editor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Switch into class modification mode (upper right corner)&lt;/li&gt;
&lt;li&gt;Change the JDBC connection URL in the field &lt;code&gt;S_URL_PREFIX&lt;/code&gt; to a similar URL as the repacked namespace. E.g. &lt;code&gt;jdbc:hsqldb234&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Save the manipulated &lt;code&gt;DatabaseURL.class&lt;/code&gt; file&lt;/li&gt;
&lt;li&gt;Put the manipulated class file back into the JAR (e.g by Overwriting the content with 7-ZIP)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Done&lt;/strong&gt;! Use the manipulated JAR trough your own custom JDBC URL(e.g. &lt;code&gt;jdbc:hsqldb234&lt;/code&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/ceClassEditing.PNG"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 15 Sep 2014 16:38:40 -0400</pubDate><guid>https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project/962</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project/961</link><description>&lt;p&gt;&lt;strong&gt;9.1 and later&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;HSQLDB is upgraded to 2.5.0.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;8.0 and prior&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;You can use a &lt;a href="http://repackage.org/"&gt;repacked&lt;/a&gt; JAR that contains a newer HSQLDB and put it on the system classpath. &lt;/p&gt;
&lt;p&gt;I've already prepared such a repacked JAR. You can download it here: &lt;a href="http://www.ivyteam.ch/downloads/XIVY/samples/org.hsldb.232.repack.jar"&gt;HSQLDB 2.3.2 Repack&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Configure your database as follows to use this repacked version:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;put the repack JAR into JRE/lib/ext folder of your designer&lt;/li&gt;
&lt;li&gt;chose the driver "Others" &amp;gt; "Other" within the Database Connection Configuration&lt;/li&gt;
&lt;li&gt;set the Driver Class to: org.hsqldb232.jdbc.JDBCDriver&lt;/li&gt;
&lt;li&gt;set the Connection URL to: jdbc:hsqldb232:mem&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img alt="DB Editor with repacked HSQLDB" src="http://answers.axonivy.com/upfiles/dbConfigEditor_hsqlDb232.PNG"&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Mon, 15 Sep 2014 16:24:17 -0400</pubDate><guid>https://answers.axonivy.com/questions/960/use-the-latest-hsqldb-within-my-project/961</guid></item></channel></rss>