CDI alpha3 and rating sample app (Vaadin 7.3.0rc1) no-go.

Updating my Vaadin 7.2.6 app to cdi-alpha3 broke injection and resulted in null pointer exceptions. So I figured maybe my code isn’t quite ok, me being new to CDI. So I took the example app from this webcast https://vaadin.com/blog/-/blogs/learn-by-hacking - a rating stars application using cdi and jpacontainer - and bumped the cdi dependency in the pom.xml from alpha2 to alpha3, and guess what, also no go. The rating stars app is Vaadin 7.3.0 RC-based.

What’s going on? Exactly which versions of Vaadin core should be used with which versions of cdi?

Vaadin core 7.2.6 should be fine with alpha3, as should 7.3.0.rc1.

One big thing that changed is the use of conventions for mapping of UIs and views. If you had @CDIUI or @CDIView without any parameters in your application, you can get the old behavior by changing these to @CDIUI(“”) or @CDIView(“”). There is no need to change @CDIUI or @CDIView if you have explicitly given the value parameter to them.

If this does not help, what is the environment you are running your application in? Application server version and CDI implementation/version (Apache OpenWebBeans/Weld/…) if not the default embedded in the JEE server? Where does injection not work anymore (UI class? view? some other class with @UIScoped? some other class?)? What exceptions are you getting (stack traces)? Is the application doing any operations in background threads or using server push, and if so, which method?

I’m running Joonas’ application in Wildfly, Java 8 on OS X. Works fine with alpha2. With alpha3 I simply get “Request was not handled by any registered handler.” in the browser. can’t really see anything wrong in the logs or console.

App is here https://vaadin.com/blog/-/blogs/learn-by-hacking so it’s possible to check out if I’m the only one getting trouble bumping cdi to alpha3.

We tested the application (CDI branch and master) with the latest development branch of the CDI add-on, and the only changes needed in the application were

  • updating the dependency version number
  • changing @CDIUI to @CDIUI(“”)
  • changing @CDIView to @CDIView(“”) (for PresentationsView in the CDI branch, for LoginView in master)

Works, badabing! Thanks a bunch!