RE: Hibernate schema export

2004-06-15 Thread phillip rhodes
Schema export worked fine for me (except that it did
not just export the schema, but required to execute it
on the database).

I used the 1.1 of the maven-hibernate plugin.  
I used version 2.1.3 of hibernate as a dependency.
I am using maven-1.0-rc3

If you do not have valid connect info in you hibernate
property files, the schema file, while created, will
be empty.

I will commit my work to cvs tonight if you want to
see everything.

Looking at the error, please validate your hbm file
using the hibernate dtd file.  I would guess that is
the problem. 
Hope that gives you hope.
Phillip Rhodes


--- Eric Pugh <[EMAIL PROTECTED]> wrote:
> I did some work on the plugin to get it to work with
> Hibernate2, what
> version of Hibernate are you using?  Try and build
> the version in CVS.
> 
> Eric
> 
> > -Original Message-
> > From: David Salib [mailto:[EMAIL PROTECTED]
> > Sent: Monday, June 14, 2004 8:36 PM
> > To: Maven Users List
> > Subject: Re: Hibernate schema export
> >
> >
> > On Sun, 2004-06-13 at 07:14, Konstantin
> Shaposhnikov wrote:
> > > On 03:07 Sat 12 Jun , David Salib wrote:
> > > > On Mon, 2004-05-24 at 16:06, Konstantin
> Shaposhnikov wrote:
> > > > > May be this file could be helpful for
> somebody
> > > >
> > > > I keep getting a
> java.lang.NullPointerException but I can't find
> > > > anything wrong (and neither has anybody else)
> with my mapping file.
> > > > Could that be the same bug?
> > > >
> > Can anybody tell me where's it's choking based on
> this? Is it maven or
> > hibernate?
> >
> > hibernate:schema-export2:
> > [echo] Exporting Hibernate Schema file
> > Could not configure datastore from file:
> >
>
/home/dubbed/Documents/Work/nUsers/philantrope/target/classes/ca/n
> > users/philantrope/Contribution.hbm.xml
> > java.lang.NullPointerException
> > at
> >
>
net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:241)
> > at
>
net.sf.hibernate.cfg.Binder.bindCollection(Binder.java:498)
> > at
>
net.sf.hibernate.cfg.Binder$4.create(Binder.java:1435)
> > at
> >
>
net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1017)
> > at
>
net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361)
> > at
>
net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
> > at
> >
>
net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
> > at
> >
>
net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:171)
> > at
> >
>
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(Sc
> > hemaExportTask.java:195)
> > at
> >
>
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExpor
> > tTask.java:135)
> > at
> org.apache.tools.ant.Task.perform(Task.java:341)
> > at
> >
>
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
> > at
> >
>
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> > at
> >
>
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> > at
> >
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoa
> > lTag.java:79)
> > at
> >
>
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.per
> > formAction(MavenGoalTag.java:110)
> > at
> com.werken.werkz.Goal.fire(Goal.java:639)
> > at
> com.werken.werkz.Goal.attain(Goal.java:575)
> > at
> >
>
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
> > at
> >
>
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:610)
> > at
> >
>
org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
> > at
> org.apache.maven.cli.App.doMain(App.java:485)
> > at
> org.apache.maven.cli.App.main(App.java:1214)
> > at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> > at
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> > pl.java:39)
> > at
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
> > cessorImpl.java:25)
> > at
> java.lang.reflect.Method.invoke(Method.java:324)
> > at
> com.werken.forehead.Forehead.run(Forehead.java:551)
> > at
> com.werken.forehead.Forehead.main(Forehead.java:581)
> >
> > BUILD FAILED
> > File..
> >
>
/home/dubbed/.ma

RE: Hibernate schema export

2004-06-14 Thread Eric Pugh
I did some work on the plugin to get it to work with Hibernate2, what
version of Hibernate are you using?  Try and build the version in CVS.

Eric

