java.lang.UnsupportedOperationException during first box startup

Hi all,

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.

Anyone have any ideas?

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:


in your /home/cartadmin/.CommandBox/CommandBox.json file and re-running box.

Thanks for the reply!

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:

I’ll let you know how it goes. If it works, the next version of CommandBox should consider updating the JLine jar.

Commandbox is on v4.8…if i’m reading your terminal correctly…your cli is outdated. Maybe that’s the problem.

Please let me know if it works. There was actually a recent JLine release that I can upgrade to but hadn’t had the time nor need yet.

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.

Good catch, but v4.8 also includes an older JLine jar. We did eventually update to v4.8.

Just confirmed that the latest JLine jar works in vSphere Web Client, so mystery solved. Is there somewhere I should report this to?

Thanks all!

Yes, please create a CommandBox ticket to update JLine.

Done: [COMMANDBOX-1063] box fails to open in vSphere Web Client console due to outdated JLine jar - Welcome


Thanks for the ticket! I’ll try to get that in the next release of CommandBox.

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.

Looks like you may be making progress if I’m reading your latest comments correctly?

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.