.NET Daily

ASP.net

Nhibernate Exception: Named Query Not Found: storedproceduremaname

Posted on .

Nhibernate Exception: Named Query Not Found: storedproceduremaname

Introduction

Nhibernate Exception: Named Query Not Found: storedproceduremaname

Scenario 1: You call a WCF service method to populate a repeater and at page load you are prompted with the above exception.

Resolution for Scenario 1: The above exception appears when Nhibernate doesn’t recognize the entity that you want to call. It could be triggered by multiple causes:

  1. The stored procedure doesn’t exists in the database;
  2. The stored procedure is not registered in the .hbm.xml configuration file;
  3. The mapping assembly for the current business layer is not specified in the web.config file:
  4. Ex:

    Check the above list of items on your solution and see if exception disappears.

Darius

Darius

Darius Dumitrescu is a creative Senior CMS Consultant with in depth .NET knowledge, focused on Web Development and Architecture Design.

There are no comments.

View Comments (0) ...
Navigation