Hibernate version: 3.2
Application server: jboss 4.2.2
hi everyone
my webapp loads external "plugin" classes using a xml conf file. Everything worked fine while the "plugin" classes and the rest of the webapp where on the same ear file, but i need to split them up, so i moved the plugins in a different jar i placed inside the lib directory.
now i get a NoClassDefFoundError Exception, linking to an entity bean i'm sending to the plugin class using an hashtable. Putting a jar with the Entity Beans in the lib directory changes the error to a ClassCastException
Hashtable context -> the one with the Entity Beans
Hashtable params -> info from the xml
String className, methodName -> the class name and method name
try{
Class c = Class.forName(className);
Object o = c.newInstance();
Method m = o.getClass().getMethod(methodName, new Class[]{Hashtable.class, Hashtable.class});
result = (XMLResult) m.invoke(o, new Object[] {context, params});
} catch(Exception e) {
logger.error(e.getMessage());
result = new XMLResult(3, "Errore Bloccante");
}
inside the plugin, i'm just using the entity as normal pojo objects.
how can i resolve this problem?
i hope to have made myself clear enough and i'm sorry for my bad english
Thanks for your time and help
Enrico.
|