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

FlatNPMBundleProcessor fails when a module with no dependencies is scanned

    Details

      Description

      Steps to reproduce:

      1. Startup Liferay 7 and wait it until initializes.
      2. Deploy the attached JAR

       Expected behavior: no errors in log

       Actual behavior: an error from FlatNPMBundleProcessor is thrown:

      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
       at java.lang.String.charAt(String.java:658)
       at com.liferay.frontend.js.loader.modules.extender.npm.ModuleNameUtil.getPackageName(ModuleNameUtil.java:122)
       at com.liferay.frontend.js.loader.modules.extender.npm.model.JSModuleAdapter.<init>(JSModuleAdapter.java:61)
       at com.liferay.frontend.js.loader.modules.extender.npm.builtin.BuiltInJSModule.<init>(BuiltInJSModule.java:52)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatJSModule.<init>(FlatJSModule.java:47)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatNPMBundleProcessor._processModules(FlatNPMBundleProcessor.java:205)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatNPMBundleProcessor._processPackage(FlatNPMBundleProcessor.java:294)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatNPMBundleProcessor._processNodePackages(FlatNPMBundleProcessor.java:237)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.flat.FlatNPMBundleProcessor.process(FlatNPMBundleProcessor.java:74)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistry$NPMRegistryBundleTrackerCustomizer.addingBundle(NPMRegistry.java:251)
       at com.liferay.frontend.js.loader.modules.extender.internal.npm.NPMRegistry$NPMRegistryBundleTrackerCustomizer.addingBundle(NPMRegistry.java:245)
       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.track(AbstractTracked.java:229)
       at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
       at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:905)
       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.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
       at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
       at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
       at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
       at org.eclipse.osgi.container.Module.publishEvent(Module.java:461)
       at org.eclipse.osgi.container.Module.start(Module.java:452)
       at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:454)
       at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:717)
       at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:491)
       at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:437)
       at org.eclipse.osgi.container.ModuleContainer.refresh(ModuleContainer.java:955)
       at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1336)
       at org.eclipse.osgi.container.ModuleContainer$ContainerWiring.dispatchEvent(ModuleContainer.java:1)
       at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
       at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

       

        Attachments

          Activity

            People

            Assignee:
            joyce.wang Joyce Wang
            Reporter:
            ivan.zaera Ivan Zaera
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 12 weeks, 3 days ago

                Packages

                Version Package
                7.0.0 DXP FP30
                7.0.X EE
                7.0.4 CE GA5
                7.1.X
                Master