Studio Creator 2/Tomcat/JDBC/MySQL Combo
Posted by: Paul Gustitus
Date: March 20, 2006 03:48PM

I am using Win XP/ Sun Java Studio Creator 2/ Apache Tomcat 5.5.12 / MySQL 4.1.13 / and MySQL connector Java 3.1.11 and .12 (neither works).

I have tried all the tutorials and knowledge base articles that I can find related to setting up MySQL/JDBC/ data sources.

I am able to add a data source in Creator 2 and run a simple web page that fills a table from one table in my DB just fine using the Sun AppServer.

But when I create a .WAR file and try to run it in Tomcat, I get :

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)

root cause

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:123)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:311)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:194)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
-----------------------
The code generated by Studio Creator 2 looks like this:
public class Page1 extends AbstractPageBean {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int __placeholder;

/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
indivDataProvider.setCachedRowSet((javax.sql.rowset.CachedRowSet)getValue("#{SessionBean1.indivRowSet}"));
}

...
public class SessionBean1 extends AbstractSessionBean {
// <editor-fold defaultstate="collapsed" desc="Creator-managed Component Definition">
private int __placeholder;

/**
* <p>Automatically managed component initialization. <strong>WARNING:</strong>
* This method is automatically generated, so any user-specified code inserted
* here is subject to being replaced.</p>
*/
private void _init() throws Exception {
indivRowSet.setDataSourceName("java:comp/env/jdbc/NewLogin");
indivRowSet.setCommand("SELECT * FROM indiv");
indivRowSet.setTableName("indiv");
}

...where
the data source name: NewLogin
user id: root
password: *******
database url: jdbc:mysql://localhost/newlogin
driver class: org.gjt.mm.mysql.Driver

Options: ReplyQuote


Subject
Written By
Posted
Studio Creator 2/Tomcat/JDBC/MySQL Combo
March 20, 2006 03:48PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.