users@jersey.java.net

Re: [Jersey] Re: Error using Spring Bean in Jersey resource class - Plz Help!!

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 19 Mar 2010 18:44:34 +0100

Hi,

Can you send me a reproducible example, preferably a maven-based
project?

It is hard to tell what is going wrong. For example, when using
registered Spring beans you should not have to use package scanning
because Jersey will iterate through the Spring registered beans. So
you may be able to remove:

                <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-
name>
            <param-value>org.unjspf.eleave.service</param-value>
        </init-param>

Any more info in the logs? e.g.

   "Registering Spring bean .... as a root resource class"

?


Paul.

On Mar 19, 2010, at 6:10 PM, Jay_K wrote:

>
> Yes,
> I do have ContextLoaderListener and RequestContextListener
> configured in
> Web.xml.
>
> And personservice is also defined as a Spring bean in Spring
> Application
> context file. Infact my Spring application is working fine without any
> problem.
> Thanks.
> --
> View this message in context: http://n2.nabble.com/Error-using-Spring-Bean-in-Jersey-resource-class-Plz-Help-tp4763799p4764417.html
> Sent from the Jersey mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>