db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak" <tom...@gmail.com>
Subject Re: ClassCastException and ClassLoaders
Date Thu, 27 Sep 2007 05:08:39 GMT
On 9/26/07, Wessam Abd Rabo <wessam.abdrabo@gmail.com> wrote:

> What i know about this issue is that if classloader A loads Class X and
> Classloader B loads classY, then even if Y is assignable to X at the source
> code level, it fails, because the classes are in different *classloaders*.
> so although the ZephyrParserFactory is an implementation of the
> XMLInputFactory they are both loaded from different class loaders (perhaps
> the ZephyrParserFactory is bundled with a separate StAX API JAR). If two
> identical classes are loaded from different class loaders they are NOT the
> same class, so it will cause a class cast exception.
>
> Can anyone suggest a solution to this problem

Unfortunately I have no idea about NetBeans, so can't really help you there.
But one thing that you could try to see whether it gets you somewhere,
is to remove the Woodstox dependency. DdlUtils does not depend on this
particular StAX implementation, so if NetBeans provides one (Zephyr ?)
then DdlUtils should be able to work with it instead.
Perhaps also the StAX API and Xerces dependencies.

Tom

Mime
View raw message