Yeah, I've got a similar thing goin on with my db unit tests (torque + ojb +
velocity + dbunit).

Quite often people get confused with the protocol/subprotocol things in OJB. 
Your connection descriptor should look something like this:

                protocol="jdbc"
                subprotocol="hsqldb"
                dbalias="/home/username/databasename"
                username="sa"
                password=""

I've seen some time people leave out the dbalias by mistake and add it to the
subprotocol.  In this situation, you'll get some odd behaviour.  So that's
probably the first thing to check.

Second, if you're using hsql in standalone and you're accessing it from two
seperate jvms, you get all sorts of problems there (or at least I did).

Anyway, check those two things and if you still have problems I have some pretty
neat scripts that work well that I can strip the proprietory stuff from and send
 your way.

Cheers
Adam



Quoting Durham David Contr 805 CSPTS/SCE <[EMAIL PROTECTED]>:

> Hi all,
> 
> I want to use hsqldb to do some rapid prototyping (not so rapid since I
> don't have it done yet, but anyway -- it's a concept).  Basically, I
> have unit tests that I want to run against model classes that in turn
> use OJB.
> 
> So here's how my flow works once I trigger a "run JUnit tests" Ant
> target.
> 
> 1. Generate hsqldb DDL scripts via XDoclet and Torque.  Then, execute
> this script.  The execution is done via torque -- and it seems to work.
> I'm using the following protocol string: jdbc:hsqldb:file:ucm
> 
> The DDL looks like the usual "create table ...  alter table ... add
> constraint" stuff.  And that works.  If I use the database manager tool,
> it shows the tables that I want.
> 
> Also, I've generated an ojb repository.xml file, the contents of which
> are not particularly important.
> 
> The next thing in the sequence is to execute the Unit tests.  Here's
> where I run into a problem.  Using the same protocol,
> jdbc:hsqldb:file:ucm and within the same Ant target sequence (so
> user.dir should be the same) I get the following:
> 
> org.apache.ojb.broker.PersistenceBrokerSQLException:
> java.sql.SQLException: Table not found: PROJECTS in statement [SELECT
> A0.name,A0.id FROM ...
> 
> According to the DatabaseManager, the table is there.
> 
> Any ideas?
> 
> 
> Thanks,
> 
> Dave
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





------------------------------------------------------------
This email was sent from Netspace Webmail: http://www.netspace.net.au


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to