MYSQL using JSP tags , is it supported in app 7?

Hello,

Iam trying to run one the cd shop example, but with the MYSQL database.

It runs under the tomcat server, but when i change to the application server instance and deploy then execute the application it does not work.

it gives this error, i was wondering does the application server 7 support mysql.

Type: Exception Report

Message: Internal Server Error

Exception

javax.servlet.ServletException: In <driver>, invalid driver class name: "org.git.mm.mysql.Driver"

at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:471)

Example of my database setting

<sql:setDataSource var="productDS"

url="jdbc:mysql://localhost/dbname"

driver="com.mysql.jdbc.Driver"

user="" password="" />

[826 byte] By [jtranex] at [2007-11-25 10:44:37]
# 1

You must set up the JDBC connection for your MYSQL database for both the IDE and the Application Server 7 (Tomcat is pre-setup, so you didn't realize this was necessary). Follow all the steps in the following article: http://developers.sun.com/tools/javatools/tips/tip03-08-22.html

That should do it.

Jane Sokolow

writer-jqs at 2007-7-1 21:38:48 > top of Java-index,Development Tools,Java Tools...
# 2
Here is a post that has answers you might find helpful: http://swforum.sun.com/jive/thread.jspa?forumID=114&threadID=22357
jetsons at 2007-7-1 21:38:48 > top of Java-index,Development Tools,Java Tools...
# 3
Hello, I think MYSQL is set up correctly in the Sun IDE.The connection pool, jdbc-mysql and persistence is registered for it.I will try editing the server.xml file.Where is the server.xml file? I cannot find it for the application server instance.
jtranex at 2007-7-1 21:38:48 > top of Java-index,Development Tools,Java Tools...
# 4

Well, you do not neccessarily need to edit the server.xml file . Just use the Studio <-> Appserver integration plugin to create a JNDI name and JDBC resource. It will update the server.xml file automatically. In case you still want to go the manual route it is located in

<Appserver deployment dir>/domains/domain_name/instance_name/config

On UNIX and Linux systems the <appserver depl. dir> is usually /var/opt/SUNWappserver7. This is not the directory where appserver binaries get installed.

BUT, reading about your problems, it almost seems like that you do not have your MySQL JDBC driver installed on your appserver, to do this copy the JDBC JAR file into

<Appserver deployment dir>/domains/domain_name/instance_name/lib/

I did have problems with version 3.x of the driver, try to use version 2.x if problems still persist.

Hope this helps

jP

Jiri Prazak at 2007-7-1 21:38:48 > top of Java-index,Development Tools,Java Tools...
# 5
Thanks for the help, seemed to set the classpath to the zip file of the mysql package instead of the jar file.The web module works now. Great!
jtranex at 2007-7-1 21:38:48 > top of Java-index,Development Tools,Java Tools...