Clovis, for long transactions to work, you will have to use any otehr cache type than 'none'. Otherwise, Castor will not be possible to check whether some othe runit of work (read thread) has changed the underlying entity whilst it's taking part of the long transaction. We had users coming back to us in the past with similar issuesd, and it *always* turned out that they e.g. were using cache type count-limited or time-limited where the object in question (the one taking part of a long transaction) had expired from the cache.
Regards Werner -----Ursprüngliche Nachricht----- Von: clovis_wichoski [mailto:[EMAIL PROTECTED] Gesendet: Samstag, 06. August 2005 14:49 An: user Betreff: [castor-user] MappingException when had two maps for same class that implements TimeStampable. Hi, Here I had two maps, one with cache and other without, with cache I use for CRUD operations, and without cache for queries (long queries that returns many objects), since for this two maps I use same classes, and this classes are used in long transaction then must implement TimeStampable, but with the no cache map I get follow exception: org.exolab.castor.mapping.MappingException: A cache type other than none must be used with >myapp.Person< as it implements TimeStampable. at org.exolab.castor.persist.ClassMolder.(ClassMolder.java:282) at org.exolab.castor.persist.ClassMolder.resolve(ClassMolder.java:533) at org.exolab.castor.persist.LockEngine.(LockEngine.java:164) at org.exolab.castor.persist.PersistenceEngineFactory.createEngine(PersistenceEngineFactory.java:80) at org.exolab.castor.jdo.engine.DatabaseRegistry.(DatabaseRegistry.java:727) at org.exolab.castor.jdo.engine.DatabaseRegistry.(DatabaseRegistry.java:690) at org.exolab.castor.jdo.engine.DatabaseRegistry.initFromDriver(DatabaseRegistry.java:449) at org.exolab.castor.jdo.engine.DatabaseRegistry.initDatabase(DatabaseRegistry.java:274) at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:200) at org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:153) at org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:289) at org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:322) ... to solve this Exception, I see the code of ClassMolder and the found the lines: 281: if ((_timeStampable) && (_cachetype != null) && (_cachetype.equalsIgnoreCase ("none"))) { 282: throw new MappingException (Messages.format("persist.wrongCacheTypeSpecified", _name)); 283: } in my map files without cache I declared the tag cache-type like this: <cache-type type="none"/> that is causing the Exception, analysing the line 281, (_cachetype != null), then if I remove this declaration from my no cache map, I no more get Exceptions, and the problem is solved, I can have same Class cached in one map and dont in another. But my doubt is because what this Exception is throw? I cant see the reason for that. Thanks Clovis ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] ------------------------------------------------- ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

