0

I'm using docker payara/server-full:5.2020.5-jdk11 image. I deployed the java ee app built with JDK 11. I have some DTOs, in which I have annotations like:

@XmlJavaTypeAdapter(DateTimeAdapter.class)
private Date creationDate;

private SomeEnum enumm;

@XmlEnum
public enum SomeEnum {
@XmlEnumValue("U")
USER;
}

and these annotations are not working (while making rest requests). There is no error in runtime. Annotations are just ignored. I tested adding ie throw exception in adapter and nothing happened.

I read about that in JDK 11 this package is excluded, and I also added the recommended dependencies to the pom, but still no difference. And, as I said, I have no error.

Matt
  • 35
  • 8
  • Did you deploy the dependencies? – Andreas Oct 21 '20 at 12:13
  • Inside .ear i have .war, and inside it in web-inf\lib i can find these dependencies – Matt Oct 21 '20 at 12:19
  • Have you added the `jaxb-impl` into your application as described in https://stackoverflow.com/a/48204154/784594? is the `jaxb-impl` JAR in your web-inf/lib folder in the WAR? – OndroMih Oct 22 '20 at 09:10

1 Answers1

-1

I need to mention, that i'm making the migration from payara 4.

I think that my problem is related to those topics:
JSON Binding @JsonbTypeDeserializer annotation ignored on enums?
Glassfish 5 ignores JAXB @XmlJavaTypeAdapter annotation?
How do I configure Glassfish 5 to use Moxy as the default Provider?

For now I decided to use:

@JsonbDateFormat
// and
@JsonbTypeAdapter

as a replacement.

Matt
  • 35
  • 8