{"action":"created","issue":{"url":"https://api.github.com/repos/javers/javers/issues/224","labels_url":"https://api.github.com/repos/javers/javers/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/javers/javers/issues/224/comments","events_url":"https://api.github.com/repos/javers/javers/issues/224/events","html_url":"https://github.com/javers/javers/issues/224","id":110854243,"number":224,"title":"ClassCastException with joda-time objects","user":{"login":"asaf-romano","id":11056617,"avatar_url":"https://avatars.githubusercontent.com/u/11056617?v=3","gravatar_id":"","url":"https://api.github.com/users/asaf-romano","html_url":"https://github.com/asaf-romano","followers_url":"https://api.github.com/users/asaf-romano/followers","following_url":"https://api.github.com/users/asaf-romano/following{/other_user}","gists_url":"https://api.github.com/users/asaf-romano/gists{/gist_id}","starred_url":"https://api.github.com/users/asaf-romano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asaf-romano/subscriptions","organizations_url":"https://api.github.com/users/asaf-romano/orgs","repos_url":"https://api.github.com/users/asaf-romano/repos","events_url":"https://api.github.com/users/asaf-romano/events{/privacy}","received_events_url":"https://api.github.com/users/asaf-romano/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/javers/javers/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/javers/javers/labels/test%20required","name":"test required","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-10-11T12:45:47Z","updated_at":"2015-10-14T21:00:56Z","closed_at":null,"body":"Hey there,\r\n\r\nTrying to use the library on an object containing various jodatime's DateTime fields, I get the following exception:\r\n``\r\njava.util.concurrent.CompletionException: java.lang.ClassCastException: org.joda.time.chrono.ISOChronology cannot be cast to org.javers.core.metamodel.object.GlobalId\r\n\tat java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[na:1.8.0_60]\r\n\tat java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[na:1.8.0_60]\r\n\tat java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) [na:1.8.0_60]\r\n\tat java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1582) [na:1.8.0_60]\r\n\tat java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[na:1.8.0_60]\r\n\tat java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[na:1.8.0_60]\r\n\tat java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[na:1.8.0_60]\r\n\tat java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[na:1.8.0_60]\r\nCaused by: java.lang.ClassCastException: org.joda.time.chrono.ISOChronology cannot be cast to org.javers.core.metamodel.object.GlobalId\r\n\tat org.javers.core.graph.ObjectNode.getReference(ObjectNode.java:75) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.RealNodePair.getRightGlobalId(RealNodePair.java:61) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.appenders.ReferenceChangeAppender.calculateChanges(ReferenceChangeAppender.java:25) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.appenders.ReferenceChangeAppender.calculateChanges(ReferenceChangeAppender.java:15) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.DiffFactory.appendChanges(DiffFactory.java:142) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.DiffFactory.appendPropertyChanges(DiffFactory.java:132) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.DiffFactory.createAndAppendChanges(DiffFactory.java:114) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.DiffFactory.create(DiffFactory.java:65) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.diff.DiffFactory.compare(DiffFactory.java:58) ~[javers-core-1.3.13.jar:na]\r\n\tat org.javers.core.JaversCore.compare(JaversCore.java:94) ~[javers-core-1.3.13.jar:na]\r\n``"},"comment":{"url":"https://api.github.com/repos/javers/javers/issues/comments/148199149","html_url":"https://github.com/javers/javers/issues/224#issuecomment-148199149","issue_url":"https://api.github.com/repos/javers/javers/issues/224","id":148199149,"user":{"login":"bartoszwalacik","id":2511028,"avatar_url":"https://avatars.githubusercontent.com/u/2511028?v=3","gravatar_id":"","url":"https://api.github.com/users/bartoszwalacik","html_url":"https://github.com/bartoszwalacik","followers_url":"https://api.github.com/users/bartoszwalacik/followers","following_url":"https://api.github.com/users/bartoszwalacik/following{/other_user}","gists_url":"https://api.github.com/users/bartoszwalacik/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszwalacik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszwalacik/subscriptions","organizations_url":"https://api.github.com/users/bartoszwalacik/orgs","repos_url":"https://api.github.com/users/bartoszwalacik/repos","events_url":"https://api.github.com/users/bartoszwalacik/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszwalacik/received_events","type":"User","site_admin":false},"created_at":"2015-10-14T21:00:55Z","updated_at":"2015-10-14T21:00:55Z","body":"chronology ... so when two dates are using diffrent callendars?\r\n\r\nIn fact, there is no out-of-the-box support for org.joda.time.DateTime in JaVers\r\n(only 2 Joda types have built in cmparators: LocalDateTime and LocalDate)\r\n\r\nTry to write and register `CustomPropertyComparator` (see http://javers.org/documentation/diff-configuration/#custom-comparators) for org.joda.time.DateTime, and then we can push it to JaVers core.\r\n"}}