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:[EMAIL PROTECTED] 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:[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]