> -Original Message-
> From: David Salib [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 14, 2004 8:36 PM
> To: Maven Users List
> Subject: Re: Hibernate schema export
>
>
> On Sun, 2004-06-13 at 07:14, Konstantin Shaposhnikov wrote:
> > On 03:07 Sat 12 Jun , David Salib wrote:
> > > On Mon, 2004-05-24 at 16:06, Konstantin Shaposhnikov wrote:
> > > > May be this file could be helpful for somebody
> > >
> > > I keep getting a java.lang.NullPointerException but I can't find
> > > anything wrong (and neither has anybody else) with my mapping file.
> > > Could that be the same bug?
> > >
> Can anybody tell me where's it's choking based on this? Is it maven or
> hibernate?
>
> hibernate:schema-export2:
> [echo] Exporting Hibernate Schema file
> Could not configure datastore from file:
> /home/dubbed/Documents/Work/nUsers/philantrope/target/classes/ca/n
> users/philantrope/Contribution.hbm.xml
> java.lang.NullPointerException
> at
> net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:241)
> at net.sf.hibernate.cfg.Binder.bindCollection(Binder.java:498)
> at net.sf.hibernate.cfg.Binder$4.create(Binder.java:1435)
> at
> net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1017)
> at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361)
> at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
> at
> net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
> at
> net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:171)
> at
> net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(Sc
> hemaExportTask.java:195)
> at
> net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExpor
> tTask.java:135)
> at org.apache.tools.ant.Task.perform(Task.java:341)
> at
> org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
> at
> org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
> at
> org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
> at
> org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoa
> lTag.java:79)
> at
> org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.per
> formAction(MavenGoalTag.java:110)
> at com.werken.werkz.Goal.fire(Goal.java:639)
> at com.werken.werkz.Goal.attain(Goal.java:575)
> at
> com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
> at
> org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:610)
> at
> org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
> at org.apache.maven.cli.App.doMain(App.java:485)
> at org.apache.maven.cli.App.main(App.java:1214)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm
> pl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc
> cessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at com.werken.forehead.Forehead.run(Forehead.java:551)
> at com.werken.forehead.Forehead.main(Forehead.java:581)
>
> BUILD FAILED
> File..
> /home/dubbed/.maven/plugins/maven-hibernate-plugin-1.1/plugin.jelly
> Element... schemaexport
> Line.. 68
> Column 46
> Schema text failed: java.lang.NullPointerException
>
> --
> David Salib <[EMAIL PROTECTED]>
>
>
> -
> 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: Hibernate schema export

2004-06-14 Thread David Salib
On Sun, 2004-06-13 at 07:14, Konstantin Shaposhnikov wrote:
> On 03:07 Sat 12 Jun , David Salib wrote:
> > On Mon, 2004-05-24 at 16:06, Konstantin Shaposhnikov wrote:
> > > May be this file could be helpful for somebody
> > 
> > I keep getting a java.lang.NullPointerException but I can't find
> > anything wrong (and neither has anybody else) with my mapping file. 
> > Could that be the same bug?
> >
Can anybody tell me where's it's choking based on this? Is it maven or
hibernate?

hibernate:schema-export2:
[echo] Exporting Hibernate Schema file
Could not configure datastore from file:
/home/dubbed/Documents/Work/nUsers/philantrope/target/classes/ca/nusers/philantrope/Contribution.hbm.xml
java.lang.NullPointerException
at
net.sf.hibernate.util.StringHelper.qualify(StringHelper.java:241)
at net.sf.hibernate.cfg.Binder.bindCollection(Binder.java:498)
at net.sf.hibernate.cfg.Binder$4.create(Binder.java:1435)
at
net.sf.hibernate.cfg.Binder.propertiesFromXML(Binder.java:1017)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:361)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1243)
at
net.sf.hibernate.cfg.Configuration.add(Configuration.java:249)
at
net.sf.hibernate.cfg.Configuration.addFile(Configuration.java:171)
at
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.getConfiguration(SchemaExportTask.java:195)
at
net.sf.hibernate.tool.hbm2ddl.SchemaExportTask.execute(SchemaExportTask.java:135)
at org.apache.tools.ant.Task.perform(Task.java:341)
at
org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:232)
at
org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
com.werken.werkz.WerkzProject.attainGoal(WerkzProject.java:193)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:610)
at
org.apache.maven.MavenSession.attainGoals(MavenSession.java:266)
at org.apache.maven.cli.App.doMain(App.java:485)
at org.apache.maven.cli.App.main(App.java:1214)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
 
