I'm getting an error (see below) on one server (Server1) but not at another (Server2).
Here is code:
GregorianCalendar c = new GregorianCalendar();
c.setTime(rs.getDate("claimDate"));
XMLGregorianCalendar date2 =
DatatypeFactory.newInstance().newXMLGregorianCalendar(c);
Here is error:
Caused by: java.lang.NoSuchMethodError: javax.xml.datatype.FactoryFinder.find(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object;
at javax.xml.datatype.DatatypeFactory.newInstance(DatatypeFactory.java:49) ~[?:?]
Java versions are same (build 1.8.0_92-b14).
I've used a custom Karaf distribution (https://karaf.apache.org/manual/latest/#_custom_distributions) which I deploy on two different servers (different physical machines and Ubuntu versions).
Server1: Linux karaf1 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Server2: Linux newproger 3.13.0-142-generic #191-Ubuntu SMP Fri Feb 2 12:13:35 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Start scripts and java parameters are all same.