| Author |
InjectionException
|
Chetan Raju
Ranch Hand
Joined: Aug 02, 2006
Posts: 109
|
|
Hello All, Not sure whether this is the right place to post this topic.. I have deployed a servlet on Sun Java System App Server 9.1. The code snippet for the problem area is code: -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- I am getting a code: -------------------------------------------------------------------------------- com.sun.enterprise.InjectionException: Exception attempting to inject Res-Ref-Env-Property: servlets.GreetingServlet/myDB@javax.sql.DataSource@ resolved as: jndi: servlets.GreetingServlet/myDB@res principal: null@mail: null -------------------------------------------------------------------------------- I am trying to connect to a MySQL database instance. I have also configured the web.xml for the resource which is a DataSource code: -------------------------------------------------------------------------------- myDB myDB javax.sql.DataSource -------------------------------------------------------------------------------- What could be the problem ? Can anyone help ? [Formated code - dave] [ August 07, 2008: Message edited by: David O'Meara ]
|
 |
K. Tsang
Ranch Hand
Joined: Sep 13, 2007
Posts: 1219
|
|
|
Is the JNDI name for the database defined in Sun App Server JDBC section? Have you use the traditional JDBC connection (using Driver class) to see if the connection really work?
|
K. Tsang JavaRanch SCJP5 SCJD/OCM-JD
|
 |
 |
|
|
subject: InjectionException
|
|
|