Results 1 to 7 of 7

Thread: Integrating IBatisNet with Spring.Net

  1. #1
    Join Date
    Mar 2006
    Posts
    2

    Default Integrating IBatisNet with Spring.Net

    I'm integrating IBatisNet with Spring.Net, and It's not easy for me.

    The problem is this,

    Whenever i add "Spring.Data.IBatisNet.dll" reference into my project,

    The studio reports two errors,

    One is this

    log4net Version=1.2.0.30714 Culture ... missmatch .. log4net Version=1.2.9.0 ...

    and, the other is this

    log4net Version=1.2.9.0 Culture ... missmatch .. log4net Version=1.2.0.30714 ...


    I used these two versions

    - Spring.NET-20051201-1228
    - Spring.NET-20060317-2234

    And, the result is same..

    How can i do for solve this problem? Please.. somebody help me..


    ps)

    Using IBatisNet with Spring.Net is verified? I could find just one reference(http://plainvanilla.typepad.com/spri...ibatisnet.html) about that.

    So, if there are more.. please let me know

  2. #2
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    I need to revisit iBatis support in general and at a minimum bring it in line with the DbProvider abstraction we are using.

    The issue you are having is that iBatis.NET 1.2.x uses log4.net 1.2.0 and Spring.NET uses 1.2.9 (the 'beta' which has been out forever...) I just checked that iBatis 1.3.0 beta uses log4net 1.2.9.0

    Anyway, If you add this rebinding section to your application configuration file the issue should be resolved.

    Code:
        <runtime>
            <assemblyBinding xmlns="urn&#58;schemas-microsoft-com&#58;asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="log4net" publicKeyToken="b32731d11ce58905" culture="neutral" />
                    <bindingRedirect oldVersion="1.2.0.30714" newVersion="1.2.9.0" />
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
    Let me know if this helps you.

    Cheers,
    Mark

  3. #3
    Join Date
    Mar 2006
    Posts
    2

    Default

    Thank you for your reply, Mark..

    however, I couldn't solve the problem..

    As you mentioned, IBatis.Net 1.3.0 beta uses log4net 1.2.9.

    but, Spring ibatis support dll uses IBatis.Net 1.2.9, so it made another

    problem..

    So, I decided to use NHibernate instead.. and it doesn't have problem..

    Anyway, thank you for you reply again..

    Have a nice day~!

  4. #4

    Default

    Mark,

    I would be willing to help out where I can with the iBATIS integration, if you could just give me a quick overview of your vision for it.

    Thanks,
    Shawn

  5. #5
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,

    The current IBatis stuff doesn't use the DbProvider abstraction if I remember correctly, instead it takes a connection string directly. Moving it along the lines of how nhibernate/ado support is would be a big help.

    Also there should be the ability to have ibatis participate in transaction already started via AdoTemplate and vice-versa. I think getting at the underlying tx object in ibatis isn't that simple in the .net version - it would be good to check.

    There is also docs and a sample program, say based on the current simple springair database used in the web app or good 'ol northwind... Hmm, ping me privately and we can discuss more. I greatly appreciate your offer of help!

    Cheers,
    Mark

  6. #6
    Mark Pollack is offline Spring.NET Co-Lead Spring TeamSpring User
    Join Date
    Sep 2004
    Location
    New York, NY
    Posts
    1,683

    Default

    Hi,
    FYI, I was only able to get the binding redirect to work in my unit tests. You may try to work backwards from putting the redirect in machine.config.

    Mark

  7. #7
    Join Date
    Mar 2005
    Posts
    78

    Default

    Quote Originally Posted by lanore View Post
    I'm integrating IBatisNet with Spring.Net, and It's not easy for me.

    The problem is this,

    Whenever i add "Spring.Data.IBatisNet.dll" reference into my project,

    The studio reports two errors,

    One is this

    log4net Version=1.2.0.30714 Culture ... missmatch .. log4net Version=1.2.9.0 ...

    and, the other is this

    log4net Version=1.2.9.0 Culture ... missmatch .. log4net Version=1.2.0.30714 ...
    Just a note: iBATIS 1.5 bundles Log4Net 1.2.10, but it can use a prior version, and other logging clients as well.

    If anyone is having a problem running iBATIS 1.5 with Spring.NET 1.0.2, just remove the Log4Net 1.2.10 assembly that comes with iBATIS, and iBATIS will fall back automatically.

    -Ted.

Similar Threads

  1. spring.net + nhibernate integration
    By greatewei in forum Data Access
    Replies: 16
    Last Post: 05-22-2006, 01:19 PM
  2. Spring.NET and IBatis.NET Beginner Question
    By Hadi in forum Architecture, Design and Best Practices
    Replies: 6
    Last Post: 11-05-2005, 02:32 AM
  3. what are you injecting with Spring.Net?
    By SecretSquirrel123 in forum Core Container
    Replies: 7
    Last Post: 04-27-2005, 08:11 AM
  4. Spring.Net and NHibernate
    By nohare in forum Core Container
    Replies: 2
    Last Post: 03-09-2005, 08:50 AM
  5. Spring.NET ???
    By Anonymous in forum Architecture, Design and Best Practices
    Replies: 2
    Last Post: 02-03-2005, 05:31 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •