Having an issue getting JNDI working with Tomcat. I've configured my web.xml inside my project with this;
and the Tomcat5.5.20 server.xml is configured with:Code:<resource-ref> <description>MySql</description> <res-ref-name>NestleServletDataFetcher</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref>I'm using the mysql-connector-java-5.1.6-bin.jar and I put that in the common/lib directory of Tomcat.Code:<Resource name="NestleServletDataFetcher" type="javax.sql.DataSource" maxActive="4" maxIdle="2" username="nestle" maxWait="5000" driverClassName="com.mysql.jdbc.jdbc2.optional.MysqlDataSource" password="nestle" url="jdbc:mysql://partnersam.talisentech.com:3306/nestle_bill_history"/>
In my dataAccessContext.xml I've configured it like so;
Full Error in server log: org.springframework.transaction.CannotCreateTranCode:<!-- Main JNDI DataSource for J2EE environments --> <jee:jndi-lookup id="dataSource" jndi-name="NestleServletDataFetcher"/>
sactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
Am I missing a jar or is this a configuration issue?


Reply With Quote