2 Replies Latest reply on Mar 10, 2011 6:11 AM by Jesper Vrelits

    RF 4 CR1: graphValidator + Clonable + JPA

    Jesper Vrelits Newbie

      Hi!

       

      I tried to use graphValidator and implement Clonable on my form bean (as advised), but I get the following error

       

      Caused by: java.lang.ClassCastException: org.eclipse.persistence.jpa.PersistenceProvider
      at javax.persistence.Persistence$1.isLoaded(Persistence.java:77)
      at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:62)
      at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:94)
      at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:47)
      at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:757)
      at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:324)
      at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:276)
      at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:256)
      at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:210)
      at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
      at org.richfaces.validator.BeanValidatorServiceImpl.validateObject(BeanValidatorServiceImpl.java:447)
      at org.richfaces.component.AbstractGraphValidator.validateObject(AbstractGraphValidator.java:214)
      at org.richfaces.component.AbstractGraphValidator.processValidators(AbstractGraphValidator.java:199)

       

      In my form bean I have an JPA entity. Funny enough I'm using hibernate and not some eclipse stuff it complains about. I have no idea where it gets org.eclipse.persistence.jpa.PersistenceProvider from???

       

      If I remove 'implements Clonable' the error disappears.