Hi Johann,

Johann Reyes wrote:
Question, do you use profiles in your project?

Nope. Is there something there for me to use?

Many thanks,

Manos



Regards

Johann Reyes

-----Original Message-----
From: Manos Batsis [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 9:13 AM
To: [email protected]
Subject: [mojo-user] NoInitialContextException with Hibernate3 Maven Plugin
2.0-alpha-1


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(DatasourceCo
nnectionProvider.java:52)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Con
nectionProviderFactory.java:124)
at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(Con
nectionProviderFactory.java:56)
at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.j
ava: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(JDBCMetaDataConfigu
ration.java:38)
at org.codehaus.mojo.hibernate3.configuration.JDBCComponentConfiguration.doConf
iguration(JDBCComponentConfiguration.java:67)
at org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.ge
tConfiguration(AbstractComponentConfiguration.java:37)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.configureExporter(Hiberna
teExporterMojo.java:179)
at org.codehaus.mojo.hibernate3.exporter.Hbm2CfgXmlExporterMojo.configureExport
er(Hbm2CfgXmlExporterMojo.java:62)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.doExecute(HibernateExport
erMojo.java:234)
at org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporter
Mojo.java:139)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:412)


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

    http://xircles.codehaus.org/manage_email




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

    http://xircles.codehaus.org/manage_email



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

   http://xircles.codehaus.org/manage_email

Reply via email to