Thank you Pid

Yeah, where exactly in the server.xml did you put this?

I put it in <GlobalNamingResources> tag in server.xml


On 5/25/07, Pid <[EMAIL PROTECTED]> wrote:

Mohammed Zabin wrote:
> Hello Geeks

I'm not sure what the appropriate response is but I'll try to sneak
something passed my language filter:

Hello XXXXX,

> Following is my problem, I am trying to configure my Tomcat 6 to connect
to
> my localhost Oracle 10g Database, following is my server.xml file :
>
> <Resource name="jdbc/myoracle" auth="Container"
>                  type="javax.sql.DataSource" driverClassName="
> oracle.jdbc.OracleDriver"
>                  url="jdbc:oracle:thin:@127.0.0.1:1521:orcldb"
>                  username="hr" password="hr" maxActive="20" maxIdle="10"
>                  maxWait="-1"/>

Yeah, where exactly in the server.xml did you put this?

Tomcat is now telling you that it can't even find the name of the
driver, which I think you told us in your previous thread it could, but
couldn't find the class.

All you had to do was add the oracle driver to CATALINA_HOME/lib or your
WEB-INF/lib and you should have been done...


p



> and i put the following in web.xml:
>
> <resource-ref>
> <description>Oracle Datasource example</description>
> <res-ref-name>jdbc/myoracle</res-ref-name>
> <res-type>javax.sql.DataSource</res-type>
> <res-auth>Container</res-auth>
> </resource-ref>
> and the following is code is the JSP code:
>
>
> <%@ page import="javax.naming.Context,javax.naming.InitialContext,
> javax.naming.NamingException,javax.sql.DataSource, java.sql.*" %>
>
> <%
>  Context initContext = new InitialContext();
>  Context envContext  = (Context)initContext.lookup("java:/comp/env");
>  DataSource ds = (DataSource)envContext.lookup("jdbc/myoracle");
>  Connection conn = ds.getConnection();
>
>  out.println( "Connection Established" );
> %>
>
> After running the jsp page, i got the following error:
>
> org.apache.jasper.JasperException: javax.servlet.ServletException:
> org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC
> driver of class '' for connect URL 'null'
>     org.apache.jasper.servlet.JspServletWrapper.handleJspException(
JspServletWrapper.java:532)
>
>     org.apache.jasper.servlet.JspServletWrapper.service(
JspServletWrapper.java:408)
>
>     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java
:320)
>
>     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>     javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> i have downloaded JDBC driver from otn.oracle classes12.zip and i
> changed it to classes12.jar, and put it in CLASSPATH.
>
> I am working on this problem almost from 2 weeks, i didn't know what
> the problem is, any help plzzzzzzzzzz
>



Reply via email to