Ajax4jsf 1.0.2 works out-of-the-box with Seam
Ajax4jsf 1.0.2 now works out-of-the-box with JBoss Seam and Facelets running inside JBoss AS (Ajax4jsf + Seam + plain JSP still has some issues though!). There is no more shared JAR files or ugly hacks. You just need to package the Ajax4jsf library JARs in the same JAR as your EJB3 beans:
myapp.ear
| + myapp.war
| + myapp.jar
| + ajax4jsf.jar
| + oscache-xxx.jar
| + mybean.class
Congratulations to the Ajax4jsf team! So, why do we no long need the separate *-war.jar files in myapp.war? As it turns out, more recent JSF implementations (i.e., JBoss AS 4.0.4 and above) search files by
JAVA:
So, it sees all configuration files in classpath including those in myapp.jar.
October 12th, 2006 at 11:37 am
Hello,
I am quite interested in using seam together with ajax4jsf
but unfortunately i can’t get it to work.
I tried to deploy the application referenced on
http://jira.jboss.org/jira/browse/JBSEAM-388
but this is the exception i get during deploy:
15:40:23,766 ERROR [[/jfash-booking-example]] Exception starting filter ajax4jsf
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
org.apache.myfaces.webapp.StartupServletContextListener
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at org.ajax4jsf.framework.resource.InternetResourceService.init(InternetResourceService.java:58)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.init(BaseFilter.java:121)
[... ...]
I am sorry if this is the wrong place to ask this question but i have no idea how to register with jboss since I am a student and can not provide the information needed to fill out the registration form.
Regards,
Christoph
October 12th, 2006 at 1:53 pm
Christoph,
I will take a look but cannot promise anything. In the meanwhile, perhaps you can contact the author of this application: Todd Smart. His email address is in the JIRA issue you referenced.
cheers
Michael
October 15th, 2006 at 7:16 am
Hi Michael,
thank you for your quick reply.
The problem was duplicate jar files.
I just removed them from the tomcat jsf-libs directory
and now it works!
Greets,
Christoph
October 15th, 2006 at 12:26 pm
Thanks for the update!
October 15th, 2006 at 12:57 pm
Hi again,
I was a little quick on my judgment. It seems JBoss Portal is involved, too.
What I’ve found out is that I don’t get the exception if I don’t start up the database configured for JBoss Portal. Still need help!
greets,
Christoph