Troubleshooting: UserData is not defined in the Data Service Layer configuration
When you load custom userData for business objects, an error can occur when the Data Service Layer (DSL) configuration mappings for the data is not in the expected directory. If DSL configuration mappings are in a custom extension directory, you must specify your WebSphere Commerce instance when you run the Data Load utility. If you do not specify your instance, the utility might not locate the DSL configuration for your userData, which can result in a userData is not defined error.
Problem
When you load custom userData data for business objects with the Data Load utility, an error can occur stating that the userData is not defined in the data service layer configuration. This error occurs because the Data Load utility cannot find the DSL configuration for the userData that you are loading. The utility uses the DSL configuration to determine how custom fields are mapped to database tables and columns. When you run the utility and specify only the required command-line parameters, the utility searches only the default WebSphere Commerce Version 7 and fix pack directories for DSL configuration mappings. If the mappings for the business objects or userData that you are loading are in a different directory, the utility does not find the mappings by default. For example, if your userData is being populated into custom extension tables or columns and the mappings are in an extension directory.
Example
You are loading marketing content that includes multiple click actions (image map) and include custom userData in the field2 column of your CSV input file. If you run the utility and do not include the optional -Dinstance command-line parameter, an error occurs. Without the -Dinstance specified, the Data Load utility cannot find this DSL configuration mapping and the error occurs with a message similar to the following error message:
An exception was caught: com.ibm.commerce.foundation.dataload.exception.DataLoadApplicationException: The user data with the key field2 is not defined in the data service layer configuration. Application message: An error occurred while transforming the data object into physical objects. Data Object: com.ibm.commerce.marketing.facade.datatypes.impl.MarketingContentTypeImpl@60316031 (clickAction: <unset>, inputOption: <unset>, url: null, mimeType: null, marketingSpotBehavior: null, uIDisplayable: null, managingTool: null, ovrMktLimit: null), Physical objects: ================================================== Transformed Physical objects: ================================================== COLLIMGMAPAREA SEQUENCE=1.0 SHAPE=rect LANGUAGE_ID=-1 COLLATERAL_ID=43051 TITLE=hoverText COLLIMGMAPAREA_ID=3074457345618262605 COORDINATES=1,4,5,6, URL=ProductDisplay?productId=10010&catalogId=#catalogId#&storeId=#storeId# ,Operation mode: I. ================================================== Exception message: The user data with the key field2 is not defined in the data service layer configuration. Stack trace: ...
Solution
For the utility to locate the DSL configuration mapping for your userData, you must configure the utility to search extension directories for the configuration mappings. To configure the utility to search these directories, include the -Dinstance parameter when you run the utility. By including this parameter, the utility includes the WebSphere Commerce EAR xml directory in the class path and is able to locate all DSL configuration files. When you specify the -Dinstance parameter, ensure that you have the files for the instance that you specify in the WC_installdir/instances/instance_name directory or its subdirectories. You must also have access to the files. The utility can then locate the DSL configuration mapping for your custom data.
- Custom JAR files or Data Service Layer configuration files from the development environment to the WebSphere Commerce server.
- Any type of data into a workspace environment.
- Catalog data when base change history recording is enabled. When this history recording is enabled, change history is recorded whenever an object that is approved content is created, updated, or deleted with Management Center or the Data Load utility. For more information about this change history recording, see Enabling the change history for approved and canceled task groups.
- Catalog entry description override data with the com.ibm.commerce.catalog.dataload.mediator.CatalogEntryDescriptionOverrideMediator mediator.
- SEO information for catalog entry or category data. To load SEO data with catalog entry or
category data, include the loadSEO parameter with a value set to be "true". You can load SEO data
with the following mediators:
- com.ibm.commerce.catalog.dataload.mediator.CatalogEntryMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogEntrySEOMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogGroupMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogGroupSEOMediator
- WebSphere Commerce search index requests. You can request search indexing to occur with the
following mediators:
- com.ibm.commerce.catalog.dataload.mediator.AttributeDictionaryAttributeSearchIndexMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogEntrySearchIndexMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogGroupRelationshipSearchIndexMediator
- com.ibm.commerce.catalog.dataload.mediator.CatalogGroupSearchIndexMediator
- Custom mediators that support indexing custom data types and extend com.ibm.commerce.foundation.dataimport.dataload.mediator.AbstractSolrInputDocumentMediator.
- Marketing image map content that includes data for custom fields. You can load marketing image
map content with the following mediator:
- com.ibm.commerce.marketing.dataload.mediator.MarketingContentImageMapMediator