This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Struts 1.3, Tomcat 5.5.12, MySQL 5.0.37 issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Struts 1.3, Tomcat 5.5.12, MySQL 5.0.37 issue" Watch "Struts 1.3, Tomcat 5.5.12, MySQL 5.0.37 issue" New topic
Author

Struts 1.3, Tomcat 5.5.12, MySQL 5.0.37 issue

mihir maniar
Ranch Hand

Joined: Sep 09, 2003
Posts: 88
I get the following error "javax.naming.NamingException: Cannot create resource instance" at the line "DataSource ds = (DataSource)envContext.lookup("jdbc/mydb");" in my action class.

I am trying to connect to MySQL database using JNDI. the document that I am referring to resolve the issue is: http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

the configuration of the system is: Tomcat 5.5.12 Struts 1.3 MySQL Server version: 5.0.37-community-nt MySQL Community Edition (GPL) MYSQL connector to connect frm java code mysql-connector-java-5.0.8-bin.jar (I have downloaded the connector from http://dev.mysql.com/downloads/connector/j/5.0.html ) The code to connect in the action class is



The complete error stack is


This is my server.xml




This is the web.xml




Kindly let me know what is going wrong. Thanks a million in advance.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Struts 1.3, Tomcat 5.5.12, MySQL 5.0.37 issue
 
It's not a secret anymore!