New build 796 - new features

85 views
Skip to first unread message

Ayende Rahien

unread,
Mar 13, 2011, 10:04:37 AM3/13/11
to nhprof
Hi guys,
We have a brand new build, which contains some pretty exciting features :-)
a) When using NHibernate 3.0, you are no longer required to reference log4net
b) Yes, that means that you can run on the client profiler.

There is, however, a breaking change if you are relying on log4net to configure NH Prof, you need to include the new 
HibernatingRhinos.Profiler.Appender.NHibernateLog4Net.dll in your project and modify the log4net accordingly.
We have updated the documentation to the new settings: http://nhprof.com/Learn/Usage/ProfileAppWithConfiguration

Kris-I

unread,
Mar 13, 2011, 1:55:30 PM3/13/11
to nhprof
I have a problem with this new version, no change in my code, the code
compile, when I execute I receive this, see this picture :
http://i54.tinypic.com/30ae6p5.png

Thanks

Ayende Rahien

unread,
Mar 13, 2011, 3:27:24 PM3/13/11
to nhp...@googlegroups.com, Kris-I
Can you send me the full exception test?


--
You received this message because you are subscribed to the Google Groups "nhprof" group.
To post to this group, send email to nhp...@googlegroups.com.
To unsubscribe from this group, send email to nhprof+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nhprof?hl=en.


Alex McMahon

unread,
Mar 14, 2011, 5:45:54 AM3/14/11
to nhp...@googlegroups.com
I'm not having any luck upgrading to the latest version, I do use the Log4Net method of profiling, but even if I use the Initialize() method I can't get it to work. 

I'm using NHibernate 2.1.0.4000.

With the Initialize() method I get the following error:
System.NullReferenceException was unhandled
  Message="Source resource is missing: HibernatingRhinos.Profiler.Appender.NHibernate.Log4Net.NHibernateProfilerAppender.cs"
  Source="HibernatingRhinos.Profiler.Appender"
  StackTrace:
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.GetResources(IEnumerable`1 sourcesResources)
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.RegisterAppenderUsingLog4Net()
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.WrapLogger()
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.StartNHibernateProfiling()
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(NHibernateAppenderConfiguration configuration)
       at HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize()
       at NHProfQueryPlanTest.Program.Main(String[] args) in C:\VSProjects\NHProfQueryPlanTest\NHProfQueryPlanTest\Program.cs:line 14
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException: 

I've tried referencing just the HibernatingRhinos.Profiler.Appender.dll assembly and tried also referencing HibernatingRhinos.Profiler.Appender.NHibernateLog4Net.dll. Neither combination worked

I've also been looking at the log4net config... are you sure it's correct on http://nhprof.com/Learn/Usage/ProfileAppWithConfiguration 

it sort of looks like it should be:

<?xml version="1.0" encoding="utf-8" ?>
<log4net>
<appender name="NHProfAppender"
type="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender,
HibernatingRhinos.Profiler.Appender.NHibernateLog4Net"
>
<sink value="tcp://127.0.0.1:22897" />
</appender>
<logger name="HibernatingRhinos.Profiler.Appender.NHibernate.NHProfAppender.Setup">
<appender-ref ref="NHProfAppender"/>
</logger>
</log4net>



Message has been deleted

Kah Hoe

unread,
Mar 14, 2011, 4:44:45 AM3/14/11
to nhprof
I am having similar problem too. What other information do you need?

Error Message:
System.InvalidOperationException: {"Metadata file 'D:\\build\
\mims.com.v2.src\\application\\dotnet\\project\
\Mims.Online.Presentation.Web.Mvc\\\
\HibernatingRhinos.Profiler.Appender.dll' could not be found"}

Source:
HibernatingRhinos.Profiler.Appender.v4.0

Stack Trace:
at
HibernatingRhinos.Profiler.Appender.Util.GenerateAssembly.Compile(String
fileName, String[] sources, IEnumerable`1 assembliesToReference)
at
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.RegisterAppenderUsingNHibernateLogger()
at
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.WrapLogger()
at
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.StartNHibernateProfiling()
at
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize(NHibernateAppenderConfiguration
configuration)
at
HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize()
at
Mims.Online.Presentation.Web.Mvc.MvcApplication.Application_Start() in
D:\build\mims.com.v2.src\application\dotnet\project
\Mims.Online.Presentation.Web.Mvc\Global.asax.cs:line 281

Code calling in global.asax:

HibernatingRhinos.Profiler.Appender.NHibernate.NHibernateProfiler.Initialize();

gen

unread,
Mar 14, 2011, 5:55:36 AM3/14/11
to nhprof
Getting the same error as above running NHibernate 3.0 and ASP.NET MVC
3
Trying both x.Appender.dll and x.Appender.v4.dll

Error points to
protected void Application_Start()
{
NHibernateProfiler.Initialize();
}

and the text "No Metadata found for file xxx"
> onhttp://nhprof.com/Learn/Usage/ProfileAppWithConfiguration
>
> it sort of looks like it should be:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <log4net>
>   <appender name="NHProfAppender"
>
>       type="HibernatingRhinos.Profiler.Appender.*NHibernate*.NHProfAppender,
>       HibernatingRhinos.Profiler.*Appender*.NHibernateLog4Net">

Yosef Yitzchak Yitzchaki

unread,
Mar 14, 2011, 7:16:07 AM3/14/11
to nhp...@googlegroups.com
Hi, this will be fixed in the next build 

Yosef Yitzchak Yitzchaki

unread,
Mar 14, 2011, 7:21:17 AM3/14/11
to nhp...@googlegroups.com
This will be fixed in the next build

Reply all
Reply to author
Forward
0 new messages