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

IllegalArgumentException errors are thrown when starting up Liferay DXP

    Details

      Description

      Description

      IllegalArgumentException errorsĀ are thrown for subsequent startups of Liferay DXP if the initial startup is interrupted.

      The IllegalArgumentExceptions involve LPKG and WAR files, such as:

      Unknown LPKG URL lpkg:/Liferay+Frontend+Theme+-+Impl-1.0.2/admin-theme.war

      This issue is only reproducible with LPKGs.
      In order to test this issue, it would be best to download an actual Liferay bundle.

      Steps to Reproduce

      1. Download Liferay DXP 7.1 Bundle
      2. Delete folder: osgi/state if it exists
      3. Start Liferay DXP 7.1 using the terminal with the following command:
        ./catalina.sh run start
        
      4. Watch the terminal console for the following lines:
        [main] INFO osgi.logging.org_eclipse_osgi - ServiceEvent REGISTERED {org.eclipse.osgi.service.security.TrustEngine}={service.ranking=-2147483648, osgi.signedcontent.trust.engine=org.eclipse.osgi, service.id=24, service.bundleid=0, service.scope=singleton}
        [main] INFO osgi.logging.org_eclipse_osgi - ServiceEvent REGISTERED {org.eclipse.osgi.signedcontent.SignedContentFactory}={service.id=25, service.bundleid=0, service.scope=singleton}
        [main] INFO osgi.logging.org_eclipse_osgi - ServiceEvent REGISTERED {org.eclipse.osgi.service.debug.DebugOptionsListener}={service.ranking=2147483647, listener.symbolic.name=org.eclipse.osgi, service.pid=0.org.eclipse.osgi.internal.debug.Debug, service.vendor=Eclipse.org - Equinox, service.id=26, service.bundleid=0, service.scope=singleton}
        [main] INFO osgi.logging.org_eclipse_osgi - ServiceEvent REGISTERED {org.eclipse.osgi.service.debug.DebugOptionsListener}={service.ranking=2147483647, listener.symbolic.name=org.eclipse.osgi, service.pid=0.org.eclipse.osgi.container.ModuleContainer, service.vendor=Eclipse.org - Equinox, service.id=27, service.bundleid=0, service.scope=singleton}
        [Framework stop] INFO osgi.logging.org_eclipse_osgi - ServiceEvent UNREGISTERING {com.liferay.portal.app.license.AppLicenseVerifier}={version=1.0.0, service.id=22, service.bundleid=0, service.scope=singleton}
        [Framework stop] INFO osgi.logging.org_eclipse_osgi - ServiceEvent UNREGISTERING {org.osgi.framework.hooks.resolver.ResolverHookFactory}={service.id=23, service.bundleid=0, service.scope=singleton}
        
      5. Startup should pause here for a moment..
      6. Prepare to force liferay to quit (using ctrl + c, kill -9, or a similar command)
      7. Once you notice the log continuing to output messages, force liferay to quit
      8. Start Liferay again with the same startup command

      Expected Results:
      Liferay starts without errors

      Actual Results:
      Liferay throws illegalArgumentExceptions when starting

      Sample snippet of an IllegalArgumentException that is thrown:

      2018-09-21 23:48:55.098 ERROR [Framework Event Dispatcher: Equinox Container: 50f617c9-f8bd-0018-1181-d7cf7ac35dc7][Liferay Frontend Theme - Impl-classic-theme-wrapper:97] FrameworkEvent ERROR
      java.lang.RuntimeException: java.lang.IllegalArgumentException: Unknown LPKG URL lpkg:/Liferay+Frontend+Theme+-+Impl-1.0.2/classic-theme.war
      	at com.liferay.portal.lpkg.deployer.internal.wrapper.bundle.URLStreamHandlerServiceServiceTrackerCustomizer.addingService(URLStreamHandlerServiceServiceTrackerCustomizer.java:94)
      	at com.liferay.portal.lpkg.deployer.internal.wrapper.bundle.URLStreamHandlerServiceServiceTrackerCustomizer.addingService(URLStreamHandlerServiceServiceTrackerCustomizer.java:33)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at com.liferay.portal.osgi.web.wab.generator.internal.WabGenerator.registerURLStreamHandlerService(WabGenerator.java:232)
      	at com.liferay.portal.osgi.web.wab.generator.internal.WabGenerator.start(WabGenerator.java:92)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)
      	at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
      	at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
      	at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
      	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)
      	at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)
      	at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
      	at org.apache.felix.scr.impl.inject.BindMethod.getServiceObject(BindMethod.java:648)
      	at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2203)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1118)
      	at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1520)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1005)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:859)
      	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:823)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:496)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:619)
      	at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:414)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
      	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
      	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
      	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)
      	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)
      	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)
      	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
      	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
      	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:891)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
      	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
      	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:1001)
      	at com.liferay.registry.internal.RegistryImpl.registerService(RegistryImpl.java:369)
      	at com.liferay.portal.servlet.MainServlet.registerPortalInitialized(MainServlet.java:1337)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:414)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:158)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1124)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1079)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:971)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4765)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5075)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:742)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:718)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:703)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1840)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
      	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:525)
      	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:424)
      	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1586)
      	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:308)
      	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
      	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
      	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:966)
      	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427)
      	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
      	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
      	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943)
      	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
      	at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353)
      	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)
      Caused by: java.lang.IllegalArgumentException: Unknown LPKG URL lpkg:/Liferay+Frontend+Theme+-+Impl-1.0.2/classic-theme.war
      	at com.liferay.portal.lpkg.deployer.internal.LPKGURLStreamHandlerService.openConnection(LPKGURLStreamHandlerService.java:41)
      	at org.eclipse.osgi.internal.url.URLStreamHandlerProxy.openConnection(URLStreamHandlerProxy.java:114)
      	at java.net.URL.openConnection(URL.java:979)
      	at java.net.URL.openStream(URL.java:1045)
      	at com.liferay.portal.osgi.web.wab.generator.internal.connection.WabURLConnection.transferToTempFile(WabURLConnection.java:128)
      	at com.liferay.portal.osgi.web.wab.generator.internal.connection.WabURLConnection.getInputStream(WabURLConnection.java:100)
      	at com.liferay.portal.lpkg.deployer.internal.wrapper.bundle.URLStreamHandlerServiceServiceTrackerCustomizer.addingService(URLStreamHandlerServiceServiceTrackerCustomizer.java:83)
      	... 154 more
      

        Attachments

          Activity

            People

            Assignee:
            sharry.shi Sharry Shi
            Reporter:
            eric.yan Eric Yan
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

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

                Packages

                Version Package
                7.0.0 DXP FP60
                7.0.0 DXP SP9
                7.0.X
                7.1.10 DXP FP3
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master