Skip to Content
Jan 06, 2015 at 04:50 PM

Setup datahub for production - InitApp


I set up a datahub project with sap-integration and some custom extensions of the product.

Up to now I developed the datahub in development mode only (means kernel.autoinitmode=create-drop). The things that I implemented work as expected.

Now I would like to deploy the application to the test server and therefore changed the property above to ignore (as stated in the datahub docs ).

Unfortunately the server doesn't start successfully with another option than create-drop. The following errors occur:

when the database tables are empty

 com.hybris.kernel.api.exceptions.ServiceBlockedException: Service call blocked: com.hybris.kernel.api.PersistenceManager.setFlushBeforeQuery; Reason System is not initialized or not up to date. Target object class at com.hybris.kernel.persistence.initialization.uptodate.ServiceBlocker.intercept( ~[kernel-persistence-]

when the database is initialized from a previous create-drop (for all TargetItems of the sap-extensions)

 [c.h.d.e.l.i.DefaultExtensionImportService] Failed to create code of type BaseProduct  com.hybris.datahub.validation.ValidationException: nullValidationException{failures=[ValidationFailure{EXISTING_ITEM, name: "TargetAttributeDefinition already exists."}]} at com.hybris.datahub.validation.ComplexValidator.runThroughNestedValidators( - [datahub-service-]

The docs state that the Core+ component Init App should be used with the ignore option but I can't find any information about this in combination with the datahub.

Has anyone running a datahub in production mode? Or any tips, where I chould look at?

Kind regards Fabian