Ja.
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/hibernate</property>
<property name="hibernate.connection.username">hibernate</property>
<property name="hibernate.connection.password">password</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.format_sql">true</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<mapping class="dao.User" />
</session-factory>
</hibernate-configuration>
Schreibe ich den Klassennamen falsch, wird es entsprechend bemängelt. Der Log zeigt folgendes:
Code:
47 [main] INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.5.3-Final
342 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.5.3-Final
350 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
359 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
403 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
1234 [main] INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.2.0.Final
1302 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
1303 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
2484 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
2494 [main] INFO org.hibernate.cfg.search.HibernateSearchEventListenerRegister - Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
3066 [main] INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring
3105 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
3106 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
3106 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
3182 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/hibernate
3184 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=hibernate, password=****}
5077 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: MySQL, version: 5.1.47
5077 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.13 ( Revision: ${bzr.revision-id} )
5304 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQLDialect
5444 [main] INFO org.hibernate.engine.jdbc.JdbcSupportLoader - Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
5446 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Using default transaction strategy (direct JDBC transactions)
5449 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
5449 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
5450 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
5450 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
5450 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
5451 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
5451 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): enabled
5451 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Maximum outer join fetch depth: 2
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
5486 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
5489 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
5490 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
5490 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
5490 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
5490 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
5499 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
5499 [main] INFO org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge - Cache provider: org.hibernate.cache.NoCacheProvider
5500 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
5500 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
5507 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
5509 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
5509 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
5509 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
5509 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
5509 [main] INFO org.hibernate.cfg.SettingsFactory - Check Nullability in Core (should be disabled when Bean Validation is on): enabled
5814 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
5859 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
5872 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - Running hbm2ddl schema update
5875 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - fetching database metadata
5877 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - updating schema
5881 [main] INFO org.hibernate.tool.hbm2ddl.SchemaUpdate - schema update complete