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

Unable to startup the portal using Windows due to OSGI framework is always on

    Details

      Description

      Trying to startup the portal in a Windows environment the following exception is displayed:

      SEVERE: Exception sending context initialized event to listener instance of class com.liferay.portal.spring.context.PortalContextLoaderListener
      java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:178)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(Unknown Source)
      	at org.eclipse.osgi.framework.internal.core.FrameworkProperties.initializeProperties(FrameworkProperties.java:130)
      	at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:64)
      	at org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:37)
      	at org.eclipse.osgi.launch.Equinox.init(Equinox.java:178)
      	at com.liferay.osgi.bootstrap.ModuleFrameworkImpl.startFramework(ModuleFrameworkImpl.java:364)
      	at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.startFramework(ModuleFrameworkUtilAdapter.java:77)
      	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextInitialized(PortalContextLoaderListener.java:175)
      	... 14 more
      Apr 29, 2013 4:34:52 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Error listenerStart
      Apr 29, 2013 4:34:52 PM org.apache.catalina.core.StandardContext startInternal
      SEVERE: Context [] startup failed due to previous errors
      16:34:53,014 ERROR [pool-2-thread-1][PortalContextLoaderListener:113] java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.portal.kernel.servlet.DirectServletRegistryUtil.clearServlets(DirectServletRegistryUtil.java:27)
      	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:110)
      	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819)
      	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466)
      	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      16:34:53,021 ERROR [pool-2-thread-1][PortalContextLoaderListener:120] java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.reset(HotDeployUtil.java:45)
      	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:117)
      	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819)
      	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466)
      	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      16:34:53,024 ERROR [pool-2-thread-1][PortalContextLoaderListener:127] java.lang.NullPointerException
      java.lang.NullPointerException
      	at com.liferay.osgi.bootstrap.ModuleFrameworkImpl.stopRuntime(ModuleFrameworkImpl.java:422)
      	at com.liferay.portal.module.framework.ModuleFrameworkUtilAdapter.stopRuntime(ModuleFrameworkUtilAdapter.java:103)
      	at com.liferay.portal.spring.context.PortalContextLoaderListener.contextDestroyed(PortalContextLoaderListener.java:124)
      	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819)
      	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466)
      	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.lang.Thread.run(Unknown Source)
      

      Analyzing the problem, it seems that the OSGI framework is unable to work for windows URLs, the following line is causing the exception due to this kind of URL uses the character '\' instead of '/' :

      org.eclipse.osgi.framework.internal.core.FrameworkProperties.java
      setProperty(PROP_INSTALL_AREA, filePart.substring(0, filePart.lastIndexOf('/')));
      

      This problem has been brought to light after setting the osgi framework always on (LPS-34785)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alberto.chaparro Alberto Chaparro
              Reporter:
              alberto.chaparro Alberto Chaparro
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 31 weeks, 4 days ago

                  Packages

                  Version Package
                  6.2.0 CE M6