You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use UOM together with spring data redis to persist some values.
When saving the Object i always get the following error:
Caused by: java.lang.NoClassDefFoundError: IllegalName: tech.units.indriya.unit.ProductUnit$$Lambda$1208/0x0000000801204e70_Accessor_5hp3zf
at java.base/java.lang.ClassLoader.preDefineClass(ClassLoader.java:886) ~[na:na]
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1010) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:506) ~[spring-core-6.0.3.jar:6.0.3]
Any hints how it is meant to be serialized?
I am using Spring Boot 3 on Java 17 with Indriya 2.1.3.
The text was updated successfully, but these errors were encountered:
Can you share more details or code snippets to reproduce?
It might be a problem of Spring and reflection under Java 17, there are some things that got more restrictive with every version. Did you ask the Spring Framework Core team about the error in ReflectUtils? ProductUnit inherits from AbstractUnit which is Serializable, so there is no serialization issue as such.
@andi-huber Any idea what the $$Lambda$$ might mean, because at least inside ProductUnit itself I could not see lambda expressions either.
Thanks for the input @andi-huber, then @MehrCurry could you please ask the Spring team why they're still using CGLIB and if there is another option you may try?
I am trying to use UOM together with spring data redis to persist some values.
When saving the Object i always get the following error:
Any hints how it is meant to be serialized?
I am using Spring Boot 3 on Java 17 with Indriya 2.1.3.
The text was updated successfully, but these errors were encountered: