Event rest api not allowing time element with OpenJDK 11
Description
Environment
Acceptance / Success Criteria
Lucidchart Diagrams
Activity
Benjamin Reed October 1, 2019 at 6:39 PM
I know this issue was technically first, but I'm closing it as "duplicate" in favor of https://opennms.atlassian.net/browse/NMS-12263#icft=NMS-12263 since it turns out making this code backwards-compatible is WAY more work than it should be, and is ultimately just prolonging the pain.
Instead we'll be pulling off the band-aid and introducing the breaking change of requiring ISO-8601 dates for events rather than locale-based dates.
Benjamin Reed August 28, 2019 at 5:53 PM
OK, new issue created for the long-term CLDR support: https://opennms.atlassian.net/browse/NMS-12263#icft=NMS-12263
Benjamin Reed August 28, 2019 at 5:42 PM
Yeah, probably worth making a new issue. Definitely not liking that it's putting at
in serialized stuff or adding commas or whatever. Might be we just need to change the way we output some things to account for it, rather than just changing the test data.
Ron Roskens August 28, 2019 at 4:34 PMEdited
Enabling COMPAT locale short term would seem to be the best option then. I couldn't find anything about when it might be removed in a future java release.
Lets say someone didn't want to use COMPAT on a new install, would work supporting that be in a new JIRA issue?
Benjamin Reed August 28, 2019 at 4:17 PM
Looking at the changes in your branch, Ron, it appears that would actually change the way we serialize dates, which seems bad compatibility-wise. Seems like the locale COMPAT
is the safer choice here.
When event is inserted via rest api with time element it does not work with OpenJDK 11 and is giving following error message in web.log:
"Failed to marshal/unmarshal XML file while unmarshalling an object (Event): javax.xml.bind.UnmarshalException: java.text.ParseException: Unparseable date: "2019-08-27T07:13:53+00:00""
With JDK 8 this is working.