错误原因?

2015-12-14 13:08:47 org.hibernate.annotations.common.Version <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}

2015-12-14 13:08:47 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {4.2.4.Final}

2015-12-14 13:08:47 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

2015-12-14 13:08:47 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

2015-12-14 13:08:47 org.hibernate.cfg.Configuration configure

INFO: HHH000043: Configuring from resource: /hibernate.cfg.xml

2015-12-14 13:08:47 org.hibernate.cfg.Configuration getConfigurationInputStream

INFO: HHH000040: Configuration resource: /hibernate.cfg.xml

2015-12-14 13:08:47 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: entity/Appliance.hbm.xml

2015-12-14 13:08:47 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2015-12-14 13:08:47 org.hibernate.cfg.Configuration addResource

INFO: HHH000221: Reading mappings from resource: entity/Users.hbm.xml

2015-12-14 13:08:47 org.hibernate.internal.util.xml.DTDEntityResolver resolveEntity

WARN: HHH000223: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!

2015-12-14 13:08:47 org.hibernate.cfg.Configuration doConfigure

INFO: HHH000041: Configured SessionFactory: null

2015-12-14 13:08:47 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)

2015-12-14 13:08:47 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000115: Hibernate connection pool size: 20

2015-12-14 13:08:47 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000006: Autocommit mode: false

2015-12-14 13:08:47 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000401: using driver [oracle.jdbc.driver.OracleDriver] at URL [jdbc:oracle:thin:@localhost:1521:orcl]

2015-12-14 13:08:47 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

INFO: HHH000046: Connection properties: {user=system, password=****}

2015-12-14 13:08:47 org.hibernate.engine.jdbc.internal.JdbcServicesImpl configure

WARN: HHH000341: Could not obtain connection metadata : 不支持的特性

2015-12-14 13:08:47 org.hibernate.engine.jdbc.internal.LobCreatorBuilder useContextualLobCreation

INFO: HHH000422: Disabling contextual LOB creation as connection was null





代码:

public class TestA {

@Test

public void testSchemaExport(){

Configuration config=new Configuration().configure();

ServiceRegistry serviceRegistry=new ServiceRegistryBuilder().

applySettings(config.getProperties()).buildServiceRegistry();

SessionFactory sessionFactory=config.buildSessionFactory(serviceRegistry);

Session session=sessionFactory.getCurrentSession();

SchemaExport export=new SchemaExport(config);

export.create(true, true);

}

}


慕九州0120569
浏览 2622回答 2
2回答

小城阿哥

不好意思    应该是数据库jar包版本的问题吧   问题是说取不到元数据么。

小城阿哥

hibernate 版本问题  建议使用 老师所用的版本  
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java