JSF 2.0-BETA 1 on Oracle Weblogic 10gR3

Markus Eisele
8
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.

Post a Comment

8Comments

  1. The issue you've describe here has been resolved in the 2.0.0 RC2 release (released as of today).

    ReplyDelete
  2. We have tried the JSF 2.0.1 on WLS 10.3.1 and the first issue is solved, but e.g. validation annotation still doesn't to work. Is this a WLS problem since it works on Tomcat 6.0 or?

    ReplyDelete
  3. @Ole:
    this is not realy a "wls problem". The dependency mechanisms need an appserver specific provider. For 1.x this is supplied by Oracle in form of the WeblogicInjectionProvider. For JSF 2.x this is still missing. As of today this is still not supported by WLS 10.3.x.
    But I heard rumors, that they are working on this ..

    ReplyDelete
  4. " - add a WEB-INF/classes folder and add the com.bea.faces.WeblogicInjectionProvider.class class to it"
    Do You add this class from old WAR?

    ReplyDelete
  5. Does JSF 2.0 works after adding com.bea.faces.WeblogicInjectionProvider?

    ReplyDelete
  6. @lukep1984:
    No, you have to look at the provided jsf-1.2.war and copy it from there.

    ReplyDelete
  7. @antiso:
    Unfortunately not. JSF 2.0 is not supported by WLS at the moment. Even the most recent version does not! I heared rumors, that support will be available with the P2.

    ReplyDelete
  8. @antiso: No. Sorry. Still not working.

    ReplyDelete
Post a Comment