tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto A C A S Magalhães <alberto.magalh...@bnc.pt>
Subject Using javax.sql.DataSource
Date Fri, 04 Apr 2003 08:25:22 GMT
**********************************************************************
Este email assim como os ficheiros que possa ter em anexo são confidenciais
e para uso exclusivo da pessoa ou organização para o qual foi enviado.
Se recebeu este email por engano por favor notifique Redes@bnc.pt

Esta nota confirma que esta mensagem foi verificada pelo MIMEsweeper
não tendo sido encontrados virus.

www.mimesweeper.com
***********************************************************************

Hi,
I am trying to implement a Connection Pools.
My context is tomcatexample, and I build a tomcatexample.xml, that I copy to
WEBAPPS.
 
<?xml version='1.0' encoding='windows-1252'?>
<Context path="/tomcatexample"
    docBase="tomcatexample"
    debug="0"
    reloadable="true">
 
    <Resource
        name="jdbc/tomcatexample"
        auth="Container"
        type="javax.sql.DataSource"/>
 
    <ResourceParams name="jdbc/tomcatexample">
      <parameter>
        <name>user</name>
        <value>user</value>
      </parameter>
      
      <parameter>
        <name>password</name>
        <value>password </value>
      </parameter>
      
      <parameter>
        <name>driverClassName</name>
        <value>oracle.jdbc.driver.OracleDriver</value>
      </parameter>
 
      <parameter>
        <name>url</name>
        <value>jdbc:oracle:thin:@bdtest:1521:srnd</value>
      </parameter>
 
    </ResourceParams>
 
In my web.xml, I put:
    <resource-ref>
        <description>
          This is a BD example
        </description>
        <res-ref-name>jdbc/tomcatexample</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>
 
When I try to run it , it report the following error:
 
 
type Exception report
message 
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception 
org.apache.commons.dbcp.DbcpException: java.sql.SQLException: invalid
arguments in call
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne
ctionFactory.java)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect
ionFactory.java)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo
l.java)
        at
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool
.java)
        at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja
va)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java)
        at
com.wiley.tomcatbook.ClientListPooledServlet.doGet(ClientListPooledServlet.j
ava:51)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
        at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
        at java.lang.Thread.run(Thread.java:536)
Caused by: java.sql.SQLException: invalid arguments in call
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
        at oracle.jdbc.dbaccess.DBError.check_error(DBError.java)
        at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java)
        at oracle.jdbc.driver.OracleConnection.(OracleConnection.java)
        at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java)
        ... 38 more
 
Thanks.
AAM.
 
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message