Element IDENTITY.IDENTITY is undefined in a CFML structure referenced as part of an expression. #27

Closed
willcor opened this Issue Sep 29, 2010 · 19 comments

Projects

None yet

10 participants

@willcor

Encountered this error after updating to version 1.000299. when creating an application using MSSQL 2008 database. But it does work on Apache Derby Database.

@jasonhutton

Getting same error here. Using MSSQL 2008. Here is the log file from the error:

struct

Detail: [empty string]
ErrNumber: 0
Message: Element IDENTITY.IDENTITY is undefined in a CFML structure referenced as part of an expression.
Resolvedname: [empty string]
StackTrace: coldfusion.runtime.UndefinedElementException: Element IDENTITY.IDENTITY is undefined in a CFML structure referenced as part of an expression.
at coldfusion.runtime.DotResolver.resolveSplitNameInMap(DotResolver.java:109)
at coldfusion.runtime.CfJspPage._resolve(CfJspPage.java:1559)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1777)
at coldfusion.runtime.CfJspPage._resolveAndAutoscalarize(CfJspPage.java:1769)
at cftable2ecfc2117812495$funcDETERMINEAUTOINCMSSQL.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:837)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
at cftable2ecfc2117812495$funcDETERMINEAUTOINC.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:791)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2360)
at cftable2ecfc2117812495$funcPOPULATETABLE.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:783)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
at cftable2ecfc2117812495$funcINIT.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:88)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CFPage.___createObjectInternal(CFPage.java:8609)
at coldfusion.runtime.CFPage._createObject(CFPage.java:8577)
at cfdatasource2ecfc1691690504$funcPOPULATETABLES.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc:92)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:405)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2582)
at cfdatasource2ecfc1691690504$funcINIT.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc:35)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:472)
at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:368)
at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:55)
at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:321)
at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:220)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:491)
at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:337)
at coldfusion.runtime.CFPage.___createObjectInternal(CFPage.java:8609)
at coldfusion.runtime.CFPage._createObject(CFPage.java:8577)
at cfhandlerGenerate2ecfm1878019093.runPage(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\handlerGenerate.cfm:133)
at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:231)
at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:416)
at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:360)
at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
at coldfusion.filter.PathFilter.invoke(PathFilter.java:94)
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:62)
at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:126)
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)
TagContext:

[array]
1) [struct]
COLUMN: 0
ID: CF_DOTRESOLVER
LINE: 837
RAW_TRACE: at cftable2ecfc2117812495$funcDETERMINEAUTOINCMSSQL.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:837)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc
TYPE: CFML
2) [struct]
COLUMN: 0
ID: CF_UDFMETHOD
LINE: 791
RAW_TRACE: at cftable2ecfc2117812495$funcDETERMINEAUTOINC.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:791)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc
TYPE: CFML
3) [struct]
COLUMN: 0
ID: CF_TEMPLATEPROXY
LINE: 783
RAW_TRACE: at cftable2ecfc2117812495$funcPOPULATETABLE.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:783)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc
TYPE: CFML
4) [struct]
COLUMN: 0
ID: CF_UDFMETHOD
LINE: 88
RAW_TRACE: at cftable2ecfc2117812495$funcINIT.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc:88)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\table.cfc
TYPE: CFML
5) [struct]
COLUMN: 0
ID: CF_CFPAGE
LINE: 92
RAW_TRACE: at cfdatasource2ecfc1691690504$funcPOPULATETABLES.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc:92)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc
TYPE: CFML
6) [struct]
COLUMN: 0
ID: CF_UDFMETHOD
LINE: 35
RAW_TRACE: at cfdatasource2ecfc1691690504$funcINIT.runFunction(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc:35)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\cfc\db\datasource.cfc
TYPE: CFML
7) [struct]
COLUMN: 0
ID: CF_CFPAGE
LINE: 133
RAW_TRACE: at cfhandlerGenerate2ecfm1878019093.runPage(C:\Inetpub\wwwroot\Adobe Apptacular\handlers\handlerGenerate.cfm:133)
TEMPLATE: C:\Inetpub\wwwroot\Adobe Apptacular\handlers\handlerGenerate.cfm
TYPE: CFML
Type: Expression
element: IDENTITY.IDENTITY
objectType:

[object of java.lang.Class]
Class Name: java.lang.Class
Methods:

