[commandbox-1.0.1+00051] variable [USERPOSITIONALPARAMS] doesn't exist

Following running an upgrade --latest command the prompt indicated that I had an update available and I hit enter then immediately following the update it throws the following error referencing userPositionalParams not existing. From what I can see the code in the CommandService.cfc properly checks for length of array, before deciding to call the convertToNamedParameters() method.

Not sure if others have run into this issue or if I was just too far behind that the update process didn’t work properly and I just need to blow away my .CommandBox folder to start fresh.

Thanks. Let me know your thoughts and if it looks like a code issue I can see if I can submit a pull request.

From CommandBox.log file:

`

“Severity”,“Appender”,“Date”,“Time”,“Category”,“Message”
“ERROR”,“FILEAPPENDER”,“03/26/2015”,“12:04:09”,“commandbox.system.Shell”,“variable [USERPOSITIONALPARAMS] doesn’t exist ExtraInfo:variable [USERPOSITIONALPARAMS] doesn’t exist
at railo.runtime.type.scope.UndefinedImpl.get(UndefinedImpl.java:208):208
at system.services.commandservice_cfc$cf.udfCall2(E:\Users\tim.CommandBox\cfml\system\services\CommandService.cfc:603):603
at system.services.commandservice_cfc$cf.udfCall(E:\Users\tim.CommandBox\cfml\system\services\CommandService.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93
at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307
at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:748):748
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547
at system.services.commandservice_cfc$cf.udfCall1(E:\Users\tim.CommandBox\cfml\system\services\CommandService.cfc:203):203
at system.services.commandservice_cfc$cf.udfCall(E:\Users\tim.CommandBox\cfml\system\services\CommandService.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93
at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307
at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208
at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547
at system.shell_cfc$cf.udfCall2(E:\Users\tim.CommandBox\cfml\system\Shell.cfc:401):401
at system.shell_cfc$cf.udfCall(E:\Users\tim.CommandBox\cfml\system\Shell.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93
at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307
at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208
at railo.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:748):748
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547
at system.shell_cfc$cf.udfCall2(E:\Users\tim.CommandBox\cfml\system\Shell.cfc:375):375
at system.shell_cfc$cf.udfCall(E:\Users\tim.CommandBox\cfml\system\Shell.cfc):-1
at railo.runtime.type.UDFImpl.implementation(UDFImpl.java:93):93
at railo.runtime.type.UDFImpl._call(UDFImpl.java:307):307
at railo.runtime.type.UDFImpl.call(UDFImpl.java:208):208
at railo.runtime.ComponentImpl._call(ComponentImpl.java:623):623
at railo.runtime.ComponentImpl._call(ComponentImpl.java:506):506
at railo.runtime.ComponentImpl.call(ComponentImpl.java:1738):1738
at railo.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:724):724
at railo.runtime.PageContextImpl.getFunction(PageContextImpl.java:1547):1547
at users.tim._commandbox46.cfml.system.bootstrap_cfm$cf.call(E:\Users\tim.CommandBox\cfml\system\Bootstrap.cfm:52):52
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:909):909
at railo.runtime.PageContextImpl.doInclude(PageContextImpl.java:861):861
at railo.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:206):206
at railo.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:18):18
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2212):2212
at railo.runtime.PageContextImpl.execute(PageContextImpl.java:2179):2179
at railo.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:331):331
at railo.runtime.engine.CFMLEngineImpl.cli(CFMLEngineImpl.java:632):632
at railo.loader.engine.CFMLEngineWrapper.cli(CFMLEngineWrapper.java:249):249
at railocli.CLIMain.run(CLIMain.java:63):63
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method):-2
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source):-1
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source):-1
at java.lang.reflect.Method.invoke(Unknown Source):-1
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:326):326
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:264):264”

`

Thanks!

~Tim

That’s interesting. Do you continue to get the error if you close and re-run CommandBox, or is it just a one-time thing after upgrading?

Does it change anything if you modify line 603 to read:

for( var param in **arguments.**userPositionalParams ) {

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Hi Brad,

Message went away by “x’ing” out of the command prompt. It would throw that error on any command like help or even exit previously.

When relaunching the shell via box it gave me the following message:

`

E:\Users\tim\sites\messaging-polyglot>box
Current version and installed versions do not match!
*current: 1.0.0+00018
installed: 1.0.1+00051

*updating installed CFML

`

Looks like it failed during the update process. I guess all is well, but thought it was an interesting behavior that might be worth noting as part of the upgrade process. Especially on this box that was quite a few builds behind it appears.

Thanks!
Tim

Ok, I was able to duplicate this error by installing our 1.0 Final release on a clean machine and then running “upgrade --latest”.

There are actually two separate bugs happening.

The first is is that we’re confusing Railo by switching out files from underneath it while it’s in the middle of executing them. You can see in the stack trace that the lines being executed are off. I think Railo is jumping to the wrong lines in the CommandService.cfc since it has the file cached but when it reads it from the disk it gets something else. The only fix for this might be to just immediately abort and exit the shell so the user has to re-open it. The upgrade command attempts to reload the shell, but by then it’s apparently too late to do anything.

The second bug is that the Java loader code doesn’t actually parse the version number to see if the CFML version in the exe is NEWER than what’s unpacked on disk. It just does a simple == check and if they’re different, it re-extracts the CFML that came originally in the .exe over what’s in your user directory. So what it’s actually doing is DOWNGRADING your installation back to build 18. This obviously works if you download a binary that’s newer than what’s installed, but not the other way around.

Thanks for helping us test the upgrade command. It was difficult to test when we finished writing it since we didn’t have any actual later versions to fully test with. I tried to create these scenarios, but obviously nothing works like actually having the pieces in place.

I’ll put in some tickets to address this. In the mean time, if you want to use the latest build, just wipe out your .CommandBox folder and download the BE build from our integration server:
http://integration.stg.ortussolutions.com/artifacts/ortussolutions/commandbox/1.0.1/

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

https://ortussolutions.atlassian.net/browse/COMMANDBOX-207
https://ortussolutions.atlassian.net/browse/COMMANDBOX-208

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com