Contentbox 6.0.0 first time setup - error cfmigrations already exists

@lhoess .cfmigrations.json contains the following:

{
    "contentbox": {
        "manager": "cfmigrations.models.QBMigrationManager",
        "migrationsDirectory": "modules/contentbox/migrations/",
		"seedsDirectory": "tests/resources/seeds/",
        "properties": {
            "defaultGrammar": "AutoDiscover@qb",
			"schema" : "${DB_DATABASE}",
            "migrationsTable": "cfmigrations1",
            "connectionInfo": {
				"connectionString": "${DB_CONNECTIONSTRING}",
                "class": "${DB_CLASS}",
                "username": "${DB_USER}",
                "password": "${DB_PASSWORD}",
                "bundleName": "${DB_BUNDLENAME}",
                "bundleVersion": "${DB_BUNDLEVERSION}"
            }
        }
    },
	"default": {
        "manager": "cfmigrations.models.QBMigrationManager",
        "migrationsDirectory": "resources/database/migrations/",
		"seedsDirectory": "resources/database/seeds/",
        "properties": {
            "defaultGrammar": "AutoDiscover@qb",
			"schema" : "${DB_DATABASE}",
            "migrationsTable": "cfmigrations_app",
            "connectionInfo": {
				"connectionString": "${DB_CONNECTIONSTRING}",
                "class": "${DB_CLASS}",
                "username": "${DB_USER}",
                "password": "${DB_PASSWORD}",
                "bundleName": "${DB_BUNDLENAME}",
                "bundleVersion": "${DB_BUNDLEVERSION}"
            }
        }
    }
}

I changed the table by appending a 1 to it, and I now get the message for the new table name. So whatever is processing that script is performing it twice. I check schemabuilder.cfc a little more closely now. Thanks!

@lmajano , just curious, I’m assuming there is an additional script that creates a few tables and probably populates a few records prior to the web installation taking over to open the admin tool. Do you know if that’s available on the Git site? Folder and name?

Hi @jrat65

That’s why you need to run the migrations. The entire database is source-controlled via migrations. If you can’t run the migrations via CommandBox, we have a big problem because this is the official way to do installations and upgrades. If this doesn’t work, a future path cannot be guaranteed.

There are two managers in the .cfmigrations.json one for your custom app and one for ContentBox. You can see that in there and you can see that in the box.json there is the script

"contentbox:migrate":"migrate up manager=contentbox",

That tells cfmigrations to use the contentbox manager to connect to your database and execute the migrations.

@lmajano Tried all of your suggestions from scratch again. Same exact error as the first time. Downloaded MySQL and installed the the server, created everything the same on MySQL as I did with MSSQL and ran everything again, and got to the web installer portion this time, which I never did before. So positive forward progress!

I’d suggest reviewing the script for Microsoft SQL Server and make sure there isn’t anything that’s being implemented (default constraints, foreign keys, table options) differently in SQL server than MySQL. Something is causing it to think that the cfmigrations table already exists. Thanks for the assistance though!

Ok, had a chance to jump back into this again after the database finally installed properly. The next thing appears to be an application launch issue? To review, I am not using lucee. My machine already has coldfusion 2023 (update 7) installed in c:\coldfusion2023 and I have two other development sites. One of our small business apps and one hosting an Adobe Summit application that I’m testing with the adobe coldfusion builder extension for vscode on. Both of those sites are functioning with wsconfig and iis. These apps also appear in separate subdirectories outside of the coldfusion2023/cfusion/wwwroot path and are both bound to the their IP address through the hosts file. I applied the same process to mysite (the contentbox location) and configured that site the same as the other two, giving it a domain through hosts file (mysite-local.ustrotting.com 127.0.0.200) and configuring it through wsconfig. This machine is running windows 10. No problems with coldfusion and wsconfig and I’m assuming (since it was able to populate using the datasource in coldfusion) no issues with mysql either. Also, the default website is also configured through wsconfig as well.

