GeeCON Prague 2014*
The moose likes JSF and the fly likes JSF 1.2: RichFaces ApplicationFactory exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "JSF 1.2: RichFaces ApplicationFactory exception" Watch "JSF 1.2: RichFaces ApplicationFactory exception" New topic
Author

JSF 1.2: RichFaces ApplicationFactory exception

Andrew Redick
Greenhorn

Joined: Feb 04, 2012
Posts: 2
Hi,

I'm working on a webapp which combines PrimeFaces 1.1 and RichFaces 3.3.3 in a JBoss 4.2.3 server, so this application uses JSF 1.2.

Inside this app I have a webpage where I combine different components from these two libraries. My problem consists in: initially this page works fine, but there is a rich:tree component included in this page which is not rendered after a request. All other components are rendered and updated correctly. The server throws the following exception after any request:

java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267)
org.richfaces.skin.SkinFactoryImpl.processProperties(SkinFactoryImpl.java:239)
org.richfaces.skin.SkinFactoryImpl.buildSkin(SkinFactoryImpl.java:278)
org.richfaces.skin.SkinFactoryImpl.getSkinByName(SkinFactoryImpl.java:133)
org.richfaces.skin.SkinFactoryImpl.getSkin(SkinFactoryImpl.java:150)

... etc

Thanks in advance!

FYI: I need to use JSF 1.2 because this app uses the WSDC library from JADE (multiagent system) and I'm not able to use WSDC library in a JSF 2.0 environment. This library allows to invoke web services (which represents JADE agents services) in a dynamic way.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

Welcome to the JavaRanch, Andrew!

It's generally not safe to combine enhanced tagsets like RichFaces and Primefaces on the same page (and sometimes not even in the same webapp). That's because they have overlapping functionalities and they each have their own ways to provide them. Which sometimes assumes a certain set of resources that are used in conflicting ways relative to how other extension tagsets do it.

There are some exceptions to this rule, where the vendor explicitly allows for "mix-n-match", but if they don't say so, results may be unpredictable.


Customer surveys are for companies who didn't pay proper attention to begin with.
Andrew Redick
Greenhorn

Joined: Feb 04, 2012
Posts: 2
Thank you, Tim!

I agree with your recommendation, but in this case I need to mix RF + PF. This is a requirement and I'm not able to change it.

Anyway, today I have found the answer to my problem. The exception was thrown by WSDC library. This evening I have used another similar library which allows to call web services dynamically and everything works fine now. This new library is JBoss Wise: www.jboss.org/wise.

Regards!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16093
    
  21

Andrew Redick wrote: This is a requirement and I'm not able to change it.


You're doomed. When geniuses at the top make commandments like this it's a sure sign that a child has been handed a chainsaw. I hope your résumé is up to date.

Fortunately, if the emails from recruiters I've been getting lately are any indication, the job market for Enterprise Java is pretty good right now.
 
GeeCON Prague 2014
 
subject: JSF 1.2: RichFaces ApplicationFactory exception