日期:2014-05-16  浏览次数:20736 次

spring+hibernate连接数据库异常(Could not obtain connection metadata)
?

?

1547 [main] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: 不支持的特性
?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.supportsGetGeneratedKeys(OracleDatabaseMetaData.java:4180)
?at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:127)
?at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2163)
?at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2159)
?at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1383)
?at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:855)
?at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:774)
?at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
?at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
?at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
?at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
?at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
?at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
?at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
?at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
?at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
?at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
?at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
?at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
?at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
?at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
?at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
?at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
?at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
?at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
?at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
?at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
?at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)
?at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)
?at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)
?at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
?at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
?at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
?