Skip to content

Weird jgit stacktraces in publish command on Linux with a non-default / non-US locale #1293

Open
@alexarchambault

Description

@alexarchambault

Version(s)
0.1.12

Describe the bug
Using scala-cli publish or scala-cli publish local on a (Linux?) machine with a non-US locale makes jgit prints stack traces such as these:

$ scala-cli publish local .
Using directive publish.version not set, assuming git:tag as publish.computeVersion
Exception in thread "Thread-3" org.eclipse.jgit.errors.TranslationBundleLoadingException: Loading of translation bundle failed for [org.eclipse.jgit.internal.JGitText, en_US]
	at org.eclipse.jgit.nls.TranslationBundle.load(TranslationBundle.java:141)
	at org.eclipse.jgit.nls.GlobalBundleCache.lookupBundle(GlobalBundleCache.java:64)
	at org.eclipse.jgit.nls.NLS.get(NLS.java:125)
	at org.eclipse.jgit.nls.NLS.getBundleFor(NLS.java:101)
	at org.eclipse.jgit.internal.JGitText.get(JGitText.java:28)
	at org.eclipse.jgit.util.FS$GobblerThread.setError(FS.java:1499)
	at org.eclipse.jgit.util.FS$GobblerThread.run(FS.java:1469)
	at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:705)
	at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.eclipse.jgit.internal.JGitText, locale en_US
	at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2045)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1683)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1586)
	at java.util.ResourceBundle.getBundle(ResourceBundle.java:1280)
	at org.eclipse.jgit.nls.TranslationBundle.load(TranslationBundle.java:138)
	... 8 more
Caused by: java.lang.ClassCastException: org.eclipse.jgit.internal.JGitText cannot be cast to ResourceBundle
	at java.util.ResourceBundle$Control.newBundle0(ResourceBundle.java:3211)
	at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:3151)
	at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1984)
	at java.util.ResourceBundle.findBundle(ResourceBundle.java:1770)
	at java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)
	at java.util.ResourceBundle.findBundle(ResourceBundle.java:1722)
	at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1656)
	... 11 more

These seem to be non-fatal - Scala CLI just keeps going after they're printed. They're just surprising.

Expected behaviour
No such stack traces get printed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpublish commandrequires scopingIssue requires a spike to revalidate it and assign an up-to date scope for its requirements.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions