Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 59843 invoked from network); 4 Apr 2006 20:06:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Apr 2006 20:06:47 -0000 Received: (qmail 66293 invoked by uid 500); 4 Apr 2006 20:06:46 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 66272 invoked by uid 500); 4 Apr 2006 20:06:45 -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 66261 invoked by uid 99); 4 Apr 2006 20:06:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2006 13:06:45 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [163.191.240.2] (HELO mail.idpa.state.il.us) (163.191.240.2) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2006 13:06:44 -0700 Received: from DPA2200B-MTA by mail.idpa.state.il.us with Novell_GroupWise; Tue, 04 Apr 2006 15:06:19 -0500 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.4 Date: Tue, 04 Apr 2006 15:05:59 -0500 From: "Rob Flather" To: Subject: Re: Mapping the following SQLException, with ErrorCode -30,082 and SQLState 08001, to a StaleConnect Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Thanks Jeff. I will let you know how it works. Are you still with CIBER? Rob >>> jeffgbutler@gmail.com 04/04/06 2:55 PM >>> The problem is in your sqlmapconfig.xml file. You specify JNDI as the datasource, but set all the properties for SIMPLE datasource as well as = JNDI datasource. If you mean to use JNDI, you only specify the DataSource property - all other items (driver class, userid, password, etc.) need to be specified in the WebSphere configuration. If you mean to use SIMPLE datasource, then you don't need the DataSource property. Jeff Butler On 4/4/06, Rob Flather wrote: > > Has anybody run into this problem? I searched the archives, but = couldn't > find anything. I am using java 1.4 on Websphere. I am not using the > properties file in the SqlMapConfig (I have actually tried it both ways, = but > neither seems to work), but I do use it in the SqlMapConfig.java class. = I > am not getting any errors from iBatis reading the xml files, etc. I'm = not > sure whether the error is the StaleConnectionException or the Password > Missing, but the error code 30082 would seem to point to a missing > password. I have tested the user id and password, and they are correct. > Any help would be appreciated! Thanks in advance. > > Here is my AppDao.xml file > > > > > > > value=3D"common/ibatis/SqlMapConfig.xml"/> > > > implementation=3D"common.ibatis.dao.IbatisBusinessDAO"/> > > > > > > *Here is my SqlMapConfig.xml transaction manager section:* > > > > > > > > > > > > *my SqlMapConfig.java static initializer and daoManager methods* > > static { > Properties props =3D Resources.getResourceAsProperties > ("US/common/resources/dbconfig.properties"); > daoManager =3D buildDaoManager(null); > } > > public static DaoManager getDaoManager() { > return daoManager; > } > public static DaoManager buildDaoManager(Properties props) throws > DaoException { > try { > Reader reader =3D Resources.getResourceAsReader(resource); > return DaoManagerBuilder.buildDaoManager(reader, props); > } catch (Exception e) { > throw new DaoException("Could not initialize DaoConfig. Cause: " + > e.getClass().getName() + " " + e.getMessage()); > } > } > > *my DAOFactory method:* > > return (BusinessDAOInterface) IbatisSqlConfig.getDaoManager().getDao( > common.dao.BusinessDAOInterface.class); > > *my BusinessDAO method:* > > try { > Integer busPk =3D new Integer(busOid); > return > (Business)getSqlMapExecutor().queryForObject("getBusinessByOID", busPk); > } > catch (Exception e){ > throw DAOException(e.getMessage()); > } > > *Here is the exception trace from the business method:* > > [4/4/06 13:35:52:391 CDT] 6cb95871 StaleConnecti A CONM7007I: Mapping = the > following SQLException, with ErrorCode -30,082 and SQLState 08001, to a > StaleConnectionException: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI = Driver] > SQL30082N Attempt to establish connection failed with security reason = "3" > ("PASSWORD MISSING"). SQLSTATE=3D08001 > > at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(Unknown= > Source) > at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(Unknown > Source) > at COM.ibm.db2.jdbc.app.DB2Connection.connect(Unknown Source) > at COM.ibm.db2.jdbc.app.DB2Connection.(Unknown Source) > at COM.ibm.db2.jdbc.app.DB2ReusableConnection.(Unknown Source) > at COM.ibm.db2.jdbc.DB2PooledConnection.getConnection(Unknown Source) > at com.ibm.ws.rsadapter.spi.WSRdbDataSource.getConnection( > WSRdbDataSource.java:695) > at > com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.createManagedConn= ection > (WSManagedConnectionFactoryImpl.java:727) > at > com.ibm.ejs.j2c.poolmanager.FreePool.createManagedConnectionWithMCWrapper= ( > FreePool.java:1261) > at com.ibm.ejs.j2c.poolmanager.FreePool.createOrWaitForConnection( > FreePool.java:1067) > at com.ibm.ejs.j2c.poolmanager.PoolManager.reserve(PoolManager.java:1671= ) > at com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper( > ConnectionManager.java:677) > at com.ibm.ejs.j2c.ConnectionManager.allocateConnection( > ConnectionManager.java:461) > at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection( > WSJdbcDataSource.java:241) > at com.ibm.ws.rsadapter.jdbc.WSJdbcDataSource.getConnection( > WSJdbcDataSource.java:214) > at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init( > JdbcTransaction.java:48) > at > com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection( > JdbcTransaction.java:89) > at > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryF= orObject > (GeneralStatement.java:104) > at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject( > SqlMapExecutorDelegate.java:561) > at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject( > SqlMapExecutorDelegate.java:536) > at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject( > SqlMapSessionImpl.java:93) > at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject( > SqlMapClientImpl.java:70) > at common.ibatis.dao.IbatisBusinessDAO.getBusiness(IbatisBusinessDAO.jav= a > :43) > > >