最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

mysql-SchemaExportexport自动创建表失败

来源:动视网 责编:小采 时间:2020-11-09 16:45:43
文档

mysql-SchemaExportexport自动创建表失败

mysql-SchemaExportexport自动创建表失败:mysqlhibernatejavassist package entity;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import org.hibernate.service.ServiceRegistry;import org.hibernate.service.ServiceRegistryBuilde
推荐度:
导读mysql-SchemaExportexport自动创建表失败:mysqlhibernatejavassist package entity;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import org.hibernate.service.ServiceRegistry;import org.hibernate.service.ServiceRegistryBuilde


mysqlhibernatejavassist

package entity;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import org.hibernate.service.ServiceRegistry;
import org.hibernate.service.ServiceRegistryBuilder;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.junit.Test;

public class TestStudents {

@Test
public void testSchemaExport()
{
//创建配置对象
Configuration config = new Configuration().configure();
//创建服务注册对象
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(config.getProperties()).buildServiceRegistry();
//创建sessionFactory
SessionFactory sessionFactory = config.buildSessionFactory(serviceRegistry);
//创建session对象
Session session = sessionFactory.getCurrentSession();
//创建SchemaExport对象
SchemaExport export = new SchemaExport(config);

export.create(true, true);

}
}

九月 20, 2015 2:40:45 上午 org.hibernate.annotations.common.Version
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
九月 20, 2015 2:40:46 上午 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.4.Final}
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Environment
INFO: HHH000206: hibernate.properties not found
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Configuration configure
INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: HHH000040: Configuration resource: /hibernate.cfg.xml
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: entity/Students.hbm.xml
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Configuration addResource
INFO: HHH000221: Reading mappings from resource: entity/Users.hbm.xml
九月 20, 2015 2:40:46 上午 org.hibernate.cfg.Configuration doConfigure
INFO: HHH000041: Configured SessionFactory: null
九月 20, 2015 2:40:46 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
九月 20, 2015 2:40:46 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
九月 20, 2015 2:40:46 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
九月 20, 2015 2:40:46 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql:///test?useUnicode=true&characterEncoding=UTF-8]
九月 20, 2015 2:40:46 上午 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=root, password=****}
九月 20, 2015 2:40:46 上午 org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure
WARN: HHH000342: Could not obtain connection to query metadata : Access denied for user 'root'@'localhost' (using password: NO)
九月 20, 2015 2:40:46 上午 org.hibernate.dialect.Dialect
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
九月 20, 2015 2:40:46 上午 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation
INFO: HHH000422: Disabling contextual LOB creation as connection was null
九月 20, 2015 2:40:46 上午 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
九月 20, 2015 2:40:46 上午 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory
INFO: HHH000397: Using ASTQueryTranslatorFactory

文档

mysql-SchemaExportexport自动创建表失败

mysql-SchemaExportexport自动创建表失败:mysqlhibernatejavassist package entity;import org.hibernate.Session;import org.hibernate.SessionFactory;import org.hibernate.cfg.Configuration;import org.hibernate.service.ServiceRegistry;import org.hibernate.service.ServiceRegistryBuilde
推荐度:
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top