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 In tomcat 5.0.19 doesn't found the driver
Date Fri, 30 Apr 2004 21:38:31 GMT
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


Mime
View raw message