다크호스 프로그래머: hibernate 테스트 이상 해결: Hibernate Validator bean - validator - 3.0 - JBoss - 4.0.2

3402 단어
-------
안 드 로 이 드 교육
당신 과 교류 하 기 를 기대 합 니 다!
hibenate. cfg. xml 설정 파일 은 다음 과 같 습 니 다.
 
<hibernate-configuration>

    <session-factory>

       <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
        <!--       -->
        <property name="connection.url">jdbc:mysql://localhost:3306/db_database14</property>
        <!--          -->
        <property name="connection.username">root</property>
        <!--         -->
        <property name="connection.password">root</property>
        <!--       -->
        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <!--   SQL   -->
        <property name="show_sql">true</property>
        <!--      -->

        <!-- Drop and re-create the database schema on startup -->
        <property name="hbm2ddl.auto">create</property>

        <mapping resource="org/hibernate/tutorial/hbm/Event.hbm.xml"/>

    </session-factory>

</hibernate-configuration>

테스트 시 가방 아래 이상:
인용 하 다.
2012-5-23 23:01:53 org.hibernate.annotations.common.Version
정보: Hibernate Commons Annotations 3.2.0. Final
2012-5-23 23:01:53 org.hibernate.cfg.Environment
정보: Hibernate 3.6.10. Final
2012-5-23 23:01:53 org.hibernate.cfg.Environment
정보: hibernate. properties not found
2012-5-23 23:01:53 org.hibernate.cfg.Environment buildBytecodeProvider
정보: Bytecode provider name: javassist
2012-5-23 23:01:53 org.hibernate.cfg.Environment
정보: JDK 1.4 java. sql. Timestamp handling 사용
2012-5-23 23:01:53 org.hibernate.cfg.Configuration configure
정보: 리 소스 구성: / hibernate. cfg. xml
2012-5-23 23:01:53 org.hibernate.cfg.Configuration getConfigurationInputStream
정보: Configuration resource: / hibernate. cfg. xml
2012-5-23 23:01:53 org.hibernate.cfg.Configuration addResource
정보: 리 소스 에서 매 핑 읽 기: org / hibernate / tutorial / hbm / Event. hbm. xml
2012-5-23 23:01:53 org.hibernate.cfg.Configuration doConfigure
정보: 구 성 된 SessionFactory: null
2012-5-23 23:01:53 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues
정보: Mapping class: org. hibenate. tutorial. hbm. Event - > EVENTS
2012-5-23 23:01:53 org.hibernate.cfg.Configuration applyHibernateValidatorLegacyConstraintsOnDDL
정보: Hibernate Validator 를 찾 을 수 없 음: ignoring
2012-5-23 23:01:53 org.hibernate.validator.util.Version
정보: Hibernate Validator bean - validator - 3.0 - JBoss - 4.0.2
솔 루 션, 설정 파일 에 다음 문장 을 추가 하면 됩 니 다.
<property name="javax.persistence.validation.mode">none</property>  

-------
자바 교육
당신 과 교류 하 기 를 기대 합 니 다!
자세히 보기:
안 드 로 이 드 교육 -------

좋은 웹페이지 즐겨찾기