-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Problem with 1.2.0.alpha and MySql.Data
PostPosted: Fri Jun 02, 2006 6:28 am 
Newbie

Joined: Fri Jun 02, 2006 6:01 am
Posts: 2
I tried to migrate to 1.2.0 but I have problems with MySql Connector. I get exception thats says " Could not create the driver from NHibernate.Driver.MySqlDataDriver. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.HibernateException: The IDbCommand and IDbConnection implementation in the assembly MySql.Data could not be found. Please ensure that the assembly MySql.Data is in the Global Assembly Cache or in a location that NHibernate can use System.Type.GetType(string) to load the types from." everytime I try to make a new SessionFactory. I'm using MySql Connector version 1.0.7.

edit: same code worked fine with 1.0.2


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 02, 2006 8:46 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
You have to either put the assembly in the GAC and add <qualifyAssembly/> element to your application configuration file, or put the assembly into your application directory so that it can be found.

The reason is that NHibernate no longer uses Assembly.LoadWithPartialName to load an assembly, so that you have more control over which version of the provider actually gets loaded.

I'll change the error message to explain this.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 03, 2006 5:54 am 
Newbie

Joined: Sun Jan 15, 2006 11:51 am
Posts: 8
Example:
Code:
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <qualifyAssembly partialName="MySql.Data"
           fullName="MySql.Data, Version=1.0.7.30072, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
    </assemblyBinding>
  </runtime>


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 4:59 am 
Newbie

Joined: Fri Jun 02, 2006 6:01 am
Posts: 2
Ok, thanks a lot. I got it working and generics works too. GJ :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.