I'm trying to add some mysql table columns to JSF table. And I'm getting error:

/index.xhtml: The class 'logon.User' does not have the property 'description'. Please help


package logon;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

public class User {

    private int id;
    public String name = null;
    public String surname = null;
    public String username = null;
    public String description = null;
    public String email = null;

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId(){
        return id;
    public void setId(int id){
        this.id = id;

    @Column(name = "Name")
    public String getName(){
        return name;

    public void setName(String Name){
        this.name = Name;

    @Column(name = "Surname")
    public String getSurname(){
        return surname;

    public void setSurname(String Surname){
        this.surname = Surname;

    @Column(name = "Username")
    public String getUsername(){
        return username;
    public void setUsername(String Username){
        this.username = Username;
    @Column(name = "Description")
    public String getDescription(){
        return description;

    public void setDescription(String Description){
        this.description = Description;



package logon;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.enterprise.context.SessionScoped;
import javax.faces.bean.ViewScoped;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
import javax.persistence.Query;

@javax.faces.bean.ManagedBean(name = "logonTest")
public class LogonTest implements Serializable {
    @PersistenceUnit(unitName = "Webbeans_RESOURCE_LOCAL")
    private EntityManagerFactory emf;

    public List<User> getUserList() {
        return userList;

    public void setUserList(List<User> userList) {
        this.userList = userList;

    public List<User> userList = new ArrayList();

    public void init() {
        EntityManager em = emf.createEntityManager();
        // Read the existing entries and write to console
        Query q = em.createQuery("SELECT u FROM User u");
        userList = q.getResultList();
        System.out.println("Size: " + userList.size());

    public LogonTest() {




<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml"


    <h1>JSF 2.0 View Data From The Database Table Example</h1>

    <h:dataTable value="#{logonTest.userList}" var="u" border="1">

            <f:facet name="header">

            <f:facet name="header">

            <f:facet name="header">

            <f:facet name="header">

            <f:facet name="header">



Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.