DataSplice 5.1 CampMaster table does not exist in production, but exists in test environment - maximo

We migrated some XML files (Views) from test to production. When the technician tried to create a work order, they got an error. The ds51prod.log said the following:
SelectSchemaQueryFailed: SELECT * FROM ds51_cm_offlineids
ORA-00942: table or view does not exist
Error Details:
Exception Type: DataSplice.Db.DbException
HRESULT: 0x80131600
Stack Trace:
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
at Oracle.DataAccess.Client.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at DataSplice.Db.StatementBuilder.DataSplice.Db.Internal.StatementBuilder.IStatementBuilderInternal.GetAdoSchemaTable()
It has to do with the CampMaster plug-in not able to create the custom table as defined by DSAdmin.exe
Without resorting to creating the table manually, how do I have the application create the custom table that is missing in production?

Run DSAdmin.exe
Go to Display Views
Look for Offline IDs
Change Query Permission from true to false
Click Save (diskette icon)
Change Query Permission from false to true
Click Save again
DataSplice should see that the table is missing and create it.
The issue occurred because the XML for Offline IDs had Query Permission set to true. When moved to production, this Option Value assumes the custom table already exists. The custom table does not exists and will error when DataSplice application wants to interact with the table.

Related

Kentico upgrade 10 to 11 - CMSDataVersion upgrade failure

I used the upgrade100_110.exe tool to upgrade my Kentico 10 CMS solution. The solution and database schema were successfully upgraded, but upon accessing the site's admin portal in a web browser, the expected data upgrade did not occur.
To clarify, the CMSSettingsKey KeyValue for CMSDBVersion is 11.0, but the CMSSettingsKey KeyValue for CMSDataVersion is still 10.0.
The only UPGRADE events in the Kentico event log are the following:
Message: 'system' is a duplicate attribute name. Line 1, position 5202.
Exception type: System.Xml.XmlException Stack trace: at
System.Xml.XmlTextReaderImpl.Throw(Exception e) at
System.Xml.XmlTextReaderImpl.AttributeDuplCheck() at
System.Xml.XmlTextReaderImpl.ParseAttributes() at
System.Xml.XmlTextReaderImpl.ParseElement() at
System.Xml.XmlTextReaderImpl.ParseElementContent() at
System.Xml.XmlTextReaderImpl.Read() at
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader
reader) at System.Xml.XmlDocument.LoadXml(String xml) at
CMS.FormEngine.FormHelper.MergeFormDefinitions(String original, String
alternative, Boolean includeAllAltFields) at
UpgradeProcedure.UpdateAlternativeForms() at
UpgradeProcedure.UpgradeApplication(Func`1 versionSpecificMethod,
String newVersion, String packageName) at UpgradeProcedure.Update()
and
Message: 'system' is a duplicate attribute name. Line 1, position
5202.
Exception type: System.Xml.XmlException Stack trace: at
System.Xml.XmlTextReaderImpl.Throw(Exception e) at
System.Xml.XmlTextReaderImpl.AttributeDuplCheck() at
System.Xml.XmlTextReaderImpl.ParseAttributes() at
System.Xml.XmlTextReaderImpl.ParseElement() at
System.Xml.XmlTextReaderImpl.ParseElementContent() at
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) at
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) at
System.Xml.XmlDocument.Load(XmlReader reader) at
System.Xml.XmlDocument.LoadXml(String xml) at
CMS.FormEngine.FormHelper.MergeFormDefinitions(String original, String
alternative, Boolean includeAllAltFields) at
UpgradeProcedure.UpdateAlternativeForms() at
UpgradeProcedure.UpgradeApplication(Func`1 versionSpecificMethod,
String newVersion, String packageName) at UpgradeProcedure.Update()
I'm looking for suggestions on how to troubleshoot this problem. Any suggestions on where to start would be helpful!
Are there any custom modules or modules from marketplace? I've seen an issue where this error had been caused by the URL Redirection module. https://devnet.kentico.com/articles/url-redirection
Or, another idea: MergeFormDefinitions will merge upgraded form definitions with previous ones to transfer custom fields to new forms.
It seems like one of the old forms is not stored correctly and the XML definitions are containing system elements twice. Or, it contains a field called like this which could be a reserved word.
You can check the definitions in the CMS_Calss table to see it contains a element.
Alternatively, you can add a breakpoint into the upgrade procedure to catch the temp table. Then you will be able to see the new definitions and compare them. These two are being merged later and it seems the issue occurs at that time.

