Locale problem

I’m trying to get the tests to run on a Debian server. But I get the following error. It looks like a locale error. I’ve tried setting the locale on my server to en_CA.UTF-8 but that didn’t fix it. I also tried running the tests with -Duser.language=en but that didn’t work either, I still get this error. Thoughts?

java.lang.NoClassDefFoundError: Could not initialize class VASSAL.i18n.Resources
at VASSAL.configure.HotKeyConfigurer.getString(HotKeyConfigurer.java:118)
at VASSAL.configure.NamedHotKeyConfigurer.getString(NamedHotKeyConfigurer.java:219)
at VASSAL.counters.KeyCommand.(KeyCommand.java:57)
at VASSAL.counters.KeyCommand.(KeyCommand.java:65)
at VASSAL.counters.DynamicProperty$DynamicKeyCommand.(DynamicProperty.java:387)
at VASSAL.counters.DynamicProperty$DynamicKeyCommandConfigurer.(DynamicProperty.java:405)
at VASSAL.counters.SetGlobalPropertySerializeTest.setKeyCommandListConfig(SetGlobalPropertySerializeTest.java:32)
at VASSAL.counters.SetGlobalPropertySerializeTest.serialize(SetGlobalPropertySerializeTest.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

Thus spake fil512:

I’m trying to get the tests to run on a Debian server. But I get the
following error. It looks like a locale error. I’ve tried setting the
locale on my server to en_CA.UTF-8 but that didn’t fix it. I also tried
running the tests with -Duser.language=en but that didn’t work either, I
still get this error. Thoughts?

Presently the language files are keyed only to the langauge, not the
country (so, there’s a fr file, but not a fr_CA one), so I think it
should make no difference what you have the country set to.

My guess is that it’s failing because it can’t find the resource files
in src/VASSAL/i18n.


J.

For future reference, this issue was Maven related. The fix for it was to move the resource files from src/main/java to src/main/resources.