Announcement Announcement Module
Collapse
No announcement yet.
What is causing PropertyAccessException? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • What is causing PropertyAccessException?

    Need some pointers on the cause of the follow Exception and how to get rid of it.
    Exception:

    Code:
    Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'tmlRepository': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'entityManager' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.setMappingContext(Lorg/springframework/data/mapping/context/MappingContext;)V
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1396)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:587)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
        at com.app.core.tml.tmlTester.main(tmlTester.java:17)
    Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
    PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'entityManager' threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.setMappingContext(Lorg/springframework/data/mapping/context/MappingContext;)V
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
        at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1393)
        ... 11 more

  • #2
    Problem was incompatible jars.

    Comment


    • #3
      hey-which ones?

      Originally posted by Laedislaw View Post
      Problem was incompatible jars.
      Hi

      I have the same issue

      here are my dependencies:

      Code:
      <spring.version>3.2.2.RELEASE</spring.version>
      		<spring-data-jpa.version>1.3.0.RELEASE</spring-data-jpa.version>
      		<cglib.version>2.2.2</cglib.version>
      		<aspectjweaver.version>1.7.1</aspectjweaver.version>
      		<hibernate.version>4.2.1.Final</hibernate.version>
      		<validation-api.version>1.0.0.GA</validation-api.version>
      		<hibernate-validator.version>4.3.1.Final</hibernate-validator.version>
      which ones were causing issues?

      Comment


      • #4
        Originally posted by pjs2k04 View Post
        Hi

        I have the same issue

        here are my dependencies:

        Code:
        <spring.version>3.2.2.RELEASE</spring.version>
        		<spring-data-jpa.version>1.3.0.RELEASE</spring-data-jpa.version>
        		<cglib.version>2.2.2</cglib.version>
        		<aspectjweaver.version>1.7.1</aspectjweaver.version>
        		<hibernate.version>4.2.1.Final</hibernate.version>
        		<validation-api.version>1.0.0.GA</validation-api.version>
        		<hibernate-validator.version>4.3.1.Final</hibernate-validator.version>
        which ones were causing issues?
        The following versions worked for me.
        Code:
        		 <dependency>
        			 <groupId>org.springframework.data</groupId>
         			<artifactId>spring-data-jpa</artifactId>
         			<version>1.1.0.RELEASE</version>
        		</dependency>
        	<dependency>
        			<groupId>org.springframework.data</groupId>
        			<artifactId>spring-data-commons-core</artifactId>
        			<version>1.3.1.RELEASE</version>
        		</dependency>

        Comment

        Working...
        X