Please join us at the new JavaWorld Q&A Forums. Your existing login will work there. The discussions here are now read-only.
islandhope
stranger
Reged: 11/01/06
Posts: 4
|
|
Hi... I've been trying to configure my MySQL Database with Tomcat JNDI but I can't. It's always throwing the following exception: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/TestDB"
My context.xml source is given below: <!-- The contents of this file will be loaded for each web application --> <!-- <Context path="" docBase="" debug="5" reloadable="true" crossContext="true"> -->
<Context> <!-- Default set of monitored resources --> <WatchedResource>WEB-INF/web.xml</WatchedResource> <!-- Uncomment this to disable session persistence across Tomcat restarts --> <!-- <Manager pathname="" /> --> <Resource name="jdbc/testDB" auth="Container" factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" removeAbandoned="true" username="root" password="root" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/test?autoReconnect=true&useUnicode=true" removeAbandonedTimeout="60" logAbandoned="true"/>
</Context>
Also I put mysql-connector-java-5.1.6-bin.jar in common/lib folder of tomcat.
Could anyone tell me what's happening with my JNDI configuration?
Thanks
Rashed
|
|
0 registered and 1 anonymous users are browsing this forum.
Moderator:
Print Topic
|
Forum Permissions
You cannot start new topics
You cannot reply to topics
HTML is disabled
UBBCode is enabled
|
Rating:
Topic views: 4146
|
|
|
|
|
|
Powered by UBB.threads™ 6.5.5