Xafari on existing project

StatusIDPriorityType
Closed30093BlockerQuestion
ProfileReply
Julio César Detrinidad BermúdezClient

I am trying to integrate the framework with an existing project but no guide is available for this. I tried with your template (and is easy) but is not suitable for my scenario. Can you provide a guide for this task. I am really close to buy the Enterprise subscription but I can not continue if the framework is not working with my current project. The main problem I am getting is when I try to integrate the Audit Module I get the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
at Xafari.Controllers.ListViewCriteriaObjectCreatingController.NewController_Deactivated(Object sender, EventArgs e)
at DevExpress.ExpressApp.Controller.OnDeactivated()
at DevExpress.ExpressApp.ViewController.OnDeactivated()
at DevExpress.ExpressApp.Controller.activeList_ResultValueChanged(Object sender, BoolValueChangedEventArgs e)
at DevExpress.ExpressApp.Utils.BoolList.OnResultValueChanged(Boolean oldResultValue, Boolean resultValue)
at DevExpress.ExpressApp.Utils.BoolList.EndUpdate()
at DevExpress.ExpressApp.Utils.BoolList.set_Item(String key, Boolean value)
at DevExpress.ExpressApp.Frame.c__DisplayClass4.b__1()
at DevExpress.Persistent.Base.SafeExecutor.Execute(Method method, Object targetObject, String targetObjectIdentifier)
at DevExpress.ExpressApp.Frame.Dispose()
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateWindow(ShowViewParameters parameters, ShowViewSource showViewSource, Boolean isMain)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInInspector(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.ShowViewInNewWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInCurrentWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowView(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Frame.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Win.WinWindow.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Frame.ShowViewAction_ProcessCreatedView(Object sender, ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.OnProcessCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)

And in the ExpressAppFramework log I can Identify the following line:

17.01.18 00:30:01.277 Operation GetSelectMemberExpression completed. Result: False
17.01.18 00:30:01.297 WinApplication.CreateWindowCore.activateControllersImmediately: True
17.01.18 00:30:01.298 Window.activateControllersImmediately: True
17.01.18 00:30:01.300 WinWindow.activateControllersImmediately: True
17.01.18 00:30:01.323 Frame.set_Template: old value - null, new value - DevExpress.ExpressApp.Win.Templates.Ribbon.DetailRibbonFormV2
Modularis.Win.exe Error: 0 : 17.01.18 00:30:01.372 ================================================================================
The error occurred:

Type: NullReferenceException
Message: Object reference not set to an instance of an object.
Data: 0 entries
Stack trace:

at Xafari.Controllers.ListViewCriteriaObjectCreatingController.NewController_Deactivated(Object sender, EventArgs e)
at DevExpress.ExpressApp.Controller.OnDeactivated()
.......

I will appreciate your help

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello Julio César Detrinidad Bermúdez!

You are welcome.
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs.
Unfortunately we are unable to reproduce the issue. We do not have ideas why this error can occur on your machine either.
Could you please provide us with the following info?
1. A small demo project, reproducing the problem;
2. Detailed steps to reproduce the problem.
We want to help you and are looking forward to hearing from you.

Regards,
Mariya
On behalf of Xafari Client Services Team

Julio César Detrinidad BermúdezClient

Hello, Here is the info, if you need more don't hesitate to ask. Here is the procedure I followed.

.Net Framework 4.7.1
Devexpress Universal 17.2.4
Xafari Framework 17.2.4011

1. Created a new project with the template "Devexpress v17.2 Template Gallery" and .Net Framework 4.7.1
2. Selected the following options in the wizard: Windows environment, XPO, Authentication None, No modules selected.
3. Openned the XafApplication1.Module and Added the following modules
XafariModule
XafariAuditModule
XafariBCAuditModule
XafariBCAuditCfgModule
XafariBCAuditTriggersModule
4. Openned the XafApplication1.Module.Win and Added the following modules
XafariWinModule
XafariBCAuditWinModule
5. Build and Run and when I try to open the Audit Navigation Item it give me the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
at Xafari.Controllers.ListViewCriteriaObjectCreatingController.NewController_Deactivated(Object sender, EventArgs e)
at DevExpress.ExpressApp.Controller.OnDeactivated()
at DevExpress.ExpressApp.ViewController.OnDeactivated()
at DevExpress.ExpressApp.Controller.activeList_ResultValueChanged(Object sender, BoolValueChangedEventArgs e)
at DevExpress.ExpressApp.Utils.BoolList.OnResultValueChanged(Boolean oldResultValue, Boolean resultValue)
at DevExpress.ExpressApp.Utils.BoolList.EndUpdate()
at DevExpress.ExpressApp.Utils.BoolList.set_Item(String key, Boolean value)
at DevExpress.ExpressApp.Frame.c__DisplayClass4.b__1()
at DevExpress.Persistent.Base.SafeExecutor.Execute(Method method, Object targetObject, String targetObjectIdentifier)
at DevExpress.ExpressApp.Frame.Dispose()

MariyaVoytovichAgent

Hello Julio César Detrinidad Bermúdez!

Thanks for the project.
Regarding the error that you reported, I can say that our development team decided it and the solution will be added to the new version of the Xafari.

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Julio César Detrinidad BermúdezClient

Thanks for the support. Do you have an estimated date for the next release?

MariyaVoytovichAgent

Hello Julio César Detrinidad Bermúdez!

We apologize for the delay.

Usually a new release is published after the release of the new version of devexpress.

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Julio César Detrinidad BermúdezClient

Thanks! Let's wait and I'll try with the next release.

Julio César Detrinidad BermúdezClient

Hello! Do you have an estimated date for the next release (17.2.5)?

MariyaVoytovichAgent

Hello Julio César Detrinidad Bermúdez!

Our apologies for the delay.

We today published a new build of Xafari 17.2.5011.1402.
You can download the new build here: Xafari Download

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Julio César Detrinidad BermúdezClient

Hello, just tried to add the audit module and the error was fixed but a new one showed up. Here are the details:

System.InvalidOperationException: Exception occurs while assigning the 'DetailView, ID:AuditDataViewer_DetailView' view to WinWindow:
Keyword not supported: 'xpodatastorepool'. ---> System.ArgumentException: Keyword not supported: 'xpodatastorepool'.
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)
at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(DbConnectionPoolKey key, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)
at System.Data.SqlClient.SqlConnection.ConnectionString_Set(DbConnectionPoolKey key)
at System.Data.SqlClient.SqlConnection.set_ConnectionString(String value)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString, SqlCredential credential)
at System.Data.SqlClient.SqlConnection..ctor(String connectionString)
at Xafari.BC.Audit.Triggers.Providers.SqlDataProvider.GetConnection()
at Xafari.BC.Audit.Triggers.Providers.SqlDataProvider.ExecuteNonQuery(String command)
at Xafari.BC.Audit.Triggers.Providers.SqlDataProvider..ctor()
at Xafari.BC.Audit.Triggers.AuditSettingsManagerDbTriggers.GetDefaultDataProvider()
at Xafari.BC.Audit.Triggers.AuditSettingsManagerDbTriggers.get_DataProvider()
at Xafari.BC.Audit.Triggers.AuditSettingsManagerDbTriggers.GetAuditDataByObject(IAuditSupport filteringObject)
at Xafari.BC.Audit.Win.AuditDataViewerPropertyEditor.ReadValueCore()
at DevExpress.ExpressApp.Editors.PropertyEditor.ReadValue()
at DevExpress.ExpressApp.Win.Editors.WinPropertyEditor.Control_ParentChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnParentChanged(EventArgs e)
at System.Windows.Forms.ContainerControl.OnParentChanged(EventArgs e)
at System.Windows.Forms.Control.AssignParent(Control value)
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Control.set_ParentInternal(Control value)
at System.Windows.Forms.Control.set_Parent(Control value)
at DevExpress.XtraLayout.LayoutControlItem.UpdateControlParent()
at DevExpress.XtraLayout.LayoutControlItem.set_Control(Control value)
at DevExpress.ExpressApp.Win.Layout.XafLayoutControlItem.EnsureControl()
at DevExpress.ExpressApp.Win.Layout.XafLayoutControlItem.RaiseShowHide(Boolean visible)
at DevExpress.XtraLayout.BaseLayoutItem.SetVisible(Boolean lVisible)
at DevExpress.XtraLayout.BaseLayoutItem.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutControlItem.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChild(BaseLayoutItem item, Boolean visible)
at DevExpress.XtraLayout.LayoutGroup.UpdateChildren(Boolean visible)
at DevExpress.XtraLayout.LayoutControlImplementor.UpdateRoot()
at DevExpress.XtraLayout.LayoutControlImplementor.InvalidateRootOffsetControlsAndScrolls()
at DevExpress.XtraLayout.LayoutControlImplementor.Invalidate()
at DevExpress.XtraLayout.LayoutControl.DevExpress.XtraLayout.ILayoutControl.Invalidate()
at DevExpress.XtraLayout.BaseLayoutItem.Invalidate()
at DevExpress.XtraLayout.LayoutGroup.Invalidate()
at DevExpress.XtraLayout.BaseLayoutItem.ComplexUpdate(Boolean shouldUpdateViewInfo, Boolean shouldResize, Boolean shouldArrangeTextSize)
at DevExpress.XtraLayout.LayoutItemContainer.EndUpdate()
at DevExpress.XtraLayout.LayoutItemContainer.EndChangeUpdate()
at DevExpress.XtraLayout.LayoutDesignerMethodsProvider.DevExpress.XtraLayout.ILayoutDesignerMethods.EndChangeUpdate()
at DevExpress.XtraLayout.LayoutControlImplementor.ProcessLookAndFeelStyleChanged()
at DevExpress.XtraLayout.LayoutControlImplementor.OnLookAndFeelStyleChanged(Object sender, EventArgs e)
at DevExpress.XtraLayout.LayoutControlImplementor.EndInitCore()
at DevExpress.XtraLayout.LayoutControlImplementor.set_UpdatedCount(Int32 value)
at DevExpress.XtraLayout.LayoutControlImplementor.EndInit()
at DevExpress.XtraLayout.LayoutControl.EndInit()
at DevExpress.ExpressApp.Win.Layout.WinLayoutManager.LayoutControls(IModelNode layoutNode, ViewItemsCollection viewItems)
at DevExpress.ExpressApp.CompositeView.CreateControlsCore()
at DevExpress.ExpressApp.View.CreateControls()
at DevExpress.ExpressApp.Win.Templates.ViewSiteManager.EnsureViewControl()
at DevExpress.ExpressApp.Win.Templates.ViewSiteManager.FillViewSite()
at DevExpress.ExpressApp.Win.Templates.ViewSiteManager.OnViewChanged()
at DevExpress.ExpressApp.Win.Templates.ViewSiteManager.SetView(View view)
at DevExpress.ExpressApp.Win.Templates.Ribbon.DetailRibbonFormV2.DevExpress.ExpressApp.Templates.IFrameTemplate.SetView(View view)
at DevExpress.ExpressApp.Frame.SetTemplateView(View view)
at DevExpress.ExpressApp.Frame.SetView(View view, Boolean updateControllers, Frame sourceFrame, Boolean disposeOldView)
--- End of inner exception stack trace ---
at DevExpress.ExpressApp.Frame.SetView(View view, Boolean updateControllers, Frame sourceFrame, Boolean disposeOldView)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateWindow(ShowViewParameters parameters, ShowViewSource showViewSource, Boolean isMain)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInInspector(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.ShowViewInNewWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInCurrentWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowView(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Frame.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Win.WinWindow.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Frame.ShowViewAction_ProcessCreatedView(Object sender, ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.OnProcessCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)

Julio César Detrinidad BermúdezClient

Also tried to add the Reports module on the same way I described above and got the following error:

System.NullReferenceException: Object reference not set to an instance of an object.
at Xafari.Reports.Analysis.ReportInfo.AnalysisReportInfoViewController.OnFrameAssigned()
at DevExpress.ExpressApp.Controller.SetFrame(Frame frame)
at DevExpress.ExpressApp.Frame.RegisterController(Controller controller)
at DevExpress.ExpressApp.Frame.Initialize(XafApplication application, TemplateContext context, ICollection`1 controllers)
at DevExpress.ExpressApp.Window..ctor(XafApplication application, TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.Win.WinWindow..ctor(XafApplication application, TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.Win.WinApplication.CreateWindowCore(TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.XafApplication.CreateWindow(TemplateContext context, ICollection`1 controllers, Boolean createAllControllers, Boolean isMain, View view)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateWindow(ShowViewParameters parameters, ShowViewSource showViewSource, Boolean isMain)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)

Julio César Detrinidad BermúdezClient

I assume that I will have lot of troubles adding Xafari Framework to an existing project. I added with success everything on the project created with your template but I have an advanced project and will be difficult to adapt in short time.

Do you test your modules on templates created with Devexpress default gallery?

Or should I adapt my project with some changes to make it run successfully?

MariyaVoytovichAgent

Hello Julio César Detrinidad Bermúdez!

To fix the first error you need:
1.Open the WinApplication module in your project.
2. In the CreateDefaultObjectSpaceProvider method, change the value to true to false in the line XPObjectSpaceProvider.GetDataStoreProvider (args.ConnectionString, args.Connection, true)

protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
args.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(XPObjectSpaceProvider.GetDataStoreProvider(args.ConnectionString, args.Connection, false), false));
args.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(TypesInfo, null));
}

Regarding the second error that you reported I can say that all information submitted to our development team.
Also a relevant issue [102.179136] registered in our issue tracking system. You may reference to this number later to find out its state.

We don't test own modules on templates created with Devexpress default gallery.
But we think that if you adapt your project, it will be successfully executed.

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US