-
Bug
-
Resolution: Done
-
Major
-
1.4.0.Final
-
None
The jberet rest api relies on jaxb for org.jberet.schedule.JobScheduleConfig (de)serialization.
This class is annotated with Jaxb annotation, however it contains two fields of types out of this project scope.
For instance, the project is compiled against jboss-ejb-api_3.2_spec version 1.0.0.Final, while wildfly 19 provides version 2.0.0.Final in system modules.
In version 1.0.0.Final, the ScheduleExpression declare those fields:
// Some comments here public class ScheduleExpression implements Serializable { private static final long serialVersionUID = 1L; private String dayOfMonth = "*"; private String dayOfWeek = "*"; private Date end; private String hour = "0"; private String minute = "0"; private String month = "*"; private String second = "0"; private Date start; private String timezone = ""; private String year = "*";
While in version 2.0.0.Final, those fields have been suffixed:
public class ScheduleExpression implements Serializable { private static final long serialVersionUID = -3813254457230997879L; //... private String second_ = "0"; private String minute_ = "0"; private String hour_ = "0"; private String dayOfMonth_ = "*"; private String month_ = "*"; private String dayOfWeek_ = "*"; private String year_ = "*"; private String timezoneID_ = null; private Date start_ = null; private Date end_ = null;
This causes an error in deserialization while running on the restAPI wildfly sample on wildfly 19:
14:15:52,060 ERROR [stderr] (default task-1) com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "month" (class javax.ejb.ScheduleExpression), not marked as ignorable (0 known properties: ]) 14:15:52,061 ERROR [stderr] (default task-1) at [Source: (io.undertow.servlet.spec.ServletInputStreamImpl); line: 1, column: 72] (through reference chain: javax.ejb.ScheduleExpression["month"]) 14:15:52,068 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61) 14:15:52,074 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:840) 14:15:52,082 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1192) 14:15:52,090 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1592) 14:15:52,095 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1570) 14:15:52,101 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:294) 14:15:52,107 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) 14:15:52,113 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:138) 14:15:52,119 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288) 14:15:52,124 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151) 14:15:52,129 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1682) 14:15:52,134 ERROR [stderr] (default task-1) at com.fasterxml.jackson.core.jackson-databind@2.10.1//com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:977) 14:15:52,140 ERROR [stderr] (default task-1) at org.jboss.resteasy.resteasy-jackson2-provider@3.11.0.Final//org.jboss.resteasy.plugins.providers.jackson.ResteasyJackson2Provider.readFrom(ResteasyJackson2Provider.java:192) 1