tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@shareowner.com
Subject RE: DbcpDataSourceFactory: driverClassName is required
Date Tue, 29 Oct 2002 14:22:27 GMT
Rename jdbc to .jar and put in common/lib

Regards,
 
 
Phillip Qin
 
Software Developer
Canadian Shareowner
121 Richmond Street W, 7th Floor
Toronto, ON M5H 2K1
(416) 595-9600 ext 291
 

-----Original Message-----
From: John Ruffin [mailto:John.Ruffin@AccredoHealth.com] 
Sent: October 28, 2002 5:32 PM
To: 'Tomcat Users List'
Subject: DbcpDataSourceFactory: driverClassName is required

Using j2sdk1.4.0_01, jwsdp-1_0_01, SQL2k, on W2k, there seems to be an issue
with JNDI.

When accessing a datasource with JNDI, I get the error message:
"javax.servlet.ServletException: DbcpDataSourceFactory: driverClassName is
required" .  However, if I use the Class.forName code - that works.

Searching the archives, I see this was an issue with DB2 using TC4.0.4 (see
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg64387.html)
but I haven't seen any posts (problems or fixes) regarding SQL2k.

Thanks for your feedback!

Here is the relevant code from the <bad-word> scriptlet </bad-word> (I'm
just testing the connection, MVC'ers):

Context ctx = new InitialContext();
Context envCtx = (Context)envCtx.lookup("java:comp/env");
DataSource ds = (DataSource)envCtx.lookup("jdbc/Northwind");
Connection conn = ds.getConnection();
...

web.xml relevant code:
<resource-ref>
	<description>DB Connection</description>
	<res-ref-name>jdbc/Northwind</res-ref-name>
	<res-type>javax.sql.DataSource</res-type>
	<res-auth>Container</res-auth>
</resource-ref>
...

server.xml relevant code:
<Resource name="jdbc/Northwind" auth="Container" description="JDBC DSN"
type="javax.sql.DataSource" />
<ResourceParams name="jdbc/Northwind">
	...
	<parameter>
		<name>driverClassName</name>
		<value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value>
	<parameter>
	...


************************************************************
The information in this email is confidential and may be 
legally privileged. It is intended solely for the addressee,
and access by anyone else is unauthorized.

If you are not the intended recipient, any disclosure, 
copying, distribution or any action taken or omitted to be
taken in reliance on it, is prohibited and may be unlawful. 

If you believe that you have received this email in error, 
please advise us by calling (901) 385 3688, or emailing
mailgateway@accredohealth.net, and then delete this message
and all copies and backups thereof. Thank you.
************************************************************


--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message