RichFaces 4.0.0ALPHA2 compatibility problems

UI Components for JSF
Post Reply
healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

28 Jun 2010, 13:35

I've got an application working with Mojarra 2.0.3 and PrimeFaces 2.0.2,
then all I do is add the RichFaces 4 jars to the classpath (there are 6 of
them + 2 slf4j jars) and without making ANY other changes I get this when
trying to redeploy my app with NetBeans:

INFO: Loading application SportQuest at /SportQuest
INFO: SportQuest was successfully deployed in 9,685 milliseconds.
WARNING: StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
at org.primefaces.context.PrimeExternalContext.redirect(PrimeExternalContext.java:45)
at com.sun.faces.application.NavigationHandlerImpl.handleNavigation(NavigationHandlerImpl.java:182)
at uk.co.sportquest.general.CustomExceptionHandler.handle(CustomExceptionHandler.java:81)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:215)

Is there anything I can do to help debug this, or should I be chasing this with
the RichFaces people? Any suggestions welcome.

Thanks,
Brendan.

p.s. I tried using the original Mojarra release shipped with Glassfish v3 in
Dec 2009 and no difference, I've also tried changing the order of the jars in
the classpath and also no difference.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

28 Jun 2010, 14:08

Hello,

This is what I several times tried to tell in this forum, but without success until now :-). See for instance

http://primefaces.prime.com.tr/forum/vi ... 35&start=0
http://primefaces.prime.com.tr/forum/vi ... 55&start=0
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

29 Jun 2010, 10:11

I'd read your post but it wasn't (still isn't) entirely clear if we're seeing the
same problem. However, the fact remains that it's extremely important
for PrimeFaces to be inter-operable with RichFaces. I'm sure I echo the
sentiments of many when I say that I want to be able to pick and choose
and use the best components in the cookie jar, regardless of which library
they're from.

I'm sure I can't be alone in giving ICEFaces a wide berth because (as I
understand it) if you use ICEFaces, you can't use any other library. I don't
want to get locked into any particular technology, it'd be like going back to
the 1980s! And there are a lot of bugs and limitations with this JSF
technology, I find that I need the biggest possible array of weaponry to get
anything serious working.

In the meantime I'm going to try a RichFaces only build without PrimeFaces
to see if this works ok, then add in the PrimeFaces jar. I've got PrimeFaces
only working ok and it breaks with the RichFaces + slf4j libraries, so at
least if RichFaces works alone then it is definitely an interoperability issue.

Regards,
Brendan.

healeyb
Posts: 365
Joined: 07 Apr 2010, 16:05

29 Jun 2010, 12:17

Ok, I now think that this was a problem with my RichFaces libraries as
opposed to any issue related to interoperability between the two libraries,
so I eat my words!

I setup a new project with a hello world and tried it with just RichFaces. It
turns out that the RichFaces 4.0.0-ALPHA2 release notes are missing the
bit that tells you that you need two additional jars, sac-1.3.jar and
cssparser-0.9.5.jar. Having got this working from a build perspective (not
using any RF tags) I was then able to add in the primefaces2.0.2 lib in ok
and use p:editor. I then removed and added back in the richfaces libs into
my main project and it then worked ok.

Interestingly just having the RichFaces libs in my classpath changes the
appearance of all my pages. I'm either going to have to get a magnifying
glass or use CTRL+!

Regards,
Brendan.

User avatar
kislo_metal
Posts: 9
Joined: 29 Jun 2010, 12:51

29 Jun 2010, 12:57

about richfaces tag library see - http://community.jboss.org/message/548498#548498

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

29 Jun 2010, 13:24

Just a note that, PrimeFaces has no mandatory dependencies, you just need primefaces-{version}.jar.

User avatar
Oleg
Expert Member
Posts: 3805
Joined: 02 Oct 2009, 09:41
Location: Germany, Black Forest

29 Jun 2010, 14:20

The author of this post has a NullPointerException if he mixes PrimeFaces and RichFaces. The problem could be resource order loading. In your case PrimeFaces PhaseListeners are executed either after or before RichFaces listeners. You should find out it. Try to change the order how it's described here http://blogs.sun.com/rlubke/entry/jsf_c ... e_ordering
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: brianfeidt and 27 guests