I'm not sure I believe Spring and JavaEE are as compatible as some would lead you to believe. CDI and JPA are the official implementations of dependency injection and ORM persistence, but they overlap with other functions in Spring and Hibernate. Components in JavaEE are POJOs or MBeans and they're injected based on qualifiers and rules in a configuration file. Guice and Spring both allow you to wire components together, but you can easily get conflict between their injection and the CDI injection.
The compile time sanity checking is still doing type checking, and to a degree you're correct ... there will be run-time exceptions if CDI can't find any instances of an object (likely an interface) to inject or if there is more than one that matches. I don't think you'd want it to randomly pick one.
If you code to the CDI and JPA specifications, you can plug in Hibernate and Weld as your implementations of the frameworks. If you plug in Hibernate and Weld, then use their non-standard extensions you can indeed find irregularities.
The compile time sanity checking is still doing type checking, and to a degree you're correct ... there will be run-time exceptions if CDI can't find any instances of an object (likely an interface) to inject or if there is more than one that matches. I don't think you'd want it to randomly pick one.
If you code to the CDI and JPA specifications, you can plug in Hibernate and Weld as your implementations of the frameworks. If you plug in Hibernate and Weld, then use their non-standard extensions you can indeed find irregularities.