0 Replies Latest reply on Dec 23, 2013 3:47 PM by Issam Achouri

    ecliipselink jboss

    Issam Achouri Newbie

      hello,

       

      i devlope a small application with jboss, eclipse i have this configured:

       

      1 class entity:

      @Entity

      public class User implements Serializable{

        private static final long serialVersionUID = 1L;

       

       

        @Id

        @GeneratedValue(strategy=GenerationType.IDENTITY)

        private long id;

        private String nom;

        private String prenom;

        public User() {

        super();

        // TODO Auto-generated constructor stub

        }

        public User(String nom, String prenom) {

        super();

        this.nom = nom;

        this.prenom = prenom;

        }

        public long getId() {

        return id;

        }

        public void setId(long id) {

        this.id = id;

        }

        public String getNom() {

        return nom;

        }

        public void setNom(String nom) {

        this.nom = nom;

        }

        public String getPrenom() {

        return prenom;

        }

        public void setPrenom(String prenom) {

        this.prenom = prenom;

        }

       

      }

       

      the persistence.xml:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <persistence version="2.0"

        xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">

        <persistence-unit name="UP_USERS" transaction-type="JTA">

       

       

       

        <jta-data-source>java:/DbPersonne</jta-data-source>

        <properties>

       

       

       

        <!-- EclipseLink should create the database schema automatically -->

        <property name="eclipselink.ddl-generation" value="drop-and-create-tables" />

       

       

        <property name="eclipselink.ddl-generation.output-mode"

        value="database" />

        <property name="eclipselink.target-server" value="JBoss" />

        <property name="eclipselink.weaving" value="false" />

       

      when i run the project, the project is depployed in the jboss server but there is no database generation

        <property name="eclipselink.logging.level" value="FINEST" />

        </properties>

        </persistence-unit>

      </persistence>