• Welcome to KonaKart Community Forum. Please login or sign up.
 

Module class loading

Started by Mike, May 07, 2008, 06:58:08 pm

Previous topic - Next topic

Mike

I have an odd problem which I assume is a classloader issue. Can anyone shed any light?

I have created a Payment module (which works fine). I then tried to add in a call to some Javamail code (which works perfectly else where).

With the Javamail code included, I get the exception shown at the bottom of the page.

If I incorporate my Javamail code into a new Struts action (TestAction), invoked by Test.do, it works fine. The problem only occurs when the module is packaged as a jar and then loaded. Hence my suspicion of the behaviour of the class loader. Is there any configuration of the classpath for the module loader?

Thanks for any help.


The exception:

<pre>
java.lang.NoClassDefFoundError: com/konakart/actions/gateways/WebWrightPayAction$1
   java.lang.Class.getDeclaredConstructors0(Native Method)
   java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
   java.lang.Class.getConstructor0(Class.java:2699)
   java.lang.Class.newInstance0(Class.java:326)
   java.lang.Class.newInstance(Class.java:308)
   org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
   org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292)
   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
   org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
   org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
   org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
   org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)
   org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
   org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
</pre>

nitros

Which server are you using?

Mike