Hi everyone I am feeling a bit stupid. :white_fr...
# cfml-general
c
Hi everyone I am feeling a bit stupid. ☹️ I am using CommandBox and am using ColdBox v6.2.2+1396 Stupidly I did:
Copy code
box install commandbox-cfconfig
When I think the correct version was already installed. Essentially, I think I overwrote the correct module.
Now I am getting an error when I try and run the website:
Copy code
CommandBox> recipe lucee.boxr
cd C:\domains\<http://lucee.com|lucee.com>\wwwroot
C:\domains\<http://lucee.com|lucee.com>\wwwroot\
server set web.http.port=8080
Set web.http.port = 8080
server show web.http.port
8080
server start cfengine=lucee@5.3.9+166
Error executing command [server start cfengine=lucee@5.3.9+166], exiting recipe.
   |------------------------------
× | Starting Server
   |------------------------------
   | Adding host 'lucee.local' to your hosts file!
   | Can't write to hosts file. Did you remember to start CommandBox with admin privileges?
   | WAR/zip archive already installed.
   |------------------------------
   | √ | Setting Server Profile to [development]
   | × | Loading CFConfig into server
   |   | > key [MULTICONTEXT] doesn't exist
   |   |-------------------------------------------
   |   | Config transferred from C:\domains\<http://lucee.com|lucee.com>\wwwroot\.cfconfig.json!
   |   |-------------------------------------------
 
ERROR (5.2.1+00295)
 
key [MULTICONTEXT] doesn't exist
 
 
\modules\commandbox-cfconfig\models\Util.cfc: line 70
68:
69:                             // Crappy workaround for CommandBox bug where this logic is being done on the fly, but not saved back into the serverInfo struct!
70:                             if( serverInfo.multiContext && not serverInfo.webConfigDir contains '{web-root-directory}' && not serverInfo.webConfigDir contains '{web-context-hash}'  ) {
71:                                     serverInfo.webConfigDir &= '-{web-context-hash}'
72:                             }
called from \modules\commandbox-cfconfig\interceptors\ConfigLoader.cfc: line 398
called from \system\wirebox\system\core\events\EventPool.cfc: line 118
called from \system\wirebox\system\core\events\EventPool.cfc: line 96
called from \system\wirebox\system\core\events\EventPoolManager.cfc: line 59
called from \system\services\InterceptorService.cfc: line 57
called from \system\services\ServerService.cfc: line 1015
called from \system\modules_app\server-commands\commands\server\start.cfc: line 173
called from \system\services\CommandService.cfc: line 345
called from \system\services\CommandService.cfc: line 139
called from \system\Shell.cfc: line 773
called from \system\BaseCommand.cfc: line 132
called from \system\modules_app\system-commands\commands\recipe.cfc: line 117
called from \system\services\CommandService.cfc: line 345
called from \system\services\CommandService.cfc: line 139
called from \system\Shell.cfc: line 773
called from \system\Shell.cfc: line 593
called from \system\Bootstrap.cfm: line 154
 
