首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

小弟我用Spring控制Hibernate,但无法自动生成数据库,这是日志,求解

2012-02-15 
我用Spring控制Hibernate,但无法自动生成数据库,这是日志,求解!INFO - hibernate.properties not foundINF

我用Spring控制Hibernate,但无法自动生成数据库,这是日志,求解!

INFO - hibernate.properties not found
INFO - Bytecode provider name : cglib
INFO - using JDK 1.4 java.sql.Timestamp handling
INFO - Mapping class: com.xiong.myhrs.model.Application -> Application
INFO - Mapping class: com.xiong.myhrs.model.Attend -> Attend
INFO - Mapping class: com.xiong.myhrs.model.AttendType -> type
INFO - Mapping class: com.xiong.myhrs.model.CheckBack -> CheckBack
INFO - Mapping class: com.xiong.myhrs.model.Employee -> Employee
INFO - Mapping joined-subclass: com.xiong.myhrs.model.Manager -> Manager
INFO - Mapping class: com.xiong.myhrs.model.Payment -> Payment
INFO - Mapping collection: com.xiong.myhrs.model.Attend.applications -> Application
INFO - Mapping collection: com.xiong.myhrs.model.Employee.attends -> Attend
INFO - Mapping collection: com.xiong.myhrs.model.Employee.payments -> Payment
INFO - Mapping collection: com.xiong.myhrs.model.Manager.checkBacks -> CheckBack
INFO - Mapping collection: com.xiong.myhrs.model.Manager.employees -> Employee
INFO - Building new Hibernate SessionFactory
INFO - Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
INFO - Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge4gb8fobfe6d15blfp6|f0b4a3, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge4gb8fobfe6d15blfp6|f0b4a3, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/myhrs, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]
INFO - RDBMS: MySQL, version: 5.1.53-community
INFO - JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.1.7 ( Revision: ${svn.Revision} )
INFO - Using dialect: org.hibernate.dialect.MySQLDialect
INFO - Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
INFO - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO - Automatic flush during beforeCompletion(): disabled
INFO - Automatic session close at end of transaction: disabled
INFO - JDBC batch size: 15
INFO - JDBC batch updates for versioned data: disabled
INFO - Scrollable result sets: enabled
INFO - JDBC3 getGeneratedKeys(): enabled
INFO - Connection release mode: auto
INFO - Maximum outer join fetch depth: 2
INFO - Default batch fetch size: 1
INFO - Generate SQL with comments: disabled
INFO - Order SQL updates by primary key: disabled
INFO - Order SQL inserts for batching: disabled
INFO - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO - Using ASTQueryTranslatorFactory
INFO - Query language substitutions: {}
INFO - JPA-QL strict compliance: disabled
INFO - Second-level cache: enabled
INFO - Query cache: enabled
INFO - Cache provider: org.hibernate.cache.EhCacheProvider


INFO - Optimize cache for minimal puts: disabled
INFO - Structured second-level cache entries: disabled
INFO - Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
INFO - Echoing all SQL to stdout
INFO - Statistics: disabled
INFO - Deleted entity synthetic identifier rollback: disabled
INFO - Default entity-mode: pojo
INFO - Named query checking : enabled
INFO - building session factory
WARN - Could not find configuration [com.xiong.myhrs.model.Payment]; using defaults.
WARN - Could not find configuration [com.xiong.myhrs.model.Attend]; using defaults.
WARN - Could not find configuration [com.xiong.myhrs.model.Employee]; using defaults.
WARN - Could not find configuration [com.xiong.myhrs.model.AttendType]; using defaults.
WARN - Could not find configuration [com.xiong.myhrs.model.CheckBack]; using defaults.
WARN - Could not find configuration [com.xiong.myhrs.model.Application]; using defaults.
INFO - Not binding factory to JNDI, no JNDI name configured

INFO - starting update timestamps cache at region: org.hibernate.cache.UpdateTimestampsCache
INFO - starting query cache at region: org.hibernate.cache.StandardQueryCache
INFO - Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 1hge4gb8fobfe6d15blfp6|f0b4a3, debugUnreturnedConnectionStackTraces -> false, description -> null, driverClass -> com.mysql.jdbc.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 1hge4gb8fobfe6d15blfp6|f0b4a3, idleConnectionTestPeriod -> 0, initialPoolSize -> 3, jdbcUrl -> jdbc:mysql://localhost:3306/myhrs, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false ]] of Hibernate SessionFactory for HibernateTransactionManager
INFO - Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
INFO - Quartz Scheduler v.1.6.1 created.
INFO - RAMJobStore initialized.
INFO - Quartz scheduler 'QuartzScheduler' initialized from an externally provided properties instance.
INFO - Quartz scheduler version: 1.6.1
INFO - JobFactory set to: org.springframework.scheduling.quartz.AdaptableJobFactory@1ca5df9
INFO - Starting Quartz Scheduler now
INFO - Scheduler QuartzScheduler_$_NON_CLUSTERED started.
INFO - Root WebApplicationContext: initialization completed in 9556 ms
INFO - Parsing configuration file [struts-default.xml]
INFO - Parsing configuration file [struts-plugin.xml]
INFO - Parsing configuration file [struts.xml]
INFO - Initializing Struts-Spring integration...
INFO - Setting autowire strategy to name
INFO - ... initialized Struts-Spring integration successfully

[解决办法]
第一行信息显示
INFO - hibernate.properties not found
这个提示未找到配置文件
[解决办法]
hibenrate的配置文件都没有。。。。
[解决办法]
<prop key="hibernate.hbm2ddl.auto">update</prop> 



加这个了么

热点排行