users@glassfish.java.net

com.sun.enterprise.InjectionException:

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Jun 2009 05:46:22 PDT

Hi,

I am using Glassfish 2.1 app server. I set up a JDBC Resource with the name 'jdbc/myDB'.

And I used @Resource annotation to inject the resource in my ejb (ejb3) as below:

[i][i][b][i]@Stateless
public class BidManagerBean implements BidManager {
        
        @Resource(name="jdbc/myDB") private DataSource ds;
        ....
}[/i][/b][/i][/i]

I didn't mention anything in deployment descriptor as I am using ejb3 with annotations.

Now, when I access this ejb from the client, I am getting the following error:

"[b]com.sun.enterprise.InjectionException: Exception attempting to inject Res-Ref-Env-Property: jdbc/vinayDB_at_javax.sql.DataSource@ resolved as: jndi: jdbc/myDB_at_res principal: null_at_mail: null
No Runtime properties
Database Vendor : null[/b]"


Can you please tell me where I am going wrong.
[Message sent by forum member 'vinayl' (vinayl)]

http://forums.java.net/jive/thread.jspa?messageID=349110