eXpandFramework / eXpand

DevExpress XAF (eXpressApp) extension framework. ๐—น๐—ถ๐—ป๐—ธ๐—ฒ๐—ฑ๐—ถ๐—ป.๐—ฒ๐˜…๐—ฝ๐—ฎ๐—ป๐—ฑ๐—ณ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ.๐—ฐ๐—ผ๐—บ, ๐˜†๐—ผ๐˜‚๐˜๐˜‚๐—ฏ๐—ฒ.๐—ฒ๐˜…๐—ฝ๐—ฎ๐—ป๐—ฑ๐—ณ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ.๐—ฐ๐—ผ๐—บ and ๐˜๐˜„๐—ถ๐˜๐˜๐—ฒ๐—ฟ @๐—ฒ๐˜…๐—ฝ๐—ฎ๐—ป๐—ฑ๐—ณ๐—ฟ๐—ฎ๐—บ๐—ฒ๐˜„๐—ผ๐—ฟ๐—ธ and or simply ๐—ฆ๐˜๐—ฎ๐—ฟ/๐˜„๐—ฎ๐˜๐—ฐ๐—ต this repository and get notified from ๐—š๐—ถ๐˜๐—›๐˜‚๐—ฏ
http://expand.expandframework.com
Microsoft Public License
220 stars 114 forks source link

Unable to cast object of type 'DevExpress.Xpo.DB.Helpers.MSSql2005SqlDependencyCacheRoot' to type 'DevExpress.Xpo.DB.DataCacheRoot'. #1069

Closed pavlovboris closed 2 days ago

pavlovboris commented 2 weeks ago

๐——๐—ฒ๐˜€๐—ฐ๐—ฟ๐—ถ๐—ฏ๐—ฒ ๐˜๐—ต๐—ฒ ๐—ฏ๐˜‚๐—ด

Hello,

With the last version Im getting the following error:

Unable to cast object of type 'DevExpress.Xpo.DB.Helpers.MSSql2005SqlDependencyCacheRoot' to type 'DevExpress.Xpo.DB.DataCacheRoot'.

at Xpand.Extensions.XAF.Xpo.XpoExtensions.Connection(UnitOfWork unitOfWork) at Xpand.Extensions.XAF.Xpo.ObjectSpaceExtensions.ObjectSpaceExtensions.Connection(IObjectSpace objectSpace) at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.<>c__DisplayClass19_0.b_2(IObjectSpace t) at System.Reactive.Linq.ObservableImpl.SelectMany`2.ObservableSelector..OnNext(TSource value)

No issue with 4.241.3.

BR

apobekiaris commented 2 weeks ago

is this with the lab version?

pavlovboris commented 2 weeks ago

I is 4.241.3.2

apobekiaris commented 2 weeks ago

revisions mean lab, I will look at it the tenant support is to blame see #1066

pavlovboris commented 2 weeks ago

aight thank you!

apobekiaris commented 2 weeks ago

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

apobekiaris commented 1 week ago

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

apobekiaris commented 6 days ago

is the fix ok with you? planning to push it public so if you have some time please test

pavlovboris commented 6 days ago

I keep getting the same exception;

apobekiaris commented 6 days ago

I was able to reproduce the case with a blank Xaf solution where I enable Xpo caching, after this patch all works fine on my side. Can you provide a solution that fails?

apobekiaris commented 6 days ago

I assume you are on the latest version 4.241.3.4

pavlovboris commented 6 days ago

yup. Im using the 4.241.3.4 version and custom datastore provider with MSSql2005SqlDependancyCacheRoot to utilize service broker. Will try to repro now

pavlovboris commented 6 days ago

DXApplication2.zip

The win version

apobekiaris commented 6 days ago

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

pavlovboris commented 5 days ago

the previous issue is fixed in 4.241.3.5, but now :

An item with the same key has already been added. Key: Password

at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value) at DevExpress.Xpo.DB.Helpers.ConnectionStringParser.AddPart(String partName, String partValue) at Xpand.Extensions.XAF.Xpo.ObjectSpaceExtensions.ObjectSpaceExtensions.ConnectionString(IObjectSpace objectSpace) at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.SequenceGeneratorDataLayer(IObjectSpace space) at Xpand.Extensions.LinqExtensions.LinqExtensions.GetOrAdd[TKey,TValue](IDictionary2 dictionary, TKey key, Func1 valueCreator, String caller) at Xpand.XAF.Modules.SequenceGenerator.SequenceGeneratorService.<>c__DisplayClass19_0.b_2(ValueTuple2 t) at System.Reactive.Linq.ObservableImpl.SelectMany2.ObservableSelector..OnNext(TSource value)

apobekiaris commented 5 days ago

detail me on repro steps please

pavlovboris commented 5 days ago

just try using connection string of type XpoProvider=MSSqlServer;

the one I'm using is like : XpoProvider=MSSqlServer;Pooling=true;Server=tcp:zzz,1433;Persist Security Info=True;User ID=zzz;Password=zzz;initial catalog=zzz;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=True;Connection Timeout=60;

apobekiaris commented 5 days ago

The pre-release 4.241.3.0 in the Reactive.XAF lab branch includes commits that relate to this task:

To minimize version conflicts we recommend that you use the Xpand.XAF.Core.All, Xpand.XAF.Win.All, Xpand.XAF.Web.All packages. Doing so, all packages will be at your disposal and .NET will add a dependecy only to those packages that you actually use and not to all (see the Modules installation-registrations youtube video).

Released packages: No packages released.

Please update the related Nuget packages and test if issues is addressed. These are nightly nuget packages available only from our NugetServer.

If you do not use these packages directly but through a module of the main eXpandFramework project, please wait for the bot to notify you again when integration is finished or update the related packages manually.

Thanks a lot for your contribution.

pavlovboris commented 5 days ago

Everything looks great now to me. Thank you for your efforts. Efharistรณ para poli!