[ http://issues.apache.org/jira/browse/IBATISNET-38?page=comments#action_12312690 ]
Ron Grabowski commented on IBATISNET-38: ---------------------------------------- As of 6/5/2005, this is still a problem in IBatisNet.DataAccess.Configuration.DomDaoManagerBuilder.cs. This code throws a NullReferenceException if there isn't a <properties> node: XmlNode nodeProperties = configurationScope.NodeContext.SelectSingleNode("properties"); configurationScope.ErrorContext.Resource = nodeProperties.InnerXml.ToString(); // <--- EXCEPTION configurationScope.ErrorContext.MoreInfo = "add global properties"; IBatisNet.DataMapper.Configuration.DomSqlMapBuilder.cs has a correct ParseGlobalProperties(). > ParseGlobalProperties raises NullReferenceException if optional "properties" > element is missing from sqlmap config file > ----------------------------------------------------------------------------------------------------------------------- > > Key: IBATISNET-38 > URL: http://issues.apache.org/jira/browse/IBATISNET-38 > Project: iBatis for .NET > Type: Bug > Versions: DataMapper 1.1 > Environment: [assembly: AssemblyVersion("1.1.458")] > Reporter: Ron Grabowski > Assignee: Roberto Rabe > Fix For: DataMapper 1.2 > > As of 4/13/2005, the version in SVN contains a method named > ParseGlobalProperties in DomSqlMapBuilder.cs: > XmlNode nodeProperties = > _configScope.NodeContext.SelectSingleNode("properties"); > _configScope.ErrorContext.Activity = "loading global properties"; > _configScope.ErrorContext.Resource = nodeProperties.InnerXml.ToString(); > if (nodeProperties != null) > { > If the optional "properties" node does not exist, a NullReferenceException is > thrown while trying to access InnerXml. The code should be changed as follow: > XmlNode nodeProperties = > _configScope.NodeContext.SelectSingleNode("properties"); > if (nodeProperties != null) > { > _configScope.ErrorContext.Activity = "loading global properties"; > _configScope.ErrorContext.Resource = nodeProperties.InnerXml.ToString(); -- 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