This one time, at band camp, Sylvie Ramon said:
SR>Hi,
SR>
SR>I have a problem and I don't understand what append.
SR>
SR>I work with WSAD 4.0, Oracle 8i and castor 0.9.3.9 .
SR>
SR>I develop an web application that read and create objects in database.
SR>All is ok if I run this with one or several user in a real time.
SR>
SR>I try to test my web application with Opensta.
SR>I store a scenario, and do an iteration on it.
SR>I reduct "wait" to have intensives tests.
SR>All is ok if I run ONE scenario.
SR>
SR>But, if I run SEVERAL scenarios ( concurrent access ) , I have some Exception, that
append randomly :
SR>
SR>
SR>org.exolab.castor.jdo.TransactionNotInProgressException: This database is closed
SR> at
org.exolab.castor.jdo.engine.DatabaseImpl.getTransaction(DatabaseImpl.java:464)
SR> at org.exolab.castor.jdo.engine.DatabaseImpl.load(DatabaseImpl.java:269)
SR> at org.exolab.castor.jdo.engine.DatabaseImpl.load(DatabaseImpl.java:287)
SR> at
fr.cmc.umm.entreprise.typologieappel.MotifContactService.getFicheMotif(MotifContactService.java:236)
SR> .....
SR>
SR>OR
SR>
SR>
SR>java.lang.NullPointerException
SR> at
org.exolab.castor.jdo.engine.DatabaseImpl.getLockEngine(DatabaseImpl.java:196)
SR> at org.exolab.castor.jdo.engine.OQLQueryImpl.create(OQLQueryImpl.java:270)
SR> at org.exolab.castor.jdo.engine.DatabaseImpl.getOQLQuery(DatabaseImpl.java:439)
SR> at
fr.cmc.umm.entreprise.typologieappel.MotifContactService.getListeMotifActif(MotifContactService.java:314)
SR> .....
SR>
SR>
SR>OR
SR>
SR>
SR>org.exolab.castor.jdo.TransactionNotInProgressException: No transaction in progress
for the current thread
SR> at
org.exolab.castor.jdo.engine.DatabaseImpl.getTransaction(DatabaseImpl.java:467)
SR> at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:458)
SR> at org.exolab.castor.jdo.engine.OQLQueryImpl.execute(OQLQueryImpl.java:405)
SR> at
fr.cmc.umm.entreprise.typologieappel.SousMotifContactService.getListeSousMotifActif(SousMotifContactService.java:396)
SR> ....
SR>
SR>
SR>
SR>Someone has an idea ?
Sylvie,
In my experience, these types of problems usually occur in either a
multi-threaded environment (like your concurrent accesses) or in a
situation where transactions are being nested. In either case, it is
unclear as to which transaction needs to be commit()ed by Castor so it
closes the closest one which may or may not be correct. The solution
here is to make the application more thread safe or to name each Database
instance differently. I have usually chosen to make the application more
thread safe so that the confusion doesn't occur.
Bruce
--
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev