[jboss-user] [JBoss Seam] - Re: Seam Email - IllegalStateException: No Factories configu

petemuir do-not-reply at jboss.com
Sat Feb 24 18:34:02 EST 2007


"bsmithjj" wrote : Pete,
  | 
  | Here is a report on the classloader situation just before I invoke my SLSB that sends email:

Sorry, I meant on entry to the method called by JSF (i.e. is something changing your classloader between JSF calling the action method and you calling the MailSenderBean) or is the action method being called with the UCL as the class loader?  Something like:

public String dsaProvision() {
  |    System.out.println(this.getClass().getClassLoader());
  |    // rest of the method

public String userManagerApproveAccessRequest() {
  |    System.out.println(this.getClass().getClassLoader());
  |    // rest of the method

For me (at least in the mail example where I'm working on this) at the entry to a send method (called directly by JSF) the classloader is WebAppClassLoader, whether it's a Seam managed JavaBean or a SLSB.

anonymous wrote : For now, I've put the facelets (and other) jars in both the ear and the war - the emails are going out, but there are still some issues with some of the libraries.

Sure, but this strikes me as a hack that could come back and bite you later on...

anonymous wrote : I assume that the Servlet/Portlet contexts use the webapp classloader...?

On testing this I found that facesContext, externalContext and externalContext.response all were using the UCL not the WebAppClassLoader (which was unexpected).

Perhaps the UCL is getting used because myfaces is in the ear, not in a jsf-libs/the war?

Lets see which classloader is getting for calling your methods, and I'll check some more examples/projects and see whether its always the WebAppClassLoader or whether it can be the UCL.  I suspect we need someone who actually knows about JBoss and it's classloaders at this point though (I *certainly* don't :( ).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021773#4021773

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021773



More information about the jboss-user mailing list