Closed ops4j-issues closed 6 years ago
Guillaume Nodet commented
Could you please provide a completely reproductible test / instructions based on pax-cdi 1.0.0-SNAPHOT / pax-web-4.4.0-SNAPSHOT please ?
Marc Schlegel commented
Pax-Cdi-Extension has a uses-constraint on org.osgi.dto which is provided by R6 runtimes. Pax-Web 4.x still uses OSGi R5. You might want to check your backport from Pax-Web 6.0.0 to 4.4.x.
I've added a integration-tests in master for Jetty and Undertow to master but not all injections work as desired.
@Default
at injection point BackedAnnotatedField @Inject
private org.ops4j.pax.web.sample.cdi.SomeController.sessionGuillaume Nodet commented
The dependency is that pax-cdi depends on pax-web, not the opposite, so I don't think this is a very big problem that pax-cdi depends on R6 while pax-web depends on R5.
Guillaume Nodet commented
Is it expected that SomeSessionBean is annotated with @javax
.faces.bean.SessionScoped instead of @javax
.enterprise.context.SessionScoped ?
Guillaume Nodet commented
I have some changes to make the various combinations of openwebbeans/weld/jetty/undertow work, but I don't think any of them has been integrated with JSF.
The pax-cdi-undertow-weld bundle has some support for JSF, but I haven't been able to make it work so far:
I haven't seen any way to augment the pax-web WebApp application so far, so I think I'll defer this issue.
Guillaume Nodet commented
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 commented
I've fixed the wrong annotation for SessionScoped in the sample. @javax
.enterprise.context.SessionScoped should be used.
Marc Schlegel commented
Any update on this issue? Do we need to do something on Pax-Web side?
Grzegorz Grzybek commented
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 commented
The change in pax-cdi is committed here
Former user created PAXCDI-210
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:
Affects: 0.13.0 Fixed in: 1.0.0 Votes: 5, Watches: 6
Referenced issues
relates to:
261 - ClassNotFoundException for Weld client proxies in PAX CDI Weld [PAXCDI-216]