glassfish
  1. glassfish
  2. GLASSFISH-19009

Date Bean Validation error when using Joda-time: java.lang.ClassNotFoundException: org.joda.time.ReadableInstant

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2
    • Fix Version/s: None
    • Component/s: bean-validator
    • Labels:
      None
    • Environment:

      Glassfish 3.1.2.2, JDK 7

      Description

      Referring to this forum post: http://forums.java.net/node/888356
      Hibernate Validator fails with java.lang.ClassNotFoundException: org.joda.time.ReadableInstant when using the @Past and @Future annotations.

      A similar bug in JBoss AS 7: https://issues.jboss.org/browse/AS7-1465

      The bug is that Hibernate Validator needs Joda Time, but it's not on its classpath.

      A possible workaround is to repackage bean-validator.jar with joda-time. This seems to work, but it's far from optimal.

        Activity

        Hide
        ymajoros added a comment -

        Seems it was fixed in JBOSS by creating a Jodatime module which Hibernate Validator depends on. Could you envisage the same solution?

        Show
        ymajoros added a comment - Seems it was fixed in JBOSS by creating a Jodatime module which Hibernate Validator depends on. Could you envisage the same solution?
        Hide
        Vetle Leinonen-Roeim added a comment -

        Sounds like a much better solution than my hack.

        Show
        Vetle Leinonen-Roeim added a comment - Sounds like a much better solution than my hack.
        Hide
        gcruscoe added a comment -

        I still see this issue on glassfish 4.0 – I see a tag 4.0.1-reviewed. I do not know of a work around for this issue. Can we post a work around here as well as confirm whether it will be fixed in the 4.0.1 release?

        Show
        gcruscoe added a comment - I still see this issue on glassfish 4.0 – I see a tag 4.0.1-reviewed. I do not know of a work around for this issue. Can we post a work around here as well as confirm whether it will be fixed in the 4.0.1 release?

          People

          • Assignee:
            phil.zampino
            Reporter:
            Vetle Leinonen-Roeim
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: