I have found something in the Ant FAQ that provides the workaround for
this problem.
http://ant.apache.org/faq.html#delegating-classloader
When running Castor in an Ant task the castor, jdbc driver, and mapping
class jars must be in the ANT_HOME/lib directory. I am still looking for
a way to override this behavior.
Donaghy
Philip DONAGHY a �crit :
>
> Actually the enviroment is Ant. This is the classpath.
>
> <pathelement location="lib/aixmimp.jar" />
> <pathelement location="lib/aixmuid.jar" />
> <pathelement location="lib/aixmuidoql.jar" />
> <pathelement location="lib/finaixm-db.jar" />
> <pathelement location="lib/aixm-all-xmlbeans.jar" />
> <pathelement location="lib/castor-0.9.5.3.jar" />
> <pathelement location="lib/ojdbc14.jar" />
> <pathelement location="lib/commons-logging.jar" />
> <pathelement location="lib/xbean.jar" />
> <pathelement location="lib/log4j-1.2.8.jar" />
> <pathelement location="lib/commons-collections-3.1.jar" />
> <pathelement location="lib/jta-spec1_0_1.jar" />
>
> The castor jar was build on October 20th.
>
> So I tried it outside of Ant and there is no ClassNotFoundException.
>
> Curious,
>
> Phil
>
> Werner Guttmann a �crit :
> >
> > Philip,
> >
> > no, I have not seen this issue yet. The class name reported as part of the stack
> > trace seems to be correct. In what environment are you trying to
> > execute this ?
> >
> > Regards
> > Werner
> >
> > On Wed, 20 Oct 2004 14:49:55 +0200, Philip DONAGHY wrote:
> >
> > >
> > >Has anyone seen this error.
> > >
> > >[import_snapshot] log4.xml 2004-10-20 14:39:05,625 ERROR
> > >org.exolab.castor.persist.LockEngine 193 Problem creating performance
> > >cache instance of type none.
> > >[import_snapshot] org.exolab.castor.persist.cache.CacheAcquireException:
> > >org.exolab.castor.persist.cache.NoCache
> > >[import_snapshot] at
> > >org.exolab.castor.persist.cache.AbstractCacheFactory.getCache(AbstractCacheFactory.java:86)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.cache.CacheRegistry.getCache(CacheRegistry.java:133)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.LockEngine.<init>(LockEngine.java:190)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.PersistenceEngineFactory.createEngine(PersistenceEngineFactory.java:80)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.<init>(DatabaseRegistry.java:217)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.<init>(DatabaseRegistry.java:180)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.initFromDriver(DatabaseRegistry.java:478)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:336)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:266)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.JDO.getDatabase(JDO.java:585)
> > >[import_snapshot] at
> > >com.thalesis.aixm.imp.snapshot.Import.process(Import.java:383)
> > >[import_snapshot] at
> > >com.thalesis.finaixm.imp.ImportSnapshotTask.importAixm(ImportSnapshotTask.java:19)
> > >[import_snapshot] at
> > >com.thalesis.finaixm.imp.AbstractImportTask.execute(AbstractImportTask.java:39)
> > >[import_snapshot] at
> > >org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Task.perform(Task.java:364)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Target.execute(Target.java:301)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Target.performTasks(Target.java:328)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Project.executeTarget(Project.java:1215)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Project.executeTargets(Project.java:1063)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Main.runBuild(Main.java:632)
> > >[import_snapshot] at
> > >org.apache.tools.ant.Main.startAnt(Main.java:183)
> > >[import_snapshot] at
> > >org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
> > >[import_snapshot] at
> > >org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
> > >[import_snapshot] Caused by: java.lang.ClassNotFoundException:
> > >org.exolab.castor.persist.cache.NoCache
> > >[import_snapshot] at
> > >java.net.URLClassLoader$1.run(URLClassLoader.java:199)
> > >[import_snapshot] at
> > >java.security.AccessController.doPrivileged(Native Method)
> > >[import_snapshot] at
> > >java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> > >[import_snapshot] at java.lang.Class.forName0(Native Method)
> > >[import_snapshot] at java.lang.Class.forName(Class.java:219)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.cache.AbstractCacheFactory.getCache(AbstractCacheFactory.java:82)
> > >[import_snapshot] ... 22 more
> > >[import_snapshot] java.lang.ClassNotFoundException:
> > >org.exolab.castor.persist.cache.NoCache
> > >[import_snapshot] at
> > >java.net.URLClassLoader$1.run(URLClassLoader.java:199)
> > >[import_snapshot] at
> > >java.security.AccessController.doPrivileged(Native Method)
> > >[import_snapshot] at
> > >java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > >[import_snapshot] at
> > >java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> > >[import_snapshot] at java.lang.Class.forName0(Native Method)
> > >[import_snapshot] at java.lang.Class.forName(Class.java:219)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.cache.AbstractCacheFactory.getCache(AbstractCacheFactory.java:82)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.cache.CacheRegistry.getCache(CacheRegistry.java:133)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.LockEngine.<init>(LockEngine.java:190)
> > >[import_snapshot] at
> > >org.exolab.castor.persist.PersistenceEngineFactory.createEngine(PersistenceEngineFactory.java:80)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.<init>(DatabaseRegistry.java:217)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.<init>(DatabaseRegistry.java:180)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.initFromDriver(DatabaseRegistry.java:478)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:336)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:266)
> > >[import_snapshot] at
> > >org.exolab.castor.jdo.JDO.getDatabase(JDO.java:585)
> > >[import_snapshot] at
> > >com.thalesis.aixm.imp.snapshot.Import.process(Import.java:383)
> > >
> > >Cheers,
> > >
> > >Philip Mark Donaghy
> > >
> > >
> > >
> > >-----------------------------------------------------------
> > >If you wish to unsubscribe from this mailing, send mail to
> > >[EMAIL PROTECTED] with a subject of:
> > > unsubscribe castor-user
> > >
> >
> > -----------------------------------------------------------
> > If you wish to unsubscribe from this mailing, send mail to
> > [EMAIL PROTECTED] with a subject of:
> > unsubscribe castor-user
>
> ------------------------------------------------------------------------
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user