Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9163941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:33:45+00:00 2026-06-17T14:33:45+00:00

I am new to the spring-data-jpa and am currently trying to implement with hibernate.

  • 0

I am new to the spring-data-jpa and am currently trying to implement with hibernate. I’ve followed the tutorial! for this and am currently facing issues starting the application itself.
I get the following exception during startup:

 Caused by: org.springframework.data.mapping.PropertyReferenceException: No property customer found for type com.adaptris.dashboard.customer.Customer
at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:74)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:326)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:352)
at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:306)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:270)
at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:244)
at org.springframework.data.repository.query.parser.Part.<init>(Part.java:73)
at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:180)
at org.springframework.data.repository.query.parser.PartTree$Predicate.buildTree(PartTree.java:260)
at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:240)
at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:71)
at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:57)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:90)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:162)
at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:68)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:280)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:148)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:125)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.getObject(RepositoryFactoryBeanSupport.java:41)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)

Customer is my domain class annotated with

@Entity(name = "customer")

And I suppose it is trying to connect to the DB and fetch the customer table which I’ve actually configured. Here is my spring-config:

<tx:annotation-driven transaction-manager="transactionManager" />
<!-- Activate Spring Data JPA repository support -->
<jpa:repositories base-package="com.adaptris.dashboard.customer" />

    <!-- Declare a datasource that has pooling capabilities -->
<bean id="jpaDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
    destroy-method="close" p:driverClass="${app.jdbc.driverClassName}"
    p:jdbcUrl="${app.jdbc.url}" p:user="${app.jdbc.username}" p:password="${app.jdbc.password}"
    p:acquireIncrement="5" p:idleConnectionTestPeriod="60" p:maxPoolSize="100"
    p:maxStatements="50" p:minPoolSize="10" />

<!-- Declare a JPA entityManagerFactory -->
<bean id="entityManagerFactory"
    class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
    p:persistenceXmlLocation="classpath*:META-INF/persistence.xml"
    p:persistenceUnitName="hibernatePersistenceUnit" p:dataSource-ref="jpaDataSource"
    p:jpaVendorAdapter-ref="hibernateVendor" />

<!-- Specify our ORM vendor -->
<bean id="hibernateVendor"
    class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"
    p:showSql="false" />

<!-- Declare a transaction manager -->
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"
    p:entityManagerFactory-ref="entityManagerFactory" />

And the DB is MYSQL which is running. Following are the properties:

# database properties
app.jdbc.driverClassName=com.mysql.jdbc.Driver
app.jdbc.url=jdbc\:mysql\://Mallik-PC/adaptrisschema
app.jdbc.username=dbuser
app.jdbc.password=dbpassword

Please help me out in getting out of this issue!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:33:46+00:00Added an answer on June 17, 2026 at 2:33 pm

    Sounds like the Repository interface you have specified for your Domain class contains a findXXX method whereas XXX is not a property of your Domain class.

    Example:

    public interface UserRepository extends CrudRepository<User, String> {
    
        /**
         * Finds a user by name.
         * 
         * @param name The name of the User to find.
         * @return The User with the given name.
         */
        public User findByName(String name);
    }
    

    And your Domain class looks like this and misses the “name” property:

    @Entity
    public class User {
        private String firstname;
        private String lastname;
        // No "private String name" in here!
        ... 
    }
    

    In your particular example it looks like you added a findByCustomer(Customer customer) method to your Repository interface (probably called something like CustomerRepository). You don’t need that method as a findOne(<PrimaryKeyClass> id) method is automatically generated for you by Spring Data for JPA and you can just call it with the @Id of your Domain class Customer as a parameter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a web application that uses Spring Data JPA with Hibernate, we utilize the
I'm new to Spring data JPA and am trying to understand how to best
I am new to Spring JPA. I am trying to use hibernate + Spring
I'm having a small problem with my insert statements in Spring-data/jpa/hibernate/mysql/junit application. I created
Our application is based on spring, JPA, Hibernate (3.5.1), postgresql 8.4 We will deliver
I'm trying to setup the Spring Data/JPA DomainClassConverter to automatically convert (String) id's to
We are currently starting to use Spring MVC for a new project, and we
i have the following problem. I use Spring and JPA (Hibernate) to persist Data
I use Spring data jpa and I am trying to add custom behaviour to
Am new to SPRING with JPA techniques. am trying to call the stored procedure

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.