Stephan,
I'm sorry to be so short, but...

Search the archives for the string "Cannot create JDBC driver of class '' for connect URL 'null'". I think this question gets asked every day.

-chris

Stephan Wannenwetsch wrote:
Hallo,

I try to establish a database connection pool with Tomcat and MS
SQLServer JDBC-Driver. But when I run the program I get the following
error:

1000 [http8080-Processor2] INFO connection.DatasourceConnectionProvider
- Using datasource: java:comp/env/jdbc/demo
1000 [http8080-Processor2] INFO impl.SessionFactoryImpl - Use outer
join fetching: false
1000 [http8080-Processor2] WARN util.JDBCExceptionReporter - SQL Error:
0, SQLState: null
1000 [http8080-Processor2] ERROR util.JDBCExceptionReporter - Cannot
create JDBC driver of class '' for connect URL 'null'
1000 [http8080-Processor2] WARN impl.SessionFactoryImpl - Could not
obtain connection metadata
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null', cause: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)



My server.xml:


<Context path="/demo" docBase="demo">
<Resource name="jdbc/demo" scope="Shareable" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/demo">
<parameter>
<name>factory</name>

<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<!-- DBCP database connection settings -->
<parameter>
<name>url</name>

<value>jdbc:microsoft:sqlserver://ASTERIX:1433;DatabaseName=Diplom</valu
e>
</parameter>
<parameter>
<name>driverClassName</name>

<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
</parameter>


<parameter>
<name>username</name>
<value>sa</value>
</parameter>
<parameter>
<name>password</name>
<value>a</value>
</parameter>
<!-- DBCP connection pooling options -->
<parameter>
<name>maxWait</name>
<value>5000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>2</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>4</value>
</parameter>
</ResourceParams>
</Context> </Host>
</Engine>
</Service>
</Server>



My web.xml:


<resource-ref>
<res-ref-name>jdbc/demo</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>


</web-app>


I hope someone can help me.


Thanks Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to