cancel
Showing results for 
Search instead for 
Did you mean: 

License installation error in Hybris 6.6

Former Member
0 Kudos

In Hybris 6.6 OOTB. An error is throwing using the license command line tool.

 :platform$ ./license.sh -show
 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/app/Velocity
     at de.hybris.platform.util.VelocityHelper.init(VelocityHelper.java:31)
     at de.hybris.platform.core.Registry.<clinit>(Registry.java:82)
     at de.hybris.platform.util.Utilities.assureCoreUtilities(Utilities.java:221)
     at de.hybris.platform.util.Utilities.loadPlatformProperties(Utilities.java:2949)
     at de.hybris.platform.util.logging.log4j2.HybrisLog4j2ConfigurationFactory.getConfiguration(HybrisLog4j2ConfigurationFactory.java:55)
     at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:353)
     at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:260)
     at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:613)
     at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
     at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
     at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
     at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
     at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
     at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:122)
     at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
     at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
     at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
     at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
     at de.hybris.platform.util.logging.HybrisLogger.<init>(HybrisLogger.java:104)
     at de.hybris.platform.util.logging.HybrisLoggerFactory.makeNewLoggerInstance(HybrisLoggerFactory.java:31)
     at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:275)
     at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:670)
     at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
     at de.hybris.platform.core.Log4JUtils.readConfig(Log4JUtils.java:103)
     at de.hybris.platform.core.Log4JUtils.startup(Log4JUtils.java:56)
     at de.hybris.platform.util.Utilities.<clinit>(Utilities.java:126)
     at de.hybris.platform.licence.sap.DefaultKeySystem.loadPlatformProperties(DefaultKeySystem.java:61)
     at de.hybris.platform.licence.sap.DefaultKeySystem.<init>(DefaultKeySystem.java:48)
     at de.hybris.platform.licence.sap.HybrisAdmin.main(HybrisAdmin.java:46)
 Caused by: java.lang.ClassNotFoundException: org.apache.velocity.app.Velocity
     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
     ... 29 more
 :platform $ 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

SAP have provided me a temporary fix for this issue.

Modify license.sh file.

1.Add

VELOCITY_JAR="$CORE_LIB/velocity-1.7.jar" COMMONSCOLLECTIONS_JAR="$CORE_LIB/commons-collections-3.2.2.jar"

2.Replace java -classpath ${LIKEY_LIB}:${IO_UTILS_LIB}:${COMMONS_LANG_LIB}:${SPRING_LIB}:${LOG_4J_LIB}:${GUAVA_LIB}:${CORE_SERVER}:${CORE_CLASSES}:${BOOTSTRAP_JAR}:${BOOTSTRAP_CLASSES}:${CORE_RESOURCES} \

with

java -classpath ${LIKEY_LIB}:${IO_UTILS_LIB}:${COMMONS_LANG_LIB}:${SPRING_LIB}:${LOG_4J_LIB}:${GUAVA_LIB}:${CORE_SERVER}:${CORE_CLASSES}:${BOOTSTRAP_JAR}:${BOOTSTRAP_CLASSES}:${CORE_RESOURCES}:${VELOCITY_JAR}:${COMMONSCOLLECTIONS_JAR} \

Former Member
0 Kudos

This changes fixed my license bug too. Thank you!

Answers (2)

Answers (2)

Former Member
0 Kudos

Dear All,

Download the attached license.bat file in the SAP note: https://launchpad.support.sap.com/#/notes/2591890

Replace license.bat file with the one in your server and run the license installation command.

Best Regards,

Former Member
0 Kudos

This is an known issue the script is broken since version 6.4 and should be fixed with version 6.7.

Bug ticket: https://jira.hybris.com/browse/ECP-2351

Former Member
0 Kudos

The error message in the JIRA is actually a different stack trace than this one. Is there a recommend workaround in the interim? We want to leverage the features of Hybris 6.6, and would prefer not to wait till 6.7.

Former Member
0 Kudos

You're right maybe it's an different error, did you run ant clean all before? Seems like this apache jar is missing.

If you start up your server there is an log message about the license and in the admin console you have a seperate tab for the license info..

Former Member
0 Kudos

I'm currently working on the migration from 6.3 to 6.6 and there I faced the problem that I couldn't install the license with this command:

 ./license.sh -install ../config/licence/license.txt

Tomorrow I can check if ./license.sh -s is working on my system.

Former Member
0 Kudos

I have the same error like you

 host:platform user$ ./license.sh -s
 
 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/velocity/app/Velocity
     at de.hybris.platform.util.VelocityHelper.init(VelocityHelper.java:31)
     at de.hybris.platform.core.Registry.<clinit>(Registry.java:82)
     at de.hybris.platform.util.Utilities.assureCoreUtilities(Utilities.java:221)
Former Member
0 Kudos

It can also be triggered if you try to create a temporary license: ./license.sh -temp CPS_SQL

nik26jaz
Explorer
0 Kudos

Hello Patrick,

I am facing this same exception when I try to install a hybris license with the license.bat file on v6.6; I also incorporated the changes suggested above, but I still get the same exception. Is there something else needed to be done?

Thanks and Regards,

Former Member
0 Kudos

Hi Patrick,

I'm facing the same issue like the one above, after following the mentioned fixed and also following the SAP Note https://launchpad.support.sap.com/#/notes/2591890

Exception in thread "main" de.hybris.bootstrap.config.BootstrapConfigException: Can not determine platformhome at de.hybris.bootstrap.config.ConfigUtil.getPlatformHome(ConfigUtil.java:165) Caused by: de.hybris.bootstrap.config.BootstrapConfigException: Can not determine path to core-items.xml at de.hybris.bootstrap.config.ConfigUtil.getPlatformHome(ConfigUtil.java:114)

Would you please assist.

Thank you. Obada