Contentbox 6.0.0 first time setup - error cfmigrations already exists

Errors while installing contentbox 6.0.0 using commandbox 6.0.0 See attached image.

Coldfusion 2023, 2021, and 2016 are installed locally. Current 2023 is active. However, setup either did not recognize or does not currently accept 2023 so 2021 was selected. The error appears to be a problem with the database script.

Microsoft SQL Server 2022 (developers edition) is installed locally, instance set to localhost. Had profiler running in background to capture commands sent to database. Logs show that cfmigrations already existed and the script tried to create it twice. Env file shows correct username and password for database user.

Tried to pick up after the error twice after removing tables cfmigrations and cfmigrations_app (both installed from script), but same error occured.

Few questions.

  1. Can CF 2023 be made part of the acceptable server versions (although 2021 seems to be ok).
  2. Does the setup script for SQL exist as a standalone script somewhere in the install?
  3. Is it necessary to keep the SQL user id and password as plaintext in the .env file?
  4. Once the script is corrected, will the contextbox setup pick up and complete the install?



@jrat65 I see the issue now.

I have updated the CLI with the following:

### Added

- Adobe 2023 Support
- Lucee 6 Support
- Dropped Adobe 2016 since this was deprecated already
- ContentBox 6 default version

### Updates

- Updated Database Drivers for: MySQL, MSSQL, Hypersonic

### Fixed

- ContentBox 6 was not the default and migrations was not running correctly

I believe this will fix your issues. I would suggest you upgrade the cli: update contentbox-cli --force

Wipe your db and files installed and let’s try again.

@lmajano removed the cfmigrations and cfmigrations_app tables and tried your fix: and got the following:

Decided to start over

No problems with the “update --system” system command.

Started the install all over again after removing the mysite directory. Used all the same choices as before and got a different error message this time.

Tried this twice, but it was using my original commandbox, never shut it down. And I never selected anything that had to do with Lucee, not sure if it thinks I have some lucee components installed. Will try it with a new command box and everything removed again. Any advice?

@lmajano deleted mySite again, re-started the command prompt. Re-ran installation and got the same message as above about the OSGi package being missing locally.

@lmajano One more item, in reference to the missing file, the following is only mssql jar file available in the specified directory:

mssqljdbc4-4-0-2206-100.jar - is that the version the app is looking for?

@jrat65 The MSSQL JDBC driver version which Lucee is looking for is clearly denoted in the error message: 12.4.2.jre11. I would remove that version string from your datasource definition and/or extension requirements, wherever those are set. Check your server.json, cfconfig.json, box.json and Application.cfc for that version string.

Thanks @MichaelBorn, I included that for @lmajano for troubleshooting purposes. This is only my third time installing contentbox. Also this is a coldfusion 2023 install, so it shouldn’t be looking for lucee drivers, unless coldfusion and lucee use the same drivers, but like the initial message mentioned, the first install worked as far as connecting to the database and the intial creation of two tables. @lmajano updated the drivers for mssql and also added cf2023 support so I was assuming the issue might be there. I made sure I didn’t select anything resembling lucee when going through this last several times. I’ll check where you referenced though just to make further acquaint myself with the process.

Cool, @jrat65 , looks like you’re on the right track. Be aware, though, that any migrations run from the CLI (i.e. via migrate create, migrate up, etc.) as well as any scripts run from the CLI will run on the CommandBox server, which is a Lucee server. Hence the extension installation issue is regarding a Lucee extension/OSGI bundle, not an ACF module installation issue.

Thanks again @MichaelBorn, I was not aware of that! So it spins up a lucee engine in order to run all of commandbox scripting or only certain functions like connecting to and scripting sql commands? I think I may need to read up a little more about commandbox. Also how does forgebox figure into this? I see most of the package installs reference forgebox and commandbox.

Yes, CommandBox itself runs on a lightweight Lucee instance, and every single command is a CFML component.

There’s a bit more info here:

Forgebox is the package host; i.e. where CommandBox downloads dependencies from, INCLUDING the CF engine of choice. So even Adobe ColdFusion Server is “just” another Forgebox package, though obviously it’s handled a bit differently than a ColdBox module for example.

@MichaelBorn I’ll have to check that out!

Thanks again @MichaelBorn, it appears that the original .env that was created from the install choices created the following two lines:


whereas the second .env that wouldn’t connect was set to the following:


Running these two:

migrate install
run-script contentbox:migrate

Then allowed the script to connect and create:


but received the same error again:

ERROR (6.0.0+00787)
There is already an object named ‘cfmigrations’ in the database.

@lmajano ok, so I’m back to the same error that I had originally, but I understand a little more about the interaction between the commandbox, lucee and the contentbox install. I think I must be missing a few steps that probably occur after the creation of the migrations tables (cfmigrations and cfmigrations_app), specifically the creation of the cb_author table. I’ve configured the site for IIS and was attempting to run the web-install process when I got the following:

Table cb_author defined for cfc does not exist.

Which would probably explain why I’m getting the 401 error when I first tried to hit the site without specifying index.cfm. I’m assuming that something in application.cfc is what may be triggering the error with the anonymous authentication on the iis site.

@jrat65 perhaps the docs are out of date; what if you clear the DB once again and run the contentbox migration command but skip the migrate install command?

  1. Wipe the DB
  2. Run run-script contentbox:migrate
  3. Restart the server via box server restart
  4. Report back

@MichaelBorn, I tried that before based off a reply from a similar contentbox post, but tried again anyway. Similar problem, but only the dbo.cfmigrations table was created this time. Also, the table only has two columns - name and migration_ran, with no records in the table.

Do you know if there’s just a tsql script anywhere I can run through management studio to see if I can start the web install?

Also, not sure which server should be present (if any) at that point, but when I do a server list I only see a another coldbox app I have installed. It’s what I used to test the iis setup for contentbox.

@MichaelBorn I just noticed two updates while running system --update.They are:


Let me update those and rerun.

@MichaelBorn, unfortunately…same problem. I wiped the database, then run-script contentbox:migrate and received the same error. Only one table created dbo.cfmigrations two columns and no records returned with select. Wiped again just to be sure it wasn’t missing something from the first install so I then did

migrate install
run-script contentbox:migrate

Same error, but two tables again. dbo.cfmigrations and dbo.cfmigrations_app

What is the contents of your .cfmigrations.json file. You might consider changing the "migrationsTable": "cfmigrations" in that file to something other than cfmigrations and see if that works. If you used migrate on that other site, there could be a conflict with the migration table.

– Laurence

Thanks @lhoess! It’s a new site pretty much each time I’ve run it, but good idea. I’ll you know!