-->
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: Exception when working with weblogic/oracle10 and mySQL
PostPosted: Mon Jul 05, 2010 8:22 am 
Newbie

Joined: Mon Jul 05, 2010 8:11 am
Posts: 2
I am new to hibernate and facing this new problem i am unaware of.
I have hibernate.properties file that contains all the information related to MySQL JDBC connectivity.
Then I have another properties file that contains following information:

hibernate.connection.datasource=TESTDS
hibernate.show_sql=true
hibernate.connection.provider_class=net.sf.hibernate.connection.C3P0ConnectionProvider
hibernate.c3p0.acquireIncrement=5
hibernate.c3p0.idleConnectionTestPeriod=1200
hibernate.c3p0.maxPoolSize=100
hibernate.c3p0.maxStatements=0
hibernate.c3p0.minPoolSize=1
hibernate.c3p0.initialPoolSize=20

I am creating a SessionFactory as given below:

Configuration cfg = new Configuration();
Properties properties = new Properties();
try {
properties.load(new FileInputStream("Sample.hibernate.properties"));
} catch (IOException e) {

}
cfg = cfg.setProperties(properties);
cfg = cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.Oracle9Dialect");
cfg = cfg.addResource("com/sungard/cs/aata/root/pojo/Root.hbm.xml");
cfg = cfg.addResource("com/sungard/cs/aata/tlog/pojo/Tlog.hbm.xml");
SessionFactory sf = cfg.buildSessionFactory();
HibernateTemplate sample = this.createHibernateTemplate(sf);

When i start server i get warning "java.lang.UnsupportedOperationException: The user must supply a JDBC connection".

Can someone help me know what is the solution to this exception?

Thanks in advance,
Ashish


Top
 Profile  
 
 Post subject: Re: Exception when working with weblogic/oracle10 and mySQL
PostPosted: Mon Jul 05, 2010 5:24 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Quote:
hibernate.connection.provider_class=net.sf.hibernate.connection.C3P0ConnectionProvider

net.sf.hibernate ... that's very old! check the libraries you use are compatible with each other.

_________________
Sanne
http://in.relation.to/


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.