Wayne, On 9/23/07, Wayne Fay <[EMAIL PROTECTED]> wrote: > 1. We saw your first message. No need to send it again less than 12hrs > later, much less on the Mojo list which is pretty low-traffic.
Ahh... I resented because I thought they are two seperated list. It's two different email address after all. Now I know. :) > > 2. Its a weekend. Not many people are going to look at this list on > their day off. My bad... I am little jumpy lately. > > 3. If someone has a response, they'll send it. If not, they won't. > Mail-bombing people is a bad solution strategy. I sure don't mean to do mail spamming here. See #1. > > You may need to ask the hibernate people for help with this one, or > look at the plugin code to see why its not working as you expected. > This may even be a bug. I am trying many routes. Since the problem could cause by have many layers(Maven, Hibernate plugin, Hibernate tool itself, Hibernate mapping, and then the annotation...) I thought the easier/smarter thing to do is to ask first :) > > Wayne > > On 9/23/07, thebugslayer <[EMAIL PROTECTED]> wrote: > > Hi, > > > > my database table is not getting created using jpaconfiguration. Can > > some one help? See below for my configuration. Thanks. > > > > -Z > > - > > > > ---------- Forwarded message ---------- > > From: thebugslayer <[EMAIL PROTECTED]> > > Date: Sep 23, 2007 4:49 AM > > Subject: running hibernate3 plugin with jpaconfiguration > > To: Maven Users List <[EMAIL PROTECTED]> > > > > > > Hi, > > Can someone please help me see why I do not see my database table > > created after I ran $ mvn hibernate3:hbm2ddl? I don't have any errors, > > just database wasn't updated. > > > > This is my partial pom.xml > > <plugin> > > <groupId>org.codehaus.mojo</groupId> > > <artifactId>hibernate3-maven-plugin</artifactId> > > <version>2.0-alpha-2</version> > > <configuration> > > <components> > > <component> > > <name>hbm2ddl</name> > > </component> > > </components> > > <componentProperties> > > > > <implementation>jpaconfiguration</implementation> > > <drop>true</drop> > > <create>true</create> > > <export>true</export> > > <jdk5>true</jdk5> > > <persistenceunit>default</persistenceunit> > > </componentProperties> > > </configuration> > > <dependencies> > > <dependency> > > <groupId>mysql</groupId> > > <artifactId>mysql-connector-java</artifactId> > > <version>5.0.5</version> > > </dependency> > > </dependencies> > > </plugin> > > > > Here is my persistence.xml > > <?xml version="1.0" encoding="UTF-8"?> > > <persistence 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_1_0.xsd" > > version="1.0"> > > > > <persistence-unit name="default"> > > <provider>org.hibernate.ejb.HibernatePersistence</provider> > > <properties> > > <!-- Auto detect annotation model classes --> > > <property name="hibernate.archive.autodetection" value="class"/> > > > > <!-- Datasource --> > > <property name="hibernate.dialect" > > value="org.hibernate.dialect.MySQLDialect"/> > > <property name="hibernate.connection.driver_class" > > value="com.mysql.jdbc.Driver"/> > > <property name="hibernate.connection.username" value="root"/> > > <property name="hibernate.connection.password" value=""/> > > <property name="hibernate.connection.url" > > value="jdbc:mysql://localhost/auction_dev"/> > > > > </properties> > > </persistence-unit> > > </persistence> > > > > Here is my mvn output: > > [INFO] [hibernate3:hbm2ddl] > > 04:40:52,707 INFO org.hibernate.ejb.Version - Hibernate EntityManager > > 3.2.0.GA > > 04:40:52,723 INFO org.hibernate.cfg.annotations.Version - Hibernate > > Annotations 3.2.0.GA > > 04:40:52,730 INFO org.hibernate.cfg.Environment - Hibernate 3.2.0.cr5 > > 04:40:52,734 INFO org.hibernate.cfg.Environment - > > hibernate.properties not found > > 04:40:52,735 INFO org.hibernate.cfg.Environment - Bytecode provider > > name : cglib > > 04:40:52,740 INFO org.hibernate.cfg.Environment - using JDK 1.4 > > java.sql.Timestamp handling > > [DEBUG] basedir: /Users/zemian/Desktop/projects/auction > > [INFO] src/main/resources/hibernate.cfg.xml not found within the > > project. Trying absolute path. > > [INFO] No hibernate configuration file loaded. > > [INFO] src/main/resources/database.properties not found within the > > project. Trying absolute path. > > [INFO] No hibernate properties file loaded. > > 04:40:53,067 INFO org.hibernate.dialect.Dialect - Using dialect: > > org.hibernate.dialect.MySQLDialect > > 04:40:53,108 INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running > > hbm2ddl schema export > > 04:40:53,109 INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting > > generated schema to database > > 04:40:53,112 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - Using > > Hibernate built-in connection pool (not for production use!) > > 04:40:53,112 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - Hibernate > > connection pool size: 20 > > 04:40:53,112 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - autocommit > > mode: true > > 04:40:53,116 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - using > > driver: com.mysql.jdbc.Driver at URL: > > jdbc:mysql://localhost/auction_dev > > 04:40:53,116 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - connection > > properties: {user=root, password=****, autocommit=true, > > release_mode=auto} > > 04:40:53,329 INFO org.hibernate.tool.hbm2ddl.SchemaExport - schema > > export complete > > 04:40:53,330 INFO > > org.hibernate.connection.DriverManagerConnectionProvider - cleaning up > > connection pool: jdbc:mysql://localhost/auction_dev > > [INFO] > > ------------------------------------------------------------------------ > > [INFO] BUILD SUCCESSFUL > > [INFO] > > ------------------------------------------------------------------------ > > > > And finally here is one of my entity class: > > package deng.auction.data.model; > > > > import javax.persistence.*; > > > > @Entity > > @Table(name="category") > > public class Category { > > @Id > > @GeneratedValue > > @Column(name="id") > > private Short id; > > > > @Column(name="name") > > private String name; > > > > public Short getId() { > > return id; > > } > > > > public void setId(Short id) { > > this.id = id; > > } > > > > public String getName() { > > return name; > > } > > > > public void setName(String name) { > > this.name = name; > > } > > > > } > > > > Thanks > > -- > > /bugslayer > > > > > > -- > > /bugslayer > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > -- /bugslayer --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
