[closed] cf10 errors during install on: <cfif NOT StructIsEmpty(stInfo)>

have any idea why FarCry would encounter exception:

12:37:41.041 - java.lang.UnsupportedOperationException - in C:/ColdFusion10/cfusion/wwwroot/farcry/core/webtop/install/index.cfm : line 1175 

where it’s doing a: <cfif NOT StructIsEmpty(stInfo)>

I think some code in your message got truncated. You can use 3 back-quotes (the one on the tilde key) to wrap your code and the forum will format it nicely.

Is this install using the latest 7.1.1 download?

yes, 7.1, but I’m re-installing CF10 because I’m going to iis instead of the tomcat localhost… I’ll report back after I do that…

the error message claims that StructIsEmpty() is the problem, but it’s probably happening because stInfo isn’t defined…

Thanks !

Ok cool. Make sure its 7.1.1 and not 7.1.0, I think there was a bug fix for this issue with CF9/10 :slight_smile:


sI: about to establish extension connection for WIDGET_CONTENT_MESSAGE - url: http://localhost/farcry/core/webtop/install/
scriptInjector.js:191 

sI: adding WIDGET_CONTENT_MESSAGE message listener
reservespaceifenabled.js:5 

rsie: reserveSpace
reservespaceifenabled.js:7 

rsie: getToolbarData
reservespaceifenabled.js:66 

rsie: leaving js
reservespaceifenabled.js:15 

rsie: getToolbarDataCallback(Arguments[1])
reservespaceifenabled.js:25 

rsie: window.toolbarData: Object
reservespaceifenabled.js:26 

rsie: window.Content: undefined
reservespaceifenabled.js:35 rsie: getToolbarDataCallback - done
contentScript.js:42 

cS: logger: Array[1] : undefined
contentScript.js:42 

cS: logger: Array[1] : undefined
contentScript.js:42 cS: logger: Array[1] : document ready
contentScript.js:42 

cS: logger: Array[1] : running callback
contentScript.js:42 

cS: logger: Array[1] : undefined
contentScript.js:42 

cS: logger: Array[1] : firing tab complete
contentScript.js:80 cS: sending TAB_COMPLETE
contentScript.js:234 

cs: onRequestListener(Arguments[3])
contentScript.js:234 cs: onRequestListener(Arguments[3]) 

It's impossible for me to even guess where these calls are in c:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm ```
looks like it got stuck running this listener, shown below

cS: sending TAB_COMPLETE
contentScript.js:234 

cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])
contentScript.js:234 
cs: onRequestListener(Arguments[3])

Those JavaScript errors in the console aren’t from FarCry, the installer doesn’t really use any JavaScript, so perhaps its from an extension in your browser or something.

Can you check the ColdFusion application.log and exception.log files?

Can you also confirm that you are using the installer in the latest 7.1.1 download from www.farcrycore.org ? The installer in 7.1.0 may have had a bug that was fixed in 7.1.1.

FarCry Download: FarCry 7.1.1 CMS Community Distro

The error occurred in C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 1175
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 808
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 42
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 1
1173 : 	</cftry>
1174 : 
1175 : 	**<cfif NOT structIsEmpty(stInfo)>**
1176 : 		<cfswitch expression="#stInfo.database_productname#">
1177 : 			<cfcase value="MySQL">

**Same problem I had with CF10**

Exceptions
14:24:51.051 - java.lang.UnsupportedOperationException - in C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm : line 1175
Scope Variables
CGI Variables:
CF_TEMPLATE_PATH=C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm
CONTENT_LENGTH=44
CONTENT_TYPE=application/x-www-form-urlencoded
CONTEXT_PATH=
GATEWAY_INTERFACE=CGI/1.1
HTTPS=off
HTTP_ACCEPT=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_ACCEPT_LANGUAGE=en-US,en;q=0.8
HTTP_CONNECTION=keep-alive
HTTP_COOKIE=SESSIONSCOPETESTED=true; HASSESSIONSCOPE=true; CFAUTHORIZATION_cfadmin="YWRtaW4NY2ZhZG1pbg0xNDM5MzE1OTc1OTMxDTBFQTY1QTFCRUQ3RDkxQjI="; CFID=201; CFTOKEN=2a6128b9745d532e-2B2CB5F1-9237-E2AA-97683CD06FAE75B5; CFADMIN_LASTPAGE_ADMIN=%2FCFIDE%2Fadministrator%2Fdatasources%2Findex%2Ecfm; JSESSIONID=EE62DEB81C3826D18AB59A7E5BE94F07.cfusion
HTTP_HOST=localhost
HTTP_REFERER=http://localhost/farcry/core/webtop/install/
HTTP_USER_AGENT=Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.130 Safari/537.36
PATH_INFO=/farcry/core/webtop/install/index.cfm
PATH_TRANSLATED=C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm
QUERY_STRING=
REMOTE_ADDR=127.0.0.1
REMOTE_HOST=127.0.0.1
REMOTE_USER=
REQUEST_METHOD=POST
SCRIPT_NAME=/farcry/core/webtop/install/index.cfm
SERVER_NAME=localhost
SERVER_PORT=80
SERVER_PORT_SECURE=0
SERVER_PROTOCOL=HTTP/1.1
SERVER_SOFTWARE=Microsoft-IIS/7.5
WEB_SERVER_API=
Cookie Variables:
CFADMIN_LASTPAGE_ADMIN=/CFIDE/administrator/datasources/index.cfm
CFAUTHORIZATION_cfadmin=YWRtaW4NY2ZhZG1pbg0xNDM5MzE1OTc1OTMxDTBFQTY1QTFCRUQ3RDkxQjI=
CFID=201
CFTOKEN=2a6128b9745d532e-2B2CB5F1-9237-E2AA-97683CD06FAE75B5
HASSESSIONSCOPE=true
JSESSIONID=EE62DEB81C3826D18AB59A7E5BE94F07.cfusion
SESSIONSCOPETESTED=true
Form Fields:
FIELDNAMES=SELECTEDSKELETON,INSTALLACTION
INSTALLACTION=setup
SELECTEDSKELETON=chelsea
Debug Rendering Time: 73 ms

