1 Reply Latest reply on Jul 24, 2012 4:44 AM by Tonique Claque

    Aspectj can't find type sun.rmi.registry.RegistryImpl

    Tonique Claque Newbie

      Hello,

       

      I'm using 7.1.1.Final and I have the exception below when deploying a Spring AOP application:

       

       

      Caused by: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException: warning can't determine modifiers of missing type sun.rmi.registry.RegistryImpl
       [Xlint:cantFindType]
                at org.aspectj.weaver.reflect.ReflectionWorld$ExceptionBasedMessageHandler.handleMessage(ReflectionWorld.java:129) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.Lint$Kind.signal(Lint.java:325) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.raiseCantFindType(MissingResolvedTypeWithKnownSignature.java:232) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.MissingResolvedTypeWithKnownSignature.getModifiers(MissingResolvedTypeWithKnownSignature.java:104) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.ResolvedType.isInterface(ResolvedType.java:855) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.ResolvedType.getHierarchy(ResolvedType.java:349) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.patterns.KindedPointcut.fastMatch(KindedPointcut.java:126) [aspectjtools-1.6.11.jar:]
                at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.couldMatchJoinPointsInType(PointcutExpressionImpl.java:82) [aspectjtools-1.6.11.jar:]
                at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:255) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:209) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:263) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:295) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:117) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:87) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:68) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:359) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) [spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.postProcessObjectFromFactoryBean(AbstractAutowireCapableBeanFactory.java:1598) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:162) [spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]
                ... 29 more
      
      

       

       

      Do I need to do an import of some JDK packages?

       

      Thanks!

        • 1. Re: Aspectj can't find type sun.rmi.registry.RegistryImpl
          Tonique Claque Newbie

          OK, I created a new module that exports the JDK rmi and it seems to work.

           

           

          <module xmlns="urn:jboss:module:1.1" name="sun.jdk.rmi">

              <dependencies>

                  <system export="true">

                      <paths>

                          <path name="sun/rmi/registry"/>

                          <path name="META-INF/services"/>

                      </paths>

                      <exports>

                          <include-set>

                              <path name="META-INF/services"/>

                          </include-set>

                      </exports>

                  </system>

              </dependencies>

          </module>