On 11/10/2009 00:53, Adam Monsen wrote:
I have a Web application which includes an abstract class: "TransactionImport".
Hi Adam, (Is it in a package? If not, why not?)
I compiled a subclass of TransactionImport (AudiBankImporter), placed the class in a jar, then placed the jar in $CATALINA_HOME/lib.
What else is in the jar?
What I'd like to do is load the compiled AudiBankImporter class from the Web application at runtime. When I do this using Class.forName() or ClassLoader.loadClass(), I get "java.lang.NoClassDefFoundError: TransactionImport".
The first thing to check when you get the above error is that the compiled class for "TransactionImport" actually present in a jar in $CATALINA_HOME/lib.
Is it?
If I change AudiBankImporter so that it no longer subclasses TransactionImport, I am able to load the class. I feel like I'm missing something fundamental about class loading in general or Tomcat classloaders, but I don't know what.
Maybe not, maybe you're just missing the superclass. p
If this isn't enough information to help me, I can code up a simple example. Basically what I'm trying to do is allow users to make plugins for my Web application, and force their plugins to subclass an abstract class I define. I could probably also use an interface or an actual class if that would work better in Tomcat. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org