On Dec 17, 2010, at 12:14 AM, DaHoopster wrote:
>
> Hi John and Paul,
>
> So I am writing a custom class that extends  
> AbstractRootElementProvider, but
> the super class doesn't have a default constructor. I annotated my  
> class
> with @Provider and @Component and upon start up of the server, Spring
> complained that no default constructor was found.
>
> How can I get around this?
>
Unfortunately you cannot, at least directly. These abstract classes  
are currently designed to only work with Jerseys DI system (mainly due  
to limitations with Jersey's spring integration i.e. it does not  
define that all Jersey declared bindings are also Spring bindings).
The best thing to do is create a delegate component that injects as  
fields the dependencies for the delegated component, then construct  
the delegated component on post construction of the delegate.
Paul.