java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider

Spring JIRA | Avnish Pundir | 3 years ago
  1. 0

    With a new spring mvc (all spring components from 4.0.2.RELEASE) project with spring-data-jpa 1.5.0.RELEASE (detailed environmental details are present in Environment property), STS 3.4 is giving error - {noformat} Error occured processing XML 'tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider'. See Error Log for more details {noformat} This was strange on first as there was no error if the package mentioned in spring context config file {{<jpa:repositories base-package="com.tekmindz.xyz.abc" />}} is a package which either do not exist or where there's no Spring Data JPA repository interface. However as soon as I change it to a valid package having the repository interfaces I start receiving error message. On further digging in eclipse log view, I found following trace: {noformat} java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider at org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents(RepositoryComponentProvider.java:121) at org.springframework.data.repository.config.RepositoryConfigurationSourceSupport.getCandidates(RepositoryConfigurationSourceSupport.java:69) at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:54) at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:88) at org.springframework.data.repository.config.RepositoryBeanDefinitionParser.parse(RepositoryBeanDefinitionParser.java:67) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74) at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.DelegatingNamespaceHandlerResolver$ElementTrackingNamespaceHandler.parse(DelegatingNamespaceHandlerResolver.java:177) {noformat} I tried downgrading spring framework from 4.0.2.RELEASE to 4.0.0.RELEASE but no luck. Finally I downgraded spring-data-jpa from 1.5.0.RELEASE to 1.4.4.RELEASE and all started working fine for me. Please feel free to contact me in case you need further details about this bug or in reproducing the same.

    Spring JIRA | 3 years ago | Avnish Pundir
    java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider
  2. 0

    With a new spring mvc (all spring components from 4.0.2.RELEASE) project with spring-data-jpa 1.5.0.RELEASE (detailed environmental details are present in Environment property), STS 3.4 is giving error - {noformat} Error occured processing XML 'tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider'. See Error Log for more details {noformat} This was strange on first as there was no error if the package mentioned in spring context config file {{<jpa:repositories base-package="com.tekmindz.xyz.abc" />}} is a package which either do not exist or where there's no Spring Data JPA repository interface. However as soon as I change it to a valid package having the repository interfaces I start receiving error message. On further digging in eclipse log view, I found following trace: {noformat} java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider at org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents(RepositoryComponentProvider.java:121) at org.springframework.data.repository.config.RepositoryConfigurationSourceSupport.getCandidates(RepositoryConfigurationSourceSupport.java:69) at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:54) at org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:88) at org.springframework.data.repository.config.RepositoryBeanDefinitionParser.parse(RepositoryBeanDefinitionParser.java:67) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74) at org.springframework.ide.eclipse.beans.core.internal.model.namespaces.DelegatingNamespaceHandlerResolver$ElementTrackingNamespaceHandler.parse(DelegatingNamespaceHandlerResolver.java:177) {noformat} I tried downgrading spring framework from 4.0.2.RELEASE to 4.0.0.RELEASE but no luck. Finally I downgraded spring-data-jpa from 1.5.0.RELEASE to 1.4.4.RELEASE and all started working fine for me. Please feel free to contact me in case you need further details about this bug or in reproducing the same.

    Spring JIRA | 3 years ago | Avnish Pundir
    java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider
  3. 0

    Cool exception - where is problem ?

    GitHub | 3 years ago | rinkesj
    org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/persistence.xml]; nested exception is java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    .Updated SD Rest 2.x libraries this morning. While compile went well, application failed to start. Test in Tomcat and WASCE {code} Nov 19, 2013 10:39:28 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider at org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents(RepositoryComponentProvider.java:121) at org.springframework.data.repository.config.RepositoryConfigurationSourceSupport.getCandidates(RepositoryConfigurationSourceSupport.java:69) at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:54) at org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(RepositoryBeanDefinitionRegistrarSupport.java:99) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:396) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:207) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:165) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:140) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:282) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Nov 19, 2013 10:39:28 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart {code}

    Spring JIRA | 3 years ago | Sri
    java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider
  6. 0

    .Updated SD Rest 2.x libraries this morning. While compile went well, application failed to start. Test in Tomcat and WASCE {code} Nov 19, 2013 10:39:28 AM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider at org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents(RepositoryComponentProvider.java:121) at org.springframework.data.repository.config.RepositoryConfigurationSourceSupport.getCandidates(RepositoryConfigurationSourceSupport.java:69) at org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:54) at org.springframework.data.repository.config.RepositoryBeanDefinitionRegistrarSupport.registerBeanDefinitions(RepositoryBeanDefinitionRegistrarSupport.java:99) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:396) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:207) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:165) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:140) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:282) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:223) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) Nov 19, 2013 10:39:28 AM org.apache.catalina.core.StandardContext startInternal SEVERE: Error listenerStart {code}

    Spring JIRA | 3 years ago | Sri
    java.lang.IllegalAccessError: tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalAccessError

      tried to access method org.springframework.context.annotation.AnnotationConfigUtils.processCommonDefinitionAnnotations(Lorg/springframework/beans/factory/annotation/AnnotatedBeanDefinition;)V from class org.springframework.data.repository.config.RepositoryComponentProvider

      at org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents()
    2. Spring Data Core
      RepositoryBeanDefinitionParser.parse
      1. org.springframework.data.repository.config.RepositoryComponentProvider.findCandidateComponents(RepositoryComponentProvider.java:121)
      2. org.springframework.data.repository.config.RepositoryConfigurationSourceSupport.getCandidates(RepositoryConfigurationSourceSupport.java:69)
      3. org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport.getRepositoryConfigurations(RepositoryConfigurationExtensionSupport.java:54)
      4. org.springframework.data.repository.config.RepositoryConfigurationDelegate.registerRepositoriesIn(RepositoryConfigurationDelegate.java:88)
      5. org.springframework.data.repository.config.RepositoryBeanDefinitionParser.parse(RepositoryBeanDefinitionParser.java:67)
      5 frames
    3. Spring Beans
      NamespaceHandlerSupport.parse
      1. org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
      1 frame
    4. org.springframework.ide
      DelegatingNamespaceHandlerResolver$ElementTrackingNamespaceHandler.parse
      1. org.springframework.ide.eclipse.beans.core.internal.model.namespaces.DelegatingNamespaceHandlerResolver$ElementTrackingNamespaceHandler.parse(DelegatingNamespaceHandlerResolver.java:177)
      1 frame