Page 1 of 1

Violates the constraints of type parameter

PostPosted: Mon Dec 23, 2019 4:58 pm
by Riyaz
Hi There

Pls guide me with error, am trying to read a bookin and then activate it, but I get this error

Method JiwaFinancials.Jiwa.JiwaApplication.BusinessLogicFactory.CreateBusinessLogic: type argument 'JiwaFinancials.Jiwa.JiwaForwardCover.ForwardCover' violates the constraint of type parameter 'BusinessLogicType'.

Using the code below

Dim manager As New JiwaFinancials.Jiwa.JiwaApplication.Manager()
manager.Logon(JiwaCon.DataSource, JiwaCon.Database, JiwaFinancials.Jiwa.JiwaODBC.database.AuthenticationModes.JiwaAuthentication, _Login.UserName, _Login.Password)
Dim JiwaBookIn As New BookIn
bookinjiwa = manager.BusinessLogicFactory.CreateBusinessLogic(Of JiwaLandedCost.BookIn.BookIn)(Nothing)
bookinjiwa.Read(Trim(BookInID))
With bookinjiwa
.ActivateRecord()

Re: Violates the constraints of type parameter

PostPosted: Mon Dec 23, 2019 6:25 pm
by SBarnes
The error is coming from Jiwa when the business logic factory when it tries to create a forward cover object, it may be a permissions issue try running your code as Admin and see if you get the same error as I am guessing that the user you are using may not have permissions to the forward cover object.

If it still does it as admin try it without involving forward cover.

I am basing what I am suggesting totally on the error you have given without looking at any code.

Re: Violates the constraints of type parameter  Topic is solved

PostPosted: Sun Jan 12, 2020 7:23 pm
by Mike.Sheen
Hi Riyaz,

See my post here. I think you may have some incompatible assemblies being referenced.