Title:
Bug 81887:Two entities with names ending in the same characters after a dot cause Hibernate to throw a "duplicate import" exception (org
| View in TrackerStatus/Resolution/Reason: Closed/Withdrawn/
Reporter/Name(from Bugbase): Mike Nicholls / Mike Nicholls (mikenicholls)
Created: 01/31/2010
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 9,0,0,251028 /
Priority/Frequency: Major / Unknown
Locale/System: English / Platforms All
Vote Count: 0
Problem:
Two entities with names ending in the same characters after a dot cause Hibernate to throw a "duplicate import" exception (org.hibernate.DuplicateMappingException)
Method:
./Application.cfc-----------------<cfcomponent><cfset this.name = "ORMTest"><cfset this.datasource = "cfartgallery"><cfset this.ormSettings = {useDBForMapping = false,logSQL=true}><cfset this.ormEnabled = true></cfcomponent>./index.cfm-----------<!--- do nothing --->hello./cfcs/package/TestEntity.cfc-----------------------------<cfcomponent persistent="true" entityname="something.testEntity"><cfproperty name="id" fieldType="id" generator="identity" ormtype="integer"></cfcomponent>./cfcs/otherPackage/TestEntity.cfc----------------------------------<cfcomponent persistent="true" entityname="somethingElse.testEntity"><cfproperty name="id" fieldType="id" generator="identity" ormtype="integer"></cfcomponent>
Result:
org.hibernate.DuplicateMappingException: duplicate import: testEntity refers to both something.testEntity and somethingElse.testEntity (try using auto-import="false")at org.hibernate.cfg.Mappings.addImport(Mappings.java:164)at org.hibernate.cfg.HbmBinder.bindPersistentClassCommonValues(HbmBinder.java:636)at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:549)at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:293)at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:166)at org.hibernate.cfg.Configuration.add(Configuration.java:702)at org.hibernate.cfg.Configuration.addDocument(Configuration.java:517)at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:528)at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:180)at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:141)at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:69)at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:182)at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:85)at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:475)at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:221)at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:53)at coldfusion.CfmServlet.service(CfmServlet.java:200)at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)at jrun.servlet.FilterChain.service(FilterChain.java:101)at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203)at jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)at jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3040872
External Customer Info:
External Company:
External Customer Name: Mike Nicholls
External Customer Email: 1932664644160A2F992015D5
External Test Config: 01/31/2010
Attachments:
Comments: