Showing posts with label HSQLDB. Show all posts
Showing posts with label HSQLDB. Show all posts

Thursday, September 25, 2008

Seam-gen, HSQLDB and development schemas

I like using HSQLDB's in memory db for early development.  Changes the annotations on my entities and letting hbm2ddl create the schema (tables actually which is what this post is about) for me is way useful.  One of the best things about Seam IMHO.

I ran into an error in my curent project which I set up using seam-gen and giving it a schema name of "PROJECTDEV."  After creating an entity class, "Job" I ran "seam generate-ui" from my project directory.  I deployed expecting to see the default crud screens that seam generates.  However, when I clicked on the "Job List" link I got an error.  The console told me something was wrong with my schema :

Caused by: java.sql.SQLException: invalid schema name in statement

And looking further back in the logs I found error messages from Seam while the schema export was running:

[SchemaExport] invalid schema name: PROJECTDEV in statement

Poking around the web I found some references to this problem on the Hibernate forums, JBoss forums and JBoss Jira

I tried putting :

CREATE SCHEMA PROJECTDEV AUTHORIZATION DBA;

in my import.sql file, but that didn't work.  Same errors.

I had to create the schema manually in the HSQLDB database manager (I have a post on how to use this if you don't already know how.)  After that everything worked fine.
Blogged with the Flock Browser

Friday, August 10, 2007

Enabling the HSQLD / Hypersonic console in JBoss 4.2.0.GA

Enabling the HSQLD / Hypersonic console in JBoss
  • Uncomment lines 16, 90 and 95-103 of hsqldb-dx.xml. The server should pick up the change to the file and reload.
  • Open up the jmx-console (http://localhost:8080/jmx-console if running locally.)
  • Click on the "service=Hypersonic" link under jboss.
  • Click the "Invoke" button under "void startDatabaseManager()" which should be the third MBean operation.

Blogged with Flock