-->
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.  [ 2 posts ] 
Author Message
 Post subject: can't connect to SAP DB !!
PostPosted: Fri Aug 06, 2004 9:53 am 
Newbie

Joined: Fri Aug 06, 2004 9:44 am
Posts: 11
hi everybody !

I'm quite new to hibernate, so i need a little help with this problem...

I'm trying to connect to a sapdb and this is my hibernate.properties file:

<property name="hibernate.connection.url">jdbc:sapdb://localhost/mydb</property>
<property name="hibernate.connection.driver_class">com.sap.dbtech.jdbc.DriverSapDB</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.connection.password">****</property>
<property name="dialect">net.sf.hibernate.dialect.SAPDBDialect</property>
<property name="hibernate.c3p0.minPoolSize">5</property>
<property name="hibernate.c3p0.maxPoolSize">20</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statement">50</property>

<property name="show_sql">false</property>
<property name="transaction.factory_class">
net.sf.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="hibernate.cache.provider_class">
net.sf.hibernate.cache.HashtableCacheProvider
</property>
<property name="hibernate.hbm2ddl.auto">update</property>

this is the result i get when i try to run my java application:

1574 [main] DEBUG net.sf.hibernate.connection.DriverManagerConnectionProvider - opening new JDBC connection

1574 [main] ERROR net.sf.hibernate.tool.hbm2ddl.SchemaUpdate - could not get database metadata

com.sap.dbtech.jdbc.exceptions.JDBCDriverException: SAP DBTech JDBC: Cannot connect to jdbc:sapdb://localhost/mydb [Restart required].

And then my log4j command introduced after configuring the SessionFactory:

1590 [main] INFO EventManager - Hibernate initialized !!

Really i don't know how to fix this problem... I can initialize the SessionFactory without connecting to the database??

Please help!

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 06, 2004 9:55 am 
Newbie

Joined: Fri Aug 06, 2004 9:44 am
Posts: 11
Correction: the posted file is not hibernate.properties!!

It is hibernate.cfg.xml !!

Sorry...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.