Results 1 to 2 of 2
  1. #1
    newbiejava is offline Senior Member
    Join Date
    Jan 2010
    Posts
    138
    Rep Power
    0

    Default The project does not contain a persistence unit

    Hello All,

    I need advise, why I got this warning message below:

    "The project does not contain a persistence unit ..
    The entity table name is reserved SQL-99 keyword."

    can I just ignore it? or what should I do? ..

    thanks & regards
    Win


    Java Code:
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.Table;
    
    @Entity
    @Table(name = "HOST", schema = "CLASSICMODELS")
    public class Host implements java.io.Serializable {
      private static final long serialVersionUID = 6222062494710896823L;
      private Integer           hostid;
      private String            hostname;
      private String            email;
      private String            remarks;
    
      public Host() {
      }
    
      public Host(Integer hostid) {
        this.hostid = hostid;
      }
    
      public Host(Integer hostid, String hostname, String email, String remarks) 
    {
        this.hostid = hostid;
        this.hostname = hostname;
        this.email = email;
        this.remarks = remarks;
      }
    
      @Id()
      @Column(name = "HOSTID", unique = true)
      public Integer getHostId()
      {
        return this.hostid;
      }
    
      public void setHostId(Integer hostid)
      {
        this.hostid = hostid;
      }
    
      @Column(name = "HOSTNAME", length = 50)
      public String getHostName()
      {
        return this.hostname;
      }
    
      public void setHostName(String hostname)
      {
        this.hostname = hostname;
      }
    
      @Column(name = "EMAIL", length = 100)
      public String getEmail()
      {
        return this.email;
      }
    
      public void setEmail(String email)
      {
        this.email = email;
      }
    
      @Column(name = "REMARKS", length = 1000)
      public String getRemarks()
      {
        return this.remarks;
      }
    
      public void setRemarks(String remarks)
      {
        this.remarks = remarks;
      }
    }

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,798
    Rep Power
    19

    Default

    "HOST" is a reserved word in SQL, so you can't use it like that...that's all that is telling you.
    Rename your table.

Similar Threads

  1. XML to JSP Unit Testing
    By Abder-Rahman in forum Advanced Java
    Replies: 2
    Last Post: 02-15-2009, 12:35 AM
  2. p-unit 0.12
    By Jamie in forum Java Software
    Replies: 0
    Last Post: 06-16-2007, 09:33 AM
  3. p-unit 0.11
    By levent in forum Java Software
    Replies: 0
    Last Post: 06-04-2007, 08:07 AM
  4. p-unit 0.10-release
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-28-2007, 08:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •