About software development for the enterprise. Focus on Java EE and more general Java platforms.
You'll read a lot about Conferences, Java User Groups, Java EE, Integration, AS7, WildFly, EAP and other technologies that hit my road.

Tuesday, July 7, 2009

JSF 2.0-BETA 1 on Oracle Weblogic 10gR3

11:03 Tuesday, July 7, 2009 Posted by Markus Eisele
, , ,
As you probably may have heard: JSF2.0 is final now. Time to give the available distributions a shot. I was curious to find out, that the actual available builds of the RI are still in BETA. Therefore I had to try it with the 2.0.0 Beta1 (26 May 2009).

To deploy new JSF libraries to the Oracle Weblogic server, you have to provide a separate application library. This is after all quite simple, but you have to take some actions at all.
- grep a sample from %ORACLE_HOME%\wlserver_10.3\common\deployable-libraries
- extract the .war (e.g.jsf-1.2.war) and rename the folder appropriate (e.g. jsf-2.0.1)
- change the libraries in WEB-INF/lib (you need the jsf-api.jar, jsf-impl.jar and the jstl-1.2.jar)
- change the META-INF/MANIFEST.MF to reflect the appropriate version informations:
Specification-Version: 2.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: JSF Reference Implementation (Mojarra 2.0.0 BETA1)
Implementation-Version: 2.0.1
- add a WEB-INF/classes folder and add the com.bea.faces.WeblogicInjectionProvider.class class to it
- last part is to zip everything together again and have a jsf-2.0.1.war

Now you are able to deploy the new library to the WLS. Make shure to add the managed library to your applications weblogic.xml.

<wls:library-ref>
<wls:library-name>jsf</wls:library-name>
<wls:specification-version>2.0</wls:specification-version>
<wls:implementation-version>2.0.1</wls:implementation-version>
<wls:exact-match>false</wls:exact-match>
</wls:library-ref>

and try out some samples. I came across several issues:
- It seems as if neither the com.sun.faces.taglib.jsf_core.BeanValidatorTag nor the com.sun.faces.taglib.jsf_core.RequiredValidatorTag are part of the distribution at the moment. Trying to start the samples app, leads to a class not found error. Only fix for now is to remove the Tags from the jsf_core.tld.
- Not all new @Annotations are processed with the WeblogicInjectionProvider for now. Therefore, even the simplest examples do not work as they should with this version.

Let's see, what happens with the final release, and how we could deploy this to the WLS :)

[UPDATE: 14.07.09]
Even the latest Oracle Fusion Middleware and within it the Oracle Weblogic 10.3.1.0 still only supports JSF 1.2.9.0. At the moment it is simply not possible to run JSF 2.0 on top of Weblogic Server.