Coldfusion 2018 Error

Community Beginner ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Good Afternoon,

I installed Coldfusion 2018 on our test server. We have Coldfusion 11 but I turned off all the services before installing. But when I navigate to my website, it is giving me a 500 error with details below. Any idea what the issue is? I very much appreciate any help. Thanks!

- Sheryl

 

Expression in cfproperty value must have a constant value.

coldfusion.compiler.TemplateAssembler$PropertyExpressionException: Expression in cfproperty value must have a constant value.

Views

112

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

I wonder if your problem is not quite what the error proposes.

 

If you google that error as a quoted string, "Expression in cfproperty value must have a constant value", you find various people complaing of it especially in the CF2016 era. We might infer that that somehow something had changed (perhaps from CF11), but I just did a test of using a non-constant value in a cfproperty (using ORM or not), and it worked fine on CF11 and 2018.

 

For example, this is ok:

 

<cfproperty name="test" default="bob">

 

that worked. If I did:

 

<cfproperty name="test" default="#left("bob",1)#">

 

that also worked.

 

But while setting up the test, I happened to make a mistake:

 

 

<cfproperty name="test" default="#left(bob,1)#">

 

Notice I forgot to quote bob, so CF treated it as a variable...which doesn't exist...and guess what? I got the error you show!

 

So it seems that the error happens not "if you fail to use a constant for a default in cfproperty", but "if the expression used for the default in a cfproperty has an error". That's interesting. I don't see anyone else mentioning it, but I wonder if anyone reading this may know more.

 

It may be that we have found a bug. But let's keep going with your challenge.

 

I suspect what's happened is that whateve code for you is having this problem has some variable in the expression of some cfproperty default which either does not exist or fails for some other reasons. It could be anything really, and not necessarily a compatibility issue between CF11 and 2018, but just some configuration or other issue, which once resolved would no longer get the error.

 

Since you don't refer to the file with the problem, perhaps you're also not seeing exactly WHERE this error is occuring, to even know what expression may be failing, in what file, and on what line of code.

 

Are you seeing this error on screen or as a result of some error handling (whether an email you get, or a database of errors, etc.)? If you are seeing it on screen, then you can ask CF to show you the details like the file and line number, by going into the CF Admin, and the "debug output settings" page, and enabling "robust exception handling".

 

Once you have your information, let us know what you may find. And then after that, or at least after you have done all your migration testing, you should disable that feature, if this CF instance is going to be the production one. If it's just your local dev machine, no worries. You don't want to be giving out such details to end users.

 

There's more one could say, but let's see if I have you at all on the right track, to start here.


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

Thank you so much for your reponse Charlie!

The site is working perfectly in Coldfusion 11.  I opened  all the cfc and cfm files mentioned from the details displayed in the browser and searched for cfproperty, I cannot find the cfproperty. Am I missing something? The "Robust Exception Handling" is also enabled in CF 2018. Below are the details showing on the browser. I'm lost as to where I find the cfproperty to check on the expression that needs to be a constant value. 

Again, i appreciate your help.

- Sheryl

-------------------------

Expression in cfproperty value must have a constant value.

coldfusion.compiler.TemplateAssembler$PropertyExpressionException: Expression in cfproperty value must have a constant value.

coldfusion.compiler.TemplateAssembler.propertyMetadata(TemplateAssembler.java:737)

        at coldfusion.compiler.TemplateAssembler.dumpPropertyListMetadata(TemplateAssembler.java:720)

        at coldfusion.compiler.TemplateAssembler.dumpStartMetadata(TemplateAssembler.java:586)

        at coldfusion.compiler.TemplateAssembler.assemble(TemplateAssembler.java:186)

        at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:410)

        at coldfusion.compiler.NeoTranslator.translateJava(NeoTranslator.java:160)

        at coldfusion.runtime.TemplateClassLoader$TemplateCache$1.fetch(TemplateClassLoader.java:478)

        at coldfusion.util.LruCache.get(LruCache.java:180)

        at coldfusion.runtime.TemplateClassLoader$TemplateCache.fetchSerial(TemplateClassLoader.java:404)

        at coldfusion.util.AbstractCache.fetch(AbstractCache.java:58)

        at coldfusion.util.SoftCache.get_statsOff(SoftCache.java:142)

        at coldfusion.util.SoftCache.get(SoftCache.java:81)

        at coldfusion.runtime.TemplateClassLoader.findClass(TemplateClassLoader.java:672)

        at coldfusion.runtime.RuntimeServiceImpl.getFile(RuntimeServiceImpl.java:1133)

        at coldfusion.runtime.RuntimeServiceImpl.resolveTemplatePath(RuntimeServiceImpl.java:1085)

        at coldfusion.runtime.TemplateProxyFactory.getResolvedFile(TemplateProxyFactory.java:1378)

        at coldfusion.runtime.TemplateProxyFactory.getTemplateFileHelper(TemplateProxyFactory.java:1707)

        at coldfusion.runtime.MetadataUtils.getComponentMetadata(MetadataUtils.java:134)

        at coldfusion.runtime.CfJspPage.GetComponentMetadata(CfJspPage.java:4027)

        at cfioc2ecfc552488372$funcCLEANMETADATA.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:262)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

        at cfioc2ecfc552488372$funcDISCOVERBEANSINFOLDER.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:400)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

        at cfioc2ecfc552488372$funcDISCOVERBEANS.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:364)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3928)

        at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:3908)

        at cfioc2ecfc552488372$funcADDBEAN.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:57)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:818)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:601)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:426)

        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3380)

        at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:3357)

        at cfonApplicationStart_include2ecfm477791692._factor3(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:179)

        at cfonApplicationStart_include2ecfm477791692._factor15(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:161)

        at cfonApplicationStart_include2ecfm477791692._factor26(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:102)

        at cfonApplicationStart_include2ecfm477791692.runPage(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:1)

        at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:262)

        at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:729)

        at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:565)

        at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:4082)

        at cfonApplicationStart_method2ecfm2023514382$funcONAPPLICATIONSTART.runFunction(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_method.cfm:51)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:553)

        at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)

        at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:484)

        at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:447)

        at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:398)

        at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:371)

        at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:287)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:818)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:601)

        at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:426)

        at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:115)

        at coldfusion.runtime.AppEventInvoker.onApplicationStart(AppEventInvoker.java:238)

        at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:418)

        at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:43)

        at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

        at coldfusion.filter.PathFilter.invoke(PathFilter.java:162)

        at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)

        at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:96)

        at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)

        at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

        at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:60)

        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.CfmServlet.service(CfmServlet.java:226)

        at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:311)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:46)

        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)

        at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:47)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:491)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)

        at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:422)

        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)

        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:764)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1388)

        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.base/java.lang.Thread.run(Thread.java:834)

 