Updated Table Returning Error When Query with ASP.NET Web API2 Service

I'm working on a WindowsPhone 8.1 app, and I have a SQL database connected to a Web API server hosted on an Azure website. Recently, the database person updated the database, added a new table, and added sample data to the tables that didn't already have any. When managing the database through Azure, I can see that all the tables have data in them, but when I try to retrieve them with the /api/entityname url, it returns an error message.
A few things to note, the database the server connects to has changed since I originally published it. I tried to run the enable migrations and update database commands again, but I don't know how to select the new database it's now connected to. Do I need to republish the server? Run the migrations commands for the new database? I'm hesitant try things involving the database connection on my own since I don't know much about it and don't want to mess up any configurations. I have a .NET backend. Thanks in advance for the help.
Update:
I went into the Web.Config file of my Services project and changed catalog value in the connection string to the name of my new database. Now I get the following error when I try to get the games values using the /api/teams extention:
An error has occurred.The
'ObjectContent1' type failed to serialize the response body for
content type 'application/xml;
charset=utf-8'.</ExceptionMessage><ExceptionType>System.InvalidOperationException</ExceptionType><StackTrace/><InnerException><Message>An
error has occurred.</Message><ExceptionMessage>The 'GameTime' property
on 'Game' could not be set to a 'System.TimeSpan' value. You must set
this property to a non-null value of type 'System.Byte[]'.
</ExceptionMessage><ExceptionType>System.InvalidOperationException</ExceptionType><StackTrace>
at
System.Data.Entity.Core.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader1.GetValue(DbDataReader
reader, Int32 ordinal) at
System.Data.Entity.Core.Common.Internal.Materialization.Shaper.GetPropertyValueWithErrorHandling[TProperty](Int32
ordinal, String propertyName, String typeName) at
lambda_method(Closure , Shaper ) at
System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func2
constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
at lambda_method(Closure , Shaper ) at
System.Data.Entity.Core.Common.Internal.Materialization.Coordinator1.ReadNextElement(Shaper
shaper) at
System.Data.Entity.Core.Common.Internal.Materialization.Shaper1.SimpleEnumerator.MoveNext()
at System.Data.Entity.Internal.LazyEnumerator1.MoveNext() at
WriteArrayOfGameToXml(XmlWriterDelegator , Object ,
XmlObjectSerializerWriteContext , CollectionDataContract ) at
System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator
xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at
System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract
dataContract, XmlWriterDelegator xmlWriter, Object obj,
RuntimeTypeHandle declaredTypeHandle) at
System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract
dataContract, XmlWriterDelegator xmlWriter, Object obj,
RuntimeTypeHandle declaredTypeHandle) at
System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator
writer, Object graph, DataContractResolver dataContractResolver) at
System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator
writer, Object graph, DataContractResolver dataContractResolver) at
System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator
writer, Object graph, DataContractResolver dataContractResolver) at
System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter
writer, Object graph) at
System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type
type, Object value, Stream writeStream, HttpContent content) at
System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type
type, Object value, Stream writeStream, HttpContent content,
TransportContext transportContext, CancellationToken
cancellationToken)
--- End of stack trace from previous location where exception was thrown --- at
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task
task) at
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task
task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at
System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext()
I think I'm making some progress, but I'm not very experienced with connecting apps to databases, so I'm hesitant to poke around. Thanks in advance for the help. I am using data-first migration (EF Designer from database). Also, the above error message is only displayed when I run the service locally via localhost. When I run it through it's hosted azurewebsites url, I get the following:
An error has occurred.
I assume this is due to my database updates not being published to the hosted site, correct? I'm using Firefox as my browser. If I use IE, I can't download or open the JSON file for the new entities.
With the help of a friend, I managed to fix this problem. In case anyone comes across this post down the line, the problem was due to conflicting data types between the database and the server's data objects. A list of data type mappings between C# and SQL Server can be found at https://msdn.microsoft.com/en-us/library/cc716729%28v=vs.110%29.aspx. Match the data types according to the linked chart, and ensure that any other database constraints (ie: required, etc) are included in annotations. Also, make sure that you update any code in your server's context file to match the data type changes. For instance, I had the following code in my OnModelCreating method:
modelBuilder.Entity<Game>()
.Property(e => e.GameTime)
.IsFixedLength();
Once I changed GameTime to a DateTime property,.IsFixedLength(); no longer applied to it, so I had to comment it out. As you make these changes, you can test them out by debugging your server locally, but you'll have to publish it back to the url it's hosted on in order see the changes take place on your remote server. In my case, I had to republish my azurewebsites.net site. I hope this helps anyone down the line that has a similar issue.