Referrer  	http://localhost/farcry/core/webtop/install/
Date/Time  	11-Aug-15 02:24 PM
Stack Trace
at cfindex2ecfm40377296$funcDETECTDBTYPE.runFunction(C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm:1175) at cfindex2ecfm40377296$funcGETCONSTRUCTORSETTINGS.runFunction(C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm:808) at cfindex2ecfm40377296._factor3(C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm:42) at cfindex2ecfm40377296.runPage(C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm:1) 

java.lang.UnsupportedOperationException
	at coldfusion.runtime.QueryVector.getNames(QueryVector.java:109)
	at coldfusion.runtime.Scope.isEmpty(Scope.java:122)
	at coldfusion.runtime.Struct.StructIsEmpty(Struct.java:656)
	at coldfusion.runtime.CFPage.StructIsEmpty(CFPage.java:4598)
	at cfindex2ecfm40377296$funcDETECTDBTYPE.runFunction(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:1175)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
	at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2840)
	at cfindex2ecfm40377296$funcGETCONSTRUCTORSETTINGS.runFunction(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:808)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487)
	at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420)
	at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383)
	at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95)
	at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334)
	at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231)
	at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2840)
	at cfindex2ecfm40377296._factor3(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:42)
	at cfindex2ecfm40377296.runPage(C:\inetpub\wwwroot\farcry\core\webtop\install\index.cfm:1)
	at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:246)
	at coldfusion.tagext.lang.IncludeTag.handlePageInvoke(IncludeTag.java:736)
	at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:572)
	at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
	at coldfusion.filter.IpFilter.invoke(IpFilter.java:45)
	at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:466)
	at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42)
	at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
	at coldfusion.filter.PathFilter.invoke(PathFilter.java:142)
	at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94)
	at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78)
	at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28)
	at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
	at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58)
	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:151)
	at coldfusion.CfmServlet.service(CfmServlet.java:219)
	at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at coldfusion.inspect.weinre.MobileDeviceDomInspectionFilter.doFilter(MobileDeviceDomInspectionFilter.java:121)
	at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422)
	at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)  ```
 
The error occurred in C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 1175
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 808
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 42
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 1
1173 : 	</cftry>
1174 : 
1175 : 	**<cfif NOT structIsEmpty(stInfo)>**
1176 : 		<cfswitch expression="#stInfo.database_productname#">
1177 : 			<cfcase value="MySQL">  ````
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 808
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 42
Called from C:/inetpub/wwwroot/farcry/core/webtop/install/index.cfm: line 1
1173 : 	/cftry
1174 : 
1175 : 	cfif NOT structIsEmpty(stInfo)
1176 : 		cfswitch expression="#stInfo.database_productname#"
1177 : 			cfcase value="MySQL"```

So the problem is a bona fide error caused by the inability of StructIsEmpty (in CF10 and CF11) to act upon a query structure instead of a normal structure and determine if it’s empty…

so line 1175 below:

1173 : /cftry
1174 :
1175 : cfif NOT structIsEmpty(stInfo)
1176 : cfswitch expression="#stInfo.database_productname#"
1177 : cfcase value=“MySQL”

needs to become:

1175 : cfif isDefined(“stInfo.recordcount”) and stInfo.recordcount
1176 : cfswitch expression="#stInfo.database_productname#"

You’re right, it’s actually a query. I’ve committed a fix for it to the p710 branch, thanks :smile: