Hello Richards

This is strange, would be possible for you to send your pom.xml file to
check it out.

Regards

Johann Reyes

-----Original Message-----
From: James Richards [mailto:[EMAIL PROTECTED] 
Sent: Friday, July 07, 2006 11:17 AM
To: users@maven.apache.org
Subject: Hibernate 3 failure

Hello,

I've tried searching for this problem on Google but so far have not had any
luck locating this exact error so I wanted to see if anyone on the mailing
can help out.  I have Maven 2.0.4 installed and I am trying to use the
Hibernate3 plugin.  I added the repositories configuration to my pom.xml:

  <repositories>
    <repository>
      <id>Maven Snapshots</id>
      <url>http://snapshots.maven.codehaus.org/maven2/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases> 
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>Maven Snapshots</id>
      <url>http://snapshots.maven.codehaus.org/maven2/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </pluginRepository>
  </pluginRepositories>

and was able to download the required plugin but it fails with the following
error:

[INFO] [hibernate3:hbm2ddl]
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] null
org/apache/log4j/Category
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.ExceptionInInitializerError
        at
org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport(Schema
ExportMojo.java:63)
        at
org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLE
xporterMojo.java:55)
        at
org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporter
Mojo.java:60)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:534)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:488)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@1afae45 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@1afae45 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:543)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:235)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.ja
va:209)
        at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
        at
org.hibernate.tool.hbm2ddl.SchemaExport.<clinit>(SchemaExport.java:47)
        ... 21 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable
Log constructor [Ljava.lang.Class;@1afae45 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:413)
        at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.ja
va:529)
        ... 25 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
        at java.lang.Class.getConstructor0(Class.java:2640)
        at java.lang.Class.getConstructor(Class.java:1629)
        at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryI
mpl.java:410)
        ... 26 more

Using the -X flag outputs more information but nothing seems to be obviously
wrong.  

Has anyone successfully used the Hibernate3 plugin to generate a ddl?  If
so, is there a magic step I should take or a best place to look for this
problem?

Thanks,

James



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

Reply via email to