Open GoogleCodeExporter opened 8 years ago
Look at Global.asax, Application_Start method.
Database Schema is created by application on first start.
"Castle.ActiveRecord.ActiveRecordStarter.CreateSchema();"
Original comment by e...@devel4.net
on 3 Jan 2009 at 12:12
Hi, I created a database called stacked in mysql db, and ran the website but i
got
this error: ""Could not perform ExecuteQuery for QuizItem""
For more info about the error please check the attached screen shot.
Thanks,
Original comment by amrelgar...@gmail.com
on 3 Jan 2009 at 12:30
Attachments:
The same problem I got on sql 2005.
I created patch to solve it - attached to issue 2:
http://code.google.com/p/stacked/issues/detail?id=2
Original comment by e...@devel4.net
on 3 Jan 2009 at 12:37
sorry,i don't know how to use this patch file, how can this patch file solve the
problem. can you help me
Original comment by amrelgar...@gmail.com
on 3 Jan 2009 at 12:44
Use tortoise "apply patch" command. Or simply replace your
WebSite\App_Code\QuitItem.cs with this one attached. Hope it helps :)
Original comment by e...@devel4.net
on 3 Jan 2009 at 12:57
Attachments:
yes, i got it, its working now
Original comment by amrelgar...@gmail.com
on 3 Jan 2009 at 1:25
How can I solve this problem?
------------
Server Error in '/WebSite' Application.
--------------------------------------------------------------------------------
A scope tried to registered itself within the framework, but the Active Record
was not initialized
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: Castle.ActiveRecord.Framework.ActiveRecordException: A scope
tried to registered itself within the framework, but the Active Record was not
initialized
Source Error:
Line 18: protected override void OnPreInit(EventArgs e)
Line 19: {
Line 20: _session = new SessionScope();
Line 21: base.OnPreInit(e);
Line 22: }
Source File: c:\Stacked\WebSite\Default.aspx.cs Line: 20
Stack Trace:
[ActiveRecordException: A scope tried to registered itself within the
framework, but the Active Record was not initialized]
Castle.ActiveRecord.Framework.Scopes.ThreadScopeAccessor.RegisterScope(ISessionScope scope) +81
Castle.ActiveRecord.Framework.Scopes.AbstractScope..ctor(FlushAction flushAction, SessionScopeType type) +109
Castle.ActiveRecord.SessionScope..ctor(FlushAction flushAction) +38
Castle.ActiveRecord.SessionScope..ctor() +30
_Default.OnPreInit(EventArgs e) in c:\Stacked\WebSite\Default.aspx.cs:20
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
Original comment by chitminm...@gmail.com
on 10 Aug 2010 at 6:51
where is stacked database or any sql script for this project?
Original comment by abhi.ri...@gmail.com
on 8 Sep 2011 at 6:19
Hello, I have a similar issue as above when trying to install the first time.
Error is: Invalid object name 'QuizItems'.
I tried the patch of quizitem.cs above, but it did not fix it. Can you help?
Invalid object name 'QuizItems'.
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.Data.SqlClient.SqlException: Invalid object name
'QuizItems'.
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:
[SqlException (0x80131904): Invalid object name 'QuizItems'.]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1951450
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4849003
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2394
System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +33
System.Data.SqlClient.SqlDataReader.get_MetaData() +83
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +141
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader() +12
NHibernate.Impl.BatcherImpl.ExecuteReader(IDbCommand cmd) +35
NHibernate.Loader.Loader.GetResultSet(IDbCommand st, RowSelection selection, ISessionImplementor session) +194
NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +176
NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +67
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +44
[ADOException: could not execute query
[ select this_.* from QuizItems this_
where this_.FK_Parent is null
order by (select max(Created) from QuizItems q2
where this_.ID = q2.ID or q2.FK_Parent = this_.ID
) desc
]
[SQL: select this_.* from QuizItems this_
where this_.FK_Parent is null
order by (select max(Created) from QuizItems q2
where this_.ID = q2.ID or q2.FK_Parent = this_.ID
) desc
]]
NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +122
NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +18
NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) +81
NHibernate.Loader.Custom.CustomLoader.List(ISessionImplementor session, QueryParameters queryParameters) +18
NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results) +101
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results) +72
NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters) +42
NHibernate.Impl.SqlQueryImpl.List() +103
Castle.ActiveRecord.Queries.SimpleQuery`1.InternalExecute(ISession session) +21
Castle.ActiveRecord.ActiveRecordBaseQuery.Castle.ActiveRecord.IActiveRecordQuery.Execute(ISession session) +7
Castle.ActiveRecord.ActiveRecordBase.ExecuteQuery(IActiveRecordQuery query) +79
[ActiveRecordException: Could not perform ExecuteQuery for QuizItem]
Castle.ActiveRecord.ActiveRecordBase.ExecuteQuery(IActiveRecordQuery query) +193
Castle.ActiveRecord.ActiveRecordBase`1.ExecuteQuery2(IActiveRecordQuery`1 query) +25
Castle.ActiveRecord.Queries.SimpleQuery`1.Execute() +47
Entities.QuizItem.GetQuestions(OrderBy order) +113
_Default.DataBindGrid() +243
_Default.Page_Load(Object sender, EventArgs e) +289
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.4963; ASP.NET
Version:2.0.50727.4955
Original comment by ian.ippo...@gmail.com
on 6 Nov 2011 at 11:20
P.S. ran it in Visual STudio instead, and it asked me to upgrade to net 3.5
(and I said yes). I now get the error described by the other person abvoe:
A scope tried to registered itself within the framework, but the Active Record
was not initialized
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: Castle.ActiveRecord.Framework.ActiveRecordException: A scope
tried to registered itself within the framework, but the Active Record was not
initialized
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:
[ActiveRecordException: A scope tried to registered itself within the
framework, but the Active Record was not initialized]
Castle.ActiveRecord.Framework.Scopes.ThreadScopeAccessor.RegisterScope(ISessionScope scope) +81
Castle.ActiveRecord.Framework.Scopes.AbstractScope..ctor(FlushAction flushAction, SessionScopeType type) +109
Castle.ActiveRecord.SessionScope..ctor(FlushAction flushAction) +38
Castle.ActiveRecord.SessionScope..ctor() +30
_Default.OnPreInit(EventArgs e) +46
System.Web.UI.Page.PerformPreInit() +31
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +282
Original comment by ian.ippo...@gmail.com
on 6 Nov 2011 at 11:24
Original issue reported on code.google.com by
amrelgar...@gmail.com
on 28 Nov 2008 at 8:38