Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-70534

ClassNotFoundException: com.liferay.portal.bootstrap.ModuleFrameworkUtil is thrown during startup when liferay.home path has non alphanumeric characters

    Details

      Description

      ClassNotFoundException: com.liferay.portal.bootstrap.ModuleFrameworkUtil is thrown during startup when liferay.home path has a no alphanumeric character, for example '#'

      The problematic path with the non alphanumeric character, causes com.liferay.portal.bootstrap.ModuleFrameworkUtil class to not being found, so OSGI framework is not loaded.

      Reproduced in Windows and Linux

      Steps to reproduce
      Add a "#" to Liferay installation directory:

      1. Rename directory to "liferay-dxp-digital-enterprise-7.0-ga1#" or "whatever#"
      2. Update the 'liferay.home' in portal.properties to that directory
      3. Delete liferay_home/osgi/state directory if exists
      4. Start Liferay, following exception is thrown in log
        08-Feb-2017 15:34:45.572 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\Liferay\liferay-dxp-digital-enterprise-7.0-ga1#\tomcat-8.0.32\webapps\ROOT
        08-Feb-2017 15:35:21.152 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
        Loading jar:file:/D:/Liferay/liferay-dxp-digital-enterprise-7.0-ga1%23/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
        Loading jar:file:/D:/Liferay/liferay-dxp-digital-enterprise-7.0-ga1%23/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
        Loading jar:file:/D:/Liferay/liferay-dxp-digital-enterprise-7.0-ga1%23/tomcat-8.0.32/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
        Loading file:/D:/Liferay/liferay-dxp-digital-enterprise-7.0-ga1%23/portal-setup-wizard.properties
        15:35:23,606 ERROR [localhost-startStop-1][ModuleFrameworkAdapterHelper:81] Unable to load the module framework
        08-Feb-2017 15:35:23.615 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
         java.lang.ExceptionInInitializerError
                at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:241)
                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
                at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
                at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
                at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
                at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1091)
                at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1830)
                at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.liferay.portal.bootstrap.ModuleFrameworkUtil
                at com.liferay.portal.module.framework.ModuleFrameworkAdapterHelper.<init>(ModuleFrameworkAdapterHelper.java:83)
                at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.<clinit>(ModuleFrameworkUtilAdapter.java:144)
                ... 14 more
        Caused by: java.lang.ClassNotFoundException: com.liferay.portal.bootstrap.ModuleFrameworkUtil
                at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
                at com.liferay.portal.module.framework.ModuleFrameworkClassLoader.loadClass(ModuleFrameworkClassLoader.java:98)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
                at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:52)
                at com.liferay.portal.kernel.util.InstanceFactory.newInstance(InstanceFactory.java:27)
                at com.liferay.portal.module.framework.ModuleFrameworkAdapterHelper.<init>(ModuleFrameworkAdapterHelper.java:77)
                ... 15 more

      More info, see: https://web.liferay.com/community/forums/-/message_boards/message/85251082

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  2 years, 35 weeks ago

                  Packages

                  Version Package
                  7.0.0 DXP FP12
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  7.1.X
                  Master