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

ClassNotFoundException/NoClassDefFoundException after restarting the portal

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: No Longer Reproducible
    • Affects Version/s: 7.0.0 DXP FP44, 7.0.0 DXP FP45, 7.0.6 CE GA7
    • Fix Version/s: None
    • Labels:
      None

      Description

      Steps to reproduce:

      1. Start your portal.
      2. Download the attached zip.
      3. Unzip the attached and navigate to it:
         cd ~/Downloads/ && unzip com.mycompany.my.richfaces.portlet.zip && cd com.mycompany.my.richfaces.portlet/
        
      4. If your portal has started deploy 25 copies of this war to your portal using the included script:
         ./build-and-deploy-25-portlets.sh $LIFERAY_HOME/deploy/.
        
      5. Wait until all the portlets have completely deployed (they should show as "Active" in the gogo shell), and shut down the portal.
      6. Restart the portal.

      If the bug still exists, the following exception will appear in the logs:

      2018-04-17 15:41:58.969 WARN  [localhost-startStop-1][com_liferay_portal_osgi_web_wab_extender:103] [com.mycompany.my.richfaces.portlet.6.repro_1.0.0 [581]] Error while creating extension
      java.lang.NoClassDefFoundError: javax/el/CompositeELResolver
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
              at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
              at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
              at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
              at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
              at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
              at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
              at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:330)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:407)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
              at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              at java.lang.Class.getDeclaredConstructors0(Native Method)
              at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
              at java.lang.Class.getConstructor0(Class.java:3075)
              at java.lang.Class.newInstance(Class.java:412)
              at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.scanTLDsForListeners(WabBundleProcessor.java:792)
              at com.liferay.portal.osgi.web.wab.extender.internal.WabBundleProcessor.init(WabBundleProcessor.java:201)
              at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer._initWabBundle(WebBundleDeployer.java:186)
              at com.liferay.portal.osgi.web.wab.extender.internal.WebBundleDeployer.doStart(WebBundleDeployer.java:106)
              at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory$WABExtension.start(WabFactory.java:158)
              at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
              at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
              at org.apache.felix.utils.extender.AbstractExtender.addingBundle(AbstractExtender.java:192)
              at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
              at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
              at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
              at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
              at org.osgi.util.tracker.BundleTracker.open(BundleTracker.java:156)
              at org.apache.felix.utils.extender.AbstractExtender.startTracking(AbstractExtender.java:150)
              at org.apache.felix.utils.extender.AbstractExtender.doStart(AbstractExtender.java:142)
              at org.apache.felix.utils.extender.AbstractExtender.start(AbstractExtender.java:114)
              at com.liferay.portal.osgi.web.wab.extender.internal.WabFactory.activate(WabFactory.java:69)
              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.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
              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.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              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.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              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 org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:164)
              at org.eclipse.equinox.http.servlet.internal.Activator.addingService(Activator.java:1)
              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.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
              at com.liferay.portal.osgi.web.wab.extender.internal.adapter.HttpAdapter.activate(HttpAdapter.java:121)
              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.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
              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.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:917)
              at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
              at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
              at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
              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:355)
              at com.liferay.portal.servlet.MainServlet.registerPortalInitialized(MainServlet.java:1390)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:428)
              at javax.servlet.GenericServlet.init(GenericServlet.java:158)
              at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151)
              at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038)
              at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
              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.deployDescriptor(HostConfig.java:585)
              at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794)
              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:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.ClassNotFoundException: javax.el.CompositeELResolver cannot be found by com.mycompany.my.richfaces.portlet.6.repro_1.0.0
              at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:444)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:357)
              at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:349)
              at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              ... 162 more
      

      If the bug is fixed, the exception will not appear and the portlet will deploy and function normally (as it did before the restart).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  1 year, 21 weeks, 3 days ago

                  Packages

                  Version Package