asSubclass(java.lang.Class) returns java.lang.Class
cast(java.lang.Object) returns java.lang.Object
desiredAssertionStatus() returns boolean
forName(java.lang.String, boolean, java.lang.ClassLoader) returns java.lang.Class
forName(java.lang.String) returns java.lang.Class
getAnnotation(java.lang.Class) returns java.lang.annotation.Annotation
getAnnotations() returns java.lang.annotation.Annotation[]
getCanonicalName() returns java.lang.String
getClassLoader() returns java.lang.ClassLoader
getClasses() returns java.lang.Class[]
getComponentType() returns java.lang.Class
getConstructor(java.lang.Class[]) returns java.lang.reflect.Constructor
getConstructors() returns java.lang.reflect.Constructor[]
getDeclaredAnnotations() returns java.lang.annotation.Annotation[]
getDeclaredClasses() returns java.lang.Class[]
getDeclaredConstructor(java.lang.Class[]) returns java.lang.reflect.Constructor
getDeclaredConstructors() returns java.lang.reflect.Constructor[]
getDeclaredField(java.lang.String) returns java.lang.reflect.Field
getDeclaredFields() returns java.lang.reflect.Field[]
getDeclaredMethod(java.lang.String, java.lang.Class[]) returns java.lang.reflect.Method
getDeclaredMethods() returns java.lang.reflect.Method[]
getDeclaringClass() returns java.lang.Class
getEnclosingClass() returns java.lang.Class
getEnclosingConstructor() returns java.lang.reflect.Constructor
getEnclosingMethod() returns java.lang.reflect.Method
getEnumConstants() returns java.lang.Object[]
getField(java.lang.String) returns java.lang.reflect.Field
getFields() returns java.lang.reflect.Field[]
getGenericInterfaces() returns java.lang.reflect.Type[]
getGenericSuperclass() returns java.lang.reflect.Type
getInterfaces() returns java.lang.Class[]
getMethod(java.lang.String, java.lang.Class[]) returns java.lang.reflect.Method
getMethods() returns java.lang.reflect.Method[]
getModifiers() returns int
getName() returns java.lang.String
getPackage() returns java.lang.Package
getProtectionDomain() returns java.security.ProtectionDomain
getResource(java.lang.String) returns java.net.URL
getResourceAsStream(java.lang.String) returns java.io.InputStream
getSigners() returns java.lang.Object[]
getSimpleName() returns java.lang.String
getSuperclass() returns java.lang.Class
getTypeParameters() returns java.lang.reflect.TypeVariable[]
isAnnotation() returns boolean
isAnnotationPresent(java.lang.Class) returns boolean
isAnonymousClass() returns boolean
isArray() returns boolean
isAssignableFrom(java.lang.Class) returns boolean
isEnum() returns boolean
isInstance(java.lang.Object) returns boolean
isInterface() returns boolean
isLocalClass() returns boolean
isMemberClass() returns boolean
isPrimitive() returns boolean
isSynthetic() returns boolean
newInstance() returns java.lang.Object
toString() returns java.lang.String


Thanks
Jason

@timbrown

Have the same issue..any help would be much appreciated.

@willcor

downloaded the latest version from RIAForge and it's working perfectly! Thank You.

@tpryan
Owner

Sorry to not respond sooner. Can you post a table create sql? will help me trouble shoot.

@garence

Running into identical issue, can someone shed some light on this front?

@JohnnyP10

I am seeing this with CF9 and Sql2008 and when i tried debugging, it seems to be trying to call sys tables like sys.change_tracking_tables and sys.change_tracking_databases. I assume it has something to do with sql permissions or it is just SQL 2008. I had to edit the datasource.cfc with all the table names. Terry, i will email you the code that i used.

@garence

In hopes it helps, I am willing to email code too - though I'm not sure what to send ... let me know and I'll contribute what I have.

@htezcan

I have the same problem using apptacular in CFBuilder B2 apptacular v 1.000310. I am using multiserver instance of CF9.01 with MS 2008.
"About Apptacular
Version 1.000310
Last Update Check 04/12/2011 07:11 AM
Server Name localhost
ColdFusion Version ColdFusion Server Developer 9,0,1,274733
OS Version Windows 7 6.1
ColdFusion Builder Version 2.0 "

Error
An Error has occured.
Message:Element IDENTITY.IDENTITY is undefined in a CFML structure referenced as part of an expression.

Details:

Any ideas? Thank you

@JohnnyP10

Here is the code that i used to fix my problem: http://pastebin.com/sfkA8ASQ

Just replace the generateExcludedTables() method with the one in the link above. The function should be found in handlers/cfc/db/datasource.cfc

This is not an official fix but it solved my problem. Hopefully Terry will be able to release an official update to solve the bug, but the meanwhile try the method above.

@garence

JohnnyP10 ... you are a rock star. Much thanks.

@htezcan
@tpryan tpryan added a commit that closed this issue Apr 13, 2011
@tpryan Fixes #27
User John Pitrowski submitted a fix for this error.
6998409
@tpryan tpryan closed this in 6998409 Apr 13, 2011
@khooker

Thanks for this patch. I found I had to add these two tables to the same exclusion list:

           ,'sysaltfiles','database_mirroring_witnesses'
@OrhanCan

http://pastebin.com/sfkA8ASQ this URL banned in my country, can i see the solution for MSSQL 2008 ?

@tpryan
Owner
@OrhanCan

is that only changes? do i have to replace something?

@OrhanCan

i purchased CFB2.0.1 only for Apptacular , this doesnt work for me...

@OrhanCan

this is not solution...

@martypaz

FIX FOR SQL SERVER ONLY!!!

I wrote this simple script to get the names of all the system views in SQL server - I'm sure M$ add new tables and as Terry appears to no longer develop apptacular he won;t be aware of the new views. Simply run the script and copy and paste the list of views it creates. Instructions will be displayed after running the script........

<cfdbinfo name="dbi" datasource="yourdatasource" type="Tables">
<cfquery name="dbi" dbtype="query" >
select * from dbi where table_type='VIEW'
</cfquery>
<cfoutput>
Copy the quoted values below and paste them at the bottom of /handlers/cfc/db/datasource.cfc just below the last excludedTableList (About line 455)<br><br>
excludedTableList = excludedTableList & ",#replace(listQualify(valuelist(dbi.table_name), "'"), ",'", ", '", "all")#";
</cfoutput>

Hope it helps

@tpryan
Owner

Yeah, I'm not actively maintaining. But if you can put together a pull request I'll approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment