Hi, I’m onboarding to a Commandbox project at work and I’m encountering what are potentially issues with CommandBox 6.0.0. I found this thread after looking for ways to downgrade, which is apparently quite difficult.
Could you go into a bit more depth on what to look for if a server is not compatible with Java 21? Mine seems to be displaying an incompatibility with how the underlying server handles session cookies. Any resources on workarounds that don’t require CommandBox to be downgraded would be helpful.
I’m not sure what you mean. Are you on a Mac? Are you using Homebrew? If both of those are true, HomeBrew may have installed java 21 for the CLI to run on, but this doesn’t have to be the version of Java your servers run on. If you want your servers on a different version of Java, then just tell CommandBox which version you’d like it to use.
I’ve had a couple reports of session cookie weirdness, but it seems to only affect people using J2EE sessions, which tells the servlet container (not CF) to set the JSessionID. The reports I’ve heard involved the JSessionID being set to secure even when hitting your site over HTTP and not respecting the setting
server set app.sessionCookieSecure=false
This is handled by Undertow, so it’s out of CommandBox’s handes, and I haven’t been able to dig in an reproduce. I think the last person who reported this said they just switched back to CF session cookies and it worked again.
Yes, I’m on macOS running Homebrew. I’ll try fiddling with the Java version and the server setting tomorrow. Thanks!
Before you spend any time fiddling with Java, what version of Adobe CF or Lucee are you using? Both of their latest releases should run just fine on Java 21 so far as I know.
I sort of feel like we’re running to a solution without really knowing what the problem is yet. If the problem is the session cookies, then I’d run down that route first unless there’s actually some indicator that the Java version is an issue. Just because someone else in another thread had an issue that was related to their Java version, doesn’t mean that’s your issue.