Sorry if I post this question again but I have some trouble with a test project under GlassFish v2.1.
I create this simple project (with NetBeans 6.5.1):
public class Startup {
@Resource(name = "jdbc/__MySQLTest")
private static DataSource ds;
private Connection conn = null;
public Startup() {
log("connecting...");
try {
if (ds != null) {
conn = ds.getConnection();
log("connected!!!!");
....
} else {
log("resource injection fails?");
}
} catch (SQLException ex) {
log("SQLException: " + ex.getMessage());
conn = null;
}
}
...
but always I have this exception:
http://morettoni.pastebin.com/d26e1570 (ClassNotFoundException: com.mysql.jdbc.jdbc2.optional.MysqlDataSource) but the MySQL connector JAR file is included into my application and netbeans but it under META-INF/lib/mysql....
any hints?
Thanks!
--
Luca Morettoni <luca(AT)morettoni.net> | OpenSolaris SCA #OS0344
Web/BLOG: http://www.morettoni.net/ | http://twitter.com/morettoni
jugUmbria founder - https://jugUmbria.dev.java.net/ | Thawte notary
ITL-OSUG leader - http://www.opensolaris.org/os/project/itl-osug/
[Message sent by forum member 'morettoni' (morettoni)]
http://forums.java.net/jive/thread.jspa?messageID=340021