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
It looks like Serde isn't compatible with ZoneId, it's throwing errors.
Actual Behaviour
It should work.
Steps To Reproduce
Serializing my model DTO produces the following error:
@Serdeable
data classLocation(
valtimeZoneId:ZoneId,
)
Caused by: io.micronaut.serde.exceptions.SerdeException: No serializable introspection present for type ZoneRegion. Consider adding Serdeable. Serializable annotate to type ZoneRegion. Alternatively if you are not in control of the project's source code, you can use @SerdeImport(ZoneRegion.class) to enable serialization of this type.
After this, I tried to use @SerdeImport to import the affected classes. ZoneRegion wasn't available for import, maybe because it's internal, but after adding the following imports, I got farther, but I eventually hit a new error:
18:14:30.726 [default-nioEventLoopGroup-1-3] ERROR i.m.http.server.RouteExecutor - Unexpected error occurred: class com.cfa.ots.fsd.$java_time_zone_ZoneOffsetTransition$Introspection tried to access method 'java.util.List java.time.zone.ZoneOffsetTransition.getValidOffsets()' (com.cfa.ots.fsd.$java_time_zone_ZoneOffsetTransition$Introspection is in unnamed module of loader 'app'; java.time.zone.ZoneOffsetTransition is in module java.base of loader 'bootstrap')
java.lang.IllegalAccessError: class com.cfa.ots.fsd.$java_time_zone_ZoneOffsetTransition$Introspection tried to access method 'java.util.List java.time.zone.ZoneOffsetTransition.getValidOffsets()' (com.cfa.ots.fsd.$java_time_zone_ZoneOffsetTransition$Introspection is in unnamed module of loader 'app'; java.time.zone.ZoneOffsetTransition is in module java.base of loader 'bootstrap')
at com.cfa.ots.fsd.$java_time_zone_ZoneOffsetTransition$Introspection.dispatchOne(Unknown Source)
at io.micronaut.inject.beans.AbstractInitializableBeanIntrospection$BeanReadPropertyImpl.getUnsafe(AbstractInitializableBeanIntrospection.java:1170)
at io.micronaut.serde.support.serializers.SerBean$PropSerProperty.get(SerBean.java:511)
at io.micronaut.serde.support.serializers.CustomizedObjectSerializer.serializeInto(CustomizedObjectSerializer.java:63)
Is there anything else I can try here? I'm considering writing custom serializers, but I wanted to check if there's a better way because this is surely a common problem.
Environment Information
OSX Sequioa 15.2
JDK 17.0.10
Example Application
No response
Version
4.7.4
The text was updated successfully, but these errors were encountered:
Yup, that's what I ended up doing, the docs were good on how to do that. However, I opened this issue because I was expecting Serde to be able to automatically handle the built in java classes. Is this something you guys have in scope?
Expected Behavior
It looks like Serde isn't compatible with ZoneId, it's throwing errors.
Actual Behaviour
It should work.
Steps To Reproduce
Serializing my model DTO produces the following error:
After this, I tried to use
@SerdeImport
to import the affected classes.ZoneRegion
wasn't available for import, maybe because it's internal, but after adding the following imports, I got farther, but I eventually hit a new error:Final error:
Is there anything else I can try here? I'm considering writing custom serializers, but I wanted to check if there's a better way because this is surely a common problem.
Environment Information
OSX Sequioa 15.2
JDK 17.0.10
Example Application
No response
Version
4.7.4
The text was updated successfully, but these errors were encountered: