[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2108) org.hibernate.MappingNotFoundException: file:
Courtney Arnold (JIRA)
noreply at atlassian.com
Tue Sep 26 12:41:24 EDT 2006
org.hibernate.MappingNotFoundException: file:
----------------------------------------------
Key: HHH-2108
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2108
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.2.0.cr4
Environment: Hibernate 3.2.0cr4, SQL Server 2000
Reporter: Courtney Arnold
I receive the following error while trying to add a cacheable configuration file to the configuration:
org.hibernate.InvalidMappingException: Could not parse mapping document from file F:\products\common\resources\hibernate\hbm\org\waterford\product\data\db\hibernate\Product.hbm.xml
at org.hibernate.cfg.Configuration.addCacheableFile(Configuration.java:359)
at org.hibernate.cfg.Configuration.addCacheableFile(Configuration.java:364)
at org.waterford.common.data.db.hibernate.HibernateDbBroker._addMappings(HibernateDbBroker.java:568)
at org.waterford.common.data.db.hibernate.HibernateDbBroker._getConfiguration(HibernateDbBroker.java:477)
at org.waterford.common.data.db.hibernate.HibernateDbBroker._initSessionFactory(HibernateDbBroker.java:668)
at org.waterford.common.data.db.hibernate.HibernateDbBroker.setDb(HibernateDbBroker.java:189)
at org.waterford.sm.db.smdbinterface.HibSmDbInterface.connect(HibSmDbInterface.java:426)
at org.waterford.sm.db.smdbinterface.HibSmDbInterface.<init>(HibSmDbInterface.java:333)
at org.waterford.sm.db.smdbinterface.factory.HibSmDbInterfaceFactory._getInstance(HibSmDbInterfaceFactory.java:51)
at org.waterford.sm.db.smdbinterface.factory.HibSmDbInterfaceFactory.getInstance(HibSmDbInterfaceFactory.java:24)
at org.waterford.sm.license.LicenseManager._getDbInterface(LicenseManager.java:48)
at org.waterford.sm.license.LicenseManager.loadFromDB(LicenseManager.java:218)
at org.waterford.sm.license.LicenseManager.init(LicenseManager.java:183)
at org.waterford.sm.license.LicenseManager.initLicensing(LicenseManager.java:118)
at org.waterford.sm.SMFrame.init(SMFrame.java:284)
at org.waterford.sm.SMApp.<init>(SMApp.java:76)
at org.waterford.sm.SMApp.main(SMApp.java:213)
Caused by: org.hibernate.MappingNotFoundException: file: F:\products\common\resources\hibernate\hbm\org\waterford\product\data\db\hibernate\Product.hbm.xml not found
at org.hibernate.cfg.Configuration.addCacheableFile(Configuration.java:349)
... 16 more
I have looked at the source for org.hibernate.cfg.Configuration(addCacheableFile) and the problem lies in the if /else statement around line 348. Prior to this statement a cached configuration file was loaded into the "doc" object. So the if statement "if (doc == null && xmlFile.exists())" will return false. Doing so, execution continues on the else statement that executes "throw new MappingNotFoundException("file", xmlFile.toString());". Due to this, no cached files can be loaded into the configuration, only uncached files can be loaded. The else statement needs to be modified to be "else if (doc == null)".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list