Skip to main content

How to use JSF 1.2 on Glassfish v3

7 replies [Last post]
hanafey
Offline
Joined: 2003-06-16

Is is possible to run JSF 1.2 on Glassfish v3?

I tried two approaches:
Add JSF api/impl to ASHOME/glassfish/domains/domain1/lib.
Replace JSF api/impl in ASHOME/glassfish/modules.

Neither worked.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
alan94539
Offline
Joined: 2005-09-06

This thread is marked as answered but I didn't see the answer. I'm in the same boat -- trying to get ICEFaces 1.8.2 to run under Glassfish V3 -- the one that was released with Netbeans 6.8.

Can someone point to a howto?

hanafey
Offline
Joined: 2003-06-16

Thanks for the quick answer!

One issue this caused was the following strange error:

[i]remote failure: Exception while loading the app : java.lang.Exception: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Source Document: jndi:/server/lt/WEB-INF/faces-config.xml Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is not an instance of 'class javax.faces.el.VariableResolver'[/i]

To save space in the war archives I had put the SpringFramework jar in domain/domain1/lib, and apparently this causes a class loader issue where the class name can be the same, but the classes are not.

This was fixed by including Spring in the war.

[b]Which leads to a followup question[/b]: Is there anyway to have a the entire domain run JSF 1.2 by default by putting the jsf jars in "domain/domain1/lib"? This would avoid having to bundle jsf and spring in every web app.

Ryan Lubke

On 6/16/09 10:58 AM, glassfish@javadesktop.org wrote:
> Thanks for the quick answer!
>
> One issue this caused was the following strange error:
>
> [i]remote failure: Exception while loading the app : java.lang.Exception: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Source Document: jndi:/server/lt/WEB-INF/faces-config.xml Cause: Class 'org.springframework.web.jsf.DelegatingVariableResolver' is not an instance of 'class javax.faces.el.VariableResolver'[/i]
>
> To save space in the war archives I had put the SpringFramework jar in domain/domain1/lib, and apparently this causes a class loader issue where the class name can be the same, but the classes are not.
>
> This was fixed by including Spring in the war.
>
> [b]Which leads to a followup question[/b]: Is there anyway to have a the entire domain run JSF 1.2 by default by putting the jsf jars in "domain/domain1/lib"? This would avoid having to bundle jsf and spring in every web app.
>
At this point I don't believe it's possible. I would recommend opening
a feature request.
> [Message sent by forum member 'hanafey' (hanafey)]
>
> http://forums.java.net/jive/thread.jspa?messageID=351471
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

Ryan Lubke

On 6/16/09 9:01 AM, glassfish@javadesktop.org wrote:
> Is is possible to run JSF 1.2 on Glassfish v3?
>
> I tried two approaches:
> Add JSF api/impl to ASHOME/glassfish/domains/domain1/lib.
> Replace JSF api/impl in ASHOME/glassfish/modules.
>
Bundle the JSF 1.2 implementation JARs with your application.

Include a sun-web.xml that looks something like:


Application Server 3.0 Servlet 3.0//EN"
"http://www.sun.com/software/appserver/dtds/sun-web-app_3_0-0.dtd">

in WEB-INF of your war.

> Neither worked.
> [Message sent by forum member 'hanafey' (hanafey)]
>
> http://forums.java.net/jive/thread.jspa?messageID=351449
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

pip25
Offline
Joined: 2009-06-26

I am sorry, but could describe "bundling the JSF 1.2 implementation JARs" in a little bit more detail? I tried putting them to the bundle classpath in the manifest, but then I get a very odd exception ("java.lang.NoClassDefFoundError: javax/crypto/CipherOutputStream") during deployment, so I am assume I am doing it wrong.

hanafey
Offline
Joined: 2003-06-16

Bundling the JARs with the application simply means putting them in with the other application JARs in the the standard WEB-INF/lib directory.

The sun-web.xml stuff is needed the force the classloader to resolve the JSF classes from WEB-INF/lib instead of from the application server wide versions.

pip25
Offline
Joined: 2009-06-26

Thanks for the reply; it did not solve my problem though - taking the libraries out of the bundle classpath only led to them not being seen at all.

EDIT: It seems to have something to do with the fact that I am trying to deploy my webapp as an OSGI bundle - the libraries are found if I try it as a simple war.

Message was edited by: pip25