With "contentbox install-wizard", no dice on either MSSQL or MySQL

Tried to create a site, twice, once with MSSQL and again with MySQL. Completely clean, new folders. Followed instructions from here:

Running: contentbox install-wizard pulls a whole lot of stuff from Forgebox, so that seems to be working.

After completing all the questions for the new site name, database details, etc. the Commandbox output ends with this:

Since I named the sites the same thing, I realized I had to do “server forget DWO-2” between each attempt. (As I was pasting screenshots, I noticed the pathing in the errors pointed to /site instead of /site2 or /site3, so I did the “forget”, wiped the folders and did it all again.)

Okay… I guess it’s done? Is that “no manager found” an error I need to worry about? No idea what that is. So I try “server start”. Server spins up, browser opens and this is what I get for the MSSQL site:

MSSQL Version: (SELECT @@version):
Microsoft SQL Server 2022 (RTM-CU10) (KB5031778) - 16.0.4095.4 (X64) Oct 30 2023 16:12:44 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 22.04.3 LTS) <X64>

As to the MySQL version, so far… I can see that it’s created tables. Waiting for the site to finish spinning up beyond that. Well, the request timed out before it finished, but a refresh showed more tables created. Refresh the browser… And… yep, site won’t load:

You can see the ports and folder paths are different, so these are indeed different sites.

As to the local machine, not that it should matter too much, I’m on Windows 11:
image

Sufficient resources:
image

