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: Utiliser NHibernate dans une appli Web avec Orcas ?
PostPosted: Mon Aug 06, 2007 9:58 am 
Newbie

Joined: Mon Aug 06, 2007 9:42 am
Posts: 9
Bonjour,

J'utilise NHibernate dans une appli WEB avec Orcas.
Comme c'est une appli WEB, je lie mon assembly dynamiquement (Je ne sais pas si c'est la meilleur solution, mais bon, c'est la première fois que j'utilise Hibernate)

Code:
Configuration cfg = new Configuration();

cfg.Configure(@"D:\Projets\SocoWebDBBench\nhibernate.cfg.xml");
cfg.SetDefaultAssembly(System.Reflection.Assembly.GetCallingAssembly());           
cfg.AddDirectory(new System.IO.DirectoryInfo(@"D:\Projets\SocoWebDBBench\App_Code\SocomecDBBenchmark\NHibernateDatabaseStructure"));

sessionFactory = cfg.BuildSessionFactory();



Tout va bien jusqu'au BuildSessionFactory qui me lance une exception. J'ai activé Log4Net et je n'ai pas d'erreur mentionnée. Il trouve bien la structure de ma classe et affiche le mapping de chacune des propriétés.

Voilà ce que ça donne avec Log4Net:

Code:
15:39:10.831 [4] INFO  NHibernate.Cfg.Environment - NHibernate 1.2.0.4000 (1.2.0.4000)
15:39:10.862 [4] INFO  NHibernate.Cfg.Environment - nhibernate section not found in application configuration file
15:39:10.862 [4] INFO  NHibernate.Cfg.Environment - Bytecode provider name : lcg
15:39:10.862 [4] INFO  NHibernate.Cfg.Environment - Using reflection optimizer
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - connection.provider=NHibernate.Connection.DriverConnectionProvider
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - connection.driver_class=NHibernate.Driver.FirebirdClientDriver
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - connection.isolation=ReadCommitted
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - connection.connection_string=
            Server=localhost;
            Database=d:\Users\seh\socodbbench.fdb;
            User=SYSDBA;Password=masterkey
       
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - show_sql=false
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - dialect=NHibernate.Dialect.FirebirdDialect
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - use_outer_join=true
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - command_timeout=444
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - query.substitutions=true 1, false 0, yes 1, no 0
15:39:11.315 [4] DEBUG NHibernate.Cfg.Configuration - properties: System.Collections.Hashtable
15:39:14.862 [4] INFO  NHibernate.Cfg.Configuration - Mapping file: D:\Projets\SocoWebDBBench\App_Code\SocomecDBBenchmark\NHibernateDatabaseStructure\SocomecDBBenchMark.NHibernateDatabaseStructure.CDevice.hbm.xml
15:39:14.987 [4] INFO  NHibernate.Dialect.Dialect - Using dialect: NHibernate.Dialect.FirebirdDialect
15:39:15.034 [4] INFO  NHibernate.Cfg.HbmBinder - Mapping class: SocomecDBBenchMark.NHibernateDatabaseStructure.CDevice -> Device
15:39:15.081 [4] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Id -> Id, type: Int32
15:39:15.097 [4] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Name -> Name, type: String
15:39:15.097 [4] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Type -> Type, type: String
15:39:15.097 [4] DEBUG NHibernate.Cfg.HbmBinder - Mapped property: Weight -> Weight, type: Int32
15:39:16.081 [4] INFO  NHibernate.Cfg.Configuration - processing one-to-many association mappings
15:39:16.081 [4] INFO  NHibernate.Cfg.Configuration - processing one-to-one association property references
15:39:16.081 [4] INFO  NHibernate.Cfg.Configuration - processing foreign key constraints



Je ne sais plus où chercher le problème...
Vous avez une idée ? [/code]


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.