BUILD FAILED
File..
/home/dubbed/.maven/plugins/maven-hibernate-plugin-1.1/plugin.jelly
Element... schemaexport
Line.. 68
Column 46
Schema text failed: java.lang.NullPointerException

-- 
David Salib <[EMAIL PROTECTED]>


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



Re: Hibernate schema export

2004-06-13 Thread Konstantin Shaposhnikov
On 03:07 Sat 12 Jun , David Salib wrote:
> On Mon, 2004-05-24 at 16:06, Konstantin Shaposhnikov wrote:
> > May be this file could be helpful for somebody
> 
> I keep getting a java.lang.NullPointerException but I can't find
> anything wrong (and neither has anybody else) with my mapping file. 
> Could that be the same bug?
> 
> Also a newbie question I think: I put the plugin.jelly in
> ~/.maven/plugins/maven-hibernate-plugin-1.2.1/plugin.jelly but when I
> run: maven hibernate:export-schema2 it returns:
> hibernate:export-schema2 no such goal in this project.
> What's wrong?

delete all *.cache files from ~/.maven/plugins/ and start maven again

> 
> -- 
> David Salib <[EMAIL PROTECTED]>
> 
> 
> -
> 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: Hibernate schema export

2004-06-12 Thread David Salib
On Mon, 2004-05-24 at 16:06, Konstantin Shaposhnikov wrote:
> May be this file could be helpful for somebody

I keep getting a java.lang.NullPointerException but I can't find
anything wrong (and neither has anybody else) with my mapping file. 
Could that be the same bug?

Also a newbie question I think: I put the plugin.jelly in
~/.maven/plugins/maven-hibernate-plugin-1.2.1/plugin.jelly but when I
run: maven hibernate:export-schema2 it returns:
hibernate:export-schema2 no such goal in this project.
What's wrong?

-- 
David Salib <[EMAIL PROTECTED]>


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



Re: Hibernate schema export

2004-05-30 Thread Nadeem Bitar
On æ, 2004-05-24 at 23:06 +0300, Konstantin Shaposhnikov wrote:
> May be this file could be helpful for somebody
> 


Thanks, that works. 

I was doing the same thing in a goal instead of a plugin. 



> -
> 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: Hibernate schema export

2004-05-24 Thread Konstantin Shaposhnikov
May be this file could be helpful for somebody




>

  

  



  

Exporting Hibernate Schema file



  

 

Exporting Hibernate Schema file


  

  
  

  

 
 
 
 
 


 









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

Re: Hibernate schema export

2004-05-23 Thread Konstantin Shaposhnikov
On 00:59 Sun 23 May , Nadeem Bitar wrote:
> The following bug http://jira.codehaus.org/browse/MPHIBERNATE-3 is
> closed but I am still having the same problem. I built the
> maven-hibernate-plugin from cvs but I am still getting 
> 
> net.sf.hibernate.MappingException: persistent class [classname] not
> found.  

Recently I have the same problem. It seems that it is classloader 
problem. I fix it in the following way: maven-hibernate-plugin call 
hibernate SchemaExportTask using jelly taglibrary, but this 
is not necessary, so I change plugin to call this ant task directly.

Currently I am not in office, but tomorrow I can send modified 
plugin.jelly to mailing list. Also may be it will be useful to 
submit patch to jira.

Best regards,
Konstantin

  
> 
> Am i missing something?
> 
> 
> 
> -
> 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]