Announcement Announcement Module
Collapse
No announcement yet.
NPE in Roo ITD Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NPE in Roo ITD

    Hi everybody,

    So I've been seeing a few NPE's in my deployed ROO application that has a fairly low number of users. But I can't make it repeat, I just have myself being emailed on unhandled exceptions.

    Looking at the details below it seems that the only possible thing that is null is the "this." in the getTenant method, so I've got no idea whats happening unless its in the AOP implementation.

    Code:
    java.lang.NullPointerException
           at nz.co.tentacle.domain.security.TentacleUser_Roo_JavaBean.ajc$interMethodDispatch1$nz_co_tentacle_domain_security_TentacleUser_Roo_JavaBean$nz_co_tentacle_domain_security_TentacleUser$getTenant(TentacleUser_Roo_JavaBean.aj)
           at nz.co.tentacle.security.SessionDetails.getTenant(SessionDetails.java:61)
           at nz.co.tentacle.security.SessionDetails$$FastClassByCGLIB$$c2d4e91e.invoke(<generated>)
           at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191)
           at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
           at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
           at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
           at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
           at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
           at nz.co.tentacle.security.SessionDetails$$EnhancerByCGLIB$$30eed92.getTenant(<generated>)

    So the getTenant method in the ITD looks like.
    Code:
    privileged aspect TentacleUser_Roo_JavaBean {
        
        public Tenant TentacleUser.getTenant() {
            return this.tenant;
        }
    ...

    Code:
    @Entity
    @RooJavaBean
    @RooToString
    @RooEntity(finders = { "findTentacleUsersByUsername", "findTentacleUsersByTenant" })
    public class TentacleUser extends nz.co.tentacle.domain.Entity {
    
    	private static final Logger LOG = LoggerFactory.getLogger(TentacleUser.class);
    	
    	@ManyToOne(targetEntity = Tenant.class)
    	@JoinColumn
    	private Tenant tenant;
    I am using the ROO 1.1.0.RELEASE version, but my have updated some child libraries in between ... I will attempt to go to the latest ROO version, but am really keen to know if anybody has seen anything like this before or knows that it has been fixed in the newer versions? Or has any ideas in general?

    Cheers,
    Steve
Working...
X