I’ve been trying to get the boxlang coldbox demo app to run and have so far been unable to get boxlang to load. The server error I’m getting is - [INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Starting Runwar
[INFO ] runwar.server: - Runwar Version: 5.0.8
[INFO ] runwar.server: - Java Version: 21.0.6+7-LTS (Eclipse Adoptium)
[INFO ] runwar.server: - Java Home: C:\commandbox\boxHome\serverJREs\openjdk21_jdk_x64_windows_hotspot_jdk-21.0.6+7
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Listeners:
[INFO ] runwar.server: - Binding HTTP on 127.0.0.1:59503
[INFO ] runwar.server: ******************************************************************************
[INFO ] runwar.server: Configuring Servlet
[INFO ] runwar.server: Found WEB-INF: ‘C:\commandbox\boxHome\server\56BB2B4F9D9D71BA35199633A7A6AC5F-bx-default\boxlang-1.0.0-snapshot\WEB-INF’
[ERROR] runwar.config: Error reading web.xml
java.lang.IllegalArgumentException: UT010009: Servlet BoxLangServlet of type class ortus.boxlang.servlet.BoxLangServlet does not implement javax.servlet.Servlet
at io.undertow.servlet.api.ServletInfo.(ServletInfo.java:76) ~[runwar-5.0.8.jar:5.0.8]
at runwar.undertow.WebXMLParser.lambda$parseWebXml$3(WebXMLParser.java:112) ~[runwar-5.0.8.jar:5.0.8]
at org.joox.Impl.each(Impl.java:407) ~[runwar-5.0.8.jar:5.0.8]
at org.joox.Impl.each(Impl.java:79) ~[runwar-5.0.8.jar:5.0.8]
at runwar.undertow.WebXMLParser.parseWebXml(WebXMLParser.java:99) [runwar-5.0.8.jar:5.0.8]
at runwar.RunwarConfigurer.configureServerWar(RunwarConfigurer.java:128) [runwar-5.0.8.jar:5.0.8]
at runwar.RunwarConfigurer.configureServerResourceHandler(RunwarConfigurer.java:87) [runwar-5.0.8.jar:5.0.8]
at runwar.Server.startServer(Server.java:332) [runwar-5.0.8.jar:5.0.8]
at runwar.Start.main(Start.java:44) [runwar-5.0.8.jar:5.0.8]
[ERROR] runwar.context: java.lang.RuntimeException: java.lang.IllegalArgumentException: UT010009: Servlet BoxLangServlet of type class ortus.boxlang.servlet.BoxLangServlet does not implement javax.servlet.Servlet
[ERROR] runwar.context: at runwar.undertow.WebXMLParser.parseWebXml(WebXMLParser.java:300)
[ERROR] runwar.context: at runwar.RunwarConfigurer.configureServerWar(RunwarConfigurer.java:128)
[ERROR] runwar.context: at runwar.RunwarConfigurer.configureServerResourceHandler(RunwarConfigurer.java:87)
[ERROR] runwar.context: at runwar.Server.startServer(Server.java:332)
[ERROR] runwar.context: at runwar.Start.main(Start.java:44)
[ERROR] runwar.context: Caused by: java.lang.IllegalArgumentException: UT010009: Servlet BoxLangServlet of type class ortus.boxlang.servlet.BoxLangServlet does not implement javax.servlet.Servlet
[ERROR] runwar.context: at io.undertow.servlet.api.ServletInfo.(ServletInfo.java:76)
[ERROR] runwar.context: at runwar.undertow.WebXMLParser.lambda$parseWebXml$3(WebXMLParser.java:112)
[ERROR] runwar.context: at org.joox.Impl.each(Impl.java:407)
[ERROR] runwar.context: at org.joox.Impl.each(Impl.java:79)
[ERROR] runwar.context: at runwar.undertow.WebXMLParser.parseWebXml(WebXMLParser.java:99)
[ERROR] runwar.context: … 4 more
[INFO ] runwar.server: Stopping server ‘bx-default’
[ERROR] runwar.context: java.lang.NullPointerException: Cannot invoke “runwar.undertow.SiteDeploymentManager.getDeployments()” because “runwar.Server.siteDeploymentManager” is null
[ERROR] runwar.context: at runwar.Server.stopServer(Server.java:546)
[ERROR] runwar.context: at runwar.Server$2.run(Server.java:507)
[ERROR] runwar.server: *** unknown server error
java.lang.NullPointerException: Cannot invoke “runwar.undertow.SiteDeploymentManager.getDeployments()” because “runwar.Server.siteDeploymentManager” is null
at runwar.Server.stopServer(Server.java:546) [runwar-5.0.8.jar:5.0.8]
at runwar.Server$2.run(Server.java:507) [runwar-5.0.8.jar:5.0.8]
The important bits above (java.lang.IllegalArgumentException: UT010009: Servlet BoxLangServlet of type class ortus.boxlang.servlet.BoxLangServlet does not implement javax.servlet.Servlet at io.undertow.servlet.api.ServletInfo) I’ve found in quite a lot of places re: undertow but I have not figured out what to do about it. I just tried a brand new machine with fresh Windows 11 and installed what I believe was the correct jdk. Still the same error. Ideas? Thank you.
Has anyone gotten boxlang to run on Windows? I put together a linux box and got it to work there. No dice on Windows. Error is - [INFO ] runwar.server: Found WEB-INF: ‘C:\commandbox\boxHome\server\56BB2B4F9D9D71BA35199633A7A6AC5F-bx-default\boxlang-1.0.0-snapshot\WEB-INF’
[ERROR] runwar.config: Error reading web.xml
java.lang.IllegalArgumentException: UT010009: Servlet BoxLangServlet of type class ortus.boxlang.servlet.BoxLangServlet does not implement javax.servlet.Servlet
at io.undertow.servlet.api.ServletInfo.(ServletInfo.java:76) ~[runwar-5.0.8.jar:5.0.8]
at runwar.undertow.WebXMLParser.lambda$parseWebXml$3(WebXMLParser.java:112) ~[runwar-5.0.8.jar:5.0.8]
at org.joox.Impl.each(Impl.java:407) ~[runwar-5.0.8.jar:5.0.8]
at org.joox.Impl.each(Impl.java:79) ~[runwar-5.0.8.jar:5.0.8]
at runwar.undertow.WebXMLParser.parseWebXml(WebXMLParser.java:99) [runwar-5.0.8.jar:5.0.8]
at runwar.RunwarConfigurer.configureServerWar(RunwarConfigurer.java:128) [runwar-5.0.8.jar:5.0.8]
at runwar.RunwarConfigurer.configureServerResourceHandler(RunwarConfigurer.java:87) [runwar-5.0.8.jar:5.0.8]
at runwar.Server.startServer(Server.java:332) [runwar-5.0.8.jar:5.0.8]
at runwar.Start.main(Start.java:44) [runwar-5.0.8.jar:5.0.8]
It should as we test with all major OS.
Did you install the commanbox-bolang module?
I did as here - FORGEBOX: Default ColdBox App Template For BoxLang
box install cbtemplate-bx-default
box install
box server start
When that failed I saw the error above so started messing around with updating java. At one point I did get it to try and load but that gives an error something like “setting is not a valid var” type error. I removed the “setting requestTimeout =“300”;” entry in Application.bx but still no go. Was never able to get it past the error above. I then took a box I have and installed Ubuntu and tried again from scratch. Got similar error when I tried to shut down a server. Again messed around with java (sorry I don’t have details) until it came up with the same setting is not a valid var error. This time I removed the entry in Application.bx and it came up. Went back to Windows machine and could never get it to load.
In short I followed this - FORGEBOX: Default ColdBox App Template For BoxLang
Java info on box is -
C:\Users\irv>java -version
java version “21.0.5” 2024-10-15 LTS
Java™ SE Runtime Environment (build 21.0.5+9-LTS-239)
Java HotSpot™ 64-Bit Server VM (build 21.0.5+9-LTS-239, mixed mode, sharing)
C:\Users\irv>echo %JAVA_HOME%
C:\Program Files\Java\jdk-21
Server.json is (default from download) -
{
“name”:“bx-default”,
“app”:{
“cfengine”:“boxlang@be”
},
“jvm”:{
“heapSize”:“512”,
“javaVersion”:“openjdk21_jdk”,
“args”:“-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888”
},
“cfconfig”:{
“file”:“.cfconfig.json”
},
“web”:{
“rewrites”:{
“enable”:true
}
},
“scripts”:{
“onServerInitialInstall”:“install bx-compat-cfml”
}
}
Instead of trying with Forgebox (I honestly don’t know much about it), what if you follow the directions here:
Basic install: Installation | BoxLang : A Modern Dynamic JVM Language
Then running with CB: CommandBox | BoxLang : A Modern Dynamic JVM Language
Before you even try to run it as a web app though, I’d ensure the boxlang
CLI is working.
Thank you Ray. I should try that. Normally Commandbox allows for servers to be spun up, whether ACF or Lucee, with a simple “server start cfengine=adobe”, etc. In this case it’s a BoxLang app and it appears a server is started much the same way (except being Boxlang). I’m pretty certain that’s the intention. For testing I can do the above though. Maybe it’ll point to the issue. With that said I think the server NOT coming up using a direct Commandbox “server start” command is an issue.
This error tells me that you don’t have the latest version of the commandbox-boxlang
module installed. You will need to be on at least CommandBox v6.1 and then run box install —force commandbox-boxlang
BoxLang uses the Jakarta API for the servlet rather than Javax
Yes, Luis’ original comment was on-point. you need to update the commandbox-boxlang
module which is a system module in CommandBox. This has nothing to do with running box install
.
update --system
I did although sill not completely sure how. I ran update --system and that cleared it. The thing confusing me is everything I installed was from scratch (I think). I know I messed around with various java versions and settings. Also deleted the server folder under commandbox to force new server files more than once. Only thing I’m not sure that I updated is commandbox itself but I “think” I did. Maybe not. Regardless, is running now. Thank you!