javax.validation.ValidationException: Call to TraversableResolver.isReachable() threw an exception

Hibernate JIRA | Archie Cobbs | 6 years ago
  1. 0

    The documentation for the Hibernate Validator states: {quote} The API is not tied to a specific application tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developer. {quote} However, this doesn't seem to be the case. It is true that validation can be performed without any persistence layer being present. However, simply by having a non-Hibernate persistence layer such as EclipseLink in the classpath, validation fails as follows: {noformat} javax.validation.ValidationException: Call to TraversableResolver.isReachable() threw an exception at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:766) at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:324) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273) 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 Foo.main(Foo.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) at org.apache.tools.ant.taskdefs.Java.run(Java.java:764) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.Main.runBuild(Main.java:758) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.NullPointerException at javax.persistence.Persistence$1.isLoaded(Persistence.java:78) 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) ... 33 more {noformat} I've attached a test case. Run "ant" to see the problem. Edit {{build.xml}} to remove {{eclipselink-1.2.0.jar}} from the runtime classpath, re-run "ant", and the problem goes away.

    Hibernate JIRA | 6 years ago | Archie Cobbs
    javax.validation.ValidationException: Call to TraversableResolver.isReachable() threw an exception
  2. 0

    The documentation for the Hibernate Validator states: {quote} The API is not tied to a specific application tier or programming model. It is specifically not tied to either the web tier or the persistence tier, and is available for both server-side application programming, as well as rich client Swing application developer. {quote} However, this doesn't seem to be the case. It is true that validation can be performed without any persistence layer being present. However, simply by having a non-Hibernate persistence layer such as EclipseLink in the classpath, validation fails as follows: {noformat} javax.validation.ValidationException: Call to TraversableResolver.isReachable() threw an exception at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:766) at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:324) at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273) 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 Foo.main(Foo.java:23) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) at org.apache.tools.ant.taskdefs.Java.run(Java.java:764) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218) at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132) at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.apache.tools.ant.Main.runBuild(Main.java:758) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) Caused by: java.lang.NullPointerException at javax.persistence.Persistence$1.isLoaded(Persistence.java:78) 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) ... 33 more {noformat} I've attached a test case. Run "ant" to see the problem. Edit {{build.xml}} to remove {{eclipselink-1.2.0.jar}} from the runtime classpath, re-run "ant", and the problem goes away.

    Hibernate JIRA | 6 years ago | Archie Cobbs
    javax.validation.ValidationException: Call to TraversableResolver.isReachable() threw an exception
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at javax.persistence.Persistence$1.isLoaded()
    2. JavaEE 7
      Persistence$1.isLoaded
      1. javax.persistence.Persistence$1.isLoaded(Persistence.java:78)
      1 frame
    3. Embedded GlassFish Web
      SingleThreadCachedTraversableResolver.isReachable
      1. org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:62)
      2. org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:94)
      3. org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:47)
      3 frames
    4. Vaadin
      ValidatorImpl.validate
      1. org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:757)
      2. org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:324)
      3. org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:273)
      4. org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:256)
      5. org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:210)
      6. org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
      6 frames
    5. Unknown
      Foo.main
      1. Foo.main(Foo.java:23)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:616)
      4 frames
    7. Ant
      UnknownElement.execute
      1. org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
      2. org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
      3. org.apache.tools.ant.taskdefs.Java.run(Java.java:764)
      4. org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218)
      5. org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
      6. org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
      7. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      7 frames
    8. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:616)
      4 frames
    9. Ant
      Main.startAnt
      1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      2. org.apache.tools.ant.Task.perform(Task.java:348)
      3. org.apache.tools.ant.Target.execute(Target.java:357)
      4. org.apache.tools.ant.Target.performTasks(Target.java:385)
      5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
      6. org.apache.tools.ant.Project.executeTarget(Project.java:1306)
      7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      8. org.apache.tools.ant.Project.executeTargets(Project.java:1189)
      9. org.apache.tools.ant.Main.runBuild(Main.java:758)
      10. org.apache.tools.ant.Main.startAnt(Main.java:217)
      10 frames
    10. Apache Ant Launcher
      Launcher.main
      1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
      2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
      2 frames