on 2018 Jan 17 1:13 PM
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 $
Request clarification before answering.
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} \
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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..
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.