Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# Ayende Rahien 3/29/2007 1:42 AM
I just got the following exception on my site:

f [from Feed f where f.Section.Id = :sectionId]

This affected all the pages I checked.
A restart has fixed the issue, but I have no idea why, it looks like the SessionFactory didn't have the correct assemblies loaded.
# Ayende Rahien 3/29/2007 1:58 AM
Here is the full exception message:
Exception Details: NHibernate.QueryException: in expected: f [from Feed f where f.Section.Id = :sectionId]

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[QueryException: in expected: f [from Feed f where f.Section.Id = :sectionId]]
   NHibernate.Hql.FromParser.Token(String token, QueryTranslator q) +1785
   NHibernate.Hql.ClauseParser.Token(String token, QueryTranslator q) +955
   NHibernate.Hql.PreprocessingParser.Token(String token, QueryTranslator q) +603
   NHibernate.Hql.ParserHelper.Parse(IParser p, String text, String seperators, QueryTranslator q) +170
   NHibernate.Hql.QueryTranslator.Compile() +160
   NHibernate.Hql.QueryTranslator.Compile(ISessionFactoryImplementor factory, IDictionary replacements, Boolean scalar) +64
   NHibernate.Impl.SessionFactoryImpl.GetQuery (String queryString, Boolean shallow) +134
   NHibernate.Impl.SessionImpl.GetQueries(String query, Boolean scalar) +29
   NHibernate.Impl.SessionImpl.Find(String query, QueryParameters parameters) +122
   NHibernate.Impl.QueryImpl.List () +84
   Cuyahoga.Modules.RemoteContent.RemoteContentModule.GetAllFeeds() +83

[Exception: Unable to get Feeds for section: News]
   Cuyahoga.Modules.RemoteContent.RemoteContentModule.GetAllFeeds() +159
   Cuyahoga.Modules.RemoteContent.RemoteContentModule.RefreshFeeds() +34
   Cuyahoga.Modules.RemoteContent.RemoteContentModule.GetAllFeedItems() +83

[Exception: Unable to get FeedItems for section: News]
   Cuyahoga.Modules.RemoteContent.RemoteContentModule.GetAllFeedItems () +167
   Cuyahoga.Modules.RemoteContent.Web.RemoteContent.Page_Load(Object sender, EventArgs e) +55
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback (Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive () +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 
# martijnb 3/29/2007 6:21 AM
I've seen this one also before, but I couldn't get my finger behind it. I'll have a look at it. Maybe, if you play a little bit with the cache settings of the RemoteContent module, things will become more clear.
# ILLSeaBass 4/12/2007 1:03 PM
I am getting this same issue with a few modules I've developed. Any luck in figuring this out? Any help would be great.

# martijnb 4/12/2007 2:26 PM
All I know that is that it is caused by the way modules are loaded on-the-fly (lazy). Still figuring out a decent solution without the need that all modules have to be loaded at start time.
# ILLSeaBass 4/13/2007 12:53 PM
Thanks for the quick reply. Do you happen to know of a temporary work around or hack I could put in place until this is remedied? The only thing that is fixing this issue is an IISreset which is not what I want to do unless I have no choice.

Thanks,
Matt
# martijnb 4/14/2007 10:38 AM
A workaround is to register the persistent classes in the NHibernate facility section of facilities.config. You'll have to remove the INHibernateModule implementation of your modules in that case. This way, the mappings are loaded at start time. See http://www.castleproject.org/container/facilities/v1rc3/nhibernate/configref.html#sample for an example.
# discgolfer1138 4/19/2007 6:05 PM
I'm having the same problem and am in the process of implementing the workaround..

I'll let y'all know what the outcome is..

(crosses fingers)