  | 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
|
|
|
  | | | 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 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:@(protected):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.
|
|
 |