ERROR: HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): java.lang.ClassNotFoundException: entity.students
org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration
谁帮忙解决下,谢谢!
org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration
谁帮忙解决下,谢谢!
2017-02-18
创建SchemaExport的对象
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadata = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
new SchemaExport().create(EnumSet.of(TargetType.DATABASE), metadata);
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().configure().build();
MetadataImplementor metadata = (MetadataImplementor) new MetadataSources(serviceRegistry).buildMetadata();
new SchemaExport().create(EnumSet.of(TargetType.DATABASE), metadata);
空指针异常的原因是你们忘记在logout这个方法添加注解@skipValidation,如果不添加这个注解,那么你在login_success的页面登出的时候也会进行validate()这个方法,显然这个步骤我们是没有传user实例进去的,所以酒报了空指针的异常
2017-02-17
最赞回答 / Takecareofyourself
<package name="users" namespace="/users" extends="struts-default"> <action name="*_*" class="com.action.{1}Action" method="{2}"> <result name="login_success">/users/Users_login_success.jsp</result> <result name="login_failu...
2017-02-15