I update to the new version of cold box with yum and now it won’t run if I jsut try and run box from the command line I get :
Exception in thread “main” java.lang.UnsupportedClassVersionError: cliloader/LoaderCLIMain : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
You have the wrong version of java. Just google that error message, it’s super common (although a little confusing). Use java 8.
Is 1.8 required now?
Can I revert cold box to the previous version with yum?
I assume you mean CommandBox, and not ColdBox?? Yes, CommandBox 4.0 requires java 8. java 7 is so old it’s not even funny and Java 10 is now the latest! This is documented here under the section titled “Known Breaking Changes”
It there a good reason you need to use Java 7? Even CF9 will run on java 8 if you are on an older version like update 92.
As far as using yum to install an older version, I’m sure it’s possible but I’m not really a yum expert. You can also download all previous versions of CommandBox here:
No reason just time to update everything.
I just manually installed the old version and it works fine.
I installed 1.8 and 4.0 started, but it’s ignoring the Application.cfc so I guess that was a change as well.
I’ll have to review all the changes and work on my scripts before I update.
thank you for the link to the old versions.
it’s ignoring the Application.cfc
Can you be more specific? Are you talking about starting a server, or running CFMs from the command line? If you mean when you do something like this:
then yes that’s another change force by JSR-223 and it’s also documented in that link I sent you. It’s fairly easy to work around and I’d actually recommend you check into using Task Runners. They are much more powerful than just simple .cfm files
Its an existing script i wrote as a cfm file that does some database upkeep from a command line script in linx written in CFML.
I had the datasources setup in the Application.cfc and it worked prior to 4.0
I just did a test with passing the datasource using a structure which connects and works fine. I can rewrite the script when I have time that way if the Application.cfc is not viable.
I’ll research the notes when I get time and see if I can figure it out.
Your help is much appreciated.
Excellent, I assume you’ve seen this page:
I think you’ll like the task runners. To get started, just copy/paste your script into a cfc with a run method. It makes handling input, output, and interactivity way easier.