You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Durham David Contr 805 CSPTS/SCE <Da...@scott.af.mil> on 2004/09/14 23:48:43 UTC
hsqldb, junit, torque, ojb, et al.
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: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Optimistic Locking exception with 1.0 - doesn't happen with rc4
Posted by "Kollivakkam R. Raghavan" <rk...@cisco.com>.
I am getting the following exception with an optimistic locking which
does not happen with rc4. Did something change? We are about to use
OJB in production and I wanted to switch to the release version. Please
help.
Thanks
Raghavan
------------------
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.ojb.broker.OptimisticLockException: Object has
been modifi
ed by someone else
at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(JdbcAc
cessImpl.java:485)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Persistenc
eBrokerImpl.java:1641)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBro
kerImpl.java:1542)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBro
kerImpl.java:705)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Delegati
ngPersistenceBroker.java:174)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Delegati
ngPersistenceBroker.java:174)
a:1770)
... 40 more
Additional exceptions :
14-Sep-2004 16:23:42 WARN [010-Processor25]
.broker.core.PersistenceBrokerImpl
No running tx found, please only store in context of an PB-transaction,
to avoid
side-effects - e.g. when rollback of complex objects
14-Sep-2004 16:23:42 ERROR [010-Processor25]
m.cisco.aons.amc.logic.PolicyLogic
Database error: PersistenceBrokerException was caught
org.apache.ojb.broker.OptimisticLockException: Object has been modified
by someo
ne else
at
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeUpdate(JdbcAc
cessImpl.java:485)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Persistenc
eBrokerImpl.java:1641)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBro
kerImpl.java:1542)
at
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBro
kerImpl.java:705)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Delegati
ngPersistenceBroker.java:174)
at
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Delegati
ngPersistenceBroker.java:174)
at
com.cisco.aons.amc.logic.PolicyLogic.savePolicyRecord(PolicyLogic.jav
a:1770)
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org