• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Placing ReloadedMessageResources.java in a jar file

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm successful in overriding struts message resource, thanks to this link

But i want the ReloadedMessageResources.java and ReloadedMessageResourcesFactory.java to be in a jar file. I have 3 applications and i want each to use this jar file to override struts message resource.
So I tried placing these classes in it. Then I placed the jar file in my build path/lib, and in the server runtime.

When the appserver starts, it executes the constructor successfully:
public ReloadedMessageResources(MessageResourcesFactory factory, String config, boolean returnNull) {
super( factory, config, returnNull );
locales = new HashMap();
messages = new HashMap();

But when i try to access an action path, websphere is giving me this exception:
Error 500: No action instance for path
[8/28/08 17:26:50:264 CST] 26006b09 WebGroup I SRVE0181I: [???.war] [/???/???] [Servlet.LOG]: action: Error creating ActionForm instance of class 'com.???.???.???.form.???': java.lang.ClassNotFoundException: com.???.???.???.form.???
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)

It looks like websphere's classloader is having problems.
Your help is very much appreciated.
    Bookmark Topic Watch Topic
  • New Topic