Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modelsbuilder failing to generate models due to SQL error #4731

Closed
clausjensen opened this issue Feb 25, 2019 · 1 comment
Closed

Modelsbuilder failing to generate models due to SQL error #4731

clausjensen opened this issue Feb 25, 2019 · 1 comment

Comments

@clausjensen
Copy link
Contributor

clausjensen commented Feb 25, 2019

Note - this only happened one out of 4 times while testing installs from zip, with both sqlce and sqlserver. It happened on the sqlserver install:

When the site was installed - modelsbuilder was not able to generate models and generated this error:

Failed to build PureLive models.
There is already an open DataReader associated with this Command which must be closed first.

   at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)
   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteScalar()
   at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
   at NPoco.Database.ExecuteScalarHelper(DbCommand cmd)
   at NPoco.Database.ExecuteScalar[T](String sql, CommandType commandType, Object[] args)
   at Umbraco.Core.Scoping.Scope.ReadLock(Int32[] lockIds)
   at Umbraco.Core.Services.Implement.ContentTypeServiceBase`3.GetAll(Int32[] ids)
   at Umbraco.ModelsBuilder.Umbraco.UmbracoServices.GetAllTypes()
   at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.GetModelsAssembly(Boolean forceRebuild)
   at Umbraco.ModelsBuilder.Umbraco.PureLiveModelFactory.EnsureModels()

After triggering a generation of models (saving a document type) this error goes away but I then get a binding error trying to bind nucache content.

image

Republishing the content item will make this error go away as well and my content now renders.

@zpqrtbnk
Copy link
Contributor

zpqrtbnk commented Mar 4, 2019

Fixed with aa86dfa

Which is not part of 8.0.0 but will be part of 8.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants