Title:
Bug 76112:I'm trying to use CF's ORM to create a table from a CFC definition on MySQL 5
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Jon Hartmann / Jon Hartmann (jon.hartmann)
Created: 03/22/2009
Components: ORM Support
Versions: 9.0
Failure Type: Unspecified
Found In Build/Fixed In Build: 0000 / 227817
Priority/Frequency: Major / Unknown
Locale/System: English / Win All
Vote Count: 0
Problem:
I'm trying to use CF's ORM to create a table from a CFC definition on MySQL 5.0 and getting an error. I defined the "Contacts.cfc", and setup my application to handle it with dbcreate = "update" in the ORMSettings. When I went to the page yesterday it gave the error message below, only instead of being empty, it displayed "7". I've confirmed that the server is running, and that the datasource user has full permissions on the database.
Method:
Application.cfc
<cfcomponent output="false">
<cfset this.name = "ORMTest2" />
<cfset this.ORMEnabled = true />
<cfset this.datasource = "ormtest" />
<cfset this.ORMSettings = {
dialect = "MySQL",
dbcreate = "trueupdate"
} />
<cffunction name="onRequestStart">
<cfif IsDefined("url.reinit")>
<cfset ApplicationStop() />
</cfif>
</cffunction>
</cfcomponent>
Contacts.cfc
<cfcomponent persistent="true" table="contact">
<cfproperty name="contactID" fieldtype="id" datatype="int" generator="identity" />
<cfproperty name="name" datatype="string" length="100" notnull="true" />
<cfproperty name="title" datatype="string" length="100" />
<cfproperty name="telephone" datatype="string" length="25" />
<cfproperty name="email" datatype="string" length="100" />
<cfproperty name="createdAt" datatype="date" update="false" default="#now()#" />
<cfproperty name="updatedAt" datatype="date" insert="false" />
<cfproperty name="removedAt" datatype="date" insert="false" />
</cfcomponent>
index.cfm
<cfset contacts = EntityLoad("Contacts") />
<cfdump var="#contacts#">
Result:
7
Resources:
* Check the ColdFusion documentation to verify that you are using the correct syntax.
* Search the Knowledge Base to find a solution to your problem.
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Remote Address 127.0.0.1
Referrer http://localhost:8500/bug/
Date/Time 30-Mar-09 11:25 AM
Stack Trace
java.lang.ArrayIndexOutOfBoundsException: 7
at coldfusion.runtime.AttributeCollection.<init>(AttributeCollection.java:36)
at coldfusion.compiler.TemplateAssembler.propertyMetadata(TemplateAssembler.java:425)
at coldfusion.compiler.TemplateAssembler.dumpPropertyListMetadata(TemplateAssembler.java:415)
at coldfusion.compiler.TemplateAssembler.dumpStartMetadata(TemplateAssembler.java:351)
at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:101)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:368)
at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:144)
at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:418)
at coldfusion.util.LruCache.get(LruCache.java:180)
at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:362)
at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)
at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:133)
at coldfusion.util.SoftCache.get(SoftCache.java:81)
at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:584)
at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:540)
at coldfusion.runtime.TemplateClassLoader.newInstance(TemplateClassLoader.java:523)
at coldfusion.orm.mapping.CFPropertyBinder.getMetaData(CFPropertyBinder.java:108)
at coldfusion.orm.mapping.CFPropertyBinder.<init>(CFPropertyBinder.java:92)
at coldfusion.orm.hibernate.HibernateConfiguration.generateHbmDocFromCFCs(HibernateConfiguration.java:534)
at coldfusion.orm.hibernate.HibernateConfiguration.buildConfiguration(HibernateConfiguration.java:335)
at coldfusion.orm.hibernate.HibernateConfiguration.initHibernateConfiguration(HibernateConfiguration.java:156)
at coldfusion.orm.hibernate.HibernateConfiguration.<init>(HibernateConfiguration.java:121)
at coldfusion.orm.hibernate.ConfigurationManager.initConfiguration(ConfigurationManager.java:69)
at coldfusion.orm.hibernate.HibernateProvider.InitializeORMForApplication(HibernateProvider.java:168)
at coldfusion.orm.hibernate.HibernateProvider.beforeApplicationStart(HibernateProvider.java:83)
at coldfusion.filter.ApplicationFilter.fireBeforeAppStartEvent(ApplicationFilter.java:497)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:207)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:87)
at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:74)
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:177)
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.http.WebService.invokeRunnable(WebService.java:172)
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: 3037979
External Customer Info:
External Company:
External Customer Name: Jon Hartmann
External Customer Email: 3124041A447C75CA99201549
External Test Config: 03/22/2009
Attachments:
Comments: