We are deploying CommandBox on a RHEL 7.6 VM, and we send a large ZIP with CommandBox already basically built so that we don’t have to actually rely on downloading anything. However, we ran into something today we’ve never seen before: java.lang.UnsupportedOperationException when trying to run box for the first time. We are pretty baffled.
I’ve attached a screenshot of the error message. Haven’t found a helpful log file yet.
I can’t say I’ve ever seen that, but from the file it came from it seems to be related to the JLine library used to draw the console. Can you try setting verbose errors on so we can see the full stack trace? Either run
box config set verboseErrors=true
or if CommandBox won’t load to the point where that works, then try setting this:
{
“verboseErrors”:“true”
}
in your /home/cartadmin/.CommandBox/CommandBox.json file and re-running box.
We ended up setting that file to { “verboseErrors”: true, “debugNativeExecution”: true } and confirmed it was a line in the JLine jar. We believe it’s the client’s terminal, which I believe is vSphere Web Client, that is incompatible with the version of JLine shipped with CommandBox, so today we are going to push out the latest JLine jar and test. This change in this commit looks like it could fix our issue:
Adrian, the version you’re setting on the screenshot is the loader version, which follows a different number sequence. I haven’t bumped the Jline library in a bit so it looks like that loader version is probably not that old. CommandBox 4.8 shipped JLine 3.10.0 and it looks like that fix is in the new 3.13 release.
John, I don’t know if you saw my comment on your JIRA ticket, but I won’t be able to update to the latest JLine version yet due to a new regression that happened in version 3.12.0.
Sort of… This is tricky since JLine 3.12.0 + now requires JNA 5.3.1+ but the Systemtray library that makes the tray icons require JNA 4.x so we’ve got a bit of an incompatibility there. Giving JLine a test with the Jasni library (which should, in theory, work on Windows the same as JNA) seems to work, but I’ll have to test it as Jline has always been full of little edge cases that give me troubles, and every other JLine release always seems to have a regression or two I have to deal with.