-->
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.  [ 4 posts ] 
Author Message
 Post subject: AddAssembly Problem?
PostPosted: Wed Feb 01, 2006 1:19 pm 
Newbie

Joined: Wed Feb 01, 2006 1:08 pm
Posts: 2
Hibernate version: 1.02

I get this error when I try to Add the Assembly. I have also included a portion of my hibernate-mapping xml sheet showing where Glasses is created. I do have Embedded Resource on also. Thanks for the help!

Code:
ERROR!
File or assembly name Glasses, or one of its dependencies, was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: File or assembly name Glasses, or one of its dependencies, was not found.

Source Error:


Line 51:    // make the configuration file
Line 52:      Configuration cfg = new Configuration();
Line 53:    ***cfg.AddAssembly("Glasses"); ***
Line 54:
Line 55: ISessionFactory factory = cfg.BuildSessionFactory();


Code:
Mapping File
hibernate-mapping xmlns="urn:nhibernate-mapping-2.0">
   <class name="Glasses.Test.User, Glasses" table="Person">


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 3:34 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
Is the Glasses assembly in the "bin" folder of your web app?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 4:54 pm 
Newbie

Joined: Wed Feb 01, 2006 1:08 pm
Posts: 2
k-dub wrote:
Is the Glasses assembly in the "bin" folder of your web app?


I am actually not familiar on where I need to put the User.hbm.xml file. I currently just placed it in the bin folder and nothing changed. I currently just have the standard nHibernate.dll in the bin file. I was under the impression that the namespace Glasses is automatically an assembly file, how exacdtly do I create the assembly file?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 01, 2006 5:35 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
It is the *.dll output of whatever project the "Glasses.Test.User" class is in. If your mapping is correct, then the project is likely called "Glasses" or "Glasses.Test". If you do not have a separate project for your data classes, then it is likely the same name as your web project.

The *.hbm.xml files are normally added to the same project as the classes they map to, and their Build Action set to "Embedded Resource".


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