Visual Paradigm Logo
     Build Quality Applications Faster, Better and Cheaper
 
Home | Products | Download | Documentation | Support | Resources | Partners | Quick Tour | Shop | Company |  
 
   Visual Paradigm Discussion Forum
  Login   [ Register ] Email: Password: Log me on automatically I lost my password  
Advanced Search
undefined alias or unknown mapping  
Forum Index -> Object Relational Mapping (ORM)
Author Message
Anonymous

Hi Sergi,



I have noticed you as a very active member on the Hibernate forum. I have logged the issue which I am facing on the forum but didn’t receive any reply so was hoping that you could help me with the same.



I am using Using .NET 1.1, AndroMDA with NHibernate and MYSQL 5.0.27 as the database. I am also using the MYSQL connector 1.0.9 for Nhibernate.



This exception occurs randomly on production and everything works fine on reloading the page. We have not encountered this exception while development. Seems to be some issue with the cache or some many-to-many relationship issue
I have checked all hbm mapping files are embedded resource. we have caching enabled and settings as given below:

Caching Entries
<!-- NHibernate caching settings-->
<property name="hibernateEnableCache">true</property>
<property name="hibernateEnableAssociationsCache">false</property>
<property mame="hibernateQueryUseNamedParameters">true</property>
<property name="ehCacheEternal">false</property>
<property name="ehCacheMaxElementsInMemory">100</property>
<property name="ehCacheOverflowToDisk">false</property>
<property name="ehCacheTimeToIdleSeconds">0</property>
<property name="ehCacheTimeToLiveSeconds">172800</property>
<property name="hibernateAssociationCache">read-write</property>
<property name="hibernateEntityCache">read-write</property>
<property name="hibernateUseQueryCache">false</property>



Full Stack Trace



2007-04-10 16:02:06,984 [5032] ERROR [(null)] -

Exception Details:
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> NHibernate.
MappingException: Association references unmapped class: StoryImpl
at NHibernate.Cfg.Binder.BindCollectionSecondPass(XmlNode node, Collection model, IDictionary persistentClasses,
Mappings mappings)
at NHibernate.Cfg.SetSecondPass.SecondPass(IDictionary persistentClasses)
at NHibernate.Cfg.AbstractSecondPass.DoSecondPass(IDictionary persistentClasses)
at NHibernate.Cfg.Configuration.SecondPassCompile()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
at AndroMDA.NHibernateSupport.DefaultSessionManager.BuildSessionFactory()
at AndroMDA.NHibernateSupport.DefaultSessionManager.HandleSessionStart()
at Services.ProjectServiceBase.GetProjectByRsProjectID(String rsProjectID)
at Web.Layout.ToolsLayout.get_ProjectVO()
at Web.Home.HandleLogin()
at Web.Home.Page_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

*************************************************************

2007-04-09 09:31:27,031 [1900] ERROR [(null)] -

Exception Details:
System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. --->
Services.ProjectServiceException: undefined alias or unknown mapping: PT [from PT.Domain.ProjectImpl as
project where project.RsProjectId = :RsProjectId] ---> NHibernate.QueryException: undefined alias or unknown mapping:
PT [from PT.Domain.ProjectImpl as project where project.RsProjectId = :RsProjectId]
at NHibernate.Hql.PathExpressionParser.Token(String token, QueryTranslator q)
at NHibernate.Hql.ParserHelper.Parse(IParser p, String text, String seperators, QueryTranslator q)
at NHibernate.Hql.FromParser.Token(String token, QueryTranslator q)
at NHibernate.Hql.ClauseParser.Token(String token, QueryTranslator q)
at NHibernate.Hql.PreprocessingParser.Token(String token, QueryTranslator q)
at NHibernate.Hql.ParserHelper.Parse(IParser p, String text, String seperators, QueryTranslator q)
at NHibernate.Hql.QueryTranslator.Compile()
at NHibernate.Hql.QueryTranslator.Compile(ISessionFactoryImplementor factory, IDictionary replacements, Boolean
scalar)
at NHibernate.Impl.SessionFactoryImpl.GetQuery(String queryString, Boolean shallow)
at NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar)
at NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters)
at NHibernate.Impl.QueryImpl.List()
at PT.Domain.ProjectDaoBase.GetProjectByRsProjectID(Int32 transform, String queryString, String RsProjectId)
at PT.Domain.ProjectDaoBase.GetProjectByRsProjectID(Int32 transform, String RsProjectId)
at PT.Services.ProjectServiceImpl.HandleGetProjectByRsProjectID(String rsProjectID)
at PT.Services.ProjectServiceBase.GetProjectByRsProjectID(String rsProjectID)
--- End of inner exception stack trace ---
at PT.Services.ProjectServiceBase.GetProjectByRsProjectID(String rsProjectID)
at PT.Web.Layout.ToolsLayout.get_ProjectVO()
at PT.Web.Home.HandleLogin()
at PT.Web.Home.Page_Load(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)



Will really appreciate if you could help me resolve the issue or guide me where to look for a solution.

 
 
   Forum Index -> Object Relational Mapping (ORM)
Go to:   
Powered by JForum 2.1.4 © 2005 - Rafael Steil