cancel
Showing results for 
Search instead for 
Did you mean: 

protobuf / getUnknownFields

eric_rosfelder
Explorer
0 Kudos
504

We have migrate from hybris 6.1.0.4 to 6.4.0.1.

The server start in our DEV environnemet, but failed in our TEST environnement.


[java] ESC[mESC[32mINFO  [main] [OnTenantStartupProcessor] [main]: Initializing rule engine modules after tenant [master] startup. Modules to be initialized: promotions-module
     [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]     at de.hybris.bootstrap.loader.Loader.execute(Loader.java:142)
     [java]     at de.hybris.bootstrap.loader.Loader.main(Loader.java:118)
     [java] Caused by: java.lang.VerifyError: class org.drools.compiler.kie.builder.impl.KieModuleCache$KModuleCache overrides final method getUnknownFields.()Lcom/google/protobuf/UnknownFieldSet;
     [java]     at java.lang.ClassLoader.defineClass1(Native Method)
     [java]     at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
     [java]     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     [java]     at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
     [java]     at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     [java]     at de.hybris.bootstrap.loader.YURLClassLoader.loadRegisterAndResolveClass(YURLClassLoader.java:85)
     [java]     at de.hybris.bootstrap.loader.YURLClassLoader.loadClass(YURLClassLoader.java:72)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     [java]     at org.drools.compiler.kie.builder.impl.KieMetaInfoBuilder.createCacheBuilder(KieMetaInfoBuilder.java:119)
     [java]     at org.drools.compiler.kie.builder.impl.KieMetaInfoBuilder.generateKieModuleMetaInfo(KieMetaInfoBuilder.java:72)
     [java]     at org.drools.compiler.kie.builder.impl.KieMetaInfoBuilder.writeKieModuleMetaInfo(KieMetaInfoBuilder.java:54)
     [java]     at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildKieProject(KieBuilderImpl.java:233)
     [java]     at org.drools.compiler.kie.builder.impl.KieBuilderImpl.buildAll(KieBuilderImpl.java:197)
     [java]     at de.hybris.platform.ruleengine.init.impl.DefaultRuleEngineKieModuleSwapper.createKieModule(DefaultRuleEngineKieModuleSwapper.java:276)
     [java]     at de.hybris.platform.ruleengine.init.impl.DefaultRuleEngineBootstrap.startup(DefaultRuleEngineBootstrap.java:73)
     [java]     at de.hybris.platform.ruleengine.event.OnTenantStartupProcessor.lambda$0(OnTenantStartupProcessor.java:103)
     [java]     at java.util.ArrayList.forEach(ArrayList.java:1249)
     [java]     at de.hybris.platform.ruleengine.event.OnTenantStartupProcessor.activateRulesModules(OnTenantStartupProcessor.java:103)
     [java]     at de.hybris.platform.ruleengine.event.OnTenantStartupProcessor.processOnTenantStartup(OnTenantStartupProcessor.java:74)
     [java]     at de.hybris.platform.ruleengine.event.OnTenantStartupProcessor$DefaultRuleEngineTenantListener.afterTenantStartUp(OnTenantStartupProcessor.java:251)
     [java]     at de.hybris.platform.core.AbstractTenant.executeStartupNotifyIfNecessary(AbstractTenant.java:911)
     [java]     at de.hybris.platform.core.AbstractTenant.executeInitsIfNecessary(AbstractTenant.java:1388)
     [java]     at de.hybris.platform.core.Registry.assureTenantStarted(Registry.java:668)
     [java]     at de.hybris.platform.core.Registry.activateTenant(Registry.java:709)
     [java]     at de.hybris.platform.core.Registry.setCurrentTenant(Registry.java:556)
     [java]     at de.hybris.platform.core.Registry.activateMasterTenant(Registry.java:616)
     [java]     at de.hybris.platform.util.ClientExecuter.execute(ClientExecuter.java:43)
     [java]     ... 6 more

We can found an explanation about it on : https://stackoverflow.com/questions/15908268/error-with-serialization-with-protobuf#answer-15913425

It seems that Hybris use multiples versions of protobuf :


bin/ext-commerce/ruleengine/lib/protobuf-java-2.6.1.jar
bin/ext-commerce/solrserver/resources/solr/server/solr-webapp/webapp/WEB-INF/lib/protobuf-java-2.5.0.jar
bin/ext-channel/mobileservices/lib/protobuf-lite-libphonenumber-rev10.jar --> Use protobuf (2.4.1)

We just remove the mobileservices extension, and we didn't get anymore the error.

I think the error appear depending of the loading order of these classes. It seems that hybris extension are not loaded in the sae order (ubuntu, debian, windows).

It's possible to force the load order of extension in localextensions.xml ?

0 Kudos

We have setup jenkins to automate builds in our dev environment. The strange part is the deployments were working fine until last week and today it throws the above error.

What is surprising to me is, the order of extensions is created by the ant scripts itself(ant production). So it must have been taken care already.

What I've done is replaced the localextions.xml generated after "ant production" with the original one in our git repo. This starts server successfully.

Accepted Solutions (0)

Answers (2)

Answers (2)

geffchang
Active Contributor
0 Kudos

This issue is planned to be fixed in 1811 - Hybris fails to start (protobuf library multiple times on classpath): https://jira.hybris.com/browse/ECP-2148

CC: ,

Former Member
0 Kudos

This problem is still there in 1808. Hey SAP I'm looking at you!!!!!! angry face