Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 27633 invoked from network); 18 Jul 2006 16:55:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jul 2006 16:55:26 -0000 Received: (qmail 12393 invoked by uid 500); 18 Jul 2006 16:55:26 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 12383 invoked by uid 500); 18 Jul 2006 16:55:26 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 12372 invoked by uid 99); 18 Jul 2006 16:55:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2006 09:55:25 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2006 09:55:23 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8C91941001A for ; Tue, 18 Jul 2006 16:53:15 +0000 (GMT) Message-ID: <18693554.1153241595572.JavaMail.jira@brutus> Date: Tue, 18 Jul 2006 09:53:15 -0700 (PDT) From: "cristian manea (JIRA)" To: dev@ibatis.apache.org Subject: [jira] Commented: (IBATISNET-168) The parameter class reflection does not work anymore In-Reply-To: <29795247.1153236917704.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/IBATISNET-168?page=comments#action_12421899 ] cristian manea commented on IBATISNET-168: ------------------------------------------ Hello, I'm still Cristian Manea. I was able to BYPASS the problem by eliminating the parameterClass property from ALL the select statements in my sqlMaps. I think the problem comes from that new "Probe" that is done when parsing the maps. As a humble opinion: at least until one is 100% sure, the "anomalies" found by the new probe object should not block everything by throwing an error...maybe they shoud be only treated as some kind of warning and nothing more. It is clear that not giving the probe a chance to work (since i'm not telling it what class I'm passing as a parameter), it works as in the previous version (which did not have the probe). Best regards. Cristian Manea www.atypiqsoftware.ro > The parameter class reflection does not work anymore > ---------------------------------------------------- > > Key: IBATISNET-168 > URL: http://issues.apache.org/jira/browse/IBATISNET-168 > Project: iBatis for .NET > Issue Type: Bug > Components: DataMapper > Affects Versions: DataMapper 1.5 > Environment: Windows 2003 server, dot net framework 2.0, VS2005 > Reporter: cristian manea > Priority: Blocker > > Hello. > We have upgraded our project from dnf 1.1 to dnf 2.0 vs2005, so we have upgraded to Data Mapper 1.5 (from 1.3). > It seams that the dynamic class reflection for the query parameters does not work anymore in 1.5, in the 1.3 version it work just fine. It is really a blocking situation for us, because...it simply does not work anymore :( > We are using a solution where the parameter that we are passing is a "generic" one, and has this definition: > public class Query > { > private Object _DataObject; > public Object DataObject{get{return _DataObject; }set { _DataObject = value;}} > private Object _ParametersObject; > public object ParametersObject{get { return _ParametersObject; }set { _ParametersObject = value; }} > } > Then we are passing to iBatis (by internal convention) the "parameters" embeded in the Query class, here is an example: > > obj_Query.ParametersObject = Parameters; //here we are setting our Parameters object > obj_Query.DataObject = Labels[0]; //here we are setting our Business Object > objLabel = (Label) Helpers.Label().Read(obj_Query); //here we are calling by passing the query object > Assert.IsNotNull (objLabel, "Label not returned"); > ............................................................................................. > public override System.Object Read(System.Object obj) > { > Labels objLabel = (Label) Mapper ().QueryForObject("SelectLabel",obj); > return(objLabel); > } > The mapped statemend in the sqlmap file is as follows: > > iBatis 1.5 returns this error (it does not understand that the DataObject is in fact a Label, and not an Object): > failed: IBatisNet.Common.Exceptions.ConfigurationException : > - The error occurred while loading SqlMap. > - parse dynamic tags on sql statement > - The error occurred in . > - Check the SelectLabel. > ----> IBatisNet.Common.Exceptions.ProbeException : There is no Get member named 'Id' in class 'Object' > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureAndWatch(String resource, ConfigureHandler configureDelegate) > at IBatisNet.DataMapper.Mapper.InitMapper() > at IBatisNet.DataMapper.Mapper.Instance() > C:\Documents and Settings\Administrator\Favorites\LogiqLibrary\Source\LL\LL_BusinessObjects\Helper.cs(18,0): at LL_BusinessObjects.Helper.Mapper() > C:\Documents and Settings\Administrator\Favorites\LogiqLibrary\Source\LL\LL_BusinessObjects\LanguageHelper.cs(17,0): at LL_BusinessObjects.LanguageHelper.ReadList(Object obj) > C:\Documents and Settings\Administrator\Favorites\LogiqLibrary\Source\LL\LL_Tests\DAL_tests.cs(27,0): at LL_Tests.DAL_tests.LanguageSelects() > --ConfigurationException > at IBatisNet.Common.Utilities.Objects.ReflectionInfo.GetGetterType(String memberName) > at IBatisNet.Common.Utilities.Objects.ObjectProbe.GetMemberTypeForGetter(Type type, String memberName) > at IBatisNet.DataMapper.Configuration.ParameterMapping.InlineParameterMapParser.ResolveTypeHandler(TypeHandlerFactory typeHandlerFactory, Type parameterClassType, String propertyName, String propertyType, String dbType) > at IBatisNet.DataMapper.Configuration.ParameterMapping.InlineParameterMapParser.NewParseMapping(String token, Type parameterClassType, IScope scope) > at IBatisNet.DataMapper.Configuration.ParameterMapping.InlineParameterMapParser.ParseInlineParameterMap(IScope scope, IStatement statement, String sqlStatement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseDynamicTags(XmlNode commandTextNode, IDynamicParent dynamic, StringBuilder sqlBuffer, Boolean isDynamic, Boolean postParseRequired, IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseDynamicTags(XmlNode commandTextNode, IDynamicParent dynamic, StringBuilder sqlBuffer, Boolean isDynamic, Boolean postParseRequired, IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseDynamicTags(XmlNode commandTextNode, IDynamicParent dynamic, StringBuilder sqlBuffer, Boolean isDynamic, Boolean postParseRequired, IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseDynamicTags(XmlNode commandTextNode, IDynamicParent dynamic, StringBuilder sqlBuffer, Boolean isDynamic, Boolean postParseRequired, IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ParseDynamicTags(XmlNode commandTextNode, IDynamicParent dynamic, StringBuilder sqlBuffer, Boolean isDynamic, Boolean postParseRequired, IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ProcessSqlStatement(IStatement statement) > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.ConfigureSqlMap() > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Initialize() > at IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.Build(XmlDocument document, DataSource dataSource, Boolean useConfigFileWatcher, Boolean isCallFromDao) > Thank you for your support. > Cristian Manea > www.atypiqsoftware.ro -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira