当前位置: 代码迷 >> Java Web开发 >> java web程序,使用了hibernate对数据库操作,但是报这个错,一直解决不了,该如何处理
  详细解决方案

java web程序,使用了hibernate对数据库操作,但是报这个错,一直解决不了,该如何处理

热度:282   发布时间:2016-04-17 00:59:55.0
java web程序,使用了hibernate对数据库操作,但是报这个错,一直解决不了
Java code
2011-9-24 16:16:27 org.hibernate.cfg.Environment <clinit>信息: Hibernate 3.3.2.GA2011-9-24 16:16:27 org.hibernate.cfg.Environment <clinit>信息: hibernate.properties not found2011-9-24 16:16:27 org.hibernate.cfg.Environment buildBytecodeProvider信息: Bytecode provider name : javassist2011-9-24 16:16:27 org.hibernate.cfg.Environment <clinit>信息: using JDK 1.4 java.sql.Timestamp handling2011-9-24 16:16:27 org.hibernate.cfg.Configuration configure信息: configuring from resource: /hibernate.cfg.xml2011-9-24 16:16:27 org.hibernate.cfg.Configuration getConfigurationInputStream信息: Configuration resource: /hibernate.cfg.xml2011-9-24 16:16:27 org.hibernate.cfg.Configuration addResource信息: Reading mappings from resource : com/hibernate/UInfo.hbm.xml2011-9-24 16:16:27 org.hibernate.cfg.HbmBinder bindRootPersistentClassCommonValues信息: Mapping class: com.hibernate.Uinfo -> uinfo2011-9-24 16:16:27 org.hibernate.cfg.Configuration doConfigure信息: Configured SessionFactory: null2011-9-24 16:16:27 org.hibernate.connection.DriverManagerConnectionProvider configure信息: Using Hibernate built-in connection pool (not for production use!)2011-9-24 16:16:27 org.hibernate.connection.DriverManagerConnectionProvider configure信息: Hibernate connection pool size: 202011-9-24 16:16:27 org.hibernate.connection.DriverManagerConnectionProvider configure信息: autocommit mode: false2011-9-24 16:16:27 org.hibernate.connection.DriverManagerConnectionProvider configure信息: using driver: com.microsoft.sqlserver.jdbc.SQLServerDriver at URL: jdbc:sqlserver://localhost:1433;databaseName=Info2011-9-24 16:16:27 org.hibernate.connection.DriverManagerConnectionProvider configure信息: connection properties: {user=sa, password=****}2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: RDBMS: Microsoft SQL Server, version: 10.50.25002011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: JDBC driver: Microsoft SQL Server JDBC Driver 3.0, version: 3.0.1301.1012011-9-24 16:16:27 org.hibernate.dialect.Dialect <init>信息: Using dialect: org.hibernate.dialect.SQLServerDialect2011-9-24 16:16:27 org.hibernate.transaction.TransactionFactoryFactory buildTransactionFactory信息: Using default transaction strategy (direct JDBC transactions)2011-9-24 16:16:27 org.hibernate.transaction.TransactionManagerLookupFactory getTransactionManagerLookup信息: No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Automatic flush during beforeCompletion(): disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Automatic session close at end of transaction: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Scrollable result sets: enabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: JDBC3 getGeneratedKeys(): enabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Connection release mode: auto2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Default batch fetch size: 12011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Generate SQL with comments: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Order SQL updates by primary key: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Order SQL inserts for batching: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory createQueryTranslatorFactory信息: Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory2011-9-24 16:16:27 org.hibernate.hql.ast.ASTQueryTranslatorFactory <init>信息: Using ASTQueryTranslatorFactory2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Query language substitutions: {}2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: JPA-QL strict compliance: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Second-level cache: enabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Query cache: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory createRegionFactory信息: Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Optimize cache for minimal puts: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Structured second-level cache entries: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Statistics: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Deleted entity synthetic identifier rollback: disabled2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Default entity-mode: pojo2011-9-24 16:16:27 org.hibernate.cfg.SettingsFactory buildSettings信息: Named query checking : enabled2011-9-24 16:16:27 org.hibernate.impl.SessionFactoryImpl <init>信息: building session factory2011-9-24 16:16:27 org.hibernate.impl.SessionFactoryObjectFactory addInstance信息: Not binding factory to JNDI, no JNDI name configured2011-9-24 16:16:28 org.hibernate.util.JDBCExceptionReporter logExceptions警告: SQL Error: 515, SQLState: 230002011-9-24 16:16:28 org.hibernate.util.JDBCExceptionReporter logExceptions严重: 不能将值 NULL 插入列 'unum',表 'UInfo.dbo.uinfo';列不允许有 Null 值。INSERT 失败。org.hibernate.exception.ConstraintViolationException: could not insert: [com.hibernate.Uinfo]
  相关解决方案