On Jan 19, 2009, at 1:18 AM, Pedro Teixeira wrote:
>
>
> Hi Martin,
>
> I'm currently using Spring 2.5. Added extra log and it seems that a
> I get null from the following bean definition:
> <bean id="abstractRepository"
> class="org.springframework.aop.framework.ProxyFactoryBean"
> abstract="true">
> </bean>
>
> Would the "abstract=true" explain the behaviour from spring?
>
I reckon so.
>
> Perhaps the best thing is to have the method:
>
> boolean ResourceConfig.isProviderClass
>
> a bit safer and return false when called with a null argument. What
> do you think?
>
Good idea. I have fixed this in the trunk for isRootResourceClass and
isProviderClass.
Paul.
>
> Thanks.
> Pedro
>
>
>
> On Sun, Jan 18, 2009 at 3:30 PM, Martin Grotzke <martin.grotzke_at_freiheit.com
> > wrote:
> Hi Pedro,
>
> in the line
>
> ClassUtils.getUserClass( springContext.getType(name) );
>
> it seems as if the type of the bean with the given name (coming from
> springContext.getBeanDefinitionNames()) cannot be determined. The
> javadoc of BeanFactory.getType [1] states referring to the return-
> value:
>
> Returns: the type of the bean, or null if not determinable
>
> And ClassUtils.getUserClass just returns null if the input is null.
>
> So we should really check for which of your beans the type cannot be
> determined. Can you findout for which of your beans that is the case?
>
> Cheers,
> Martin
>
>
> [1] http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/BeanFactory.html#getType(java.lang.String)
>
>
>
> On Sun, 2009-01-18 at 12:15 +0100, Martin Grotzke wrote:
> > Hi Pedro,
> >
> > could you provide some more details how to reproduce this issue?
> E.g.
> > for what classes/types you have this issue, the definition in the
> > applicationContext, which spring version etc. Or is this an issue
> for
> > types that are no spring beans at all?
> >
> > Thx && cheers,
> > Martin
> >
> >
> >
> > On Sat, 2009-01-17 at 03:28 -0200, Pedro Teixeira wrote:
> > > hi there,
> > >
> > > I'm just trying out version 1.0.1 and stumbled an annoying problem
> > > when the servelet is registering types.
> > >
> > > Fo some reason (not sure yet), a given type is returning null
> from the
> > > springContext.getType method.
> > >
> > > My current fix is to actually handle this possible null return in
> > > jersey's code, as follows:
> > >
> > > Class<?> type =
> > > ClassUtils.getUserClass( springContext.getType(name) );
> > > ** add this ** if(type == null) continue;
> > > if (ResourceConfig.isProviderClass(type)) {
> > > ----
> > >
> > > would be nice to have the check in the next realase ;)
> > >
> > > []'s
> > > Pedro
> --
> Martin Grotzke
> http://www.javakaffee.de/blog/
>