Error creating JNA based terminal

Description

I replaced my box.exe file with the 5.3 version and, now, cannot start box.
I deleted temporary files from cfclasses and mdCache but it did not change anything.
I'm on Windows 10 and started box from cmd.
I eventually renamed my `.commandbox` folder, started 5.3 from Powershell and saw it working. I guess my settings are buried deep in the old folder.

{{PS D:\Webs\github\bardware\cfmlsamples> & 'C:\Program Files (x86)\commandbox\box.exe' -clidebug
CLI Java Version:11.0.4+11-LTS
CLI Java Home:D:\JAVA\jdk11.0.4_10
CLI Java Vendor:Amazon.com Inc.
initial arguments:[]
Checking for properties file C:\Program Files (x86)\commandbox\commandbox.properties
C:\Program Files (x86)\commandbox\commandbox.properties NOT FOUND
Checking for properties file C:\Program Files (x86)\commandbox\cli.properties
C:\Program Files (x86)\commandbox\cli.properties NOT FOUND
cfml.cli.name: CommandBox
home: checking for command line argument CommandBox_home
home: checking for environment variable
home: checking for system property
home: checking cli.properties
home: using default
home: C:\Users\bd\.CommandBox
initial cfml.cli.home: C:\Users\bd\.CommandBox
Working Dir set to D:\Webs\github\bardware\cfmlsamples
cfml.server.dockicon:
shell: /cfml/system/Bootstrap.cfm
cfml.cli.shell: /cfml/system/Bootstrap.cfm
cfml.cli.lib: C:\Users\bd\.CommandBox\lib
cfml.cli.autoupdate: true
usage: USAGE: box execute /path/to/script [-box_home=/path/to/dir] [-debug]
Ex: 'box execute test.cfm' or 'box' to enter shell
Or for server mode: 'box -server --port=8088'
[-webroot=/path/to/web] [-background]
And to update your CommandBox home (default is ${user.home}.CommandBox/) after updating binary: 'box -update'
name: CommandBox
cfml.cli.pwd: D:\Webs\github\bardware\cfmlsamples
cfml.cli.home: C:\Users\bd\.CommandBox
Running in CLI mode
Running in CLI mode
uri: C:\Users\bd\.CommandBox\cfml\system\Bootstrap.cfm
com.intergral.fusionreactor.api.FRAPI
cfml.cli.arguments: []
cfml.cli.argument.array: []
Loading Jars

  • file:/C:/Users/bd/.CommandBox/lib/bcpg-jdk15on-1.61.jar

  • file:/C:/Users/bd/.CommandBox/lib/bcpkix-jdk15on-1.61.jar

  • file:/C:/Users/bd/.CommandBox/lib/bcprov-jdk15on-1.61.jar

  • file:/C:/Users/bd/.CommandBox/lib/jansi-1.18.jar

  • file:/C:/Users/bd/.CommandBox/lib/JavaEWAH-1.1.6.jar

  • file:/C:/Users/bd/.CommandBox/lib/jcommander-1.47.jar

  • file:/C:/Users/bd/.CommandBox/lib/jline-3.18.0.jar

  • file:/C:/Users/bd/.CommandBox/lib/jsch-0.1.55.jar

  • file:/C:/Users/bd/.CommandBox/lib/json-smart-mini-1.0.8.jar

  • file:/C:/Users/bd/.CommandBox/lib/jzlib-1.1.1.jar

  • file:/C:/Users/bd/.CommandBox/lib/lucee-5.3.7.47.jar

  • file:/C:/Users/bd/.CommandBox/lib/luceecli.jar

  • file:/C:/Users/bd/.CommandBox/lib/org.eclipse.jgit-5.5.1.201910021850-r.jar

  • file:/C:/Users/bd/.CommandBox/lib/ortus-jgit.jar

  • file:/C:/Users/bd/.CommandBox/lib/runwar-4.4.4.jar
    Webroot: C:\
    Bootstrap: /Users\bd\.CommandBox\cfml\system\Bootstrap.cfm

loader = createObject( 'java', 'cliloader.LoaderCLIMain' );
if( !isNull( loader.FRTrans ) ) { loader.FRTrans.close(); }

mappings = getApplicationSettings().mappings;
mappings[ '/__commandbox_root/' ] = 'C:\';
application mappings='#mappings#' action='update';
include '/__commandbox_root/Users\bd\.CommandBox\cfml\system\Bootstrap.cfm';

Mai 03, 2021 11:44:06 NACHM. org.jline.utils.Log logr
FEIN: Error creating JNA based terminal: 'com.sun.jna.Library com.sun.jna.Native.load(java.lang.String, java.lang.Class, java.util.Map)'
java.lang.NoSuchMethodError: 'com.sun.jna.Library com.sun.jna.Native.load(java.lang.String, java.lang.Class, java.util.Map)'
at org.jline.terminal.impl.jna.win.Kernel32.<clinit>(Kernel32.java:22)
at org.jline.terminal.impl.jna.win.JnaWinSysTerminal.<clinit>(JnaWinSysTerminal.java:28)
at org.jline.terminal.impl.jna.JnaSupportImpl.isConsoleOutput(JnaSupportImpl.java:49)
at org.jline.terminal.spi.JnaSupport.isConsoleOutput(JnaSupport.java:31)
at org.jline.terminal.TerminalBuilder.doBuild(TerminalBuilder.java:333)
at org.jline.terminal.TerminalBuilder.build(TerminalBuilder.java:265)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at lucee.runtime.reflection.pairs.MethodInstance.invoke(MethodInstance.java:56)
at lucee.runtime.reflection.Reflector.callMethod(Reflector.java:877)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:829)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
at system.util.readerfactory_cfc$cf.udfCall(/commandbox/system/util/ReaderFactory.cfc:90)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:681)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1917)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1729)
at system.shell_cfc$cf.udfCall1(/commandbox/system/Shell.cfc:138)
at system.shell_cfc$cf.udfCall(/commandbox/system/Shell.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:202)
at lucee.runtime.tag.Invoke.doFunction(Invoke.java:222)
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:194)
at system.core.dynamic.mixerutil_cfc$cf.udfCall2(/wirebox/system/core/dynamic/MixerUtil.cfc:267)
at system.core.dynamic.mixerutil_cfc$cf.udfCall(/wirebox/system/core/dynamic/MixerUtil.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:681)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1917)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1729)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall3(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc:905)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:779)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall1(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc:707)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:681)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1917)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1729)
at system.ioc.scopes.singleton_cfc$cf.udfCall(/wirebox/system/ioc/scopes/Singleton.cfc:77)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:680)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1898)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1710)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall1(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc:417)
at users.bd.commandbox46.cfml.system.wirebox.system.ioc.injector_cfc$cf.udfCall(/_commandbox_root/Users/bd/.CommandBox/cfml/system/wirebox/system/ioc/Injector.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:681)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:568)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1917)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1729)
at users.bd.commandbox46.cfml.system.bootstrap_cfm$cf.call(/_commandbox_root/Users/bd/.CommandBox/cfml/system/Bootstrap.cfm:138)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:945)
at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:837)
at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:818)
at dx5dqg44jr99.call(Unknown Source)
at lucee.runtime.compiler.Renderer.tag(Renderer.java:108)
at lucee.runtime.compiler.Renderer.script(Renderer.java:98)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:63)
at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:194)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:330)
at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:155)
at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:583)