To enable full stack trace, run config set verboseErrors=true
Does anyone know the correct version of:
Copy code
commandbox-cfconfig
For:
Copy code
ColdBox V6.2.2+1396
p
Can you please share your
.cfconfig.json
?
basically I need the keys available on it
You can remove the confidential info if any..
c
Copy code
"requestTimeoutEnabled":true,

    "whitespaceManagement":"white-space-pref",

	"requestTimeout":"0,0,5,0",

	"cacheDefaultObject":"coldbox",

    "caches":{

        "coldbox":{

            "storage":"true",

            "type":"RAM",

            "custom":{

                "timeToIdleSeconds":"1800",

                "timeToLiveSeconds":"3600"

            },

            "class":"lucee.runtime.cache.ram.RamCache",

            "readOnly":"false"

        }

    },

	"datasources" : {

		 "${DB_DATABASE}":{

			 "host":"${DB_HOST}",

			 "dbdriver":"${DB_DRIVER}",

			 "database":"${DB_DATABASE}",

			 "dsn":"jdbc:mysql://{host}:{port}/{database}",

			 "custom":"useUnicode=true&characterEncoding=UTF-8&useLegacyDatetimeCode=true&autoReconnect=true",

			 "port":"${DB_PORT}",

			 "class":"${DB_CLASS}",

			 "username":"${DB_USER}",

			 "password":"${DB_PASSWORD}",

			 "connectionLimit":"100",

			 "connectionTimeout":"1"

		 }

	}

}
To be honest. Everything worked well until I did:
Copy code
box install commandbox-cfconfig
So, I think I overwrote the correct version of the
commandbox-cfconfig
module?
p
Seems like a version conflict between commandbox & cfconfig module as per @bdw429s’s comment here..
👍 1
c
Yes. I saw this, but I didn’t know how to add environment variables. Do I just create a file called
env
in the Coldbox website route and then add the following:
Copy code
BOX_INSTALL= false
Yes 100%
p
You need not worry about the env variable as it looks like a docker specific thing..
Probable you can upgrade commandbox / cfconfig.. That should work..
c
I would rather get the correct commandbox-cfconfig module but I have no idea what version to get?
The most recent version has caused the error. I guess this only person who would know is Brad Wood?
box install commandbox-cfconfig@[VERSION]
p
Yes, You could get more info about this in the other channel
box-products
b
@Charles Robertson Quite the opposite really-- the latest version of CFConfig has the fix for this. If you're getting that error, you must be on an older version.
I'm confused though since
Copy code
install commandbox-cfconfig
should install the latest version
The version of ColdBox MVC literally has nothing whatsoever to do with this so there's no need to bring it up.
Please confirm your version of the CFConfig module with
Copy code
list --system
Also, your version of CommandBox is dated. You're on 5.2.1 and the latest is 5.6.0. You wouldn't have gotten the error in the first place if CommandBox were up to date
Which was tagged in version
v1.10.31
c
Hi Brad Thank you for helping me! Here is the info:
Copy code
CommandBox> cd "C:\Users\Charles Robertson\.CommandBox\cfml\modules\commandbox-cfconfig"
C:\Users\Charles Robertson\.CommandBox\cfml\modules\commandbox-cfconfig\
CommandBox:commandbox-cfconfig> list --system
Dependency Hierarchy for  (1.0.0)
├─┬ commandbox-cfconfig (1.10.3)
│ └─┬ cfconfig-services (1.18.4)
│   ├── lucee-password-util (1.0.3)
│   ├── coldbox ()
│   ├── testbox ()
│   ├─┬ JSONPrettyPrint (1.4.1)
│   │ ├── coldbox ()
│   │ └── testbox ()
│   ├─┬ adobe-password-util (1.0.8)
│   │ └── propertyFile (1.3.2)
│   ├─┬ semver (1.2.6)
│   │ └── testbox ()
│   └── propertyFile (1.3.2)
└── commandbox-hostupdater (1.8.0)
I am happy to update CommandBox. What is the command for this?
b
It looks like you have the latest CFConfg module, however you may need to reload CommandBox to pick up the new module (this is not an issue on the latest CommandBox)
To update CommandBox, this depends on your operating system and how yo installed it, but on Windows for example just download the latest
box.exe
and replace it. It will upgrade on first run.
c
Could I do:
Copy code
upgrade —latest
Or is that not as good as your suggestion? I know your going to give me hell for this question 😳
r
You can try that. I will probably give you a link to the site to download it.
🙌 1
b
Well, two reasons • latest will give you the bleeding edge version which isn't necessarily what you want • Since the underlying jars have changed, the upgrade command won't work anyway, it will just tell you to download the new binary! 🙂
🙏 1
On a related note, I am happy to announce I completed this last night! https://twitter.com/bdw429s/status/1590361157264707585
🎉 3
🙂 1
That will help in the future and will make the
upgrade
command much more useful
👍 1
c
I have just updated CommandBox to the latest version v5.6.1 Everything works perfectly now. I had to remove the
.CommandBox
folder, before I ran the latest
box.exe
file for the first time. Thanks for all you help. Much appreciated...🙏
🙏 1