I have a problem in my web application to get DB connection from DataSource when I run project in JBuilder.
See Sections "0 - 4" in below and help me Please !!!!
IDE : JBuilder 2005
DBMS: MySql 3.23.45
Wb Server : tomcat 5.0.27
1.my server8080.xml (server.xml) is incloded these lines :
<Context debug="0" docBase="someAddress" path="/WebModule1" reloadable="true" workDir="someAddress">
<Resourse name="jdbc/HOMEACCOUNT_DBX" type="javax.sql.DataSource" auth="Container"/>
<ResourseParams name="jdbc/HOMEACCOUNT_DBX">
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/HomeAccount_DB</value>
</parameter>
</ResourseParams>
</Context>
2. my web.xml file inclode this lines :
<resource-ref>
<res-ref-name>jdbc/HOMEACCOUNT_DBX</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
3. my code is :
Context ctx = new InitialContext();
datasource = (DataSource) ctx.lookup("java:comp/env/"+dataSourceJNDIName);
....
try {
return datasource.getConnection(); /*this throws exception*/
}catch (Exception e){
}
4. the exeption and its message are :
org.apache.commons.dbcp.SQLNestedException:
Cannot create JDBC driver of class '' for connect URL 'null'