Mai 03, 2021 11:44:06 NACHM. org.jline.utils.Log logr
FEIN: Registering shutdown-hook: Thread[JLine Shutdown Hook,5,main]
Mai 03, 2021 11:44:06 NACHM. org.jline.utils.Log logr
FEIN: Adding shutdown-hook task: org.jline.terminal.impl.AbstractWindowsTerminal$$Lambda$125/0x000000080031a040@5844a2d1Mai 03, 2021 11:44:06 NACHM. org.jline.utils.Log logr
FEIN: Using terminal JansiWinSysTerminal
BOOM GOES THE DYNAMITE!!
We're truly sorry, but something horrible has gone wrong when starting up CommandBox.
Here's what we know:.

Message:
The parameter [name] to function [get] is required but was not passed in.

Tag Context:
C:\Users\bd\.CommandBox\cfml\system\wirebox\system\ioc\Provider.cfc: line 101
called from C:\Users\bd\.CommandBox\cfml\modules\commandbox-dotenv\models\EnvironmentFileService.cfc: line 22
called from C:\Users\bd\.CommandBox\cfml\modules\commandbox-dotenv\interceptors\LoadEnvForShell.cfc: line 16
called from C:\Users\bd\.CommandBox\cfml\system\wirebox\system\core\events\EventPool.cfc: line 118
called from C:\Users\bd\.CommandBox\cfml\system\wirebox\system\core\events\EventPool.cfc: line 95
called from C:\Users\bd\.CommandBox\cfml\system\wirebox\system\core\events\EventPoolManager.cfc: line 59
called from C:\Users\bd\.CommandBox\cfml\system\services\InterceptorService.cfc: line 57
called from C:\Users\bd\.CommandBox\cfml\system\Bootstrap.cfm: line 144

To enable full stack trace, run "config set verboseErrors=true"

cfml.cli.exitCode: 1
ShutdownHook- - SIGTERM received
ShutdownHook - checking if Main thread is dead. Try #1 --> true
ShutdownHook - main thread done
Mai 03, 2021 11:44:59 NACHM. org.jline.utils.Log logr
FEIN: Running all shutdown-hook tasks
Mai 03, 2021 11:44:59 NACHM. org.jline.utils.Log logr
FEIN: Running task: org.jline.terminal.impl.AbstractWindowsTerminal$$Lambda$125/0x000000080031a040@5844a2d1
PS D:\Webs\github\bardware\cfmlsamples>}}

Activity

Show:
Brad Wood
May 4, 2021, 3:48 AM

The JNA error is a red herring. CommandBox doesn’t use JNA, we use JANSI, so that error is always there when you turn on debugging mode and doesn’t mean anything. The real error was from the dot env module. The issue is you have a very old version of the commandbox-dotenv module installed which is not compatible with the new version of WireBox in the latest version of CommandBox. The fix is very simple. Just delete the Commandbox/system/cfml/modules/commandbox-dotenv folder and then CommandBox will start. Then you can re-install the latest version of commandbox-dotenv.

Won't Fix
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Bernhard Döbler