java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • When I use the @NotEmpty Validator on a String property, Hibernate Tools is unable to open a new Session because the ClassValidator could not be instantiated. Workaround was to replace @NotEmpty with @NotNull. see also: http://forum.hibernate.org/viewtopic.php?p=2339708#2339708 Stack-Trace: java.lang.IllegalArgumentException: could not instantiate ClassValidator at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:287) at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:255) at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:127) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:319) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:317) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:312) at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by: java.util.MissingResourceException: Can't find resource in validator bundles, key validator.notEmpty at org.hibernate.validator.interpolator.DefaultMessageInterpolator.replace(DefaultMessageInterpolator.java:107) at org.hibernate.validator.interpolator.DefaultMessageInterpolator.initialize(DefaultMessageInterpolator.java:66) at org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator.addInterpolator(DefaultMessageInterpolatorAggerator.java:37) at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:283) ... 16 more java.util.MissingResourceException: Can't find resource in validator bundles, key validator.notEmpty at org.hibernate.validator.interpolator.DefaultMessageInterpolator.replace(DefaultMessageInterpolator.java:107) at org.hibernate.validator.interpolator.DefaultMessageInterpolator.initialize(DefaultMessageInterpolator.java:66) at org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator.addInterpolator(DefaultMessageInterpolatorAggerator.java:37) at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:283) at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:255) at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:127) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:319) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:317) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:312) at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    via by Christian Laakmann,
  • When I use the @NotEmpty Validator on a String property, Hibernate Tools is unable to open a new Session because the ClassValidator could not be instantiated. Workaround was to replace @NotEmpty with @NotNull. see also: http://forum.hibernate.org/viewtopic.php?p=2339708#2339708 Stack-Trace: java.lang.IllegalArgumentException: could not instantiate ClassValidator at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:287) at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:255) at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:127) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:319) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:317) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:312) at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by: java.util.MissingResourceException: Can't find resource in validator bundles, key validator.notEmpty at org.hibernate.validator.interpolator.DefaultMessageInterpolator.replace(DefaultMessageInterpolator.java:107) at org.hibernate.validator.interpolator.DefaultMessageInterpolator.initialize(DefaultMessageInterpolator.java:66) at org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator.addInterpolator(DefaultMessageInterpolatorAggerator.java:37) at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:283) ... 16 more java.util.MissingResourceException: Can't find resource in validator bundles, key validator.notEmpty at org.hibernate.validator.interpolator.DefaultMessageInterpolator.replace(DefaultMessageInterpolator.java:107) at org.hibernate.validator.interpolator.DefaultMessageInterpolator.initialize(DefaultMessageInterpolator.java:66) at org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator.addInterpolator(DefaultMessageInterpolatorAggerator.java:37) at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:283) at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:255) at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:127) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:319) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:317) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:312) at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
    via by Christian Laakmann,
    • java.lang.IllegalArgumentException: could not instantiate ClassValidator at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:287) at org.hibernate.validator.ClassValidator.createMemberValidator(ClassValidator.java:255) at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:127) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105) at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:319) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1210) at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:317) at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65) at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:89) at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:312) at org.hibernate.eclipse.console.workbench.LazySessionFactoryAdapter.getChildren(LazySessionFactoryAdapter.java:41) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:88) at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:94) at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:207) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by: java.util.MissingResourceException: Can't find resource in validator bundles, key validator.notEmpty at org.hibernate.validator.interpolator.DefaultMessageInterpolator.replace(DefaultMessageInterpolator.java:107) at org.hibernate.validator.interpolator.DefaultMessageInterpolator.initialize(DefaultMessageInterpolator.java:66) at org.hibernate.validator.interpolator.DefaultMessageInterpolatorAggerator.addInterpolator(DefaultMessageInterpolatorAggerator.java:37) at org.hibernate.validator.ClassValidator.createValidator(ClassValidator.java:283) ... 16 more
    No Bugmate found.