NetBeans ships with the MySQL driver while GlassFish does not.
You'll need to install it:
http://docs.sun.com/app/docs/doc/820-7692/ghatb?l=en&a=view
- Alexis
On 8 févr. 2010, at 18:15, glassfish_at_javadesktop.org wrote:
> Hi, I am using Netbeans 6.8 and GlassFish v3 to connect to a database in MySQL. I create a datasource (jdbc/MyNewDatabase), but whenever I run the jsp file that seeks to fetch data from the database, I get the following error:
>
> [b]type[/b] Exception report
>
> [b]message
>
> description[/b] The server encountered an internal error () that prevented it from fulfilling this request.
>
> [b]exception[/b]
>
> javax.servlet.ServletException: javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/MyNewDatabase"
>
> [b]root cause[/b]
>
> javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: No suitable driver found for jdbc/MyNewDatabase"
>
> [b]note[/b] The full stack traces of the exception and its root causes are available in the GlassFish v3 logs.
>
> [b]What have I omitted and how do I fix the error?[/b]
> [Message sent by forum member 'iakyecofie' (akyecofie_at_yahoo.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=385493
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>