On 12/3/06, Johann Reyes <[EMAIL PROTECTED]> wrote:
Hello Kostis:
1) Try this and let me know how it goes.
...
When i it ried it, i got the next error:
[INFO] [hyperjaxb2:generate {execution: compile-xsds-into-pojos-and-hbm-files}]
[INFO] Skipped XJC execution. Generated sources were up-to-date.
[INFO] [antrun:run {execution: remove-xjc-gen-procinfos}]
[INFO] Executing tasks
[INFO] Executed tasks
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [hibernate3:hbm2ddl {execution: export-db-schema}]
[INFO] src/main/resources/hibernate.cfg.xml not found within the
project. Trying absolute path.
[INFO] No hibernate configuration file loaded.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] No hibernate.cfg.xml configuration provided. Annotated
classes/packages is only configurable via hibernate.cfg.xml
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: No
hibernate.cfg.xml configuration provided. Annotated classes/packages
is only configurable via hibernate.cfg.xml
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
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:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: No
hibernate.cfg.xml configuration provided. Annotated classes/packages
is only configurable via hibernate.cfg.xml
at
org.codehaus.mojo.hibernate3.configuration.AnnotationConfigurationTask.validateParameters(AnnotationConfigurationTask.java:28)
at
org.codehaus.mojo.hibernate3.configuration.AbstractConfigurationTask.getConfiguration(AbstractConfigurationTask.java:30)
at
org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:76)
at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:123)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
... 16 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30 seconds
[INFO] Finished at: Thu Dec 07 14:34:52 EET 2006
[INFO] Final Memory: 14M/28M
[INFO] ------------------------------------------------------------------------
The problem was that the validateParameters() method of the
org.codehaus.mojo.hibernate3.configuration.AnnotationConfigurationTask
class now requires an xml configuration file.
I managed to run it after i commented out lines 26-30:
if ( getConfigurationFile() == null )
{
throw new MojoExecutionException( "No hibernate.cfg.xml
configuration provided. " +
"Annotated classes/packages is only configurable via
hibernate.cfg.xml" );
}
BUT, unfortunately, the ddl scripts were empty!!!
I then removed the 3 params:
<drop>true</drop>
<export>false</export>
<outputfilename>frepor-ddl.sql</outputfilename>
but still nothing happened.
* Any help on that?
3) On that personal note, first I apologize for such a mistake from my part,
and I have to say really no special meaning, just you met let's say my
curse, which I believe is called dyslexia. Not intended to skip a letter but
I tend to do that a lot along with flipping and replacing characters, a good
example would be during a good time of development of the plugin the hbm2ddl
goal was called "hbm2dll". And I didn't noticed my error until someone
pointed that out. LOL
Once again my apologies for my error, and let me know how it goes.
Please, don't apologize, i was just amused by the name you used, not
angry, or something.
I believe that dyslexia and/or asperger syndrome [http://www.aspergers.com/]
for many of us is responsible for our involvement with computers. You
see, it is my theory that such disorders are caused by brains that
have "excessive connectivity", that is, they tend to corelate things
more than others.
So, instead of just reading "hbm2ddl", understand just it and then
type it, your brain goes further and corelates it with the "ddl"
notion. But it is the same reason why you are good at programming:
you are more able to see patterns and abstractions, and that helps you
to architect better code and devise clever solutions.
Regards,
Kostis
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email