<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Unlikely Teacher &#187; HSQLDB</title>
	<atom:link href="http://unlikelyteacher.com/tag/hsqldb/feed/" rel="self" type="application/rss+xml" />
	<link>http://unlikelyteacher.com</link>
	<description>1. Share Everything* [Programming Gotchas, Technology News, Insights on Living and Everything in Between]</description>
	<lastBuildDate>Fri, 03 Sep 2010 04:12:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>TopLink JPA and HSQLDB Quirk</title>
		<link>http://unlikelyteacher.com/2008/05/14/toplink-jpa-and-hsqldb-quirk/</link>
		<comments>http://unlikelyteacher.com/2008/05/14/toplink-jpa-and-hsqldb-quirk/#comments</comments>
		<pubDate>Wed, 14 May 2008 09:58:01 +0000</pubDate>
		<dc:creator>paul</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[HSQLDB]]></category>
		<category><![CDATA[JPA]]></category>
		<category><![CDATA[TopLink]]></category>

		<guid isPermaLink="false">http://dayg.wordpress.com/?p=105</guid>
		<description><![CDATA[I discovered a weird issue when using HSQLDB as database provider for TopLink JPA. We need to explicitly include the toplink.target-database property in the persistence.xml file to make it work. &#60;property name=&#34;toplink.target-database&#34; value=&#34;HSQL&#34;/&#62; Without that, you are most likely to get this error below when you run your application: Query: DataModifyQuery() at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:304) ... Caused [...]]]></description>
			<content:encoded><![CDATA[<p>I discovered a weird issue when using HSQLDB as database provider for TopLink JPA.</p>
<p>We need to explicitly include the <a href="http://www.oracle.com/technology/products/ias/toplink/JPA/essentials/toplink-jpa-extensions.html#TopLinkDBSessionAppServer" target="_blank">toplink.target-database</a> property in the persistence.xml file to make it work.</p>
<pre class="brush: xml">
&lt;property name=&quot;toplink.target-database&quot; value=&quot;HSQL&quot;/&gt;
</pre>
<p>Without that, you are most likely to get this error below when you run your application:</p>
<pre class="brush: java">

Query: DataModifyQuery()
	at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:304)
       ...
Caused by: java.sql.SQLException: Table not found in statement
</pre>
<p>I did not have that property set when I was using TopLink JPA with MySQL so I was a bit surprised why it was not working initially when I switched to HSQLDB.</p>
<p>Anyway, here&#8217;s the complete properties element of persistence.xml for HSQLDB for your reference:</p>
<pre class="brush: xml">
      &lt;properties&gt;
         &lt;property name=&quot;toplink.ddl-generation&quot; value=&quot;drop-and-create-tables&quot; /&gt;
         &lt;property name=&quot;toplink.jdbc.driver&quot; value=&quot;org.hsqldb.jdbcDriver&quot; /&gt;
         &lt;property name=&quot;toplink.jdbc.url&quot; value=&quot;jdbc:hsqldb:notifications&quot; /&gt;
         &lt;property name=&quot;toplink.jdbc.user&quot; value=&quot;sa&quot; /&gt;
         &lt;property name=&quot;toplink.jdbc.password&quot; value=&quot;&quot; /&gt;
         &lt;property name=&quot;toplink.target-database&quot; value=&quot;HSQL&quot;/&gt;
      &lt;/properties&gt;
</pre>
<p>Hope I can save you guys a lot of trouble through this post.</p>
<p>Because it certainly took me hours to figure this thing out.</p>
]]></content:encoded>
			<wfw:commentRss>http://unlikelyteacher.com/2008/05/14/toplink-jpa-and-hsqldb-quirk/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
