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 3216042
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:14:54+00:00 2026-05-17T15:14:54+00:00

My application runs on JPA/Hibernate, Spring and Wicket. I’m trying to convert our ORM

  • 0

My application runs on JPA/Hibernate, Spring and Wicket. I’m trying to convert our ORM from XML files to JPA annotations. The annotated model looks like this:

@Entity
@Table(name = "APP_USER")
public class User extends BaseObject {
    private Long id;
    private String firstName;
    private String lastName;
    private String email;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "ID")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name="FIRST_NAME")
    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    @Column(name="LAST_NAME")
    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    @Column(name="EMAIL")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return Returns firstName and lastName
     */
    public String getFullName() {
        return firstName + ' ' + lastName;
    }
}

Originally, though, it was without annotation and the mapping was described in User.hbm.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN" 
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
    <class name="org.appfuse.model.User" table="app_user">
        <id name="id" column="id" unsaved-value="null">
            <generator class="increment"/>
        </id>
        <property name="firstName" column="first_name" not-null="true"/>
        <property name="lastName" column="last_name" not-null="true"/>
        <property name="email" column="email"/>
    </class>
</hibernate-mapping>

When I delete the mapping file and try to use just the annotations, the entityManagerFactory doesn’t get created, with the exception

org.hibernate.PropertyNotFoundException:
Could not find a setter for property
fullName in class
org.appfuse.model.User.

There’s no mapping set for this property, because it’s just a convenience method. What do I do wrong?

  • 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-05-17T15:14:54+00:00Added an answer on May 17, 2026 at 3:14 pm

    Mark the method as @Transient so Hibernate will ignore it:

    /**
     * @return Returns firstName and lastName
     */
    @Transient
    public String getFullName() {
        return firstName + ' ' + lastName;
    }
    

    By default, everything that looks like a getter is mapped.

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

Sidebar

Related Questions

using an application which consist of JSF, Spring and Hibernate. My example runs normally,
I recently upgraded from Grails 1.3.7 to Grails 2.0.1. The application runs normal, but
Our application runs succesfully on Tomcat, Websphere and Weblogic and as part of it
Our server application runs as a service and has a ASP.NET MVC3 web-based frontend
My Wicket application runs fine on the live Google App Engine at /* <filter-mapping>
My Spring application runs on Tomcat 6.0 on localhost. When I try to run
I'm taking over an existing Spring/JPA(w/hibernate)/Maven project and attempting to integrate unit testing and
I am trying to understand how JPA works. From what I know, if you
My Java application runs from this .bat file @ECHO OFF mode con:cols=130 lines=60 CLS
I have an existing google app engine java application runs with jpa and now

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.