In my project I can successfully test database code. I'm using Spring, Hibernate, HSQLDB, JUnit and Maven.
The catch is that currently I have to launch HSQLDB manually prior to running the tests. What is the best way to automate the launching of HSQLDB with the technologies being used?
...
I'm having a problem with my ORMLite package ( http://ormlite.sourceforge.net/ ). When I generate the schema for a table, I thought it would be a good practice to escape all entity names. This would protect some Java class or field name from being a SQL reserved word:
CREATE TABLE "footable" ("stuff" VARCHAR(255))
I'm now adding "ra...
I have an established software product that uses HSQLDB as its internal settings database. Customer projects are stored in this database. Over the years, HSQLDB has served us reasonably well, but it has some stability/corruption issues that we've had to code circles around, and even then, we can't seem to protect ourselves from them comp...
Hey guys,
i'm working on a project in which i use JPA, Hibernate and all this stuff for the first time and i ran into problem with transactions not being commited. I use class User which looks like this:
package org.tomasherman.JBTBackup.Resource.Entity;
import javax.persistence.*;
import java.io.Serializable;
@Entity
@Table(name ...
Hi,
I have a query where I am doing an Order by inside of a derived table that is being inner joined.
Ex:
SELECT g.*
FROM (
SELECT ...
FROM ...
ORDER BY alias.some_column
LIMIT 0, 20
) as g
... # other joins
This works fine in MySQL, but it fails in HSQLDB. The reason I put the order by here is that mysql is much fa...
Trying to configure tigase to use hsqldb (hsqldb-1.8.0.9-1jpp.2) instead of derby (don't ask why, that's not the point) and everything works fine, except for setting some properties in the end. In Derby I had
CREATE procedure TigAddUserPlainPw(userId varchar(2049), userPw varchar(255))
PARAMETER STYLE JAVA
LANGUAGE JAVA
MOD...
Hi all,
I have 2 test classes, both annotated with the unitils annotation
@DataSet("/dbunit-dataset.xml")
The target database is an HSQLDB, which is initiated in an abstract superclass method annotated with the testng annotation:
@BeforeClass
When the testrunner (Maven Surefire) arrives at the 2nd test, the database is correctly i...
I'm staring a toy project with Grails, but I'm having some trouble regarding the HSQLDB database. My DataSource.groovy file is the default one:
environments {
development {
dataSource {
dbCreate = "create-drop" // one of 'create', 'create-drop','update'
url = "jdbc:hsqldb:mem:devDB"
loggin...
I have a table in an Openoffice Database, containing two date columns. I'm trying to create a view that will aggregate all the rows in these columns and sum up the difference between these two columns in minutes.
This is pretty trivial, and in Postgres it would look like:
SELECT SUM(EndDate-BeginDate) AS total_minutes FROM mytable
Wh...
Hi, I'm designing a new DataBase that at the moment has 50 Tables. For many of that tables I have to eventually store a "note" for every column of every tuple.
For now I found only 2 solutions:
For each column of tables that needs note add a "column note" so for example:
create table tab (id integer, A varchar(100), B varchar(200))
...
Hsqldb 2.0 documentation talk about array and report this example:
CREATE TABLE t (id INT PRIMARY KEY, scores INT ARRAY DEFAULT ARRAY[], names VARCHAR(20)
ARRAY[10])
I tried it but I obtain this exception:
[Error Code: -5581, SQL State: 42581] unexpected token: ARRAY
How can I enable it?
...
I am beginning with HSQLDB, but I hit this issue and can't figure out what's going on:
CREATE TEXT TABLE ozizkaindata (
jobName VARCHAR(255) NOT NULL,
buildNumber VARCHAR(255) NOT NULL,
config VARCHAR(255) NOT NULL,
ar VARCHAR(255) NOT NULL,
arFile VARCHAR(255) NOT NULL,
deployDur VARCHAR(255) NOT NULL,
warmupDur VARCHAR(2...
I have an app/tool which reads from a CSV file and writes to another, processing it using HSQLDB.
I want to have the CSV file as the only output, and the database files should disappear after the process finishes.
I tried to use mem storage, but that prevents HSQLDB to write to the CSV file.
I also tried to DROP SCHEMA before closing ...
What is a good way of executing the DDL for a in-process HSQL database on the startup of the application?
I thought of selecting from INFORMATION_SCHEMA.TABLES and if the count is zero, then i'd only execute my DDL script.
Is there a better way of doing this?
...
I am working on a Java application that will use some Hibernate (annotated by JPA) classes, backed by a HSQLDB datasource (DBCP BasicDataSource). I am trying to manually tweak the HSQLDB ".script" file (which I can't for the life of me find the authoritative name for by web searching/reading the docs; it's only mentioned in passing) to ...
I would like to use a custom version of the HSQL DB in an application that I am deploying in JBoss. However, JBoss already contains an HSQLDB.jar. The JBoss jar is being resolved by my application instead of the custom jar in my ear.
How can I use a different version of HSQL in my web application from the one that JBoss uses interna...
Hello Gurus!
i'm having a light problem with liquibase and hibernate.I expect hibernate to create the schema when the hbm2ddl is set to create and then have liquibase polulate the database with an sql script file.
i've notice that when on validate it behaves as describe and on create it doesn't
Especially on a testing environment when...
I recently modified a MYSQL query using the keyword RLIKE however when I ran the unit test which uses HSQLDB in order to mock a database it throws an unknown SQL token exception.
In order to resolve this currently I have commented out these tests, but would like to find a work around so I can actually test my code.
My google-fu faile...
Something of an novice with HSQL and Hibernate...
em.getTransaction().begin();
for (Activity theActivity : activities) {
em.persist(theActivity);
}
em.getTransaction().commit();
em.close();
followed by...
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
System.out.println("QUERY:: "
+ em.createQuery("S...
Hi,
I have a tool which reads a CSV file, selects from it using HSQLDB, and saves the result as another CSV file. More here: http://ondra.zizka.cz/stranky/programovani/java/apps/CsvCruncher-csv-manipulation-sql.texy
Now when I used it for some task, I have got:
java -jar CsvCruncher-1.0.jar result.csv foo.csv 'SELECT * FROM indata'
I...