无法访问java.sql.DatabaseMetaData

时间:2015-10-22 14:57:40

标签: hibernate

我正在尝试使用maven制作Hibernate项目但是在运行应用程序之后,它给了我以下错误:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Initial SessionFactory creation failed.org.hibernate.HibernateException: Unable to access java.sql.DatabaseMetaData to determine appropriate Dialect to use
Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.x.student.impl.StudentApp.<init>(StudentApp.java:20)
    at com.x.student.impl.StudentApp.main(StudentApp.java:33)
Caused by: org.hibernate.HibernateException: Unable to access java.sql.DatabaseMetaData to determine appropriate Dialect to use
    at org.hibernate.dialect.resolver.DialectFactory.determineDialect(DialectFactory.java:140)
    at org.hibernate.dialect.resolver.DialectFactory.buildDialect(DialectFactory.java:96)
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:117)
    at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2836)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2832)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)
    at com.x.student.impl.StudentApp.<init>(StudentApp.java:16)
    ... 1 more
Caused by: java.sql.SQLException: Unsupported feature
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    at oracle.jdbc.dbaccess.DBError.throwUnsupportedFeatureSqlException(DBError.java:689)
    at oracle.jdbc.OracleDatabaseMetaData.getDatabaseMajorVersion(OracleDatabaseMetaData.java:4442)
    at org.hibernate.dialect.resolver.DialectFactory.determineDialect(DialectFactory.java:130)
    ... 7 more

0 个答案:

没有答案