Chronicle-Map icon indicating copy to clipboard operation
Chronicle-Map copied to clipboard

Latest Chronicle Map and Chronicle Values available from chronicle.bom.version 2.25ea16 are incompatible and throws exception net.openhft.chronicle.values.ImplGenerationFailedException: java.lang.ClassNotFoundException: net.openhft.chronicle.hash.VanillaGlobalMutableState$$Native

Open coderrock2021 opened this issue 1 year ago • 4 comments

Issue : net.openhft.chronicle.values.ImplGenerationFailedException: java.lang.ClassNotFoundException: net.openhft.chronicle.hash.VanillaGlobalMutableState$$Native

Using Open JDK 17 and a SpringBoot based application

The issue still persists in the latest version of Chronicle Map and Chronicle Values:

Moving back to slightly older version of Chronicle Map & Chronicle Values works for now.

older version thats works fine: <chronicle.bom.version>2.23ea4</chronicle.bom.version> latest version as of today that breaks with the below error: <chronicle.bom.version>2.25ea16</chronicle.bom.version>

Caused by: net.openhft.chronicle.values.ImplGenerationFailedException: java.lang.ClassNotFoundException: net.openhft.chronicle.hash.VanillaGlobalMutableState$$Native
    	at net.openhft.chronicle.values.ValueModel.createClass(ValueModel.java:329) ~[chronicle-values-2.25ea3.jar!/:?]
    	at net.openhft.chronicle.values.ValueModel.createNativeClass(ValueModel.java:306) ~[chronicle-values-2.25ea3.jar!/:?]
    	at net.openhft.chronicle.values.ValueModel.nativeClass(ValueModel.java:282) ~[chronicle-values-2.25ea3.jar!/:?]
    	at net.openhft.chronicle.values.Values.nativeClassFor(Values.java:89) ~[chronicle-values-2.25ea3.jar!/:?]
    	at net.openhft.chronicle.map.ChronicleMapBuilder.createWithFile(ChronicleMapBuilder.java:1695) ~[chronicle-map-3.25ea4.jar!/:3.25ea4]
    	at net.openhft.chronicle.map.ChronicleMapBuilder.createPersistedTo(ChronicleMapBuilder.java:1588) ~[chronicle-map-3.25ea4.jar!/:3.25ea4]

coderrock2021 avatar Jan 31 '24 20:01 coderrock2021

Hi!

Are you able to reproduce this issue in an isolated unit test, Venny?

chroniclekevinpowe avatar Jan 31 '24 23:01 chroniclekevinpowe

Quick update and clarification - I'm able to create a Chronicle Map locally without issues using createPersistedTo with BOM 2.25ea16. It'd be a great help if you're able to reproduce this issue with an isolated test, as it may be I'm not exercising the same code locally.

chroniclekevinpowe avatar Feb 01 '24 01:02 chroniclekevinpowe

chronicle-map-issue.zip Hi Kevin,

Thank you for your prompt response :)

I did try to reproduce in an isolated sample app attached above:

  • one from plain java public static void main based

  • and another from a spring boot based - similar to how my current org's spring boot apps are run.

The issue is not reproducible in the above attached example though.

But it consistently occurs in my org's springboot app's if they use BOM 2.25ea16. But if I move back to BOM 2.23ea4, it no longer occurs in my org's apps.

Guessing, it could be due to some SpringBoot's ClassLoader issue ?

Cheers :) Venny

coderrock2021 avatar Feb 01 '24 11:02 coderrock2021

It's worth noting that the underlying functionality being exercised when loading the map has not changed for some time.

The issue you're experiencing may be related to classloading with SpringBoot. In case you haven't taken it into account already, it'd be worth looking at this Wire docco on SpringBoot's classloader.

Please let us know if you are able to produce an isolated test case reproducing the issue.

chroniclekevinpowe avatar Feb 02 '24 00:02 chroniclekevinpowe

@coderrock2021 any further news on this? We can't reproduce and so it would appear to be related to your org's application. Closing, but we can reopen if you can help us reproduce.

JerryShea avatar Mar 29 '24 00:03 JerryShea