-
Notifications
You must be signed in to change notification settings - Fork 21
Known issues and how to resolve them
We noticed that there are cases when you might receive an com.fasterxml.jackson.databind.exc.InvalidFormatException error when using the library.
Error could look something like this:
com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not deserialize value of type java.util.Date from String "2018-04-17T14:50:37.4008047-04:00": not a valid representation (error: Failed to parse Date value '2018-04-17T14:50:37.4008047-05:00': Can not parse date "2018-04-17T14:50:37.4008047-0500": while it seems to fit format 'yyyy-MM-dd'T'HH:mm:ss.SSSZ', parsing fails (leniency? null))
The reason why you would see this error is since older versions of Jackson library have a problem with parsing fractional timezones.
The issue was fixed in version 2.9.2. Make sure that you are using up to date version of Jackson, and you should not see this issue. Postmark Java library is using newer version in it's pom.xml, but you might have a reference to Jackson in one of your pom files too. Double check version when trying out the library.
If you experience an error which looks something like one below, you are probably using library which is using Jersey (http client):
java.lang.IllegalStateException: InjectionManagerFactory not found. at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory(Injections.java:98) at java.util.Optional.orElseThrow(Optional.java:290) at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:98) at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:68)
The error is caused by mismatch betwen Jersey client version, and one of solutions from https://stackoverflow.com/questions/44088493/jersey-stopped-working-with-injectionmanagerfactory-not-found could help resolve it.
One of our users resolved it by adding following dependency to pom.xml
<dependency> <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> <version>2.27</version> </dependency>
For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.