I am not getting the driver... I mean, I just look up the service
using the initial context, get a datasource and finally get a
connection with the datasource.
I am going to modify my code, I read a common problem in the tomcat
documentation page:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html#Common%20Problems,
with the title "Random Connection Closed Exceptions". So, I think it
would be my problem. If it is not I will put the jar driver file in
$JAVA_HOME\jre\lib\ext, but there's a note that says:
"Do not install these jarfiles in your /WEB-INF/lib, or
$JAVA_HOME/jre/lib/ext, or anywhere else. You will experience problems
if you install them anyplace other than $CATALINA_HOME/common/lib", in
the "JNDI Datasource HOW-TO"



On Mon, 29 Nov 2004 07:47:16 -0800, John Najarian
<[EMAIL PROTECTED]> wrote:
> This is a reach but in your code how are you getting the driver?
> 
> I really don't know much more about this.  I just develop the code and let
> the deployment group move things around.  Sorry.
> 
> 
> 
> -----Original Message-----
> From: Carlos Bracho [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 29, 2004 7:42 AM
> To: John Najarian
> Cc: Tomcat Users List
> Subject: Re: Mysql: Cannot create JDBC driver
> 
> My $CATALINA_HOME is defined as: C:\Program Files\Apache Software
> Foundation\Tomcat\
> 
> On Mon, 29 Nov 2004 07:08:02 -0800, John Najarian
> <[EMAIL PROTECTED]> wrote:
> > Hi Carlos,
> >
> >   I have my mysql-connector-java-3.0.0.15-ga-bin.jar located in:
> > c:\tomcat\common\lib
> >
> >   However, I also have it in c:\j2sdk1.4.2_03\lib.  I think I put it there
> > as an initial test of MySQL.
> >
> >   My $CATALINA_HOME is defined as c:\tomcat, what is your CATALINA_HOME
> > defined as?
> >
> >
> >
> >
> > -----Original Message-----
> > From: Carlos Bracho [mailto:[EMAIL PROTECTED]
> > Sent: Saturday, November 27, 2004 4:58 PM
> > To: Tomcat Users List
> > Subject: Mysql: Cannot create JDBC driver
> >
> > Hello everybody.
> >
> > I am writting you because I get this exception ramdonly, I mean,
> > sometimes happends, sometimes does not.
> >
> > javax.servlet.ServletException: Cannot create JDBC driver of class ''
> > for connect URL 'null', cause: No suitable driver
> >        at
> >
> org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
> > mpl.java:825)
> >        at
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> > l.java:758)
> >        at org.apache.jsp.index_jsp._jspService(index_jsp.java:73)
> >        at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >        at
> >
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
> > 98)
> >        at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
> >        at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
> >        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> >        at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:237)
> >        at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:157)
> >        at
> >
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter
> > .java:305)
> >        at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > FilterChain.java:186)
> >        at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > ain.java:157)
> >        at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > va:214)
> >        at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >        at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >        at
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
> > Valve.java:198)
> >        at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > va:152)
> >        at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >        at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >        at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137
> > )
> >        at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >        at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
> > )
> >        at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:102)
> >        at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >        at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > :109)
> >        at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContex
> > t.java:104)
> >        at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >        at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >        at
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >        at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
> >        at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> > ction(Http11Protocol.java:702)
> >        at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
> >        at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> > a:644)
> >        at java.lang.Thread.run(Thread.java:534)
> >
> > I am using MySql 4.0.20a and the driver jar file is
> > mysql-connector-java-3.0.14.jar, here you have my xml files:
> >
> > Server.xml:
> > (...)
> > <Context path="/bankApp1" docBase="bankApp1" debug="5"
> > reloadable="true" crossContext="true">
> >                        <Logger
> > className="org.apache.catalina.logger.FileLogger"
> > prefix="localhost_bankApp1_log." suffix=".txt" timestamp="true"/>
> >                        <Resource name="jdbc/bankApp1" auth="Container"
> > type="javax.sql.DataSource"/>
> >                        <ResourceParams name="jdbc/bankApp1">
> >                                <parameter>
> >                                <name>factory</name>
> >
> > <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >                        </parameter>
> >                                <parameter>
> >                                        <name>maxActive</name>
> >                                    <value>10</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>maxIdle</name>
> >                                    <value>3</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>maxWait</name>
> >                                    <value>20</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>username</name>
> >                                        <value>tomcat</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>password</name>
> >                                    <value>xxxxxxx</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>driverClassName</name>
> >                                    <value>com.mysql.jdbc.Driver</value>
> >                                </parameter>
> >                                <parameter>
> >                                        <name>url</name>
> >
> > <value>jdbc:mysql://localhost:3306/bankapp1?autoReconnect=true</value>
> >                                </parameter>
> >                        </ResourceParams>
> >                </Context>
> > (...)
> >
> > And my web.xml:
> > (...)
> > <resource-ref>
> >        <res-ref-name>jdbc/bankApp1</res-ref-name>
> >        <res-type>javax.sql.DataSource</res-type>
> >        <res-auth>Container</res-auth>
> > </resource-ref>
> > (...)
> >
> > Please help as soon as you can.
> > Regards and thanks
> >
> > --
> > ------------------------------------------------------------------
> > Carlos J, Bracho M.
> > "The significant problems we face cannot
> >  be solved at the same level of thinking
> >  we were at when we created them."
> >  Albert Einstein
> > ------------------------------------------------------------------
> > e-mail:  [EMAIL PROTECTED]
> > MSN:    [EMAIL PROTECTED]
> > ------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> >
> >
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> --
> ------------------------------------------------------------------
> Carlos J, Bracho M.
> "The significant problems we face cannot
>  be solved at the same level of thinking
>  we were at when we created them."
>  Albert Einstein
> ------------------------------------------------------------------
> e-mail:  [EMAIL PROTECTED]
> MSN:    [EMAIL PROTECTED]
> ------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
------------------------------------------------------------------
 Carlos J, Bracho M.                                  
 "The significant problems we face cannot    
  be solved at the same level of thinking      
  we were at when we created them."          
  Albert Einstein                           
------------------------------------------------------------------
 e-mail:  [EMAIL PROTECTED]
 MSN:    [EMAIL PROTECTED]                      
------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to