Hi all,

I'm trying to connect to a MySQL database based on the Tomcat Docs example. See the error message below.

Similar to the Problem from Krapacs Ambrose, I'm using a standard configured Ubuntu 8.04 Server with Tomcat 5.5. I did follow all hints in the whole thread and reproduced exactly the example from the Tomcat Docs.

http://marc.info/?l=tomcat-user&m=122701096423437&w=2

http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

but did not succeed. My security manager is disabled.

Hopefully someone can help me. I have spend a complete day without any result. Very frustrating :-(

-----------------------------------------------
---- error messages shown up in the browser ---
-----------------------------------------------

type Exception report

message

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

exception

org.apache.jasper.JasperException: Exception in JSP: /index.jsp:15

12: <body>
13: <h1>${7+7}ÄÖ</h1>
14:
15: <sql:query var="rs" dataSource="jdbc/TestDB">
16: select * from base LIMIT 30;
17: </sql:query>
18:


Stacktrace:
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unexpected exception encountered during query.)"
        
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
        
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:96)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unexpected exception encountered during query.)"
        
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:276)
        
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:159)
        
org.apache.jsp.index_jsp._jspx_meth_sql_005fquery_005f0(index_jsp.java:115)
        org.apache.jsp.index_jsp._jspService(index_jsp.java:70)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.



--
Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to