Hello,

I'm trying to use a hibernate.cfg.xml file without any <mapping> elements as the configurationfile (and thus, base) for hibernate3:hbm2cfgxml to generate the complete file (i.e. with the <mapping> elements) for deployment. The problem is for some reason the goal tries to use the datasource name of the base file (see below for the trace) during the build. How can i make the goal ignore the datasource name and just do its job ?-)

Many thanks,

Manos


[INFO] [hibernate3:hbm2cfgxml {execution: hbm2cfgxml}]
[INFO] using jdbcconfiguration task.
[INFO] Configuration XML file loaded: /Users/manos/workspace/md4j-quickstarter/domain/target/classes/hibernate.cfg.xml [INFO] src/main/resources/database.properties not found within the project. Trying absolute path.
[INFO] No hibernate properties file loaded.
[FATAL] DatasourceConnectionProvider - Could not find datasource: java:/quickstarterDS <javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial>javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247) at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
        at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:397) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1929) at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:38) at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.doConfiguration(JDBCComponentConfiguration.java:67) at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:37) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(HibernateExporterMojo.java:179) at org.codehaus.mojo.hibernate3.exporter.Hbm2CfgXmlExporterMojo.configureExporter(Hbm2CfgXmlExporterMojo.java:62) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExporterMojo.java:234) at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:139) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:412)


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to