users@glassfish.java.net

Can Not Connect to MySQL Connection Pool

From: <glassfish_at_javadesktop.org>
Date: Sun, 21 Dec 2008 15:30:26 PST

Good day to you all !

I'm a brand new apprentice of GlassFish, and of course have done the basics, and recently I tried something a little more advanced, That is, to Create a Connection Pool.
Ok, so here's the situation:

I placed the required jar in the glassfish directory; and created the connection Pool, Fortunately the Ping was Succesful, then I created a JDBC Resource for my pool to have a JNDI name...

Later I tried the following code in a Simple class, to try to use My connection pool, But I wasn't successful..

        Context ctx = new InitialContext();
        DataSource ds = (DataSource) ctx.lookup("Pool1");
        Connection con = ds.getConnection();

it appears that it attempts to get a Connection, but it throws an Exception:

[b]java.lang.NoClassDefFoundError: com/sun/jms/spi/xa/JMSXAConnectionFactory[/b]

What Am I supposed to do now?

I have to point out that I already Included the following jars to the project:

appserv-rt.jar
javaee.jar
appserv-admin.jar

By doing so, I corrected some previous exceptions. However, I don't know how to correct the latest one I just detailed.

Please Help me out !

Best Regards,

Jose
[Message sent by forum member 'josebce' (josebce)]

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