Thanks, I've been over my classpath again and again but can't find any duplicates. It is a problem with multiple class loaders but only when I use the Junit gui to run my tests. If I run my test classes manually (without Junit) then it works ok. Frustrating though.
-----Original Message----- From: jean-pierre lerbscher [mailto:[EMAIL PROTECTED] Sent: Wednesday, 3 September 2003 5:49 PM To: OJB Users List Subject: Re: ClassCastException with rc4 Hi, Could you make sure that you do not have several times the same jar file in your classpath. A few times ago I had a similar problem where an exception stated to me wrongly that a class did not implement an interface. It was a problem with multiple class loaders. Clay Mitchell wrote: > I get this also, after I reload my webapp in Orion. > > -Clay > > Stuart Heriot wrote: > >> Hi, >> Since installing rc4 I've been unable to run some jUnit tests I >> previously >> had working with 0.9.8. Error log is below. I am running the Junit >> TestRunner gui from the command line. Running through Netbeans causes >> other >> problems with Log4j and multiple class loaders. >> >> Any assistance would be much appreciated. I've been battling with >> this for >> the past week and getting nowhere... >> Thanks >> Stuart >> >> [BOOT] ERROR: The specified class >> "org.apache.ojb.broker.cache.ObjectCacheDefaultImpl" does not >> implement the >> interface org.apache.ojb.broker.cache.Ob >> jectCache, which is a requirement for the key "ObjectCacheClass". Using >> default class org.apache.ojb.broker.cache.ObjectCacheDefaultImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl" does not >> implement the interface org.apache.ojb.brok >> er.accesslayer.ConnectionFactory, which is a requirement for the key >> "ConnectionFactoryClass". Using default class >> org.apache.ojb.broker.accesslayer.C >> onnectionFactoryPooledImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.odmg.locking.LockManagerDefaultImpl" does not >> implement the >> interface org.apache.ojb.odmg.locking.Lo >> ckManager, which is a requirement for the key "LockManagerClass". Using >> default class org.apache.ojb.odmg.locking.LockManagerDefaultImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.odmg.locking.InMemoryLockMapImpl" does not implement the >> interface org.apache.ojb.odmg.locking.LockM >> ap, which is a requirement for the key "LockMapClass". Using default >> class >> org.apache.ojb.odmg.locking.PersistentLockMapImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.broker.util.logging.Log4jLoggerImpl" does not >> implement the >> interface org.apache.ojb.broker.util.log >> ging.Logger, which is a requirement for the key "LoggerClass". Using >> default >> class org.apache.ojb.broker.util.logging.PoorMansLoggerImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl" >> >> does not implement the interface org.ap >> ache.ojb.broker.metadata.fieldaccess.PersistentField, which is a >> requirement >> for the key "PersistentFieldClass". Using default class >> org.apache.ojb.br >> oker.metadata.fieldaccess.PersistentFieldPrivilegedImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.broker.core.PersistenceBrokerImpl" does not implement >> the >> interface org.apache.ojb.broker.Persistenc >> eBroker, which is a requirement for the key "PersistenceBrokerClass". >> Using >> default class org.apache.ojb.broker.core.PersistenceBrokerImpl >> [BOOT] ERROR: The specified class >> "org.apache.ojb.odmg.collections.DListImpl" does not implement the >> interface >> org.apache.ojb.broker.ManageableCollect >> ion, which is a requirement for the key "OqlCollectionClass". Using >> default >> class org.apache.ojb.odmg.collections.DListImpl >> [BOOT] ERROR: Error in instantiation of PersistenceBrokerFactory >> class class >> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl, try >> to us >> e default PersistenceBrokerFactory implementation >> null >> java.lang.ClassCastException >> at >> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.init(PersistenceB >> >> rokerFactoryFactory.java:94) >> at >> org.apache.ojb.broker.core.PersistenceBrokerFactoryFactory.<clinit>(Persiste >> >> nceBrokerFactoryFactory.java:71) >> at >> org.apache.ojb.broker.PersistenceBrokerFactory.defaultPersistenceBroker(Pers >> >> istenceBrokerFactory.java:103) >> at >> com.infocomp.composer.data.bankaccount.helpers.BankAccountHelper.LoadBankAcc >> >> ountByBsb(BankAccountHelper.java:159) >> at >> com.infocomp.composer.data.bankaccount.helpers.TestBankAccountHelper.testLoa >> >> dBankAccountByBsb(TestBankAccountHelper.java:36) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown >> Source) >> at java.lang.reflect.Method.invoke(Unknown Source) >> at junit.framework.TestCase.runTest(TestCase.java:154) >> at junit.framework.TestCase.runBare(TestCase.java:127) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:118) >> at junit.framework.TestSuite.runTest(TestSuite.java:208) >> at junit.framework.TestSuite.run(TestSuite.java:203) >> at junit.swingui.TestRunner$16.run(TestRunner.java:623) >> > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
