Desperately need help: configure datasource and connection pool for oracle using JNDI.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Nguyen
Posted On:   Thursday, April 29, 2004 11:19 AM

Here is my Web.xml: jdbc/delphi javax.sql.DataSource Container Sharable and here is my server.xml: UserDatabaseRealm to authenticate users --> type="javax.sql.DataSource" description="Oracle 8i database on Delphi"> driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@delphi:1521:ORCL username japps password ee2j and Here is the error: exception javax.servlet.ServletException: Cannot create JDBC driver of class   More>>

Here is my Web.xml:

jdbc/delphi
javax.sql.DataSource
Container
Sharable

and here is my server.xml:








type="javax.sql.DataSource"
description="Oracle 8i database on Delphi">





driverClassName
oracle.jdbc.driver.OracleDriver



url
jdbc:oracle:thin:@delphi:1521:ORCL



username
japps



password
ee2j






and Here is the error:
exception

javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.AdministratorForm_jsp._jspService(AdministratorForm_jsp.java:291)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)


root cause

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:750)
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
org.apache.jsp.AdministratorForm_jsp._jspService(AdministratorForm_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)


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

and Here is the codes from my jsp page:
<%
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("jdbc/delphi");
Connection conn = ds.getConnection();
%>
Thank you so much.

   <<Less
About | Sitemap | Contact