Windows azure redis cache migration issue

We are hosting our site on windows azure where site is running on multiple instances.Due to multiple instances we were using shared cache for storing session values. As Microsoft is going to stop shared cache and recommended to use redis cache to store session. I modified project to use redis cache and it worked for most of the pages. My problem is that, we have a very important page "search page" (we are using lucene.net for search functionality) in our site which stores a lot of data in session and this page is not working. After hitting search button, it shows connecting status in address bar for a long time and goes to oops page of website. We are recording error messages in DB so after looking at there we found following error message.
System.Runtime.Serialization.SerializationException: Type 'myWeb.clsSearchCriteria+ContentCriteria' in Assembly 'HelmBriscoeWeb, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at Microsoft.Web.Redis.RedisUtility.GetBytesFromObject(Object data)
at Microsoft.Web.Redis.RedisUtility.AppendUpdatedOrNewItemsInList(ChangeTrackingSessionStateItemCollection sessionItems, List`1 list)
at Microsoft.Web.Redis.RedisConnectionWrapper.TryUpdateIfLockIdMatchPrepare(Object lockId, ISessionStateItemCollection data, Int32 sessionTimeout, String[]& keyArgs, Object[]& valueArgs)
at Microsoft.Web.Redis.RedisConnectionWrapper.TryUpdateIfLockIdMatch(Object lockId, ISessionStateItemCollection data, Int32 sessionTimeout)
at Microsoft.Web.Redis.RedisSessionStateProvider.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
at System.Web.SessionState.SessionStateModule.OnEndRequest(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I am not sure if this is related to my problem but seems if this is fixed, page will work properly. Has anyone any idea why this error occurred and how can I fix it?
Thanks
I solved this problem myself by adding serialization attribute to class like below.
<Serializable()> _
Public Class clsSearchCriteria
Thanks

Kentico v8 Uniselector not selecting custom document types

What Object type do we need to enter to select custom document types in the Uniselector control in Kentico v8?
In Kentico v7.0.34 we are successfully using the UniSelector to select custom document types as follows;
Object type: customtableitem.custom.Course
Return column name: CourseID
Display name format: {%Name%}
Selection mode: Multiple
Order by: Name
However in Kentico v8.0.17 we are getting the following error when using the above values;
[CustomTableItemProvider.GetTypeInfo]: Class 'custom.course' is not custom table.
Server Error in '/' Application.
[CustomTableItemProvider.GetTypeInfo]: Class 'custom.course' is not custom table.
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.Exception: [CustomTableItemProvider.GetTypeInfo]: Class 'custom.course' is not custom table.
Source Error:
Line 1094: private void LoadObjects()
Line 1095: {
Line 1096: if (Object != null)
Line 1097: {
Line 1098: // Reset string builder
Source File: c:\Visual Studio\Projects\Kentico8\CMS\CMSAdminControls\UI\UniSelector\UniSelector.ascx.cs Line: 1096
We have tried changing the Object type as follows;
Object type: custom.Course
This results is the following error;
Object type 'custom.course' not found.
Server Error in '/' Application.
Object type 'custom.course' not found.
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.Exception: Object type 'custom.course' not found.
Source Error:
Line 1094: private void LoadObjects()
Line 1095: {
Line 1096: if (Object != null)
Line 1097: {
Line 1098: // Reset string builder
Source File: c:\Visual Studio\Projects\Kentico8\CMS\CMSAdminControls\UI\UniSelector\UniSelector.ascx.cs Line: 1096
I have read the documentation available here and for Object type it provides a Sample Value of "cms.user". Setting Object type to "cms.user" does work for selecting CMS Users.
I also created a custom table called "Test" and can confirm that setting Object type to "customtableitem.customtable.Test" does work for selecting custom table items.
I have also asked this on Kentico's dev.net Q&A site;
https://devnet.kentico.com/questions/uniselector-in-kentico-v8
Cheers,
Darren
Quick answer:
ObjectType: cms.documenttype
Return column name: ClassID
Display name format: {%ClassDisplayName%}
Long answer:
Document type definitions (as well as custom table and on-line form definitions) are located in the CMS_Class table. To retrieve them you can use either more general "cms.class" or rather specific "cms.documenttype" or "cms.customtable" object types. So you should be able to do the same using ObjectType: cms.class + Where condition: ClassIsDocumentType=1.
What you've been trying to do was to retrieve data rather than class definitions of the data. Data of so called "classes" are stored in their own tables. Each custom table has its own table, each on-line form has its own table and documents are stored in CMS_TreeNode/CMS_Document tables.
Btw - there is already a form control for selecting classes. Have a look at:
\CMS\CMSFormControls\Classes\SelectClassNames.ascx
To distinguish between custom and predefined classes I'd suggest to use some prefix for your objects and select them with ClassName LIKE "myprefix%" or simply use id condition ClassID > 4478.

"System.Workflow.Runtime.Hosting.PersistenceException" Custom SharePoint Sequential workflow

I am getting following error in sharepoint Logs for my SharePoint Visual Studio Sequential workflow having a custom activity.
The custom activity is created through Component Class.
I am not sure why this error is coming? Please help!!!
System.Workflow.Runtime.Hosting.PersistenceException: Type 'System.ComponentModel.Container' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. ---> System.Runtime.Serialization.SerializationException: Type 'System.ComponentModel.Container' in Assembly 'System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable. at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() at System.Runtime.Serialization.Formatters.Binary.WriteObjectInf... 3d93366f-a701-476c-91c9-d2153911486b
03/22/2012 12:38:36.31* w3wp.exe (0x049C) 0x1620 SharePoint Foundation Workflow Infrastructure 98d4 Unexpected ...o.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) at System.Workflow.ComponentModel.Activity.Save(Stream stream, IFormatter formatter) at System.Workflow.Runtime.Hosting.WorkflowPersistenceService.GetDefaultSerializedForm(Ac... 3d93366f-a701-476c-91c9-d2153911486b
03/22/2012 12:38:36.31* w3wp.exe (0x049C) 0x1620 SharePoint Foundation Workflow Infrastructure 98d4 Unexpected ...tivity activity) at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.SaveWorkflowInstanceState(Activity instanceState, Boolean unlock) at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) --- End of inner exception stack trace --- at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation) at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock) 3d93366f-a701-476c-91c9-d2153911486b
Thanks!
The Issue was because when i changed the Component class to Sequential Activity I had Activity properties e.g. 'A' & 'B'. Then i added this activity to VS toolbox. At this stage it was working fine.
Now when I changed the activity code to change its property to 'A' & 'C' and i also removed a Constructor having parameter as 'Container' object.
When i re-compiled this Activity and refresh its DLL. In workflow designer the Activity was not getting refreshed i.e. its toolbox was still pointing to old dll.
To Resolve for this i closes and opened the VS again, VOILA the designer is now getting updated Activity with new properties.
This was i think was limitation of VS toolbox that it is not getting refreshed in-spite of dll for that activity is updated.
Thanks!
Can you access the source XAML for the workflow? See if a "Container" object is being included, and if it's necessary to have it there. If you can remove it and still have the workflow run properly, this may fix the issue.

Resources