EUnit TypeLoadException

I am trying to upgrade my project (again) from Elements 2289 (with Visual Studio 2015), where it works well, to 2395 (with Water). Configuration: cross-platform Oxygene source, compiling to java and .NET, using EUnit for testing.

.NET test program actually runs, but individual EUnit tests fail with:

TestFltModify finished. State: Failed. Message: [TypeLoadException]: Could not load type 'RemObjects.Elements.EUnit.__Global' from assembly 'RemObjects.Elements.EUnit, Version=10.0.0.2289, Culture=neutral, PublicKeyToken=null'.

java test program (almost identical, using the same cross-platform code) terminates immediately:

Exception in thread "main" java.lang.ExceptionInInitializerError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at RemObjects.Elements.EUnit.PackageHelper.ListClasses(c:\CI\b\elements\
937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas:
32)
        at RemObjects.Elements.EUnit.PackageHelper.LoadClasses(c:\CI\b\elements\
937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas:
50)
        at RemObjects.Elements.EUnit.PackageHelper.LoadClasses(c:\CI\b\elements\
937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas:
59)
        at RemObjects.Elements.EUnit.PackageHelper.LoadAllClasses(c:\CI\b\elemen
ts\937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.p
as:71)
        at RemObjects.Elements.EUnit.Discovery.DiscoverTests(c:\CI\b\elements\93
7\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\CooperDiscovery.pas:
112)
        at TestDEXjava.__Global.main$(D:\DEX\TestDEXjava\Program.pas:37)
        at TestDEXjava.__Global.main(D:\DEX\TestDEXjava\Program.pas)
Caused by: java.lang.IllegalArgumentException
        at java.util.Currency.getInstance(Unknown Source)
        at RemObjects.Elements.RTL.Locale.<init>()
        at RemObjects.Elements.RTL.Locale.getInvariant()
        at Utils.Formatting.<init>(D:\DEX\DEX\UtilsUtils.pas:25)
        at Utils.Formatting.<clinit>(D:\DEX\DEX\UtilsUtils.pas:23)
        ... 9 more

What is wrong, what should I check?

this should be fixed in 2399.

OK, I waited until 2405. I made a fresh install of “RemObjects Elements with Water - 10.0.0.2405”. Now, EUnit works with .NET, but the problem persists with java.

A freshly created Java “EUnit Test Application (Java)” terminates at Discovery.DiscoverTests() with

Exception in thread "main" java.lang.ClassFormatError: Duplicate method name "waitForExpectations____timeout__enforceOrder$RGN28RemObjects$Elements$RTL$List0N50
RemObjects$Elements$EUnit$XCTest$XCTestExpectationN16java$lang$DoubleN33RemObjec
ts$Elements$System$DoubleN45RemObjects$Elements$EUnit$XCTest$TimeIntervalN17java
$lang$BooleanN34RemObjects$Elements$System$Boolean" with signature "(Ljava.util.
ArrayList;DZ)I" in class file RemObjects/Elements/EUnit/XCTest/XCTWaiter
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at RemObjects.Elements.EUnit.PackageHelper.ListClasses(c:\CI\b\elements\937\SourceRemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas: 32)
        at RemObjects.Elements.EUnit.PackageHelper.LoadClasses(c:\CI\b\elements\937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas: 50)
        at RemObjects.Elements.EUnit.PackageHelper.LoadClasses(c:\CI\b\elements\937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas:59)
        at RemObjects.Elements.EUnit.PackageHelper.LoadAllClasses(c:\CI\b\elements\937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\PackageHelper.pas:71)
        at RemObjects.Elements.EUnit.Discovery.DiscoverTests(c:\CI\b\elements\937\Source\RemObjects.Elements.EUnit\Sources\Discovery\Cooper\CooperDiscovery.pas: 112)
        at TestDEXjava.__Global.main$(D:\DEX\TestDEXjava\Program.pas:37)
        at TestDEXjava.__Global.main(D:\DEX\TestDEXjava\Program.pas)

I also noticed that after 4005 install, in Visual Studio, at “References/Add reference…”, any reference to remobjects.elements.eunit is gone, so I can’t explicitly reference what should be the “official” installed jar. The path to EUnit jar is currently set to “C:\Program Files (x86)\RemObjects Software\Elements\References\Cooper\Plain\remobjects.elements.eunit.jar”

So, what next, where to look at and what to do?