-->
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.  [ 3 posts ] 
Author Message
 Post subject: log4net load exception!
PostPosted: Wed Apr 18, 2007 5:34 pm 
Newbie

Joined: Wed Apr 18, 2007 5:18 pm
Posts: 2
Hi I am usign NHibernate version 1.0.4.
Before I even come to load my mapping file i get below described exception. The exeption appear when calling code line.

cfg = new NHibernate.Cfg.Configuration();

I use loading mapping file from code (cfg.AddFile(mapping_file)).
What is interesting is that when I used stand alone aplication (C# project not connected with other projects) to test my database access it works fine.

The error appears when I merge my files with solution that bind more C# projects.

The exception description is:

"InnerException {"Could not load file or assembly 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905"} System.Exception {System.IO.FileLoadException}"

I am pretty desperate while I try to solve this issue already dor three dayswith no success.

Can anybody help me...


I didn't describe other details needed for help, while form my opinion they aren't relevant.

My application file is below.

Thanks in advance

gpum

<?xml version="1.0" encoding="utf-8" ?>

<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net, Version=1.2.10.0" />
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=2.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>


<!-- This section contains the log4net configuration settings -->
<log4net>

<!-- Define some output appenders -->

<appender name="rollingFile" type="log4net.Appender.RollingFileAppender,log4net" >

<param name="File" value="log.txt" />
<param name="AppendToFile" value="true" />
<param name="RollingStyle" value="Date" />
<param name="DatePattern" value="yyyy.MM.dd" />
<param name="StaticLogFileName" value="true" />

<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="%d [%t] %-5p %c [%x] &lt;%X{auth}&gt; - %m%n" />
</layout>
</appender>

<!-- Setup the root category, add the appenders and set the default priority -->

<root>
<priority value="ALL" />
<appender-ref ref="rollingFile" />
</root>

</log4net>


<nhibernate>
<add key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />

<add key="hibernate.dialect"
value="NHibernate.Dialect.PostgreSQLDialect" />

<add key="hibernate.connection.driver_class"
value="NHibernate.Driver.NpgsqlDriver" />

<add key="hibernate.connection.connection_string"
value="Server=localhost;Database=varanus;User ID=admin;Password=ki2ki;Encoding=UNICODE" />

<!-- <add key="hibernate.default_schema"
value="testDB.public" />-->

<add
key="hibernate.show_sql"
value="true"
/>

</nhibernate>

</configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 18, 2007 6:03 pm 
Newbie

Joined: Wed Dec 20, 2006 12:34 pm
Posts: 13
.Net is unable to find log4net which probably means it can't find NHibernate.dll either.

Most likely you are not referencing nhibernate properly. What is your solution file structure like? Does your startup project reference Nhibernate? Are you using namespaces?


Top
 Profile  
 
 Post subject: Load problem solved bu new appears!
PostPosted: Thu Apr 19, 2007 3:14 pm 
Newbie

Joined: Wed Apr 18, 2007 5:18 pm
Posts: 2
The load problem was solved...how...We have differebn project and at the end all projects are merged in to the one solution. One project uses log4net 1.2.9.0 and one 1.2.10.0...I have to delete target directories to delete log4net librarires and add reference to 1.2.9.0 log4net.dll...

But now another problem apperas saying.

Message "Could not find a part of the path 'D:\\Datoteke\\bussines\\agrosoft\\Projekti\\HSE\\official\\Common\\bin\\Release\\conf\\app.hbm.xml'."string

There is no end of this problems...

Thanks for answer...

gpum


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.