Hi all,
 
 
Problem: Trying to asociate a database pool to a local context
Error: "javax.naming.NameNotFoundException: Name pool is not bound in this 
Context'"
Version Tomcat: 5.5.20
JDK: 5.0
OS: Windows 2000
Comment: I been using tomcat since version 3 and never has such problems (admin 
app works only sometimes in 5.X etc) and this is the first time I´ve ever 
posted a question. 
Usually I found the answers from the docs or the web. Thinking of moving to 
Jetty after this.
 
 
server.xml (just the host part)
 
<Host
          appBase="webapps"
          name="localhost">
          
          <context path="/elibrary" docBase="elibrary" reloadable="false" 
crossContext="false" cookies="true" unpackWAR="true">
          
    <Resource
      name="pool"
      type="javax.sql.DataSource"
      password="XXXXXX"
      driverClassName="oracle.jdbc.driver.OracleDriver"
      maxIdle="2"
      maxWait="5000"
      validationQuery="select 1 from TFEW_PARAMETRO"
      username="FEWI_APP"
      url="jdbc:oracle:thin:@172.22.144.45:1533:FEWP92"
      maxActive="4"/>
          
          
          <!--
          <ResourceLink
                global="pool"
                name="pool"
                type="javax.sql.DataSource"/>    -->
                
                </context>
          
      </Host>
 
 
JSP Test from my context elibrary (no imports, try/catch for clarity)
 
Test.jsp
 
Context initContext = new InitialContext();
Context envContext  = (Context)initContext.lookup("java:/comp/env");
DataSource ds = (DataSource)envContext.lookup("pool");
Connection conn = ds.getConnection();
 
 
Error:
 
"javax.naming.NameNotFoundException: Name pool is not bound in this Context'"
 
 
Thanks,
 
Gerardo
 

 
 
 
 
 
-------------------------------------------------------------------------------------------------------------------
Este correo electrónico y, en su caso, cualquier fichero anexo al mismo, 
contiene información de carácter confidencial exclusivamente dirigida a su 
destinatario o destinatarios. Queda prohibida su divulgación, copia o 
distribución a terceros sin la previa autorización escrita de Indra. En el caso 
de haber recibido este correo electrónico por error, se ruega notificar 
inmediatamente esta circunstancia mediante reenvío a la dirección electrónica 
del remitente. POR FAVOR, ANTES DE IMPRIMIR ESTE CORREO ELECTRÓNICO CONSIDERE 
SU APORTACIÓN A LA CONSERVACIÓN DEL MEDIO AMBIENTE POR LA REDUCCIÓN DE CONSUMO 
DE PAPEL.

The information in this e-mail and in any attachments is confidential and 
solely for the attention and use of the named addressee(s). You are hereby 
notified that any dissemination, distribution or copy of this communication is 
prohibited without the prior written consent of Indra. If you have received 
this communication in error, please, notify the sender by reply e-mail. PLEASE 
CONSIDER YOUR ENVIRONMENTAL RESPONSIBILITY BEFORE PRINTING THIS E-MAIL.

Reply via email to