Unable to cast object of type 'PX.Objects.IN.INLotSerialStatus' to type 'PX.Objects.IN.Overrides.INDocumentRelease.LotSerialStatus'. in acumatica - acumatica

While multiple lot Allocation I am getting error:
Unable to cast object of type 'PX.Objects.IN.INLotSerialStatus'
to type 'PX.Objects.IN.Overrides.INDocumentRelease.LotSerialStatus'.

First unpublish all customization and try to reproduce the issue.
If it goes away re-publish customizations one by one until you find the one causing the cast error.
Review the code of the customization for all references to INLotSerialStatus and LotSerialStatus. Also look at Acumatica traces to find more details about the error.
A LotSerialStatus object is also a INLotSerialStatus because LotSerialStatus inherits from INLotSerialStatus. This is a valid assignment.
The inverse is not true, maybe there is an invalid assignment for which no cast is possible in the source code of the customization:

Related

Promotion Not Opening from HMC: de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo instance for item

When I try to open promotions on HMC it throw this error,
first Couldn't understand problem and cause of problem?
Try to clear cookies, login/logout, restart browser as well -looks nothing works. (check this link for more detail, can't find anything
https://answers.sap.com/questions/12761785/promotion-not-opening-from-hmc.html )
Try to check this: ( https://answers.sap.com/questions/12750795/cannot-create-jalo-instance-for-item-due-to-null-d.html?childToView=12798465#answer-12798465 ) clearing orphan type helps sometime.
If any one can guide how to solve this issue and explain cause of this issue.
Promotion Not Opening from HMC: Unhandled Exception:
de.hybris.platform.jalo.JaloSystemException: Cannot create Jalo
instance for item 000000 due to null
JaloSystemException is the mother of all Runtime exceptions in Hybris. So, the exception alone is not very informative.
The following comment i.e.
Cannot create Jalo instance for item
suggests that Hybris is trying to create an instance of a custom type, the definition of which (in items.xml) does not exist anymore. Either the definitions were removed manually or they were lost during system migration.
Ideally, deleting orphans should resolve this.
If you are still getting the error after removing the orphan types then -
Either there is some legacy code that is trying to create an instance of the custom types, most probably through a factory, otherwise, it would have given a compilation error during build itself.
The deleted custom type had a relation with the existing types, probably with the Promotion.
The ultimate solution is to run initialize on your local.
**Be very careful while running initialize as it will remove all the data from your system.

Binding Exception with Ninject

We have a central logging component which I am now trying to use in a WebJob that I am developing. I am basically following this example. My Activator is identical, I have the bindingModule that has my Bind statements in it. One thing I have done differently here is to use the method versions:
Kernel.Bind(typeof(IExternalSystemLogger)).To(typeof(ExternalSystemLogger));
instead of the generic versions in the example. I currently have constructor injection implemented but I have also set up the parameter injection as per the example. Which ever way I try to do this I end up with the error:
Error indexing method 'Functions.ProcessQueueMessage' ---> System.InvalidOperationException: Cannot bind parameter
or
a null reference exception (with parameter injection). Further into the error I am told that
Make sure the parameter Type is supported by the binding
which is the part that I am finding it difficult to resolve. I have looked at the available method calls on the config object available in WebJob.program but none seems to work. What is it I need to call so that I am correctly resolving my type when I am using a QueueTrigger or BlobTrigger?

Why Acumatica can't find method

I'm working with Acumatica 5.30.2347. I have following selector in my graph:
var check = PXSelect<POLine,Where<POLine.orderType, Equal<POOrderType.regularOrder>>>
.Select(this);
but when I try to execute it, I receive following error:
Method not found: 'Void PX.Data.PXLineAttribute..ctor'(System.Type).
Initially I've got an impression, that this error message appeared because class PXLineAttribute doesn't have constructor which accepts System.Type, but with help of reflector I've discovered that PXLineAttribute has following declaration:
public PXLineNbrAttribute(System.Type sourceType)
: this(sourceType, false)
{
}
which gives me idea that PXLineNbrAttribute has needed constructor. So I have two questions: Why Acumatica Framework can't find constructor of PXLineNbrAttribute? How to help Acumatica to find before mentioned constructor?
Please check your VS class library project references to Acumatica assemblies. I would suspect them to reference assemblies from a different Acumatica build and therefore cause "Method not found ..." errors at runtime.

WCF Comunication Exception when passing string array

I have a wcf service and i want to pass a string[] through it. I am receiving the below error. Can someone point me in the right direction ?
The error :
There was an error while trying to serialize parameter http://services.csssoftware.com/2.0/ComFacades:arParams. The InnerException message was 'Type 'System.String[]' with data contract name 'ArrayOfstring:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.'. Please see InnerException for more details.
If you need more data plese let me know and i will edit the question.
For others who get to the same error, the fix was to add :[ServiceKnownType(typeof(string[]))] in my interface class.
For more information about this problem you can read : HERE

VS2012 error every time I start. Message is not helpful - any suggestions?

WHen I start VS2012 I always get an exception tellng me to look at ActivityLog.xml. Here is what I see- useless to me. Hoping someone else has seen this before.
Also - VS2012 eats 100% of the CPU on the machine at time. Hoping the two are related and fixable.
System.ComponentModel.Composition.CompositionException: The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) The current type, SquaredInfinity.Foundation.Configuration.Services.IConfigurationService, is an interface and cannot be constructed. Are you missing a type mapping?
Resulting in: Resolution of the dependency failed, type = "SquaredInfinity.Foundation.Configuration.Services.IConfigurationService", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The current type, SquaredInfinity.Foundation.Configuration.Services.IConfigurationService, is an interface and cannot be constructed. Are you missing a type mapping?
-----------------------------------------------
At the time of the exception, the container was:
Resolving SquaredInfinity.Foundation.Configuration.Services.IConfigurationService,(none)
Resulting in: An exception occurred while trying to create an instance of type &apos;#Btb.#Rtb&apos;.
Resulting in: Cannot activate part &apos;#Btb.#Rtb&apos;.
Element: #Btb.#Rtb --> #Btb.#Rtb
Resulting in: Cannot get export &apos;#Btb.#Rtb (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider")&apos; from part &apos;#Btb.#Rtb&apos;.
Element: #Btb.#Rtb (ContractName="Microsoft.VisualStudio.Text.Classification.IClassifierProvider") --> #Btb.#Rtb
at System.ComponentModel.Composition.Hosting.CompositionServices.GetExportedValueFromComposedPart(ImportEngine engine, ComposablePart part, ExportDefinition definition)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.GetExportedValue(CatalogPart part, ExportDefinition export, Boolean isSharedPart)
at System.ComponentModel.Composition.Hosting.CatalogExportProvider.CatalogExport.GetExportedValueCore()
at System.ComponentModel.Composition.Primitives.Export.get_Value()
at System.ComponentModel.Composition.ExportServices.GetCastedExportedValue[T](Export export)
at System.ComponentModel.Composition.ExportServices.<>c__DisplayClass42.<CreateStronglyTypedLazyOfTM>b__1()
at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue()
at System.Lazy1.get_Value()
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.InvokeMatchingFactories[TExtensionInstance,TExtensionFactory,TMetadataView](IEnumerable1 lazyFactories, Func2 getter, IContentType dataContentType, Object errorSource)
Is your VSCommands extension up to date?
There was a compatibility issue which could produce similar stack trace, and it was fixed in latest release.

Resources