OSGi Bundle Error When Installing in Existing CF2021

Following the docs exactly hasn’t worked when installing contentbox into an existing ACF 2021 installation ( OR when deploying within commandBox for that matter ). See error below:

ERROR (6.0.0+00787)

The OSGi Bundle with name [mssqljdbc4] in version [12.4.2.jre11] for is not available locally [ (C:\Users\my name.CommandBox\engine\cfml\cli\lucee-server\bundles)] or from the update provider (https://update.lucee.org)

Thank You

Ok, it seems that the jdbc driver for mssql is wrong. I am guessing you chose Microsoft SQL for the db? Can you confirm please

Adobe ColdFusion does not use OSGI, and that is very clearly a Lucee error, from where it’s looking for the extension. Perhaps you need to follow the docs for Lucee server installation? At any rate, you’ll need to install the mssqljdbc4 Lucee extension - see:

https://download.lucee.org/#99A4EF8D-F2FD-40C8-8FB8C2E67A4EEEB6

Also, what version of Lucee are you running? I ask because I don’t know if all the *Box products are ready for Lucee 6.

Yes, that is correct. Thanks for the quick response!

I’m using CommandBox for the install which from what I understand, defaults to Lucee. I Specified ACF 2021, but I don’t know what CommandBox does when it does its thing.

If you run server info in commandbox, you’ll see what server you are running. Your server.json file will also have this info. I suspect you made a typo when specifying Adobe CF. (We all make typos!)

For clarity’s sake, here’s the docs on specifying engine versions when starting a new server:

So I’m trying to go with CommandBox to install, leaving defaults as they are with the exception of answering its questions as to database specifics.

Now, I get this, but all I did was answer the questions it asked me.

Looks like a bug in the contentbox-cli, which is the installer you’re using here.

If you wait for this GitHub build to complete, then install the latest snapshot via install contentbox-cli@be --system, that should be fixed :crossed_fingers: .

Ok, thank you. Can you please clarify for me what I would write for the cli@be --system part as an example?

The CommandBox command to reinstall the contentbox-cli module? Same as I mentioned above, though come to think of it you should also use --force to overwrite the existing dependency:

install contentbox-cli@be --system --force

Now I’m back to this :slight_smile:

Gotta say that I would think a product put out to the world for professional use would actually install. It’s kind of frustrating.

I’m sorry, but you’re going to need to do a bit of homework. Ortus has hundreds of open source products covering hundreds of thousands lines of code. Some of that code will have bugs, especially when you consider the various environments installed.

Now, I could give you a full refund (this is for professional use after all :wink: ) OR you could do your due diligence here and give us a bit more detail to go on:

  • What CF engine are you running in CommandBox? The exact version number from box info.
  • What DB driver did you choose, what settings did you enter?
  • What does your datasource configuration look like?

Here are the details copied from each step of the process:

CF Server: I selected Adobe 2021 from the list
Enter the password for the CFML Engine administrator: contentbox
Enter the password for the ColdBox HMVC Reinits: contentbox
What Database will you be using? I selected Microsoft SQL Server from the list

What Database will you be using? Microsoft SQL Server
Enter the database host (Leave empty to use β€˜localhost’) ?
Enter the database port (Leave empty to use the default for MicrosoftSQL) ?
Enter the database username to use for the connection? contentBoxUser
Enter the database password to use for the connection? **********
Enter the database name to use for the connection (Leave empty to use β€˜contentbox’) ? contentBoxDatabase

Do you want us to deploy and start a CFML Engine (adobe@2021) on CommandBox for you? Yes

Is this a development or production site? Development
Enter the ContentBox version to use or leave empty to use the latest stable version (be = snapshot)?

╔══════════════════╀════════════════════╗
β•‘ Configuration β”‚ Value β•‘
╠══════════════════β•ͺ════════════════════╣
β•‘ DATABASEPASSWORD β”‚ *** β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DATABASEPORT β”‚ [default] β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DATABASENAME β”‚ contentBoxDatabase β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DATABASEUSERNAME β”‚ contentBoxUser β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DATABASETYPE β”‚ MicrosoftSQL β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ CFMLPASSWORD β”‚ *** β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DEPLOYSERVER β”‚ true β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ COLDBOXPASSWORD β”‚ *** β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ DATABASEHOST β”‚ localhost β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ NAME β”‚ mySite β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ CFMLENGINE β”‚ adobe@2021 β•‘
β•Ÿβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β•’
β•‘ PRODUCTION β”‚ false β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•§β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
Do you wish to continue? [y/n] :

Given the above, this is what presents:

ERROR (6.0.0+00787)

Please don’t mix named and positional parameters, it makes me dizzy.

You specified named parameters: scripts.onServerInstall but you did not specify a name for: install
server set scripts.onServerInstall=cfpm install zip,orm,mysql,postgresql,sqlserver,document,feed

When doing a box info I get the below:

β€œJavaPath”:β€œD:\ContentBox\jre\bin\java.exe”,
β€œCLIHome”:β€œC:\Users\me\.CommandBox”,
β€œJavaVersion”:β€œ11.0.22 (Eclipse Adoptium)”,
β€œCLIBinary”:β€œD:\ContentBox\box.exe”,
Version":β€œ6.0.0+00787”,
β€œJLineTerminal”:β€œorg.jline.terminal.impl.jansi.win.JansiWinSysTerminal”,
β€œRunwarVersion”:β€œ5.0.0 (C:\Users\me\.CommandBox\lib\runwar-5.0.0.jar)”,
β€œCFMLVersion”:β€œ5.4.4.38 stable (Gelert)”,
β€œCFMLEngine”:β€œLucee”,
β€œCLIAuthors”:β€œBrad Wood, Luis Majano, Denny Valiant”

1 Like

Wait, we’re back to this now? That error was fixed by my patch several days ago, right? I don’t know why you’re seeing this again, unless you somehow reverted or reinstalled a specific contentbox-cli version.

Can you run these commands separately, in sequence, and paste the full stack trace of the error here? It looks like it’s failing at the migrate install command.

  • install contentbox-cli@be --system --force
  • migrate install
  • run-script contentbox:migrate

Finally, try commenting out DB_BUNDLEVERSION in your .env and see if that changes the result of migrate install.

Each time it fails to install, I delete everything except the box exe file and start over, including running the install contentbox-cli.

Do I need to run the cli command each time I start the installation process?

I did as you requested, including commenting out DB_BUNDLEVERSION in the env file. Below is the output:

Welcome to CommandBox!
CommandBox:ContentBox> install contentbox-cli@be --system --force
√ | Installing package [forgebox:contentbox-cli@be]
| √ | Uninstalling package: contentbox-cli
CommandBox:ContentBox> migrate install
Created seeds directory

ERROR (6.0.0+00787)

Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

                                                                                                                    CommandBox:ContentBox> run-script contentbox:migrate

Running package script [contentbox:migrate].

migrate up manager=contentbox
Created seeds directory

ERROR (6.0.0+00787)

Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

C:\Users\Michael Letson.CommandBox\cfml\modules\commandbox-migrations\modules\cfmigrations\models\QBMigrationManager.cfc

CommandBox:ContentBox>
migrate install

ERROR (6.0.0+00787)

Communications link failureThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

CommandBox:ContentBox>

Ok, so this looks like progress to me! You are now able to use the driver to attempt a JDBC connection the configured database. The error now indicates the database is not available or not responding to your connection requests. This means something in the datasource settings is wrong - most like the host or port. Please check and re-check those values, and confirm the database is currently running at that address.

I rechecked everything and it looks good. To verify the user, I connected it up via a CF admin data source.

I then wrote some simple queries in Sublime and executed them against the user. I was able to create tables, query them, delete records and drop tables using the user I set up for contentBox.

I then deleted the table so contentBox would have an empty DB to work with.

I’m still getting the below error:

You weren’t getting that error when you manually ran the migration in your earlier post. What changed?

I’m guessing you re-ran the install script, thus overwriting your DB_BUNDLEVERSION change? Don’t do that. :slight_smile: