Skip to Content

ClassFormatError after importing license file on Hybris 5.7.x

We've encountered an issue after importing a production license into Hybris

On server startup the following exception is seen in the console - the issue does not occur with the standard DEV license.

 SEVERE: Exception sending context initialized event to listener instance of class de.hybris.platform.spring.HybrisContextLoaderListener
 INFO   | jvm 1    | srvmain | 2016/05/19 12:16:07.100 | java.lang.ClassFormatError: Illegal local variable table length 27 in method com.sap.security.core.server.likey.utils.Utils.main([Ljava/lang/String;)V
 INFO   | jvm 1    | srvmain | 2016/05/19 12:16:07.100 | 
 at com.sap.security.core.server.likey.LicenseChecker.getAllLicenses(LicenseChecker.java:87)
 INFO   | jvm 1    | srvmain | 2016/05/19 12:16:07.100 | 
 at de.hybris.platform.licence.internal.LicenseFactory.tryFindSAPLicenseKey(LicenseFactory.java:61)
 INFO   | jvm 1    | srvmain | 2016/05/19 12:16:07.100 | 
 at de.hybris.platform.licence.internal.LicenseFactory.getCurrentLicense(LicenseFactory.java:45)
 INFO   | jvm 1    | srvmain | 2016/05/19 12:16:07.100 | 
 at de.hybris.platform.core.MasterTenant.<init>(MasterTenant.java:83)
 
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jul 20, 2016 at 10:39 AM

    Posting an answer to my own question as this is what we've discovered together with the fix we've used

    Quick answer

    Add -Xverify:none to tomcat.generaloptions

    Background

    This error is generated by java when an attempt is made to load a new class, it performs checks to ensure the class is formed correctly and that the bytecode in the classes are un-modified.

    Generally this is ok, however if agents are added to the JVM (as in our case), the bytecode is often modified to allow additional code to be added to the class to instrument it for reporting / monitoring purposes.

    To enable these classes to load JVM 7 has the flag XX:-UseSplitVerifier, this tells the JVM to use a less strict check on the classes being loaded and enable instrumented classes to load.

    In our tomcat.generaloptions we have the XX:-UseSplitVerifier flag added, however as of java 8 this flag is deprecated, and has no effect. So the strict class checking is being performed and the SAP license checker class is not able to be loaded.

    The new flag -Xverify:none replaces XX:-UseSplitVerifier in Java 8 and is now the supported flag for disabling the class loading checker.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.