-->
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.  [ 1 post ] 
Author Message
 Post subject: Data Pooling Error
PostPosted: Sat Dec 09, 2006 6:33 am 
Newbie

Joined: Sat Dec 09, 2006 6:22 am
Posts: 1
Hi

We have some issues with DB connection Pooling,Following are the Server.xml,Web.xml,Hibernate.cfg and java code

Server.xml


<Resource name="jdbc/DBPOOL" auth="Container"
type="javax.sql.DataSource"/>
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_DBTest_log." suffix=".txt"
timestamp="true"/>
<ResourceParams name="jdbc/DBPOOL">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>

<parameter>
<name>driverClassName</name>
<value>com.inet.tds.TdsDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:inetdae7:IP ADDRESS?databaseName=DBNAME</value>
</parameter>
<parameter>
<name>username</name>
<value>username</value>
</parameter>
<parameter>
<name>password</name>
<value>PASSWORD</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
</ResourceParams>

Web.xml
<resource-ref>
<description> Datasource example</description>
<res-ref-name>jdbc/DBPOOL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>


Hibernate.cfg
<property name="connection.datasource">java:comp/env/jdbc/DBPOOL</property>

java file

private static final String CONNECTIONPOOL_STRING = "jdbc/DBPOOL";

Context env = (Context) new InitialContext().lookup("java:comp/env");
DataSource datasource = (DataSource) env.lookup(CONNECTIONPOOL_STRING);
if (datasource == null)
throw new NamingException(CONNECTIONPOOL_STRING + " is an unknown DataSource");
connection = datasource.getConnection();


Error we are getting

ERROR org.hibernate.util.JDBCExceptionReporter 2006-12-09 15:12:49,422 [main] [] [] - Cannot create JDBC driver of class '' for connect URL 'null'


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

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.