tracker issue : CF-3036985

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 74091:If you have a persistent object name object

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): John Beynon / John Beynon (johnab)

Created: 12/08/2008

Components: ORM Support

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Normal / Unknown

Locale/System: English / Win All

Vote Count: 0

Problem:

If you have a persistent object name object.cfc, the database schema will get created but if you try entity load you receive message;

 unexpected token: object near line 1, column 6 [from object]
 
The error occurred in C:\JRun4\servers\centaur\centaur-ear\cfusion-war\ormmanager\index.cfm: line 2

1 : <cfscript>
2 : foo=entityLoad('objects.object');
3 : </cfscript>


renaming the object to myobject and the entityload to myobject it works just fine....



Method:

Application.cfc:
<cfset this.name = "bugs"> 
<cfset this.ormenabled = "true"> 
<cfset this.datasource = "ORM_Northwind">

object.cfc:
<cfcomponent persistent="true" table="Employees">
	<cfproperty name="EmployeeID">
	<cfproperty name="LastName">
	<cfproperty name="FirstName">
</cfcomponent>

a.cfm:
<cfset arr = entityLoad("object")>
<cfdump var="#arr#">

Run a.cfm.  Error is thrown.
Result:

The error occurred in C:\JRun4\servers\centaur\centaur-ear\cfusion-war\ormmanager\index.cfm: line 2

1 : <cfscript>
2 : foo=entityLoad('objects.object');
3 : </cfscript>

 unexpected token: object near line 1, column 6 [from object]
 
The error occurred in C:\dev\ColdFusion\cf_main\cfusion\wwwroot\bug\a.cfm: line 1

1 : <cfset arr = entityLoad("object")>
2 : <cfdump var="#arr#">

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.4) Gecko/2008102920 Firefox/3.0.4
Remote Address   	127.0.0.1
Referrer   	http://localhost:8500/bug/
Date/Time   	15-Dec-08 01:32 PM
Stack Trace
at cfa2ecfm2079463007.runPage(C:\dev\ColdFusion\cf_main\cfusion\wwwroot\bug\a.cfm:1)

org.hibernate.hql.ast.QuerySyntaxException: unexpected token: object near line 1, column 6 [from object]
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31)
	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24)
	at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
	at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:258)
	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:157)
	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133)
	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112)
	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623)
	at coldfusion.orm.hibernate.SessionWrapper.createQuery(SessionWrapper.java:110)
	at coldfusion.orm.hibernate.HibernatePersistenceManager.load(HibernatePersistenceManager.java:144)
	at coldfusion.orm.ORMUtils.entityLoad(ORMUtils.java:65)
	at coldfusion.runtime.CFPage.EntityLoad(CFPage.java:7186)
	at cfa2ecfm2079463007.runPage(C:\dev\ColdFusion\cf_main\cfusion\wwwroot\bug\a.cfm:1)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:228)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:289)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
	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:	3036985

External Customer Info:
External Company:  
External Customer Name: John Beynon
External Customer Email: 7E7D48CA445FAAAF992015D5
External Test Config: 12/08/2008

Attachments:

Comments: