JSF Beans cannot be resolved

Description

If you setup Karaf 4.0.3 with OpenWebBeans and try to run the pax-cdi-sample4-jsf it deploys and runs without any error, but as soon as you hit the Vote Button of the poll.xhtml nothing happens, you should see "Your choice: whatever you have chossen" and in the console you should see the System.out.println (form submitted) from the submit method of the FrameworkBean, but neither of both happens, if you add a command button like:

inside the form and hit that button you'll get a javax.el.PropertyNotFoundException:

Environment

  • Apache Karaf 4.0.3

  • PAX-CDI 0.13.0-SNAPSHOT including patch from (waiting for pull request)

  • CDI Features / Bundles for Karaf:
    <bundle>mvn:org.apache.xbean/xbean-bundleutils/4.1</bundle>
    <feature>pax-cdi-openwebbeans</feature>
    <feature>pax-cdi-web-openwebbeans</feature>
    <bundle>mvn:org.apache.openwebbeans/openwebbeans-jsf/1.2.6</bundle>
    <bundle>mvn:org.apache.openwebbeans/openwebbeans-el22/1.2.6</bundle>
    <bundle>mvn:org.apache.openwebbeans/openwebbeans-web/1.2.6</bundle>

Activity

Show:
Guillaume Nodet
October 18, 2016, 8:01 PM

I've pushed my changes to clean / fix pax-cdi / pax-web integration with
https://github.com/ops4j/org.ops4j.pax.cdi/commit/1f8604e11e773f25d254fc01c10ade409370a949

This doesn't provide CDI / JSF support though.

Marc Schlegel
October 19, 2016, 8:16 AM

I've fixed the wrong annotation for SessionScoped in the sample. @javax.enterprise.context.SessionScoped should be used.

Marc Schlegel
January 23, 2017, 11:10 AM

Any update on this issue? Do we need to do something on Pax-Web side?

Grzegorz Grzybek
February 8, 2018, 7:16 AM
Edited

On pax-web side, I added some important improvements, so pax-cdi + jsf works. There's even dedicated integration test. The change is here.

Summarizing the change, I ensured that the listeners declared in faces-config.xml fragments are NOT registered too early (during web app parsing), but rather by org.ops4j.pax.web.jsp.JasperInitializer.

There's canonical example created here.

And changes in pax-cdi itself are pending in this branch. I hope to have them merged soon.

Grzegorz Grzybek
February 8, 2018, 7:40 AM

The change in pax-cdi is committed here

Assignee

Grzegorz Grzybek

Reporter

Former user

Labels

Fix versions

Affects versions

Priority

Critical
Configure