Markus is a Developer Advocate at Red Hat and focuses on JBoss Middleware. He is working with Java EE servers from different vendors since more than 14 years and talks about his favorite topics around Java EE on conferences all over the world. He has been a principle consultant and worked with different customers on all kinds of Java EE related applications and solutions. Beside that he has always been a prolific blogger, writer and tech editor for different Java EE related books. He is the Java Community leader of the German DOAG e.V. and it's representative on the iJUG e.V. As a Java Champion and former ACE Director he is well known in the community. Markus is a DZone MVB and is not an employee of DZone and has posted 182 posts at DZone. You can read more from them at their website. View Full User Profile

Running RichFaces 4.1.0.Final on WebLogic 12c

  • submit to reddit

You might have noticed, that I simply love JSF. Not only the specification and the reference implementation Mojarra but also the most creative component suites on the market. This is my all-time favorite PrimeFaces and of course RichFaces. This is the reason why you find "running xxx on xxx" posts here :) Today is my RichFaces and WebLogic day, so a little followup on my earlier post this is more an update on how to get it running on latest WebLogic 12c. Here we go:

Download the IDE of your choice. I will use NetBeans 7.1 RC 2 for this post. Download and install WebLogic Server 12c. Either with the platform installer of your choice or from the ZIP distribution. Go on with creating a domain and adding the server to NetBeans. (For more details see my earlier post.) Go back to NetBeans, check your maven settings and create a new Maven Web Application project. Let's call it rfshowcase for now. Enter the missing stuff (Group, Version and Package). Select or add your local Oracle WebLogic server as your runtime environment. Add the JBoss Maven repository and the magic richfaces-bom to your pom.xml:

 <name>JBoss Repository</name>
 <!-- ... -->
<!-- ... -->
Add the RichFaces dependencies:

And you are done! Unlike with earlier version of WLS (compare my older post) JSF 2.x and JSTL 1.2 have been incorporated directly into the server's classpath. Applications deployed to WebLogic Server can seamlessly make use of JSF 2.x and JSTL 1.2 without requiring developers to deploy and reference separate shared libraries. So, you can actually start implementing your application.

Some simple tests
Let's go and add an index.xhtml to your Web Pages folder. Add the RichFaces namespaces to your html tag:

xmlns:a4j="" xmlns:rich=""

And start using your needed components. In my little example I stripped down the rich:panelMenu taken from the . Now right click on your project and "Run" it! NetBeans is starting your WLS instance and deploys your application. After this is done it should open a browser which points you to http://localhost:7001/rfshowcase/ and you see your application up and running. That's all. Nothing more to do. No library deployment, nothing else. That's what I would call a good progress. Compared to the stupid library deployment that was needed with earlier versions of WLS you know have the freedom to use whatever comes your way. Even if you feel like using another RI you could simply revert the classloader by specifying the prefer-application-packages tag in your weblogic.xml

13.12.2011 20:48:43 org.richfaces.application.InitializationListener onStart
INFO: RichFaces Core Implementation by JBoss, 
a division of Red Hat, Inc., version v.4.1.0.Final

Clazzloading or Oracle and RedHat vs. Google
If you look at your application from a classloader point of view you will see, that you have a good number (705) of classes in conflict. In the case of RichFaces all these are in the* package. The reason for that is, that WLS is distributing a which conflicts with the RichFaces dependency Running my small tests this doesn't seem to do any harm at all. But it would be best to configure a so called FilteringClassLoader which provides a mechanism for you to configure deployment descriptors to explicitly specify that certain packages should always be loaded from the application, rather than being loaded by the system classloader. So you should change your project to be an EAR module and add this little paragraph to your weblogic-application.xml (ear level):



Published at DZone with permission of Markus Eisele, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



John David replied on Tue, 2011/12/20 - 10:54am

JSF is out of market just due to performance issues. I have worked for a year or more with the JSF and finally I have to switch on some other framework.

Its data grid is very slow and has lot of issues with concurrent access and huge data access. 

I think myfaces has provided a richer set of components based on JSF as compared to rich faces. Also Ice faces could be another option.



George Jiang replied on Wed, 2011/12/21 - 5:23am in response to: John David

MyFaces Trinidad or MyFaces Tomahawk? Both are 'out of market' :-)

 And you seemed very concerned about performance. Did you know icefaces is the worst performing JSF component library?

 With JSF 2, it is RichFaces 4 vs PrimeFaces 3. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.