Adding castor.jar as yet another library has triggered in our project a new strategy for loading the libraries: instead of adding them in the classpath (which tends to grow indefinitely for large projects), we decided to use the "-Djava.ext.dirs" command-line option of the JVM. We keep on using the classpath for our code (esp. in development cycle) This works for 100% of our code, 100% of other library's code, and 95% of Castor's code. here is the description of the remaining percents:
we use Configuration.getDefault().setProperty(Configuration.Property.RegExp, MyRegExpEvaluator.class.getName()); to specify ou own regexp evaluator. unfortunately, when calling Configuration.getRegExpEvaluator() (which is done by castor), a NoClassDefFoundError is thrown. This is because Configuration.class is loaded by the extension ClassLoader, which has no knowledge of the classloader that uses the classpath. The problem is very well described here: http://www.javageeks.com/Papers/ClassForName/ClassForName.pdf One solution would be to rewrite some calls of Class.forName(aClass): Class.forName(aClass, bResolve, ClassLoader.getSystemClassLoader()) What do you think? thanks youri ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
