org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException

Spring JIRA | Wojciech Durczyński | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    I'm using aspectjweaver in version 1.6.0.20080125213731 as a javaagent. It's weird but spring-agent.jar doesn't work for me. When aspectjweaver tries to parse compiled aspects from spring-aspects.jar (version 2.5.1) I've got an error: [org.springframework.bundle.spring.aspects] warning register definition failed -- (BCException) malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:127) at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66) at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312) at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142) at org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:360) at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:343) at org.aspectj.weaver.ltw.LTWWorld.resolveDelegate(LTWWorld.java:97) at org.aspectj.weaver.World.resolveToReferenceType(World.java:378) at org.aspectj.weaver.World.resolve(World.java:271) at org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:165) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:399) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:240) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:152) at org.aspectj.osgi.weaver.loadtime.OSGiWeavingAdaptor.initialize(OSGiWeavingAdaptor.java:53) at org.aspectj.osgi.service.weaving.WeavingService.ensureAdaptorInit(WeavingService.java:75) at org.aspectj.osgi.service.weaving.WeavingService.getKey(WeavingService.java:82) at org.aspectj.osgi.AspectJAdaptorFactory.getCachingService(AspectJAdaptorFactory.java:121) at org.aspectj.osgi.AspectJAdaptor.initialize(AspectJAdaptor.java:96) at org.aspectj.osgi.AspectJAdaptor.findClass(AspectJAdaptor.java:139) at org.aspectj.osgi.hooks.AspectJBundleFile.getEntry(AspectJBundleFile.java:67) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:452) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:415) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:182) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.beans.Introspector.instantiate(Introspector.java:1460) at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:410) at java.beans.Introspector.<init>(Introspector.java:359) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:242) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:141) at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:247) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:922) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437) 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.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:248) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136) at java.lang.Thread.run(Thread.java:619) Aspects in spring-aspects.jar should be rebuilt using java 1.6 compiler and aspectj in version 1.6.0. Probably aspectj API changed in new release or something.

    Spring JIRA | 9 years ago | Wojciech Durczyński
    org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException
  2. 0

    I'm using aspectjweaver in version 1.6.0.20080125213731 as a javaagent. It's weird but spring-agent.jar doesn't work for me. When aspectjweaver tries to parse compiled aspects from spring-aspects.jar (version 2.5.1) I've got an error: [org.springframework.bundle.spring.aspects] warning register definition failed -- (BCException) malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:127) at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66) at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312) at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142) at org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:360) at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:343) at org.aspectj.weaver.ltw.LTWWorld.resolveDelegate(LTWWorld.java:97) at org.aspectj.weaver.World.resolveToReferenceType(World.java:378) at org.aspectj.weaver.World.resolve(World.java:271) at org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:165) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:399) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:240) at org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:152) at org.aspectj.osgi.weaver.loadtime.OSGiWeavingAdaptor.initialize(OSGiWeavingAdaptor.java:53) at org.aspectj.osgi.service.weaving.WeavingService.ensureAdaptorInit(WeavingService.java:75) at org.aspectj.osgi.service.weaving.WeavingService.getKey(WeavingService.java:82) at org.aspectj.osgi.AspectJAdaptorFactory.getCachingService(AspectJAdaptorFactory.java:121) at org.aspectj.osgi.AspectJAdaptor.initialize(AspectJAdaptor.java:96) at org.aspectj.osgi.AspectJAdaptor.findClass(AspectJAdaptor.java:139) at org.aspectj.osgi.hooks.AspectJBundleFile.getEntry(AspectJBundleFile.java:67) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:452) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189) at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340) at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:415) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369) at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:182) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.beans.Introspector.instantiate(Introspector.java:1460) at java.beans.Introspector.findExplicitBeanInfo(Introspector.java:410) at java.beans.Introspector.<init>(Introspector.java:359) at java.beans.Introspector.getBeanInfo(Introspector.java:159) at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:242) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:141) at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:247) at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:254) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1059) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:922) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437) 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.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:248) at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136) at java.lang.Thread.run(Thread.java:619) Aspects in spring-aspects.jar should be rebuilt using java 1.6 compiler and aspectj in version 1.6.0. Probably aspectj API changed in new release or something.

    Spring JIRA | 9 years ago | Wojciech Durczyński
    org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException

    Root Cause Analysis

    1. org.aspectj.weaver.BCException

      malformed org.aspectj.weaver.PointcutDeclaration attribute java.io.EOFException

      at org.aspectj.weaver.AjAttribute.read()
    2. AspectJ weaver
      ClassLoaderWeavingAdaptor.initialize
      1. org.aspectj.weaver.AjAttribute.read(AjAttribute.java:127)
      2. org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66)
      3. org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312)
      4. org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142)
      5. org.aspectj.weaver.bcel.BcelWorld.buildBcelDelegate(BcelWorld.java:360)
      6. org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:343)
      7. org.aspectj.weaver.ltw.LTWWorld.resolveDelegate(LTWWorld.java:97)
      8. org.aspectj.weaver.World.resolveToReferenceType(World.java:378)
      9. org.aspectj.weaver.World.resolve(World.java:271)
      10. org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:165)
      11. org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:399)
      12. org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:240)
      13. org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:152)
      13 frames
    3. org.aspectj.osgi
      AspectJBundleFile.getEntry
      1. org.aspectj.osgi.weaver.loadtime.OSGiWeavingAdaptor.initialize(OSGiWeavingAdaptor.java:53)
      2. org.aspectj.osgi.service.weaving.WeavingService.ensureAdaptorInit(WeavingService.java:75)
      3. org.aspectj.osgi.service.weaving.WeavingService.getKey(WeavingService.java:82)
      4. org.aspectj.osgi.AspectJAdaptorFactory.getCachingService(AspectJAdaptorFactory.java:121)
      5. org.aspectj.osgi.AspectJAdaptor.initialize(AspectJAdaptor.java:96)
      6. org.aspectj.osgi.AspectJAdaptor.findClass(AspectJAdaptor.java:139)
      7. org.aspectj.osgi.hooks.AspectJBundleFile.getEntry(AspectJBundleFile.java:67)
      7 frames
    4. Eclipse OSGi
      DefaultClassLoader.loadClass
      1. org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:452)
      2. org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:430)
      3. org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:413)
      4. org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:189)
      5. org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:340)
      6. org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:37)
      7. org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:415)
      8. org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:369)
      9. org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:357)
      10. org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
      10 frames
    5. Java RT
      ClassLoader.loadClass
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      1 frame
    6. Spring OSGi Core
      BundleDelegatingClassLoader.loadClass
      1. org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:182)
      1 frame
    7. Java RT
      Introspector.getBeanInfo
      1. java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      2. java.beans.Introspector.instantiate(Introspector.java:1460)
      3. java.beans.Introspector.findExplicitBeanInfo(Introspector.java:410)
      4. java.beans.Introspector.<init>(Introspector.java:359)
      5. java.beans.Introspector.getBeanInfo(Introspector.java:159)
      5 frames
    8. Spring Beans
      AbstractAutowireCapableBeanFactory$1.run
      1. org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:242)
      2. org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:141)
      3. org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:247)
      4. org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:254)
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1059)
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:922)
      7. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:437)
      8. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:383)
      8 frames
    9. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(Native Method)
      1 frame
    10. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:353)
      2. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
      3. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
      4. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
      5. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
      6. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:400)
      6 frames
    11. Spring Context
      AbstractApplicationContext.finishBeanFactoryInitialization
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:736)
      1 frame
    12. Spring OSGi Core
      AbstractDelegatedExecutionApplicationContext.completeRefresh
      1. org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:248)
      1 frame
    13. org.springframework.osgi
      DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run
      1. org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:136)
      1 frame
    14. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:619)
      1 frame