Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
JSP - A mailing list about Java Server Pages specification and reference
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
javax.naming.NameNotFoundException: Name pool is not bound in this Context

javax.naming.NameNotFoundException: Name pool is not bound in this Context

2006-11-28       - By Macari McCorry, Gerardo

 Back
Reply:     1     2     3  

Hi all,


Problem: Trying to asociate a database pool to a local context
Error: "javax.naming.NameNotFoundException Source code of 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 Source code of 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:@(protected):1533:FEWP92"
     maxActive="4"/>
         
         
         <!--
         <ResourceLink
               global="pool"
               name="pool"
               type="javax.sql.DataSource Source code of 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 Source code of 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.

©2008 junlu.com - Jax Systems, LLC, U.S.A.