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
[EMAIL PROTECTED], 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>

Reply via email to