When I hit my default website and execute my test file (http://localhost/test.cfm) which contains the following:

I receive the following reply:

When I go to just http://localhost (which is bound to 127.0.0.1) I get the IIS launch page of course:
image

When I go to http://127.0.0.1:8600/CFIDE/administrator/index.cfm I get the coldfusion administrator:
image

But when I go to http://mysite-local.ustrotting.com (which is bound to 127.0.0.200) I get the following:

Which I would normally get if something were amiss with the wsconfig process updating the default page handling looking for index.cfm. But that appears to be correct. So I thought I’d check by specifying the index and used the following:

http://mysite-local.ustrotting.com/index.cfm which ran for a while (processing application.cfc no doubt) to return with the following exception:

And also has the benefit of the debugger returning this at the bottom:

So that’s pretty much where I’m stuck now. If anyone has any suggestions, I’m all ears.

Scratch that, in New ContentBox install not working - #7 by b_w it was mentioned that the following:

I added the open to the jvm.config as suggested and ContentBox is now working.
–add-opens=java.base/sun.util=ALL-UNNAMED
I didn’t add all of the opens listed here 3 but now I know how to do that if any other opens are required.

allowed the site to open and now it is!! I’ll refresh right after this, but this is good progress!!

Continuing with web installer!!

I’m a little confused as to this roundabout process to get to the point where my post was mentioned but I’m glad it helped.

java.lang.reflect.InaccessibleObjectException: Unable to make public sun.util.ResourceBundleEnumeration(java.util.Set,java.util.Enumeration) accessible: module java.base does not “exports sun.util” to unnamed module @69ed5ea2

Did you receive this error too?

I think there is room for improvement in the documentation for all of these projects.

I think it’s mostly down to whether it’s on Linux or Windows where these processes need to be tested more thoroughly.

I had similar issue when testing the latest cbwire version and I’m sorry to say I didn’t document my findings and gave up because there were some obvious problems that could not be overcome. From memory there was an issue when a component had to be written to disk for some reason so permissions had to be set on the directory to allow write recursively but then when the file was removed it would remove that directory or file and it would fail again… I might take another look…

Is Ortus still developing the the ContentBox platform?

After evaluation I feel ContenBox is a bit dated. I had high hopes for the application but when you get into the admin it seems like it hasn’t had many feature updates and is more targeted to a basic blog application. Just forms that directly write to tables.

I think it needs a ContentTree / TreeView to indicate the site’s info architecture / page hierarchy with a GUI that could allow editors to edit content in a view that displays content in a page template that reflects the actual visual representation of the live site.

hi @b_w by roundabout I’m assuming you meant just today’s posts? I didn’t realize today was going to be so easy. The first month of posts was to document the problems with trying to get cfmigrations to continue past what I’m assuming was an error in the actual SQL script that was being used to createt the cfmigrations table, and then trying to create it again. A problem that appears to only be a problem with when using the Microsoft SQL Database and drivers (the correct java drivers). All of that was for naught once I changed it over to mySQL and the process was finally able to continue. Once I was able to get past that I was able to finally launch the web installer, and of course was presented with another issue. The rest of the post was merely trying to avoid all the finger pointing that usually comes with trying to do anything with coldfusion in a manner that skips trying to throw everything under the wwwroot directory in the coldfusion install directory structure. That way if someone wanted to follow along and try to recreate it they should have been able to.

To answer your question though, yes. I received the following:

Caused by: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.reflect.InaccessibleObjectException: Unable to make public sun.util.ResourceBundleEnumeration(java.util.Set,java.util.Enumeration) accessible: module java.base does not “exports sun.util” to unnamed module @61149fa5
** at coldfusion.runtime.StructUtils.StructEach(StructUtils.java:158)**

And I agree, the testing needs to entail a little bit more as to what the areas of concern should be. What’s currently being processed. Where to look. And finally what are some cause and effect. I don’t mind going to through forums to find similarities, but I do like to find the occasional solution as well. I should probably go back and split todays post off into a separate topic of concern, because it’s a specific problem, not to be confused with the first issue, but all related to the overall install.