users@jersey.java.net

Re: cglib problem using spring in jersey

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 13 Feb 2008 13:06:35 +0100

Hi,

Duncan Eley wrote:
> See the first comment here:
>
> http://weblogs.java.net/blog/mhadley/archive/2007/09/integrating_jer.html
>

Thanks! Peter did that solve your problem?


> I tried to transform the Bookmark example to a spring version (allowing
> me to drop the custom transaction classes).

When you have it working I would love to see the finished code if possible.

Thanks,
Paul.

> The problem I have now is that the UserResource object, which has a
> PersistenceContext injected using Spring's
> PersistenceAnnotationBeanPostProcessor is proxied by cglib
> Cglib doesn't copy the annotations from the original class causing this
> exception:
> A resource class, class example.UserResource$$EnhancerByCGLIB$$42882142,
> does not have any resource method, sub-resource method, or sub-resource
> locator.
>
> Sow I guess I should make jersey look at the parent class somehow ?
>
> Did someone else find a comparable problem? or now a solution.
>
>
> ------------------------------------------------------------------------
> Sent from Yahoo!
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html>
> - a smarter inbox.

-- 
| ? + ? = To question
----------------\
    Paul Sandoz
         x38109
+33-4-76188109