Hello Yves To create sql from hbm.xml files it works, from the error message that you posted, it looks like it's failing to connect to your database server as it looks it's trying to create the database tables in it. The difference between hbm2ddl and schema-export is that hbm2ddl is used to create and update database schemas (thus you need to specify what action you are going to do in your pom.xml) while the schema-export you don't need to specify nothing in your pom.xml and it creates the tables in the database while schema-update it just update the schema in the database.
About your error, it looks the database it's running because the database it's refusing the connection, so I would check the username and password that you are using to create the connection to see if they are the right ones. Regards Johann Reyes -----Original Message----- From: Yves Van Steen [mailto:[EMAIL PROTECTED] Sent: Thursday, October 19, 2006 1:01 PM To: Maven Users List Subject: How do i use the hibernate3 plugin from codehause Hey, I want to create ddl sql files from my hbm files but none of the goals of the hibernate3 plugin actually works? Is this plugin useable or still in development? If possible I also want to execute these sql files to my database server. Anybody have any ideas? My configuration is the same as on the info site HYPERLINK "http://mojo.codehaus.org/hibernate3-maven-plugin/howto.html"http://mojo.cod ehaus.org/hibernate3-maven-plugin/howto.html OUTPUT Hibernate3:hbm2java => generates the java files but ends with an error hibernate3:schema-update => returns success but does nothing hibernate3:hbm2doc => class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn hibernate3:hbm2hbmxml => class not found exception org/hibernate/engine/query/sql/NativeSQLQueryReturn Hibernate3:hbm2ddl & hibernate3:schema-export (any difference between the 2 ???) returns this [INFO] Configuration XML file loaded: G:\PROJECTS\sw - admin baert\source\Common \src\main\resources\hibernate.cfg.xml [INFO] Configuration Properties file loaded: G:\PROJECTS\sw - admin baert\source \Common\src\main\resources\database.properties [WARNING] 1 error(s) occurred while performing <hbm2ddl>. [WARNING] Error #1: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException MESSAGE: java.net.ConnectException: Connection refused: connect STACKTRACE: java.net.SocketException: java.net.ConnectException: Connection refused: connect at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.ja va:156) at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641) at com.mysql.jdbc.Connection.<init>(Connection.java:1531) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java :266) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) at org.hibernate.connection.DriverManagerConnectionProvider.getConnectio n(DriverManagerConnectionProvider.java:110) at org.hibernate.tool.hbm2ddl.ManagedProviderConnectionHelper.prepare(Ma nagedProviderConnectionHelper.java:28) at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:178 ) at org.codehaus.mojo.hibernate3.exporter.SchemaExportMojo.doSchemaExport (SchemaExportMojo.java:79) at org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(H bm2DDLExporterMojo.java:56) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateE xporterMojo.java:59) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi nManager.java:412) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa ultLifecycleExecutor.java:534) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goal(DefaultLifecycleExecutor.java:488) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau ltLifecycleExecutor.java:458) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:306) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:273) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi fecycleExecutor.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(DelegatingMethodAcces sorImpl.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) ** END NESTED EXCEPTION ** -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.408 / Virus Database: 268.13.5/483 - Release Date: 18/10/2006 !DSPAM:4537afce262835838318171! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]