Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 82552 invoked from network); 27 Mar 2008 12:48:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 27 Mar 2008 12:48:14 -0000 Received: (qmail 22607 invoked by uid 500); 27 Mar 2008 12:48:10 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 22155 invoked by uid 500); 27 Mar 2008 12:48:09 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 22144 invoked by uid 99); 27 Mar 2008 12:48:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2008 05:48:09 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of TomH@a-t-g.com designates 65.171.64.184 as permitted sender) Received: from [65.171.64.184] (HELO yitweb11.a-t-g.com) (65.171.64.184) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Mar 2008 12:47:28 +0000 Received: from mail.a-t-g.com ([65.171.64.187]) by yitweb11.a-t-g.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 27 Mar 2008 07:47:29 -0500 Received: from mail.a-t-g.com ([65.171.64.163] helo=mail.a-t-g.com) by ASSPCentral; 27 Mar 2008 07:47:29 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: iBatis - tomcat JNDI setup Date: Thu, 27 Mar 2008 07:47:38 -0500 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: iBatis - tomcat JNDI setup thread-index: AciPhsWwlz34V1tIRLCExvGRBz8aVwAAOgn6AAn4ZaQAFgbJYA== From: "Tom Henricksen" To: X-OriginalArrivalTime: 27 Mar 2008 12:47:29.0814 (UTC) FILETIME=[B7D13B60:01C89008] X-Virus-Checked: Checked by ClamAV on apache.org I tried what you suggested (removing the entry from web.xml and the resource link from the context.xml) and I now get this error message from my application. org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource .java:780) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.ja va:540) at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTrans action.java:48) at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection( JdbcTransaction.java:89) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery ForList(GeneralStatement.java:123) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java:615) Thanks, Tom -----Original Message----- From: Tom Henricksen [mailto:TomH@A-t-g.com]=20 Sent: Wednesday, March 26, 2008 9:09 PM To: user-java@ibatis.apache.org Subject: RE: iBatis - tomcat JNDI setup I tried following: http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html And it has both the context.xml and the entry in the web.xml. I will try without the web.xml and see. Thanks, Tom -----Original Message----- From: Christopher Lamey [mailto:clamey@localmatters.com] Sent: Wed 3/26/2008 4:23 PM To: user-java@ibatis.apache.org Subject: Re: iBatis - tomcat JNDI setup =20 Having the ResourceLink and the Resource in the context xml might be screwing it up. You're telling it to link to a global JNDI object, but it doesn't exist at that level. Also using a resource-ref in the web.xml and a Resource element in the context.xml is redundant. Read the Resource Definitions section of this page: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html Declaring a Resource in the context xml allows you to drop in JNDI objects for you webapp without having to muck with web.xml. On 3/26/08 3:17 PM, "Tom Henricksen" wrote: > I am trying to setup Tomcat JNDI to work on our application with iBatis. >=20 > I get the following error: >=20 > =20 >=20 > java.lang.RuntimeException: Error occurred. Cause: > com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: > java.lang.RuntimeException: Error parsing XPath > '/sqlMapConfig/transactionManager/dataSource/end()'. Cause: > com.ibatis.sqlmap.client.SqlMapException: There was an error configuring > JndiDataSourceTransactionPool. Cause: > javax.naming.NameNotFoundException: Name jdbc is not bound in this > Context >=20 > at > com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConf > igParser.java:89) >=20 > at > com.ibatis.sqlmap.client.SqlMapClientBuilder.buildSqlMapClient(SqlMapCli > entBuilder.java:63) >=20 > at > com.advtechgrp.bop.medical.data.SqlMapsService.initSqlMaps(SqlMapsServic > e.java:58) >=20 > at > com.advtechgrp.bop.medical.web.MedicalApplication.initialize(MedicalAppl > ication.java:106) >=20 > at > com.advtechgrp.bop.medical.web.listener.FacesListener.contextInitialized > (FacesListener.java:63) >=20 > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.j > ava:3831) >=20 > at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4323 > ) >=20 > at > org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja > va:823) >=20 > =20 >=20 > =20 >=20 > SqlMapConfig.xml ibatis 2.30 >=20 > >=20 > >=20 > value=3D"java:comp/env/jdbc/medical"/> >=20 > >=20 > >=20 > =20 >=20 > context.xml - tomcat 5.0.30 >=20 > >=20 > =20 > docBase=3D"C:/Java/eclipse-europa/europa-workspace/bop-med/web" >=20 > path=3D"/bop-med" reloadable=3D"true" >=20 > workDir=3D"work\Catalina\localhost\bop-med"> >=20 > =20 >=20 > =20 > type=3D"javax.sql.DataSource"/> >=20 > =20 >=20 > =20 > type=3D"javax.sql.DataSource" username=3D"user" >=20 > password=3D"pass" >=20 > driverClassName=3D"com.ibm.db2.jcc.DB2Driver" >=20 > url=3D"jdbc:db2://srv:50000/medical" >=20 > maxActive=3D"8" maxIdle=3D"4"/> >=20 > >=20 > =20 >=20 > In application web.xml >=20 > =20 >=20 > >=20 > >=20 > jdbc/medical >=20 > >=20 > jdbc/medical >=20 > javax.sql.DataSource >=20 > Container >=20 > >=20 > =20 >=20 > Any suggestions? >=20 > =20 >=20 > Thanks in advance, >=20 > =20 >=20 > Tom Henricksen > Consultant > Advanced Technologies Group, Inc. >=20 > 1601 48th Street, Suite 220 >=20 > West Des Moines, IA 50265 >=20 > * Office: (515) 221-9344 Ext 138 >=20 > * Fax: (515) 221-1266 > * Email: tomh@a-t-g.com >=20 > =20 >=20