Uploaded image for project: 'ZK Studio'
  1. ZK Studio
  2. ZKSTUDIO-95

java.lang.RuntimeException: Cannot invoke "java.util.Map.size()" because "metafiles" is null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.1.0
    • 2.0.5
    • None
    • None

      Steps to Reproduce

      1. install zkstudio 2.0.5.v202202111348 on eclipse 2024-03 4.31.0 (the latest at this moment)
      2. open a zul file

      Current Result

      Failed to create the part's controls

      java.lang.RuntimeException: Cannot invoke "java.util.Map.size()" because "metafiles" is null
      	at org.zkoss.eclipse.setting.internal.project.ProjectContext.getConfigContext(ProjectContext.java:57)
      	at org.zkoss.eclipse.editor.wst.ZulTextEditor$1.inputDocumentChanged(ZulTextEditor.java:97)
      	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(TextViewer.java:2850)
      	at org.eclipse.jface.text.TextViewer.setDocument(TextViewer.java:2891)
      	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:682)
      	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(ProjectionViewer.java:368)
      	at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.setDocument(StructuredTextViewer.java:861)
      	at org.eclipse.jface.text.source.SourceViewer.setDocument(SourceViewer.java:632)
      	at org.eclipse.ui.texteditor.AbstractTextEditor.initializeSourceViewer(AbstractTextEditor.java:3989)
      	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3481)
      	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:64)
      	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:454)
      	at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1598)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPartControl(CompatibilityPart.java:158)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityEditor.createPartControl(CompatibilityEditor.java:96)
      	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:365)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:976)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:938)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:138)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:385)
      	at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:311)
      	at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:203)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:90)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:59)
      	at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:42)
      	at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:132)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:991)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:658)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:762)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:727)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:711)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.lambda$0(PartServiceImpl.java:105)
      	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.lambda$0(UIEventHandler.java:38)
      	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:183)
      	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:133)
      	at org.eclipse.swt.widgets.Display.syncExec(Display.java:5247)
      	at org.eclipse.e4.ui.workbench.swt.DisplayUISynchronize.syncExec(DisplayUISynchronize.java:34)
      	at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:38)
      	at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:206)
      	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:201)
      	at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
      	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
      	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
      	at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:131)
      	at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:73)
      	at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:44)
      	at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:55)
      	at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60)
      	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:424)
      	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElementGen(ElementContainerImpl.java:168)
      	at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:187)
      	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:654)
      	at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:618)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:796)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.bringToTop(PartServiceImpl.java:401)
      	at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1271)
      	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3228)
      	at org.eclipse.ui.internal.WorkbenchPage.lambda$11(WorkbenchPage.java:3118)
      	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3116)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3086)
      	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3077)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:546)
      	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:506)
      	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:370)
      	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:172)
      	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:288)
      	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:254)
      	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
      	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:252)
      	at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:53)
      	at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:215)
      	at org.eclipse.ui.navigator.CommonNavigatorManager$1.open(CommonNavigatorManager.java:184)
      	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
      	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:799)
      	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
      	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
      	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:796)
      	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1110)
      	at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:451)
      	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:295)
      	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:330)
      	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
      	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4643)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1524)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1547)
      	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1532)
      	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1325)
      	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4410)
      	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3986)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1151)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
      	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1042)
      	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:152)
      	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:639)
      	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
      	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:546)
      	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
      	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
      	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143)
      	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439)
      	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
      	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:651)
      	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:588)
      	at org.eclipse.equinox.launcher.Main.run(Main.java:1459)
      Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "metafiles" is null
      	at org.zkoss.eclipse.setting.internal.project.JavaClasspathsMetainfoFinder.findZKDef(JavaClasspathsMetainfoFinder.java:105)
      	at org.zkoss.eclipse.setting.internal.project.ZkConfigContext.initial(ZkConfigContext.java:83)
      	at org.zkoss.eclipse.setting.internal.project.ZkConfigContext.<init>(ZkConfigContext.java:70)
      	at org.zkoss.eclipse.setting.internal.project.ProjectContext.getConfigContext(ProjectContext.java:54)
      	... 116 more
      
      

      Another Error

      Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "metafiles" is null
          at org.zkoss.eclipse.setting.internal.project.JavaClasspathsMetainfoFinder.findZKDef(JavaClasspathsMetainfoFinder.java:105)
          at org.zkoss.eclipse.setting.internal.project.ZkConfigContext.initial(ZkConfigContext.java:83)
          at org.zkoss.eclipse.setting.internal.project.ZkConfigContext.<init>(ZkConfigContext.java:70)
          at org.zkoss.eclipse.setting.internal.project.ProjectContext.getConfigContext(ProjectContext.java:54)
          ... 107 more
      

      Expected Result

      no error

      Debug Information

            jumperchen jumperchen
            hawk hawk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: