Re: Maven2+Hibernate3 Annotation Problem

2007-02-06 Thread lemon dumpling

Thanks for everyone's help! Finally made it work!

Cheers

On 2/7/07, Manos Batsis <[EMAIL PROTECTED]> wrote:





  
mysql-connector-java
mysql-connector-java
5.0.4
  



hth,

Manos

Quoting lemon dumpling <[EMAIL PROTECTED]>:

> Hi Johann,
>
> Yes, I tried that thing but it always throws no suitable driver
> exception:
> [ERROR] SchemaExport - schema export unsuccessful
>  sui
> table driver>java.sql.SQLException: No suitable driver
> at
> java.sql.DriverManager.getConnection(DriverManager.java:545)
> at
> java.sql.DriverManager.getConnection(DriverManager.java:140)
> at
> org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
> n(DriverManagerConnectionProvider.java:110)
>
> My pom.xml:
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT
> 
>   
> schema.sql
>   
> 
> 
>
>
> But then if I have something like this, it actually works - it auto
> connects
> to my database and creates the schema:
>
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT
>
> 
>   
> 
>   hbm2ddl
> 
>   
>   
> true
> true
> true
>
>

src/main/resources/hibernate.cfg.xml
>   
> 
>
> Cheers
>
>
>
> On 2/5/07, Johann Reyes <[EMAIL PROTECTED]> wrote:
> >
> > Hello
> >
> > First you need to set up the element outputfilename as seen here:
> >
> >
> >
>

http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/examples/s
> > chema_output.html
> >
> > Also you need to include the annotated classes in your
> hibernate.cfg.xml
> > file
> >
> > Regards
> >
> > Johann Reyes
> >
> > -Original Message-
> > From: lemon dumpling [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, February 03, 2007 8:33 PM
> > To: users@maven.apache.org
> > Subject: Maven2+Hibernate3 Annotation Problem
> >
> > Hi,
> >
> > I want to generate database schema to a sql file and feed the
> schema into
> > my
> > database. I have hibernate annotations instead of hbm.xml files.
> >
> > 
> > org.codehaus.mojo
> > hibernate3-maven-plugin
> > 2.0-SNAPSHOT > 
> >   
> > 
> >   hbm2ddl
> > 
> >   
> >   
> > true
> > true
> >
> >
> >
>

src/main/resources/etc/hibernate.cfg.xml > le>
> >   
> > 
> > 
> >
> > I believe something is missing. Thanks!
> >
> > Cheers
> >
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Maven2+Hibernate3 Annotation Problem

2007-02-06 Thread Johann Reyes
Hello;

That's a base example, the plugin configuration should go something like
this:


org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT


true
true
true

src/main/resources/hibernate.cfg.xml
schema.sql




Regards

Johann Reyes

-Original Message-
From: lemon dumpling [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 06, 2007 8:29 AM
To: Maven Users List
Subject: Re: Maven2+Hibernate3 Annotation Problem

Hi Johann,

Yes, I tried that thing but it always throws no suitable driver exception:
[ERROR] SchemaExport - schema export unsuccessful java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:545)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at
org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
n(DriverManagerConnectionProvider.java:110)

My pom.xml:


org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT

  
schema.sql
  




But then if I have something like this, it actually works - it auto connects
to my database and creates the schema:



org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT


  

  hbm2ddl

  
  
true
true
true

src/main/resources/hibernate.cfg.xml
  


Cheers



On 2/5/07, Johann Reyes <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> First you need to set up the element outputfilename as seen here:
>
>
>
http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/examples/s
> chema_output.html
>
> Also you need to include the annotated classes in your hibernate.cfg.xml
> file
>
> Regards
>
> Johann Reyes
>
> -Original Message-
> From: lemon dumpling [mailto:[EMAIL PROTECTED]
> Sent: Saturday, February 03, 2007 8:33 PM
> To: users@maven.apache.org
> Subject: Maven2+Hibernate3 Annotation Problem
>
> Hi,
>
> I want to generate database schema to a sql file and feed the schema into
> my
> database. I have hibernate annotations instead of hbm.xml files.
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT 
>   
> 
>   hbm2ddl
> 
>   
>   
> true
> true
>
>
>
src/main/resources/etc/hibernate.cfg.xml le>
>   
> 
> 
>
> I believe something is missing. Thanks!
>
> Cheers
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven2+Hibernate3 Annotation Problem

2007-02-06 Thread Manos Batsis



  
mysql-connector-java
mysql-connector-java
5.0.4
  



hth,

Manos

Quoting lemon dumpling <[EMAIL PROTECTED]>:

> Hi Johann,
>
> Yes, I tried that thing but it always throws no suitable driver
> exception:
> [ERROR] SchemaExport - schema export unsuccessful
>  sui
> table driver>java.sql.SQLException: No suitable driver
> at
> java.sql.DriverManager.getConnection(DriverManager.java:545)
> at
> java.sql.DriverManager.getConnection(DriverManager.java:140)
> at
> org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
> n(DriverManagerConnectionProvider.java:110)
>
> My pom.xml:
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT
> 
>   
> schema.sql
>   
> 
> 
>
>
> But then if I have something like this, it actually works - it auto
> connects
> to my database and creates the schema:
>
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT
>
> 
>   
> 
>   hbm2ddl
> 
>   
>   
> true
> true
> true
>
>
src/main/resources/hibernate.cfg.xml
>   
> 
>
> Cheers
>
>
>
> On 2/5/07, Johann Reyes <[EMAIL PROTECTED]> wrote:
> >
> > Hello
> >
> > First you need to set up the element outputfilename as seen here:
> >
> >
> >
>
http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/examples/s
> > chema_output.html
> >
> > Also you need to include the annotated classes in your
> hibernate.cfg.xml
> > file
> >
> > Regards
> >
> > Johann Reyes
> >
> > -Original Message-
> > From: lemon dumpling [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, February 03, 2007 8:33 PM
> > To: users@maven.apache.org
> > Subject: Maven2+Hibernate3 Annotation Problem
> >
> > Hi,
> >
> > I want to generate database schema to a sql file and feed the
> schema into
> > my
> > database. I have hibernate annotations instead of hbm.xml files.
> >
> > 
> > org.codehaus.mojo
> > hibernate3-maven-plugin
> > 2.0-SNAPSHOT > 
> >   
> > 
> >   hbm2ddl
> > 
> >   
> >   
> > true
> > true
> >
> >
> >
>
src/main/resources/etc/hibernate.cfg.xml > le>
> >   
> > 
> > 
> >
> > I believe something is missing. Thanks!
> >
> > Cheers
> >
> >
> >
> >
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven2+Hibernate3 Annotation Problem

2007-02-06 Thread lemon dumpling

Hi Johann,

Yes, I tried that thing but it always throws no suitable driver exception:
[ERROR] SchemaExport - schema export unsuccessful java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getConnection(DriverManager.java:545)
   at java.sql.DriverManager.getConnection(DriverManager.java:140)
   at
org.hibernate.connection.DriverManagerConnectionProvider.getConnectio
n(DriverManagerConnectionProvider.java:110)

My pom.xml:


   org.codehaus.mojo
   hibernate3-maven-plugin
   2.0-SNAPSHOT
   
 
   schema.sql
 
   



But then if I have something like this, it actually works - it auto connects
to my database and creates the schema:



   org.codehaus.mojo
   hibernate3-maven-plugin
   2.0-SNAPSHOT

   
 
   
 hbm2ddl
   
 
 
   true
   true
   true

src/main/resources/hibernate.cfg.xml
 


Cheers



On 2/5/07, Johann Reyes <[EMAIL PROTECTED]> wrote:


Hello

First you need to set up the element outputfilename as seen here:


http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/examples/s
chema_output.html

Also you need to include the annotated classes in your hibernate.cfg.xml
file

Regards

Johann Reyes

-Original Message-
From: lemon dumpling [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 03, 2007 8:33 PM
To: users@maven.apache.org
Subject: Maven2+Hibernate3 Annotation Problem

Hi,

I want to generate database schema to a sql file and feed the schema into
my
database. I have hibernate annotations instead of hbm.xml files.


org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT
  

  hbm2ddl

  
  
true
true


src/main/resources/etc/hibernate.cfg.xml
  



I believe something is missing. Thanks!

Cheers



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Maven2+Hibernate3 Annotation Problem

2007-02-05 Thread Johann Reyes
Hello

First you need to set up the element outputfilename as seen here:

http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/examples/s
chema_output.html

Also you need to include the annotated classes in your hibernate.cfg.xml
file

Regards

Johann Reyes

-Original Message-
From: lemon dumpling [mailto:[EMAIL PROTECTED] 
Sent: Saturday, February 03, 2007 8:33 PM
To: users@maven.apache.org
Subject: Maven2+Hibernate3 Annotation Problem

Hi,

I want to generate database schema to a sql file and feed the schema into my
database. I have hibernate annotations instead of hbm.xml files.


org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT
  

  hbm2ddl

  
  
true
true

src/main/resources/etc/hibernate.cfg.xml
  



I believe something is missing. Thanks!

Cheers



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Maven2+Hibernate3 Annotation Problem

2007-02-04 Thread lemon dumpling

I don't see the file getting created, as well as the table binding...



On 2/4/07, Alejandro Scandroli <[EMAIL PROTECTED]> wrote:


Hi

It looks good to me. Are you getting any errors?
Try adding your property file:
eg.
src/main/resources/hibernate.properties

You can also try:
true
true

Alejandro.


On 2/4/07, lemon dumpling <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to generate database schema to a sql file and feed the schema
into my
> database. I have hibernate annotations instead of hbm.xml files.
>
> 
> org.codehaus.mojo
> hibernate3-maven-plugin
> 2.0-SNAPSHOT 
>   
> 
>   hbm2ddl
> 
>   
>   
> true
> true
>
>
src/main/resources/etc/hibernate.cfg.xml
>   
> 
> 
>
> I believe something is missing. Thanks!
>
> Cheers
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Maven2+Hibernate3 Annotation Problem

2007-02-04 Thread Alejandro Scandroli

Hi

It looks good to me. Are you getting any errors?
Try adding your property file:
eg.
src/main/resources/hibernate.properties

You can also try:
true
true

Alejandro.


On 2/4/07, lemon dumpling <[EMAIL PROTECTED]> wrote:

Hi,

I want to generate database schema to a sql file and feed the schema into my
database. I have hibernate annotations instead of hbm.xml files.


org.codehaus.mojo
hibernate3-maven-plugin
2.0-SNAPSHOT
  

  hbm2ddl

  
  
true
true

src/main/resources/etc/hibernate.cfg.xml
  



I believe something is missing. Thanks!

Cheers




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]