on 05-18-2018 6:22 PM
I am getting the following errors when I do an init under 6.6. Any reason as to why this shows up -
[java] ERROR [main] [AbstractAntPerformable] Error occurred while perfort task
[java] Exception in thread "main" java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.media.interceptors.MediaModelPrepareInterceptor@5da5ddec]: unexpected preparer error: de.hybris.platform.core.model.audit.AuditReportConfigModel cannot be cast to de.hybris.platform.core.model.media.MediaModel
[java] at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokePrepareInterceptors(ModelWrapper.java:279) ~[coreserver.jar:?]
[java] at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142) at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.executeInterceptorsAndCascade(ModelWrapper.java:108) ~[coreserver.jar:?]
[java] at de.hybris.bootstrap.loader.Loader.main(Loader.java:118)
[java]
[java] at de.hybris.platform.servicelayer.internal.model.extractor.impl.DefaultModelExtractor.process(DefaultModelExtractor.java:44) ~[coreserver.jar:?]
[java] at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.performPersistenceOperations(DefaultModelService.java:720) ~[coreserver.jar:?]
[java] at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAllInternal(DefaultModelService.java:715) ~[coreserver.jar:?]
[java] at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.saveAll(DefaultModelService.java:695) ~[coreserver.jar:?]
[java] at de.hybris.platform.servicelayer.internal.model.impl.DefaultModelService.save(DefaultModelService.java:643) ~[coreserver.jar:?]
[java] at de.hybris.platform.audit.internal.config.DefaultAuditConfigService.storeConfiguration(DefaultAuditConfigService.java:137) ~[coreserver.jar:?]
[java] at de.hybris.platform.audit.internal.config.DefaultAuditConfigService.storeConfiguration(DefaultAuditConfigService.java:125) ~[coreserver.jar:?]
[java] at java.util.HashMap$Values.forEach(HashMap.java:980) ~[?:1.8.0_144]
[java] at de.hybris.platform.audit.internal.config.DefaultAuditConfigService.storeConfigurations(DefaultAuditConfigService.java:101) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.storeGenericAuditConfigurations(Initialization.java:1008) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.doInitializeImpl(Initialization.java:569) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.access$5(Initialization.java:466) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$5.call(Initialization.java:787) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization$5.call(Initialization.java:1) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.system.InitializationLockHandler.performLocked(InitializationLockHandler.java:80) ~[coreserver.jar:?]
[java] at de.hybris.platform.core.Initialization.doInitialize(Initialization.java:819) ~[coreserver.jar:?]
[java] at de.hybris.ant.taskdefs.InitPlatformAntPerformableImpl.performImpl(InitPlatformAntPerformableImpl.java:106) ~[coreserver.jar:?]
[java] at de.hybris.ant.taskdefs.AbstractAntPerformable.doPerform(AbstractAntPerformable.java:92) [coreserver.jar:?]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
[java] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
[java] at bsh.Reflect.invokeMethod(Reflect.java:134) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Reflect.invokeObjectMethod(Reflect.java:80) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Name.invokeMethod(Name.java:858) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHMethodInvocation.eval(BSHMethodInvocation.java:75) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:102) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:645) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:739) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at bsh.Interpreter.eval(Interpreter.java:728) [bsh-2.0b5.jar:2.0b5 2005-06-12 04:50:41]
[java] at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:49) [coreserver.jar:?]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_144]
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_144]
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_144]
[java] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_144]
[java] at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142) [ybootstrap.jar:?]
[java] at de.hybris.bootstrap.loader.Loader.main(Loader.java:118) [ybootstrap.jar:?]
[java] Caused by: java.lang.ClassCastException: de.hybris.platform.core.model.audit.AuditReportConfigModel cannot be cast to de.hybris.platform.core.model.media.MediaModel
[java] at de.hybris.platform.media.interceptors.MediaModelPrepareInterceptor.onPrepare(MediaModelPrepareInterceptor.java:1) ~[coreserver.jar:?]
[java] at de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper.invokePrepareInterceptors(ModelWrapper.java:270) ~[coreserver.jar:?]
[java] ... 39 more
[java] Caused by: Sourced file: inline evaluation of: de.hybris.ant.taskdefs.AntPerformable p = new de.hybris.ant.taskdefs.InitPlatfor . . . '' : Method Invocation p.doPerform : at Line: 2 : in file: inline evaluation of:
de.hybris.ant.taskdefs.AntPerformable p = new de.hybris.ant.taskdefs.InitPlatfor . . . '' : p .doPerform ( )
[java]
[java] Target exception: de.hybris.platform.servicelayer.exceptions.ModelSavingException: [de.hybris.platform.media.interceptors.MediaModelPrepareInterceptor@5da5ddec]: unexpected preparer error: de.hybris.platform.core.model.audit.AuditReportConfigModel cannot be cast to de.hybris.platform.core.model.media.MediaModel
Sometimes, we are observing the same error on an init with hybris 6.7, both with ant and from hac. Restarting the server and rerunning the init gives a reasonable chance that the init will succeed.
While debugging into de.hybris.platform.servicelayer.internal.model.impl.wrapper.ModelWrapper
, we found that in the cache of DefaultInterceptorRegistry.findInterceptors
, the inappropriate interceptor is present.
Clearing only that cache reveals that DefaultInterceptorRegistry.getAsignableTypes
returns CatalogUnawareMedia
as direct supertype of AutedReportConfig
, when it's taken from the cache. Only when removing that cache as well, getAssignableTypes
returns the correct type hierarchy.
For me it seems very likely that some bug (race condition?) in hybris causes that the type system cache sometimes gets filled incorrectly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It has been fixed in 1808.1 patch https://jira.hybris.com/browse/ECP-2877
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
From my experience, the reason is in the whole Audit Framework. In order to get rid of such issues like this you need to disable auditing the following way in local.properties file:
auditing.enabled=false
At least until fixes for Audit Framework will happen.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I fixed this by removing the following two extensions from my localextensions.xml
personalizationsearchsamplesaddon
personalizationsampledataaddon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you have removed some addons configurations directly from the localextensions.xml file, instead you have to uninstall it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
7 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.