View Full Version : Spring.NET and IBatis.NET Beginner Question
Hi all,
I am a beginner in the Spring.NET as well as in IBatis.NET . Currently i am learning what are the concepts of both framework.
I have downloaded the NPetshop-1.0.0.RC1 and it can't be compiled since i got the exception:
D:\inetpub\wwwroot\NPetshop.Web\UserControls\UserC ontrol.cs( 18 ) : The type or namespace name 'Index' does not exist in the class or namespace 'NPetshop.Web' (are you missing an assembly reference?)
The NPetshop is not integrated with the Spring.NET currently.
I would like to know is there any sample that integrates both Spring.NET and IBatis.NET, since i'm more comfortable in learning by looking at the concrete examples :D
Thank you very much for all your replies.
Rick Evans
10-01-2005, 12:27 PM
Hi
Nope... although I will qualify my statement by saying 'not at the moment.'
I'm currently (today) writing the data access layer for the Spring.NET reference application, SpringAir. Although I would love to use iBatis.NET in the first cut of said layer, I'm going to take the pain and provide a vanilla ADO.NET backed implementation. If someone wants to see an example of the NPetshop application using Spring.NET (in the same vein as the Spring J2EE (http://www.springframework.org/) port of the iBatis JPetStore reference application), then do feel free to create a new JIRA issue (http://opensource2.atlassian.com/projects/spring/secure/BrowseProject.jspa?id=10020).
Since we've had a call for an example of Spring.NET and iBatis.NET integration (something more concrete than this blog entry (http://plainvanilla.typepad.com/spring/2005/09/using_ibatisnet.html)), I'll address this next weekend. I'll ping this post when the code has been committed, so watch this space. Apologies, it definitely can't be any faster than that (unless someone else steps up to the plate). I'll also see Mark about getting this issue (http://opensource2.atlassian.com/projects/spring/browse/SPRNET-25) resolved, 'cos otherwise folks are gonna have to wait until the 1.1 release to be able to get SpringAir (short of picking it up for themselves from the CVS HEAD).
Ciao
Rick
Hi Rick,
Thank you very much in advance for your reply and i am waiting for your sample.
I have downloaded NPetshop sample (NPetshop-1.0.0.RC1) and i am stuck in the two issues :
1) This line : "protected NPetshop.Web.Index currentRouter; " throws an exception while compiled because the Index class is not exist . The exact file is in NPetshop.Web\UserControls\UserControl.cs
I just excluded this file from the project and it can be compiled successfully.
2) When i add a new user, it throws an exception "Error executing query 'InsertProfile' for insert. Cause: Data type mismatch in criteria".
Regards,
hadi
Rick Evans
10-02-2005, 09:28 AM
Hi Hadi
Are we using the exact same version of the NPetshop? I just (10 minutes ago) went to the iBatis site (http://ibatis.apache.org/), clicked on Downloads (http://ibatis.apache.org/downloads.html), and chose NPetshop RC1 (http://prdownloads.sourceforge.net/ibatisnet/NPetshop-1.0.0.RC1.zip?download). I opened it up in VSNET 2003 and well, there is no UserControl class in the NPetshop.Web namespace... there is one in the NPetshop.Presentation namespace though. The solution successfully compiles on a 'Rebuild All'.
Unfortunately, I too cannot (on a cursory exploration) get the NPetshop reference application to run, and get stack traces galore when I try to do anything. The starting page does look nice though :?
The sourcecode for the NPetshop reference application is over a year old now... I don't have time to dig in and see why it isn't working right now (since I'm working on Spring.NET's reference application), but I will probably have a look sometime later this month.
Your best bet is to email the iBatis.NET developers list (user-cs@ibatis.apache.org). Get them to update the NPetshop application such that...
it works, and
uses the latest iBatis.NET binaries (NPetshop is still using 1.0.0.249)
Sorry that I can't be of more help to you right now... be sure to email those IBatis.NET guys (and gals). When I work on the Spring.NET / iBatis.NET integration stuff next weekend, it sure would be nice to have a working reference application for iBatis.NET.
Ciao
Rick
Hi Rick,
Thank you very much for all your helps. I really appreciate it.
I have already emailed the iBatis at user-cs@ibatis.apache.org (http://www.mail-archive.com/user-cs@ibatis.apache.org/msg00385.html) and haven't received any reply until now :(
I have tested exactly same version of NPetshop downloaded from the iBatis site.
1) This is a little bit weird. You should find the file 'UserControl.cs' inside the UserControls folder. The UserControls folder is inside the NPetshop.Web web project.
Excluding this file will make the compilation works, otherwise it will throw this error :
The type or namespace name 'Index' does not exist in the class or namespace 'NPetshop.Web' (are you missing an assembly reference?)
It's because this line throws error :
protected NPetshop.Web.Index currentRouter;
I can't find the Index class inside the NPetshop.Web project
2) When you run the NPetshop application, try to add a new user and it will throw another error :
Data types mismatch.
Ok. Thank you for your support. I wish that the iBatis team is really as responsive as you.
Regards,
hadi
poortl9109
11-05-2005, 02:59 AM
Sorry that I can't be of more help to you right now... be sure to email those IBatis.NET guys (and gals). When I work on the Spring.NET / iBatis.NET integration stuff next weekend, it sure would be nice to have a working reference application for iBatis.NET.
Anything yet?
Hi,
I finally made it work :)
I ported the database from MS Access to SQL 2000 and then configured the database connection etc. And finally it is working ...
Rgrds,
hadi
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.