-->
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.  [ 1 post ] 
Author Message
 Post subject: Configuration de l'application avec mysql
PostPosted: Sat May 01, 2010 11:19 am 
Newbie

Joined: Sat May 01, 2010 11:09 am
Posts: 1
Bonjour à tous, alors je travaille sur un code sous visual studio 2008, avec NHibernate dans un projet c#

Mon poblème est le suivant : une partie du code est pour le MSSQL server 2005 et ayant des problèmes j'ai voulu l'essayer avec Mysql à la place.
Le projet se comporte de App.Config, Pet.hbm.xml et Program.cs

l'erreur est :
Quote:
The ProxyFactoryFactory was not configured.
Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.


J'ai modifié les lignes connection_string et dialect

Alors je vous poste l'app.config INITIAL :

Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="hibernate-configuration"
    type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
  </configSections>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory>
      <property name="connection.provider">
        NHibernate.Connection.DriverConnectionProvider
      </property>
      <property name="connection.driver_class">
        NHibernate.Driver.SqlClientDriver
      </property>
      <property name="connection.connection_string">
        Server=(local);database=Pets;Integrated Security=SSPI;
      </property>
      <property name="dialect">
        NHibernate.Dialect.MsSql2005Dialect
      </property>
      <property name="show_sql">
        false
      </property>
    </session-factory>
  </hibernate-configuration>
</configuration>



puis celui que j'ai "modifié" et qui, je pense, est la source de mon erreur :

Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="hibernate-configuration"
    type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
  </configSections>
  <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
    <session-factory>
      <property name="connection.provider">
        NHibernate.Connection.DriverConnectionProvider
      </property>
      <property name="connection.driver_class">
        NHibernate.Driver.SqlClientDriver
      </property>
      <property name="connection.connection_string">
        Server=localhost;database=Pets;User=root;Password="";
      </property>
      <property name="dialect">
        NHibernate.Dialect.MySQL5Dialect
      </property>
      <property name="show_sql">
        false
      </property>
    </session-factory>
  </hibernate-configuration>
</configuration>



Je ne comprends pas :( Pouvez-vous m'aider ?

Merci d'avance

ps : je poste le Program.cs si vous souhaitez


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

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.