Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 38193 invoked from network); 16 Jan 2007 11:37:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jan 2007 11:37:49 -0000 Received: (qmail 49314 invoked by uid 500); 16 Jan 2007 11:37:54 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 48984 invoked by uid 500); 16 Jan 2007 11:37:52 -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 48973 invoked by uid 99); 16 Jan 2007 11:37:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2007 03:37:52 -0800 X-ASF-Spam-Status: No, hits=0.8 required=10.0 tests=INFO_TLD X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [69.25.50.241] (HELO ms07.mse2.exchange.ms) (69.25.50.241) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jan 2007 03:37:43 -0800 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Subject: RE: Complex Properties problem Date: Tue, 16 Jan 2007 06:37:35 -0500 Message-ID: <567624C728CF6544ADFCB285B34D5B93024D26C3@ms07.mse2.exchange.ms> In-Reply-To: <45AAA202.6080202@houp.info> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Complex Properties problem Thread-Index: Acc4I+vPQxwveOWzTSaG+BJhoo1yCgBPZd6w From: "Goga, Murtaza" To: X-Virus-Checked: Checked by ClamAV on apache.org If you are using Spring, you might want to check if you are supplying a = valid 'dataSource' property to the SqlMapClientFactoryBean. =20 I had seen similar behavior, and it turned out that the = TransactionManager was not created for the SqlMapExecutorDelegate. The = second query attempts to use a null txManager and it cascades down to = the error you are seeing. -----Original Message----- From: Witold Bo=B3t [mailto:ja@houp.info]=20 Sent: Sunday, January 14, 2007 4:35 PM To: user-java@ibatis.apache.org Subject: Complex Properties problem Importance: Low Hi! I'm developing a simple Web app with Spring (2.0) and iBatis (2.2), and=20 ... got one strange problem with so called complex properties. What I did was basically following the Developer guide (as on page 34,=20 current stable version), and did: =09 User and Article classes are simple JavaBeans. Everything works without=20 the select=3D"getUser" in Article. I can get a selected User and = Article.=20 But I can not get them together. (I know that I could change this and do = a select from two tables with some joins, but that is not the case - I=20 want it the way it is.) When the code is used as it's shown here, the first SQL statment is=20 passed to the database (MySQL 5), and the second is not. Instead a Null=20 Pointer Exception arise: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in = /org/kolor/cms/data/dao/ibatis/jcms-client.xml. --- The error occurred while applying a result map. --- Check the jcms-client.Article. --- Check the result mapping for the 'author' property. --- Cause: java.lang.NullPointerException at=20 com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryW= ithCallback(GeneralStatement.java:188) at=20 com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryF= orObject(GeneralStatement.java:104) at=20 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMa= pExecutorDelegate.java:566) at=20 com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMa= pExecutorDelegate.java:541) at=20 com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSess= ionImpl.java:106) at=20 org.springframework.orm.ibatis.SqlMapClientTemplate$1.doInSqlMapClient(Sq= lMapClientTemplate.java:243) at=20 org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientT= emplate.java:193) at=20 org.springframework.orm.ibatis.SqlMapClientTemplate.queryForObject(SqlMap= ClientTemplate.java:241) at=20 org.kolor.cms.data.dao.ibatis.IbatisClientDao.getArticle(IbatisClientDao.= java:18) at=20 org.kolor.cms.controler.ShowItemController.handleRequestInternal(ShowItem= Controller.java:54) ... (full log info and stack trace in attachment). I'm sure that database is working well. The JDBC data source comes from=20 the server (Apache Geronimo) database pool (and it's invoked through=20 JNDI). And as I said - I can invoke getUser(1) alone, and getArticle(1)=20 when this 'complex property' is removed. I've tried running in different modes with and without lazy init,=20 enchencments modes and so on. How you got any idea what is wrong? If you need any more code I can send it here. Greetings, -me. --=20 --=3D=3D--=3D=3D---------------------- Witold Bo=B3t :: ja@houp.info gsm#660316053 :: www.houp.info