I've had a few reports of the latest version of Co...
# box-products
b
I've had a few reports of the latest version of CommandBox/Lucee dumping a bunch of OSGI errors out to the console when you start two instances of CommandBox at the same time. Can anyone confirm if they can reproduce this? I'd like to test a fix I've been playing with (that involves a pull request to Lucee).
r
I will see if I can reproduce it
b
Basically, on the latest CommandBox version just open two terminals running box
r
No issue for me
I am on box 5.7.0
b
@jacek Can you set the environment variable
Copy code
FELIX_LOG_LEVEL=0
in the terminal before starting the second box instance and see if it hides those messages?
j
@bdw429s it does! Setting the variable (Windows Terminal)
Copy code
set FELIX_LOG_LEVEL=0
and then running
Copy code
box
effectively hides the error messages
b
@jacek Thank you for helping test!
👍 1
t
@bdw429s I just tried the above test and it didn't work for me. I'm on Win10 and v5.7.0 of CommandBox. After setting that var I still get the lengthy list of error messages show multiples of this:
Copy code
ERROR: Error reloading cached bundle, removing it: C:\Users\bholm\.CommandBox\engine\cfml\cli\lucee-server\felix-cache\bundle9
java.io.FileNotFoundException: C:\Users\bholm\.CommandBox\engine\cfml\cli\lucee-server\felix-cache\bundle9\<http://bundle.info|bundle.info> (The system cannot find the file specified) 
        at java.base/java.io.FileInputStream.open0(Native Method)
        at java.base/java.io.FileInputStream.open(Unknown Source)
        at java.base/java.io.FileInputStream.<init>(Unknown Source)
        at org.apache.felix.framework.util.SecureAction.getFileInputStream(SecureAction.java:454)
        at org.apache.felix.framework.cache.BundleArchive.readBundleInfo(BundleArchive.java:872)
        at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:172)
        at org.apache.felix.framework.cache.BundleCache.getArchives(BundleCache.java:432)
        at org.apache.felix.framework.Felix.init(Felix.java:787)
        at org.apache.felix.framework.Felix.init(Felix.java:641)
        at org.apache.felix.framework.Felix.start(Felix.java:1084)
        at lucee.loader.engine.CFMLEngineFactory.getFelix(CFMLEngineFactory.java:525)
        at lucee.loader.osgi.BundleLoader.loadBundles(BundleLoader.java:93)
        at lucee.loader.engine.CFMLEngineFactory.initEngine(CFMLEngineFactory.java:381)
        at lucee.loader.engine.CFMLEngineFactory.initEngineIfNecessary(CFMLEngineFactory.java:262)
        at lucee.loader.engine.CFMLEngineFactory.getInstance(CFMLEngineFactory.java:168)
        at lucee.runtime.script.BaseScriptEngineFactory.<init>(BaseScriptEngineFactory.java:67)
        at lucee.runtime.script.LuceeScriptEngineFactory.<init>(LuceeScriptEngineFactory.java:27)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
        at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
        at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(Unknown Source)
        at java.base/java.util.ServiceLoader$ProviderImpl.get(Unknown Source)
        at java.base/java.util.ServiceLoader$3.next(Unknown Source)
        at java.scripting/javax.script.ScriptEngineManager.initEngines(Unknown Source)
        at java.scripting/javax.script.ScriptEngineManager.init(Unknown Source)
        at java.scripting/javax.script.ScriptEngineManager.<init>(Unknown Source)
        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:306)
        at cliloader.LoaderCLIMain.execute(LoaderCLIMain.java:155)
        at cliloader.LoaderCLIMain.main(LoaderCLIMain.java:580)
b
@teaman I think you have to restart Windows for system vars to take affect. Or at least completely close and re-open the terminal app.
If you want to "prove" if your env var is set, then run the following
Copy code
echo %FELIX_LOG_LEVEL%
To be clear, I intended for people to set it simply by doing this
Copy code
SET FELIX_LOG_LEVEL=0
in the terminal
t
@bdw429s I tried the set command in the terminal but it didn't show up when I opened the UI shown above so I added it in the UI as shown in the above screenshot. You are probably right about restarting the shell session.
b
env vars are cached inside the runtime of a given process
t
Is this the prescribed fix? I can ignore the errors and just wait for a new CB version.
b
So in other words, the list of env vars in your little Windows GUI are not actively looked at by any given process while it's running. They are simply used as the defaults when a new process is spawned
So adding new env vars there will not afffect existing processes, only new processes, when they are started
You can use the 4.8.0 alpha builds if you like
t
ok
b
I'm looking to put out a release (probablky 4.7.1) after Lucee releases 5.4 whcih is supposed to be soon-ish
t
I'm fine ignoring the errors so long as CB runs, which it appears to be doing fine. I'm using CF2018 and not Lucee so I assume it has no other impact other than the transcript of errors.
b
Not that I know of
There's something Felix does with the OSGI bundles that gets unhappy due to Windows file locks
I have no idea what changed-- I've seen that error on and off for years, but something made it happen much more often in the latest version of Lucee
@teaman @jacek @Robert Zehnder I finally found the root cause of this. Turns out hiding the Felix errors didn't actually fix the issue. here are the details https://ortussolutions.atlassian.net/browse/COMMANDBOX-1552
👍 2
r
Awesome news. Thanks Brad
👍 1
t
That's great news! @bdw429s
r
@bdw429s I created file box.l4j.ini: "-Dorg.osgi.framework.storage.clean=none". Now commandbox doesn't run 😞
b
@romanstr I'm not sure what you mean by "doesn't run" so I can't begin to help you there
r
Sorry. I believe I had to turn off all commandbox instances after add box.l4j.ini. I've done it, and now it works without errors! Thank you!