Spring newbie here. I’m getting the following error from Glassfish 3.0.1 with my Spring MVC 3.0.2 app:
rg.glassfish.deployment.common.DeploymentException: WELD-001408 Injection point has unsatisfied dependencies. Injection point: parameter 0 of constructor public controller.CustomWebArgumentResolverInstaller(org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter); Qualifiers: [@javax.enterprise.inject.Default()]
my applicationContext.xml has
<mvc:annotation-driven />
The CustomWebArgumentResolverInstaller.java is as follows:
package controller;
import javax.inject.Inject;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter;
import org.springframework.web.bind.support.WebArgumentResolver;
import org.springframework.mobile.device.mvc.DeviceWebArgumentResolver;
@Component
public class CustomWebArgumentResolverInstaller {
@Inject
public CustomWebArgumentResolverInstaller(AnnotationMethodHandlerAdapter controllerInvoker) {
WebArgumentResolver[] resolvers = new WebArgumentResolver[1];
resolvers[0] = new DeviceWebArgumentResolver();
controllerInvoker.setCustomArgumentResolvers(resolvers);
}
}
Any ideas about what to look for most welcome. As I’m new to this I’m not sure what is relevant to post, so if you need other information please ask.
It looks like in your case the JSR-330 annotations(
@Inject,@Namedetc) are being resolved by Glassfish rather than by Spring. I am not sure how you can suppress that, but a workaround could be simply to use Spring native annotations (@Autowired) instead.