These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Could not obtain connection metadata
PostPosted: Fri Apr 23, 2010 3:45 am 
Newbie

Joined: Fri Apr 23, 2010 3:32 am
Posts: 2
Hallo,
ich habe ein Problem mit der Verbindung zwischen hibernate und oracle und hoffe kann mir jemand hier helfen.
hier poste ich die Ausgaben von eclipse und anschliessend die hibernate.cfg.xml datei
danke!

47 [main] INFO org.hibernate.cfg.Environment - Hibernate 3.3.2.GA
63 [main] INFO org.hibernate.cfg.Environment - hibernate.properties not found
63 [main] INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
78 [main] INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
188 [main] INFO org.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml
188 [main] INFO org.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml
469 [main] INFO org.hibernate.cfg.Configuration - Reading mappings from resource : de/poliscanMonitoringPack/PSMMapping.hbm.xml
594 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: de.poliscanMonitoringPack.SystemInfoMapping -> system_info
641 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: de.poliscanMonitoringPack.EventMapping -> event
672 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: de.poliscanMonitoringPack.SystemMapping -> system
688 [main] INFO org.hibernate.cfg.HbmBinder - Mapping class: de.poliscanMonitoringPack.LogMapping -> log
703 [main] INFO org.hibernate.cfg.Configuration - Configured SessionFactory: null
860 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
860 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
860 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
1016 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: oracle.jdbc.driver.OracleDriver at URL: jdbc:oracle:thin:@Proteus:1521:vmvito
1031 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=ksa_test, password=****}
2156 [main] INFO org.hibernate.cfg.SettingsFactory - RDBMS: Oracle, version: Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
2156 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0
2219 [main] INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.Oracle10gDialect
2250 [main] WARN org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
java.sql.SQLException: Nicht unterstützte Funktion
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:123)
at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
at de.poliscanMonitoringPack.mainTest.main(mainTest.java:27)
2250 [main] INFO org.hibernate.transaction.TransactionFactoryFactory - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
2250 [main] INFO org.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch size: 15
2250 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC batch updates for versioned data: disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Connection release mode: auto
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
2250 [main] INFO org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2250 [main] INFO org.hibernate.hql.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
2266 [main] INFO org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Second-level cache: enabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Query cache: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Cache region factory : org.hibernate.cache.impl.NoCachingRegionFactory
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Structured second-level cache entries: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Echoing all SQL to stdout
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Statistics: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Deleted entity synthetic identifier rollback: disabled
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Default entity-mode: pojo
2266 [main] INFO org.hibernate.cfg.SettingsFactory - Named query checking : enabled
2375 [main] INFO org.hibernate.impl.SessionFactoryImpl - building session factory
2750 [main] INFO org.hibernate.impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
23.04.2010 09:38:49 org.apache.activemq.transport.failover.FailoverTransport doReconnect
INFO: Successfully connected to tcp://localhost:61616

hibernate.cfg.xml
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.url">jdbc:oracle:thin:@Proteus:1521:vmvito</property>
<property name="connection.username">ksa_test</property>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="connection.password">ksa_test</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<!-- thread is the short name for
org.hibernate.context.ThreadLocalSessionContext
and let Hibernate bind the session automatically to the thread
-->
<property name="current_session_context_class">thread</property>
<!-- this will show us all sql statements -->
<property name="hibernate.show_sql">true</property>

<!-- mapping files -->
<mapping resource="de/psPack/PSMMapping.hbm.xml" />

</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject: Re: Could not obtain connection metadata
PostPosted: Fri Apr 23, 2010 5:11 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Du verwendest einen sehr alten jdbc-driver der die Funktion getMetadata noch nicht kennt.
Ausserdem duerfte es auch der falsche sein, denn Du verwendest Oracle 10 (Release 10.2.0.4.0),
benuetzt aber noch einen JDBC-driver fuer Oracle 9 (version: 9.2.0.1.0)
N.B.: Die erste Ziffer in der JDBC-version sollte mit der ersten Ziffer der Oracle-Version uebereinstimmen.


Top
 Profile  
 
 Post subject: Re: Could not obtain connection metadata
PostPosted: Fri Apr 23, 2010 5:27 am 
Newbie

Joined: Fri Apr 23, 2010 3:32 am
Posts: 2
Hallo,
danke für die schnelle Anwort.
von wo kann ich dann der passende driver holen?
MfG.


Top
 Profile  
 
 Post subject: Re: Could not obtain connection metadata
PostPosted: Fri Apr 23, 2010 5:33 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
http://www.oracle.com/technology/softwa ... 10201.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.