Column: 0
ID: CF_METADATAUTILS
Line: 262
Raw Trace: at cfioc2ecfc552488372$funcCLEANMETADATA.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:262)
Template: C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc
Type: CFML

Column: 0
ID: CF_UDFMETHOD
Line: 400
Raw Trace: at cfioc2ecfc552488372$funcDISCOVERBEANSINFOLDER.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:400)
Template: C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc
Type: CFML

Column: 0
ID: CF_UDFMETHOD
Line: 364
Raw Trace: at cfioc2ecfc552488372$funcDISCOVERBEANS.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:364)
Template: C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc
Type: CFML

Column: 0
ID: CF_UDFMETHOD
Line: 57
Raw Trace: at cfioc2ecfc552488372$funcADDBEAN.runFunction(C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc:57)
Template: C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc
Type: CFML

Column: 0
ID: CF_TEMPLATEPROXY
Line: 179
Raw Trace: at cfonApplicationStart_include2ecfm477791692._factor3(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:179)
Template: C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm
Type: CFML

Column: 0
ID: CF_ONAPPLICATIONSTART_INCLUDE
Line: 161
Raw Trace: at cfonApplicationStart_include2ecfm477791692._factor15(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:161)
Template: C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm
Type: CFML

Column: 0
ID: CF_ONAPPLICATIONSTART_INCLUDE
Line: 102
Raw Trace: at cfonApplicationStart_include2ecfm477791692._factor26(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:102)
Template: C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm
Type: CFML

Column: 0
ID: CF_ONAPPLICATIONSTART_INCLUDE
Line: 1
Raw Trace: at cfonApplicationStart_include2ecfm477791692.runPage(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm:1)
Template: C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_include.cfm
Type: CFML

Column: 0
ID: CFINCLUDE
Line: 51
Raw Trace: at cfonApplicationStart_method2ecfm2023514382$funcONAPPLICATIONSTART.runFunction(C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_method.cfm:51)
Template: C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_method.cfm
Type: CFML

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

That dump of details shows the code is at line 26 of C:\inetpub\clients\WEBSITE2021\requirements\mura\bean\ioc.cfc.

 

That's in the Mura cms framework, which your app uses. That's called ultimately from line 51 of your C:\inetpub\clients\WEBSITE2021\config\appcfc\onApplicationStart_method.cfm. 

 

I suspect you are using an older version of mura, and a later one fixed the problem. Check out https://www.murasoftware.com/ for help on that. 


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

BTW, Sheryl, if you may have set things up so that you were emailed the first reply I sent here, please see my significant revision to it here.

 

I just went ahead and edited it here, to help future readers, since my revision is quite different from my first version.  Again, I am only writing this note here in case you DO have your profile here configured so that you can get emails on replies to threads you start. If you do not, then just proceed to my other answer here. 🙂


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Apr 24, 2021 Apr 24, 2021

Copy link to clipboard

Copied

LATEST

To solve this, there are 2 things you have to consider:

  1. there have been changes in CFML between ColdFusion 11 and ColdFusion 2018;
  2. there have been changes in Mura to keep pace with the changes in CFML.

 

Though CFML is a weakly-typed language, it has been made increasingly stricter, and less weakly-typed, in recent ColdFusion versions. Therefore, some uses of type that work in ColdFusion 11 might fail in ColdFusion 2018. 

 

As the language CFML evolves, so too do applications built on it, like Mura. Mura would certainly have adapted to exploit the new functionalities in CFML.

 

Consider this error a warning shot. I would bet 99:1 that there will be others. That is, if you import the (application code + Mura code) as-is from ColdFusion 11 to ColdFusion 2018.

 

For example, have a look at the fields within the init() of /mura/bean/ioc.cfc in Mura 7.1. They are declared in private, variables scope. This contrasts with the cfproperty declaration of your Mura version.

 

My suggestion is therefore that you should consider your upgrade a two-pronged project:

  1. Upgrade ColdFusion from version 11 to version 2018 (preferably 2021)
  2. Upgrade Mura to the latest version compatible with ColdFusion 2018 (or ColdFusion 2021). As you can see in the picture below, the statistics suggest the latest version of Mura 7.x (picture reference: https://w3techs.com/technologies/history_details/cm-muracms )

BKBK_0-1619266997349.png

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines