Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-4390

NullPointerException in AspectJ's Java15AnnotationFinder when running on JDK 1.6

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.6
    • Component/s: Core:AOP
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      When running a webapp in jboss with Java 6.0 I get the following Exception during startup:
      ----------
      rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'objectFactory' defined in class path resource [cc/lovo/types/springContext.xml]: Initialization of bean failed; nested exception is java.lang.NullPointerException
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:445)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:123)
      at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:76)
      at cc.lovo.service.bootstrap.BootServlet.init(BootServlet.java:27)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3951)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4225)
      [...]
      Caused by: java.lang.NullPointerException
      at org.aspectj.weaver.reflect.Java15AnnotationFinder.getAnnotations(Java15AnnotationFinder.java:109)
      at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.unpackAnnotations(ReflectionBasedResolvedMemberImpl.java:174)
      at org.aspectj.weaver.reflect.ReflectionBasedResolvedMemberImpl.hasAnnotation(ReflectionBasedResolvedMemberImpl.java:158)
      at org.aspectj.weaver.patterns.ExactAnnotationTypePattern.matches(ExactAnnotationTypePattern.java:82)
      at org.aspectj.weaver.patterns.AnnotationPointcut.matchInternal(AnnotationPointcut.java:151)
      at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.getShadowMatch(PointcutExpressionImpl.java:235)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:101)
      at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.getShadowMatch(AspectJExpressionPointcut.java:362)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:239)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:205)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:244)
      at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:278)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:113)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:85)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:66)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:296)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:331)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1266)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:438)
      ... 151 more
      ----------

      With java 1.5 there is no problem.

        Attachments

          Activity

            People

            • Assignee:
              ramnivas Ramnivas Laddad
              Reporter:
              theli Martin Thelian
              Last updater:
              Spring Issuemaster
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                26 weeks, 4 days ago