Not sure how to troubleshoot this one or give you much useful info.
I’m trying to run our web app on BoxLang rather than Lucee, and during the compilation phase, I’m getting this:
ERROR
Application Error
Error transpiling BoxLang to Java. Class Info-- sourcePath: > [/app/wheels/global/…/…/events/functions.cfm], packageName: [boxgenerated.templates.app.wheels.global…events], className: [Functions$cfm]
.
Caused By: Application ErrorParsing failed: Parse error. Found “package”, expected one of “;” “@” “\u001a” “abstract” “class” “default” “enum” “final” “import” “interface” “module” “native” “non-sealed” “open” “private” “protected” “public” “record” “sealed” “static” “strictfp” “synchronized” “transient” “transitive” “volatile” Problem stacktrace
I’ll not include the full stack trace until you say it’d be helpful.
I checked the transpiled Java file, and the only reference to package is @ the top where one would expect it:
package boxgenerated.templates.app.wheels
The Java seems well-formed, at a superficial glance, and there’s nothing in the vicinity of the package
declaration that seems untoward to me. It’s the first thing in the file, so maybe it’s not it that is the problem, it’s being “included” by something else and that ends up with invalid Java?
The problem is I can’t share the code with you. And I’m not sure how to repro it in a portable way. Am working on that.
The cfm file it’s failing on is one of the [*** TRIGGER WARNING ***] CFWheels framework files. So maybe if you were to set up a skeleton Wheels app and try to compile it you might be able to replicate?
I’m, sorry I am not invested in your project enough to mess around too much with Wheels code. I have my limits. It’s annoying though cos we’ve got a 100kloc of CFML that would be good to run on BoxLang to find bugs / opportunities for improvement for you.
Obvs lemme know if you can think of anything I can try to help you isolate what’s going on.