Illegal reflective access error

I’ve got a commandbox server project I’m working on with an existing server.json. When I try to run it, I end up with the following:

[INFO ] Runwar: Starting RunWAR 4.5.1
[INFO ] Runwar: HTTP2 Enabled:true
[INFO ] Runwar: HTTP sslEnable:false
[INFO ] Runwar: HTTP ajpEnable:false
[INFO ] Runwar: HTTP warFile exists:true
[INFO ] Runwar: HTTP warFile isDirectory:true
[INFO ] Runwar: Starting background AFS-Legacy [adobe 10.0.23+302580] from: /root/.CommandBox/lib/runwar-4.5.1.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by runwar.LaunchUtil (file:/root/.CommandBox/lib/runwar-4.5.1.jar) to method
WARNING: Please consider reporting this to the maintainers of runwar.LaunchUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO ] Starting in background -
[ERROR] at runwar.Server$

ERROR (5.4.1+00443)

I’ve replicated this on multiple different machines now.

The illegal reflective access warning is common ever since Java 11 and is usually just that-- a warning. It’s just the JVM moaning about the fact that a future version of Java will crack down on reflection in an attempt to apparently spite Java developers. I’ve never seen it prevent the server from starting however. Are you saying your server actually doesn’t start?

I notice you’re using a rather old version of Adobe CF 10, which requires Java 8 in order to run. This in combination with the reflective access warning that is only present in Java 11+ tells me you are probably trying to run CF10 on a version of Java it’s not compat with which is probably the real reason it won’t start.

Unless you specify something different, CommandBox servers will use the same version of Java that the CLI is already using. If you want to use a different version for a given server, just ask for it:

server start javaVersion=openjdk8

This seems to be working, thank you!