[hibernate-issues] [Hibernate-JIRA] Closed: (HBX-865) ClassValidator cannot be instantiated while trying to open a new Session

Max Rydahl Andersen (JIRA) noreply at atlassian.com
Mon Jun 11 09:33:04 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HBX-865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Max Rydahl Andersen closed HBX-865.
-----------------------------------

    Resolution: Fixed

works for me.

> ClassValidator cannot be instantiated while trying to open a new Session
> ------------------------------------------------------------------------
>
>                 Key: HBX-865
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-865
>             Project: Hibernate Tools
>          Issue Type: Bug
>    Affects Versions: 3.2beta9
>         Environment: Hibernate 3.2, Hibernate Tools 3.2beta9 and most recent Nightly
> DB: MSSQL Server 2000 & HSQLDB
>            Reporter: Christian Laakmann
>         Attachments: hibernate.cfg.xml, Test.java
>
>
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list