3 Replies Latest reply on Jan 11, 2021 10:31 AM by Andreas Bühler

    PIM 10.1 "Unexpected internal error" during Import

    Vittorio Ventimiglia New Member

      The PIM version has recently been updated to version 10.1. Initially the files were imported correctly but, during the impor process, the following error started to show up after a while...

       

      (Importing Products)

      Unexpected internal error:

       

       

      Saving detail model failed

       

       

      Unexpected AuditTrailPersistenceLayerException, transaction rollback will be performed. 1608038774846java.lang.IllegalStateException: LogicalKey: ProductChannelCountryAttribute.LK.TargetMarket must have a short identifier

       

       

          com.heiler.ppm.objectapi.server.converter.FieldProvider.assertShortIdentifier(FieldProvider.java:73)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

          java.util.Iterator.forEachRemaining(Iterator.java:116)

          java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)

          java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)

          java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)

          java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

          java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

          java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)

          com.heiler.ppm.objectapi.server.converter.FieldProvider.computeLogicalKeysForQualification(FieldProvider.java:64)

          java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1688)

          com.heiler.ppm.objectapi.server.converter.FieldProvider.getLogicalKeysForQualification(FieldProvider.java:53)

          com.heiler.ppm.objectapi.server.converter.DataObjectProvider.getLogicalKeysForQualification(DataObjectProvider.java:196)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.addQualification(GenericNodeDataConverter.java:122)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.convertSingle(GenericNodeDataConverter.java:101)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.buildNodes(GenericNodeDataConverter.java:76)

          com.heiler.ppm.objectapi.server.converter...

       

       

       

       

      (Importing Variants)

      Unexpected internal error:

       

       

      Saving detail model failed

       

       

      Unexpected AuditTrailPersistenceLayerException, transaction rollback will be performed. 1608039273993java.lang.IllegalStateException: LogicalKey: VariantChannelValues.Std_LK_Text100_02 must have a short identifier

       

       

          com.heiler.ppm.objectapi.server.converter.FieldProvider.assertShortIdentifier(FieldProvider.java:73)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

          java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)

          java.util.Iterator.forEachRemaining(Iterator.java:116)

          java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)

          java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)

          java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)

          java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)

          java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)

          java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)

          com.heiler.ppm.objectapi.server.converter.FieldProvider.computeLogicalKeysForQualification(FieldProvider.java:64)

          java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)

          com.heiler.ppm.objectapi.server.converter.FieldProvider.getLogicalKeysForQualification(FieldProvider.java:53)

          com.heiler.ppm.objectapi.server.converter.DataObjectProvider.getLogicalKeysForQualification(DataObjectProvider.java:196)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.addQualification(GenericNodeDataConverter.java:122)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.convertSingle(GenericNodeDataConverter.java:101)

          com.heiler.ppm.objectapi.server.converter.GenericNodeDataConverter.buildNodes(GenericNodeDataConverter.java:76)

          com.heiler.ppm.objectapi.server.converter.Generic...

       

       

      How can i solve this problem?

      Thanks.

        • 1. Re: PIM 10.1 "Unexpected internal error" during Import
          Ralph81 Guru

          Hi Vittorio,

           

          on Products it looks like there is a problem with your Target Market.

           

          on Variants it looks like a problem with the Channel

           

          If this was working before and not after Update to 10.1, was there a change on the repository? Did you already validate it in the Repo Editor?

           

          Best Regards

          • 2. Re: PIM 10.1 "Unexpected internal error" during Import
            Andreas Bühler Guru

            Hi Vittorio,

            with version 10.1 a new attribute in the repository is required to have a meaningful value. The attribute is "shortIdentifier". We provided a a correct value for all logical keys and fields of the standard repository, but since this identifier should be chose domain specific we couldn't do this for custom fields and logical keys.

            The error message: LogicalKey: ProductChannelCountryAttribute.LK.TargetMarket must have a short identifier gives you a hint which logical key is missing the short identifier.

             

            For your convenience I copied the section from the repository documentation of version 10.1:

            Allowed Characters for the short identifier:

            The "shortIdentifier" must not start with _(underscore). Although we support upper/lower case characters they are basically for readability.

             

              • a-z
              • A-Z
              • 0-9
              • - (minus)
              • _ (underscore, but not as first letter!

             

            Entities:

            • shortIdentifier
              The short identifier is used in canonical forms of an entity item like for EntityItemChangeDocuments or EntityItemDocuments which are both json structures used in AuditTrail or the ObjectAPI. The short identifier must be unique within it's parent entity in a case insensitive way. ("Name" and "name" and equal regarding the short identifier!). An entity without a short identifier will not be saved in audit trail or returned in the Object API. For custom entities we recommend to adjust the shortIdentifier accordingly, a meaningful but literally short one is the best. Keep in mind that it's always relative to the parent! Don't: articleLogisticExtension, Do: logisticExtension and the parent of that one is already article!

             

            Fields:

            • shortIdentifier
              The short identifier is used in canonical forms of an entity item like for EntityItemChangeDocuments or EntityItemDocuments which are both json structures used in AuditTrail or the ObjectAPI. The short identifier must be unique within it's parent entity in a case insensitive way. ("Name" and "name" are equal regarding the short identifier!).
              A field without a short identifier will not be saved in audit trail or returned in the Object API.
              An entity without a short identifier will not be saved in audit trail or returned in the Object API.
              For custom entities we recommend to adjust the shortIdentifier accordingly, a meaningful but literally short one is the best. Keep in mind that it's alway relative to the parent! Don't: articleLogisticExtensionMyCustomField , Do: myCustomField as the parent entity is already called logisticExtension and the parent of that one is already article!

             

            LogicalKeys

            • shortIdentifier
              The short identifier is used in canonical forms of an entity item like for EntityItemChangeDocuments or EntityItemDocuments which are both json structures used in AuditTrail or the ObjectAPI. The short identifier must be unique within it's parent entity in a case insensitive way. ("Name" and "name" are equal regarding the short identifier!).
              An editable logical key without a short identifier is an invalid configuration.For custom entities we recommend to adjust the shortIdentifier accordingly, a meaningful but literally short one is the best. Keep in mind that it's always relative to the parent! Don't: articleLangLanguage, Do: language

             

            Greetings

            Andreas

            • 3. Re: PIM 10.1 "Unexpected internal error" during Import
              Andreas Bühler Guru

              I also enhanced our migration guide, it seems a note for this was missing there in the repository section:

              Required Manual Adjustments

              Short Identifier

              Starting with version 10.1 we introduced the short identifier as a new, attribute in the custom area of the repository. It is mandatory for logical keys, optional for entities or fields unless they should be returned in the ObjectAPI or written in the audit trail.
              The standard repository already has a correct value for all logical keys and fields, but since this identifier should be chosen domain specific there is no automated way of providing this for customized repositories.

              If you receive an error message like this: "LogicalKey: ProductChannelCountryAttribute.LK.TargetMarket must have a short identifier" you are missing a short identifier in the repository

              Please have a look at the Domain Model (Repository) documentation for details and examples of this identifier.

              The repository merger also has a wizard to create short identifiers. The wizard will use the last part of the field/logical keys identifier and makes the first character lower case. Do NOT execute the wizard for the whole repository, at least not with overriding existing identifiers.

              Customers and Partners should definitely validate the generated short identifiers and adjust them in case they are not meaningful or ugly formatted etc.  Remember that this identifier is used in the objectApi and audit trail and should never be changed once defined!

              Audit Trail Settings

              With 10.1 we introduced a new child element of Entities called Audit Trail Settings. If you upgrade from an earlier version you should double check this setting for the root entities, it defines which ones will be recorded in audit trail and how they are being recorded.

              Please see Audit Trail Configuration for more details.