RE: Could not configure ResultMap
Thanks John. The problem was because my copy of Ibatis.NET was compiled in version 1.1 and it wouldn't work in .NET 2.0. I had to use the .Net 2.0 version of IBatis (with compiler directive dotnet 2) to make a new build. That solved the problem emphatically. Cheers Ananth From: LITTLEWOOD, John, GBM [mailto:[EMAIL PROTECTED] Sent: Monday, 5 February 2007 5:30 PM To: 'user-cs@ibatis.apache.org' Subject: RE: Could not configure ResultMap Hi In your statements tag within the procedure tag you are referring to resultClassNewsDataResult if you set this to resultMap=NewsDataResult I believe this will sort the issue. From: Ananth Rajarman - Clue Design [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 05:08 To: user-cs@ibatis.apache.org Subject: Could not configure ResultMap Hi All. I have just started converted my project from .NET 1.1 to .NET 2.0. I had been using IBatis as my Data Access Layer in 1.1 and was working perfectly fine. As soon as I ported the application to .NET 2.0 I get the error: Could not configure ResultMap. ResultMap named NewsDataResult not found, failed. Cause: Object reference not set to an instance of an object. Below is the snapshot of the XML. ?xml version=1.0 encoding=utf-8 ? sqlMap namespace=NewsDataMap xmlns=http://ClueDAL.CluePortal.org/mapping; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; alias typeAlias alias=NewsData type=ClueDAL.Domain.News_3_0.NewsData,ClueDAL / /alias resultMaps resultMap id=NewsDataResult class=NewsData result property=Id column=id type=int dbType=Int/ result property=Title column=title type=string dbType=varchar/ /resultMap /resultMaps parameterMap . . . /parameterMap statements procedure id=SelectAllNewsDataForMember parameterMap=SelectAllNewsParameter resultClass=NewsDataResult sp_news_NewsHeadlinesForMember /procedure /statements Could anybody throw some light on this please. PS: I haven't made any changes to the code or XML which worked in .NET 1.1 *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: www.rbs.com www.rbsgc.com www.rbsmarkets.com ***
RE: Could not configure ResultMap
Glad to hear. Quick question do you have complex calls via procedure calls. i.e a parent has a child list that you populate like so (bold highlighted line). I cannot get this to work via a procedural call selectStaticDetailsByParent - if I just type in the sql this works. resultMaps resultMap id=StaticHeader-Result class=StaticHeader result property=StaticHeadersId column=STATIC_HEADERS_ID / result property=FullDesc column=FULL_DESC / result property=AuditComment column=AUDIT_COMMENT / result property=AuditEmpId column=AUDIT_EMP_ID / result property=AuditWhen column=AUDIT_WHEN / result property=AuditWho column=AUDIT_WHO / result property=AuditVersionNo column=AUDIT_VERSION_NO / result property=StaticDetails column=STATIC_HEADERS_ID select=selectStaticDetailsByParent/ /resultMap resultMap id=StaticDetails-Result class=StaticDetail result property=StaticDetailsId column=STATIC_DETAILS_ID / result property=StaticHeadersId column=STATIC_HEADER_ID / result property=FullDesc column=FULL_DESC / result property=ShortDesc column=SHORT_DESC / result property=AuditComment column=AUDIT_COMMENT / result property=AuditEmpId column=AUDIT_EMP_ID / result property=AuditWhen column=AUDIT_WHEN / result property=AuditWho column=AUDIT_WHO / result property=AuditVersionNo column=AUDIT_VERSION_NO / /resultMap /resultMaps _ From: Ananth Rajarman - Clue Design [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 08:33 To: user-cs@ibatis.apache.org Subject: RE: Could not configure ResultMap Thanks John. The problem was because my copy of Ibatis.NET was compiled in version 1.1 and it wouldn't work in .NET 2.0. I had to use the .Net 2.0 version of IBatis (with compiler directive dotnet 2) to make a new build. That solved the problem emphatically. Cheers Ananth _ From: LITTLEWOOD, John, GBM [mailto:[EMAIL PROTECTED] Sent: Monday, 5 February 2007 5:30 PM To: 'user-cs@ibatis.apache.org' Subject: RE: Could not configure ResultMap Hi In your statements tag within the procedure tag you are referring to resultClassNewsDataResult if you set this to resultMap=NewsDataResult I believe this will sort the issue. _ From: Ananth Rajarman - Clue Design [mailto:[EMAIL PROTECTED] Sent: 05 February 2007 05:08 To: user-cs@ibatis.apache.org Subject: Could not configure ResultMap Hi All. I have just started converted my project from .NET 1.1 to .NET 2.0. I had been using IBatis as my Data Access Layer in 1.1 and was working perfectly fine. As soon as I ported the application to .NET 2.0 I get the error: Could not configure ResultMap. ResultMap named NewsDataResult not found, failed. Cause: Object reference not set to an instance of an object. Below is the snapshot of the XML. ?xml version=1.0 encoding=utf-8 ? sqlMap namespace=NewsDataMap xmlns=http://ClueDAL.CluePortal.org/mapping; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; alias typeAlias alias=NewsData type=ClueDAL.Domain.News_3_0.NewsData,ClueDAL / /alias resultMaps resultMap id=NewsDataResult class=NewsData result property=Id column=id type=int dbType=Int/ result property=Title column=title type=string dbType=varchar/ /resultMap /resultMaps parameterMap . . . /parameterMap statements procedure id=SelectAllNewsDataForMember parameterMap=SelectAllNewsParameter resultClass=NewsDataResult sp_news_NewsHeadlinesForMember /procedure /statements Could anybody throw some light on this please. PS: I haven't made any changes to the code or XML which worked in .NET 1.1 *** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: www.rbs.com www.rbsgc.com www.rbsmarkets.com ***
Embedded SqlMap.config
Is it possible to use a DLL embedded SqlMap.config file through the DataAccess portion of IBatis.net? I have moved the file to be a resource, and everything works just fine. However, switching to embedded I receive the following error: - The error occurred while configure DaoSessionHandler. - The error occurred in property name=embedded value=CoreDBSqlMap.config, Model xmlns=http://ibatis.apache.org/dataAccess; /. - Check the IBatisNet.DataAccess.DaoSessionHandlers.SqlMapDaoSessionHandler. I have my Dao configuration file set as: daoSessionHandler id=SqlMap property name=embedded value=CoreDBSqlMap.config, Model/ /daoSessionHandler Where Model is the name of the DLL project and CoreDBSqlMap.config is set to the root of the project. Michael J. McCurrey USA Digital Solutions, Inc. 602.866.8199 - The scientific name for an animal that doesn't either run from or fight its enemies is lunch.