Developer forum

Forum » CMS - Standard features » Wild Sql Error for Item Types

Wild Sql Error for Item Types

Kevin O''''Driscoll
Reply

Hi Guys need some help on this. Im getting a weird sql Error for a local install of Dynamicweb.dll 8.9.1.7 

Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'ItemType_Feature_Panel'.

We have a live site and a development site on a remote server, these do not throw this error. I see both remote databases do not have any tables for any of our custom Item types like ItemType_Feature_Panel, they do have the default item types like ItemType_Dw_Paragraph. All ItemType xml files are present in files > system > items. The remotes are using SQL Server 2008R2, my Local is running SQL Server 2014. Locally Im running 3 other DW Sites with Item Types with no problem.

In DW Admin System > Logs > items > ActivationWorkflow I see error logs with ItemType errors like:

[7/24/2017 5:08:06 PM]:	Dynamicweb.Content.Items.Activation.DatabaseFirstActivationWorkflow: Item type Feature_Panel: exeption during update

Logging 'Exception':
Type: System.Data.SqlClient.SqlException
Message: Invalid object name 'ItemType_Feature_Panel'.
StackTrace:    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   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.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Dynamicweb.Content.Items.Activation.DatabaseBuilder.SyncTable(ItemType item)
   at Dynamicweb.Content.Items.Activation.DatabaseFirstActivationWorkflow.Update(IEnumerable`1 items)
InnerException: [null]
Data: System.Collections.ListDictionaryInternal
Source: .Net SqlClient Data Provider
Object output: System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'ItemType_Feature_Panel'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   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.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Dynamicweb.Content.Items.Activation.DatabaseBuilder.SyncTable(ItemType item)
   at Dynamicweb.Content.Items.Activation.DatabaseFirstActivationWorkflow.Update(IEnumerable`1 items)
ClientConnectionId:a2e1b6bd-3779-4686-8614-680b01ae217c
Error Number:208,State:1,Class:16
------------------------------------------------------------

Any ideas why this is happening, table is missing in SQL database?

Rgds

 


Replies

 
Nicolai Pedersen
Reply

Missing DDL permissions on the SQL user on your dev environment is my guess.

 
Kevin O''''Driscoll
Reply

Thanks Nicolai, I checked permissions for the user and all seems standard, I also get this when I save the Item types in admin:

 

Capture.PNG
 
Nicolai Pedersen
Reply

So what does the log file say?

 

You must be logged in to post in the forum