tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dionisio Ruiz de Zárate <dioni...@tinieblas.com>
Subject Re: In tomcat 5.0.19 doesn't found the driver
Date Sat, 01 May 2004 14:03:31 GMT
int hte server.xml i have:
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
prefix="localhost_log." suffix=".txt" timestamp="true"/>
<Resource name="jdbc/MyDatabase" auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/MyDatabase">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>org.postgresql.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:postgresql://192.168.1.100:5432/mydatabase</value>
</parameter>
<parameter>
<name>username</name>
<value>bbuser</value>
</parameter>
<parameter>
<name>password</name>
<value>bb.user</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>20</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>-1</value>
</parameter>
<parameter>
<name>removeAbandoned</name>
<value>true</value>
</parameter>
<parameter>
<name>removeAbandonedTimeout</name>
<value>300</value>
</parameter>
<parameter>
<name>logAbandoned</name>
<value>true</value>
</parameter>
</ResourceParams>
</Host>


in the ROOT/WEB-INF/web.xml fiel i have:

<resource-ref>
<description>Datasource POSTGRESQL ServiciosNvolucion</description>
<res-ref-name>jdbc/MyDatabase</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>


i havent context.xml

can you help me for solving the error?

thanks


----- Original Message ----- 
From: "Parsons Technical Services" <parsonstechnical@earthlink.net>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Saturday, May 01, 2004 3:11 AM
Subject: Re: In tomcat 5.0.19 doesn't found the driver


> Please post your TC5 config files:
> server.xml
> web.xml
> context.xml of app or context if not in server.xml
>
> Doug
> www.parsonstechnical.com
>
> ----- Original Message ----- 
> From: "Dionisio Ruiz de Zárate" <dionisio@tinieblas.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Friday, April 30, 2004 5:38 PM
> Subject: In tomcat 5.0.19 doesn't found the driver
>
>
> > Hello y have one great problem.
> > with the bellow code i try to connect to one pstgresql database using
the
> > jakarta pool connection.
> > Using tomcat 4.1.30 it runs well but if i try to run into one tomcat
> 5.0.19
> > the systems says me the bellow error, It doesn't found the driver.
> > I have put the jar file into the common\lib directory.
> >
> > Can you help me?
> > thanks
> >
> > private Connection conn;
> >     private HttpSession userSession;
> >     private HashMap userInfo = new HashMap();
> >     private ServletContext context;
> >     private Driver drv;
> >     Context initContext;
> >     Context envContext;
> >     DataSource ds;
> > .........
> >  try{
> >             ds = (DataSource)envContext.lookup("jdbc/"+bd);
> >             System.out.println("DATABASE: " + bd);
> >             if(ds==null){
> >                 throw new Exception("BEEEEEEEEEEEEMMM -------- ds " +
> > propietarioServicio);
> >             }
> >         }catch(Exception e){
> >             System.out.println("Excepcion en el context ini3 "  +
> > propietarioServicio + " es " + e);
> >         }
> >         try{
> >             conn=ds.getConnection();
> >         }catch(Exception e){
> >             System.out.println("Excepcion en el context ini4: " +
> > propietarioServicio + " es " + e);
> >             e.printStackTrace();
> >         }
> > .......
> >
> >
> > ERROR:
> >
> >
> > Excepcion en el context ini4: bti es
> > org.apache.commons.dbcp.SQLNestedException:
> >  Cannot create JDBC driver of class '' for connect URL 'null', cause: No
> > suitabl
> > e driver
> > org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
> > class '
> > ' for connect URL 'null', cause:
> > java.sql.SQLException: No suitable driver
> >         at java.sql.DriverManager.getDriver(DriverManager.java:243)
> >         at
> > org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
> > rce.java:743)
> >         at
> > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
> > .java:518)
> >         at
> > com.nvolucion.accionesdatabase.ConectaDesconectaBaseDatos.conecta(Con
> > ectaDesconectaBaseDatos.java:104)
> >         at
> > com.nvolucion.accionesdatabase.ConectaDesconectaBaseDatos.dameConexio
> > n(ConectaDesconectaBaseDatos.java:47)
> >         at
> > com.nvolucion.accionestxomin.ConsultasAdministracionTxomin.selectCamp
> > o(ConsultasAdministracionTxomin.java:115)
> >         at
> com.nvolucion.LaEntrada.verAyudaBreveGestor(LaEntrada.java:2332)
> >         at
> org.apache.jsp.gestion.login_jsp._jspService(login_jsp.java:161)
> >         at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> > .java:311)
> >         at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
> > 01)
> >         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:284)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:204)
> >         at
> > com.nvolucion.utils.FiltroSessiones.doFilter(FiltroSessiones.java:160
> > )
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:233)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:204)
> >         at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> > alve.java:257)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> > ContextValve.java:245)
> >         at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> > alve.java:199)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> > ava:184)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> > ava:164)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:149)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> > ve.java:156)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
> >
> >         at
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
> > 6)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> > :833)
> >         at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
> > ssConnection(Http11Protocol.java:732)
> >         at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> > :619)
> >         at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> > ool.java:688)
> >         at java.lang.Thread.run(Thread.java:534)
> > java.lang.NullPointerException
> >         at
> > com.nvolucion.accionestxomin.ConsultasAdministracionTxomin.selectCamp
> > o(ConsultasAdministracionTxomin.java:124)
> >         at
> com.nvolucion.LaEntrada.verAyudaBreveGestor(LaEntrada.java:2332)
> >         at
> org.apache.jsp.gestion.login_jsp._jspService(login_jsp.java:161)
> >         at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
> > .java:311)
> >         at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
> > 01)
> >         at
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:284)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:204)
> >         at
> > com.nvolucion.utils.FiltroSessiones.doFilter(FiltroSessiones.java:160
> > )
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
> > icationFilterChain.java:233)
> >         at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
> > ilterChain.java:204)
> >         at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
> > alve.java:257)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
> > ContextValve.java:245)
> >         at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
> > alve.java:199)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
> > ava:184)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
> > ava:164)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:149)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
> > ve.java:156)
> >         at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
> > eContext.java:151)
> >         at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
> > a:567)
> >         at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
> >
> >         at
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
> > 6)
> >         at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message