Both the MSSQL and MySQL are running on my Synology NAS docker. (Which I have used just fine for my work ACF local dev database.

And Commandbox:
image

I’m TRYING hard to use Contentbox… but I’m not sure it’s going to work out. I’m trying all the things, really I am. I need to rebuild this site, and need a CMS for others to create pages and edit, but… I do NOT want to go to Wordpress. I hate Wordpress.

Is that “no manager found” an error I need to worry about?

I’m not sure on this one, but I know CFMigrations allows for a custom “manager” to influence how the migrations run. It seems like you have some custom config for a contentbox migrations manager, but ContentBox doesn’t have any such migrations manager that I’m aware of.

Someone more knowledgeable on Contentbox could chime in here.

The main issue here, though, is you are using a newer version of Lucee which does not bundle the Hibernate extension by default:

Lucee ORM is no longer being developed or bundled by the Lucee Team, Ortus have forked and taken over the development of ORM for Lucee, see Introducing: The Ortus ORM Extension .

Lucee 5.4.1.8 Stable Release - release - Lucee Dev

As far as I can tell, this is the root cause of your big yellow error on both MySQL and MSSQL, because the Hibernate class is not found. This is not related to ContentBox - any attempt to use ORM code on Lucee 5.4.1.8+ would throw this error, regardless of the coldbox, contentbox, or CBORM version.

To work around this issue, I would recommend installing the Ortus ORM extension. The easy way to do that to get started is to log into the Lucee Admin and install it from the Extensions Admin interface.

This is ALL being done via Commandbox. So… sounds like I need to create a server, do the ORM update (that Commandbox is not currently doing?), then attempt to install Contentbox? Is that the recommendation?

I noticed in the Lucee Admin (as installed by Commandbox) several updates that are needed, such as MSSQL and more.

I don’t understand. What is all “being done by CommandBox”? Did you run any command to install the Hibernate or ORM extension? If not, then it’s not “being done” at all. I’m not talking about an “update”, either - I’m talking about requiring the ORM extension to be installed in order to run any ORM code.

This was the recommendation I made:

To work around this issue, I would recommend installing the Ortus ORM extension. The easy way to do that to get started is to log into the Lucee Admin and install it from the Extensions Admin interface.

I’m saying I don’t have a Lucee installation. The only Lucee installation I have is the one that Commandbox installs. So, each time I need to setup a server, I would need to create the server via Commandbox, then update it with the Ortus ORM prior to attempting to install Contentbox?

While I don’t mind doing that… my concern is… if all my steps to setting up Coldbox involve CLI commands via Commandbox, shouldn’t Commandbox be updated to make this work without a manual install of the ORM extension? Really, I’m not trying to be sarcastic here. The whole point of Ortus’ documentation is to give that step-by-step setup for the rookies. (And as far as ORM goes, I’m definitely a rookie, though I’ve been using Coldbox for 20 years!)

Or is there some way to update something within Commandbox, so that new create server commands get the updated ORM extension automatically that I’m not familiar with?

It looks like the commandbox installation guide is missing the necessary step to installing the Ortus ORM Extension. Looking closely, you can see this step is present on the existing-coldbox-application guide.

So, yes, the guide is missing a step.

EDIT: I was mistaken - the ContentBox install wizard includes config to automatically install the Ortus ORM extension. The only issue is that it does not seem to be picked up and used - I am unsure at the moment whether this is a Lucee issue or a CommandBox issue, or something in between.

I don’t see why CommandBox should automatically install Lucee extensions for you, or how it would know which extensions you might want. Manual installation for a new project is hunky-dory.

With that said, I totally get wanting to automate extension installation on existing projects so you can get started quickly on a new machine with a simple box install and server start. I added a few notes to the Ortus ORM Extension Installation documentation so it’s more clear how to instruct Lucee to install the extension at startup time:

Yes, you do have a Lucee installation managed by CommandBox. And yes, any time you create a new project, it is up to you to define the Lucee extensions and ColdBox modules that you need installed. Check out Package Management and Installing Lucee Extensions for details on how to do that.

Okay, when the work day is done, I can give the ORM update a shot. I do want to add this below, though:

I maybe agree with you that Commandbox shouldn’t necessarily install a bunch of new extensions. However, I do think that if Commandbox is going to install a server image that the extensions already contained could be brought up to date. Even more so because Commandbox installs Lucee by default on new servers, and Contenbox is going to require an updated Ortus ORM extension to run without errors on current MSSQL/MySQL versions. Right now, the combination of “new Commandbox, new server setup, new Contentbox” fails.

image

Seeing as how Ortus ORM is already installed, why not update it to the latest version, thereby removing this issue? I’m assuming these server bundles (ACF, Lucee, etc.) are somehow pre-provisioned by Ortus to be made available, maybe through Forgebox? (I haven’t watched that closely on the server setup.)

I’m not a “release guy”, so maybe there’s something I’m not grokking about LTS, versioning, compatibility, etc.

CommandBox has zero say or sway over what Lucee extension versions are installed. Commandbox does not “bundle” any extensions at all - it simply installs the server version you ask for. Most of the extensions in your screenshot are bundled in Lucee. Perhaps some of them are installed by default via the ContentBox installation - I don’t know.

I wish you’d sent that screenshot earlier. You DO have the Ortus ORM extension installed after all, but you also have an old version of the Lucee Hibernate extension installed. How did that happen?

This is not going to work out well. You can’t have the Ortus ORM extension (containing Hibernate 5.4) and the Lucee Hibernate extension (containing Hibernate 3.5.5) on the same Lucee server. You’re going to need to remove the Lucee Hibernate extension… and while you’re at it, I would recommend upgrading your Ortus ORM extension version.

The issue from your original error screenshot likely has nothing to do with the exact version of the Ortus ORM extension. I originally assumed the issue was that it was not installed at all, however at this point I have no clue if it’s been installed all along, or whether you installed it at some point in this conversation.

Basically, I can’t debug without more and better information regarding your setup.

To the best of my knowledge, I have never installed neither Lucee nor Ortus ORM directly.

Creating a new server from Commandbox… where does it get its Lucee setup from? Not from anything I did, that I know of. If it did, chances are good I would have either the newest v6 or (more likely) an older pre-5.4 version. I can tell you I have absolutely never installed a Chart extension nor a PDF extension, either, yet there they are.

According to this page: Releases · lucee/Lucee · GitHub
Lucee 5.4.3.2 isn’t even on the list, with stable maxing out at 5.4.2.17. So, again, I ask: Where does Commandbox new server Lucee server config come from? I do see this page: https://download.lucee.org/ with different versions than listed on their github, so… maybe one of those is the source.

Perhaps those downloads are bundled with older versions, and the a repo of Lucee servers (pre-configured, pre-updated images) are not maintained by Ortus for Commandbox “server setup” ?

Okay, I have some results. I started to create a document of screen clips for my steps, on a new, clean setup. I decided to scrap all that and started a video recording with OBS, figured that would be more helpful. Before I started, I put all the commands I’d need in Notepad. This time, I added artifacts clean and I think that’s what changed.

When I got through all the steps, and did server start and opened the server admin. This time, there were only TWO updates that the Overview page was pointing at:
image

Okay, opened up the home page. I immediately got an ORM error, but I didn’t get a screen shot. But the gist of it was “Yah, java error on orm, did you install the jars?” So I went to the Server Admin > Extensions and installed the very latest version showing of Hibernate. I want to say that the error said something about version 5.5.6 or 5.5.1 or something, but I went ahead and accepted about 15 versions newer.

When I opened site’s home page, I could see tables being created as I refreshed the view in MySQL Workbench. My connection to my NAS docker might be a little slow right now, so it timed out at 300 seconds. I fired up the URL again and after some additional time, I got the Contentbox installer wizard page. (Name, email, etc.)

I’m stepping through that now. It seems to be completing.

So the only things, I guess, that need to be added here is that maybe the Contentbox installer can recognize a missing Hibernate setup in Lucee and tell the user how to get that installed. Also, the documentation might need to suggest artifacts clean. I hadn’t done this because, as a fulltime RVer, I’m always on a cell-based internet connection. I have plenty of transfer, but not always the speed.

I’ll report back if there are further developments.

I told you before, CommandBox does not bundle or install extensions by default. They are either configured in your project or bundled with Lucee. If you don’t want any extensions installed by default, use Lucee Light.

The one exception I can think of is running server start with no cfengine argument will use the default server, which is the Lucee server that CommandBox itself runs on. I believe this bundles the Ortus ORM extension in order to avoid a breaking change in a minor release of CommandBox.

Please Read:

Read the CommandBox documentation on server versions.

as well as

I have spent the better part of… let’s call it 6 hours today, trying to get the Contentbox running on an existing site and a clean site. I’ve tried on latest Lucee 5.x and current Lucee 6.x. I’ve updated (and not updated) the Hibernate extensions.

Interesting, coming back to this post, I had a draft here of my previous steps I had taken, many were similar. I am trying my best to follow the instructions here:

…but adding in ANYTHING I can think of to make things proceed gracefully. I have even gone so far as to remove EVERY Commandbox server I had set up using server forget on each of them.

I made several screen recordings, this last one seems to be the best, and I’ve uploaded it here, as a .zip (my IIS doesn’t like the .mkv extension, apparently). It’s only 27MB. https://dwo.net/files/Contentbox-Attempt-0058.zip

Perhaps someone, anyone, can tell me what I’m doing wrong. Just to be clear, this is the latest error I’m dealing with.

Doing manual (non-wizard) install attempts results in different errors about not having all the .jar files for Hibernate.
Error: cannot initialize ORM Engine [class:org.lucee.extension.orm.hibernate.HibernateORMEngine;name:hibernate.extension;version:5.4.29.27-BETA;], make sure you have added all the required jar files
…this is different than in the video, just a pre-heads-up as that might a future post.

Note: Installing according to the Ortus docs link should result in everyone having the same headache.

I watched your screen recording up until I saw you have multiple conflicting Hibernate extensions installed. Please re-read and answer my earlier question: How / why do you have multiple conflicting Hibernate extensions installed?

It looks like the Contentbox install wizard adds the lucee-extensions environment variable to your server.json to automatically install the Ortus ORM extension, so that’s where that one comes from. But I don’t understand how/why you have the old Lucee Hibernate extension installed.

This is the same error you were dealing with from the start, FYI, so nothing has changed. And this isn’t a ContentBox installation issue at all - it’s a Hibernate extension issue.

Also, the exception cause is typically buried down towards the bottom of the stack trace. If you want accurate help, you should probably paste the full stack trace… though in this case that would be a waste of time as we know your setup is not right.

I went ahead and followed the contentbox install setup you linked above. Everything looks right, but it seems specifying the lucee-extensions system property via an ad-hoc Java System Property, aka "-Dlucee-extensions":"D062D72F-F8A2-46F0-8CBC91325B2F067B", did not work to install the Ortus extension. I’m willing to bet this changed in Lucee quite recently.

Simply following the ContentBox installation guide and checking that the Ortus ORM extension is installed (per my recent comments) is enough to get you a golden-brown, delicious new ContentBox site.

@captainPalapa make sure you:

  1. uninstall the Lucee Hibernate extension
  2. install the Ortus ORM Extension
  3. Update your server.json to use the "env" struct to specify required extensions, including the Ortus ORM extension, for repeatable builds. See Installation - Ortus ORM Extension

I will tweak the ContentBox default site to use the recommended extension installation approach.

Anything we discuss here likely needs to go into the Contentbox installation documentation.

Also, I have, indeed, removed the Lucee Hibernate extension. Often, when I do that, and yes, with Ortus ORM installed, I’ll get this error on the websites first start, which I wrote down in my notes:
No ORM Engine installed! Check out the Extension Store in the Lucee Administrator for "ORM".

As to “how do I have an old Hibernate installed”? That video contains every step. There is nothing that was done that is outside of that. In addition, you indicate I should update the Ortus ORM. It seems to me that extension version 6.4.0 is the latest. However, the format of the versions are changed, I guess, and the Lucee admin seems to think there’s a newer one, though its a lower version number. Unless it’s trying to get me to go to the 7.0.0.67-SNAPSHOT. If work does not come up today (I’m contract, who knows), I’ll try to record another screen vid of doing as you suggest. I will check for new documentation.

Right now, I have updated the Ortus ORM to 6.4.0, the MSSQL to 12.4.2.jre11, installed v3.2.0.49 of Ortus Redis, and removed Hibernate.

Performed a restart in the Commandbox console afterwards.

Yep, as I expected:

Let me remove and reinstall Ortus ORM in case the Hibernate removal took part of it along.

Yep, that seems to be the issue. Order of operations matters. If you remove Hibernate, you have to then remove/reinstall Ortus ORM because the Hibernate removal is definitely hurting the Ortus ORM.

I now have the Contentbox installer screen. My ultimate goal, really, is to integrate Contentbox into an existing site so we can add a true blog to it. Right now, because of the difficulties I’ve encountered, I’m instead trying to set up a new Contentbox site and move the existing site into it, if I can.

I’ll get a complete restart going, and document each step for y’all to incorporate as you choose into your setup documentation, which, right now, does not get a site up and running. We’ll work together to help folks like me down the road.

1 Like

Ok, good work here. There’s definitely something funky going on. I followed your exact steps and did not see the Lucee Hibernate extension installed, but I did get an error from Lucee with a stack trace pointing to the (not-yet-installed) Lucee Hibernate extension. So it almost seems like Lucee is trying to install the old Lucee Hibernate extension, if no ORM engine/extension is found.

Lucee’s extension installation/update process is notoriously difficult to troubleshoot. I would advise:

  1. taking a look at the Lucee deploy log, which should indicate which extensions are being installed and when
  2. Completely “blowing away” the Lucee server via server stop && server forget && server start for a fresh start regarding Lucee extensions. Uninstalling a lucee extension is not guaranteed to work cleanly, so it’s best to start over in that regard.

This is still all Lucee debugging and has nothing to do with ContentBox. It’s 100% possible to get these issues without ever touching the Contentbox installer. All you’d have to do would be to create a CFML site, add an ORM method call, and run server start without installing the Ortus ORM Extension.

Uh, nope. I said to install the Ortus ORM extension. Installing and updating are two different beasts. As long as you have a semi-recent version installed, you should be all good. I’ve seen several screenshots above indicating you don’t have the Ortus ORM extension installed at all, so that’s why I said to make sure it’s installed.

As far as Lucee’s version upgrade notice, you should ignore that. Lucee’s version numbering system has been broken for a long time. I thought they improved this, but it’s obviously still recommending you update to a snapshot release, which is not a stable build.

TLDR: Ignore Lucee’s update warnings, you’re usually fine with whatever extension version you have installed.

UPDATE:
I created a Jira ticket to track this issue:

https://ortussolutions.atlassian.net/browse/CONTENTBOX-1504

And pushed an update to the installer to use env vars, so people running contentbox install-wizard in the future can be blissfully ignorant of the issue with the lucee-extensions system property.

@MichaelBorn is there a lucee bug already created for this?

Also, I released the patch right now for this. Should be version 1.5.2 for the CLI
update contentbox-cli

@lmajano Nope, actually it’s not a Lucee bug. Brad pointed this out - the server set jvm.args command was missing quotes:

server set jvm.args=-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false -Dlucee-extensions=D062D72F-F8A2-46F0-8CBC91325B2F067B

This is setting 3 different top-level properties, only one of which is the jvm.args. The correct syntax would be:

server set jvm.args='-Dfile.encoding=UTF8 -Dcom.sun.net.ssl.enableECC=false -Dlucee-extensions=D062D72F-F8A2-46F0-8CBC91325B2F067B'

And the update already takes care of that. :slight_smile: