You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by James Richards <ja...@northps.com> on 2006/07/07 17:17:03 UTC
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(SchemaExportMojo.java:63)
at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:55)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:60)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
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.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.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java: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(LogFactoryImpl.java:413)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java: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(LogFactoryImpl.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
RE: Hibernate 3 failure
Posted by Johann Reyes <jr...@hiberforum.org>.
Hello James
Yes, the extension is necessary as this is the only way for the moment that
I found to pass the JDBC driver to the plugin layer.
Please try it and let me know how it went.
Regards
Johann Reyes
-----Original Message-----
From: James Richards [mailto:james_richards@northps.com]
Sent: Friday, July 07, 2006 11:37 AM
To: Maven Users List
Subject: RE: Hibernate 3 failure
I have the exact same <plugin> configuration but I do not have any
extensions enabled:
<extensions>
<extension>
<groupId>jdbc.artifact.groupid</groupId>
<artifactId>jdbc-driver</artifactId>
<version>1.0</version>
</extension>
</extensions>
I am actually using the sun JDBC-ODBC bridge driver for this application
[for legacy reasons] so is that particular <extensions> configuration
required?
Thanks,
James
-----Original Message-----
From: jamin.short@gmail.com on behalf of ben short
Sent: Fri 7/7/2006 11:28 AM
To: Maven Users List
Subject: Re: Hibernate 3 failure
Have you seen this page?
http://mojo.codehaus.org/hibernate3-maven-plugin/howto.html
Ben
On 7/7/06, James Richards <ja...@northps.com> wrote:
> 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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Hibernate 3 failure
Posted by James Richards <ja...@northps.com>.
I have the exact same <plugin> configuration but I do not have any extensions enabled:
<extensions>
<extension>
<groupId>jdbc.artifact.groupid</groupId>
<artifactId>jdbc-driver</artifactId>
<version>1.0</version>
</extension>
</extensions>
I am actually using the sun JDBC-ODBC bridge driver for this application [for legacy reasons] so is that particular <extensions> configuration required?
Thanks,
James
-----Original Message-----
From: jamin.short@gmail.com on behalf of ben short
Sent: Fri 7/7/2006 11:28 AM
To: Maven Users List
Subject: Re: Hibernate 3 failure
Have you seen this page?
http://mojo.codehaus.org/hibernate3-maven-plugin/howto.html
Ben
On 7/7/06, James Richards <ja...@northps.com> wrote:
> 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(SchemaExportMojo.java:63)
> at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:55)
> at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:60)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
> 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.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.java:543)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java: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(LogFactoryImpl.java:413)
> at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java: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(LogFactoryImpl.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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Hibernate 3 failure
Posted by ben short <be...@benshort.co.uk>.
Have you seen this page?
http://mojo.codehaus.org/hibernate3-maven-plugin/howto.html
Ben
On 7/7/06, James Richards <ja...@northps.com> wrote:
> 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(SchemaExportMojo.java:63)
> at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:55)
> at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:60)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:488)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:458)
> 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.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.java:543)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
> at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java: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(LogFactoryImpl.java:413)
> at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java: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(LogFactoryImpl.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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Hibernate 3 failure
Posted by James Richards <ja...@northps.com>.
Hi Johann,
The pom.xml contents are below. I used Maven 1 extensively but am still very new to Maven 2. This is my first attempt at using the Hibernate plugin. I am running JDK 1.5.0_06 on Windows XP Professional. Any help is greatly appreciated.
Thanks,
James
----------------------------------------------------------------------------
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.foo.usertrack</groupId>
<artifactId>usertrack</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>User Tracking Web Application</name>
<url>http://corp.oberon-media.com/</url>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<filtering>false</filtering>
<includes>
<include>**/*.hbm.xml</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<!-- Application will be a standalone so disable cargo plugin
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<configuration>
<container>
<containerId>jboss4x</containerId>
<output>${installDir}/jboss4x.log</output>
<log>${installDir}/cargo.log</log>
<zipUrlInstaller>
<url>http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.2.zip</url>
<installDir>${installDir}</installDir>
</zipUrlInstaller>
</container>
</configuration>
</plugin>
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<hibernate>
<configurationFile>/src/main/resources/hibernate.cfg.xml</configurationFile>
</hibernate>
<outputDirectory>
<hbm2cfgxml>src/main/resources</hbm2cfgxml>
</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<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>
<dependencies>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee_1.4_spec</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.0.5</version>
</dependency>
</dependencies>
</project>
-----Original Message-----
From: Johann Reyes [mailto:jreyes@hiberforum.org]
Sent: Fri 7/7/2006 11:28 AM
To: 'Maven Users List'
Subject: RE: Hibernate 3 failure
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:james_richards@northps.com]
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Hibernate 3 failure
Posted by Johann Reyes <jr...@hiberforum.org>.
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:james_richards@northps.com]
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org