Alt+Shift+I to resolve class -> java.lang.NullPointerException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Alt+Shift+I to resolve class -> java.lang.NullPointerException

Alex Sviridov
Hi all

I use Product Version: NetBeans IDE Dev (Build 201709170002)
with Java: 9; Java HotSpot(TM) 64-Bit Server VM 9+181

In order to resolve java class (I want BN generate import with FQN of the class) I press
Alt+Shift+I and I got the NullPointerException (see below). I use NB 8.1 and never had
such problems. How to fix it?

java.lang.NullPointerException
    at org.netbeans.modules.java.editor.imports.ComputeImports.computeCandidates(ComputeImports.java:254)
    at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:123)
    at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:115)
    at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:523)
    at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
    at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
    at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:137)
    at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:204)
    at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:201)
    at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176)
    at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
    at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:141)
    at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:90)
    at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:201)
    at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:104)
    at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:473)
    at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:444)
    at org.netbeans.modules.java.editor.imports.FastImportAction$2.run(FastImportAction.java:151)
    at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:169)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
    at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
    at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
    at org.openide.util.RequestProcessor.post(RequestProcessor.java:420)
    at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThreadImpl(RunOffEDTImpl.java:163)
    at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:106)
    at org.netbeans.api.progress.BaseProgressUtils.runOffEventDispatchThread(BaseProgressUtils.java:113)
    at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:90)
    at org.netbeans.modules.java.editor.imports.FastImportAction.actionPerformed(FastImportAction.java:147)
    at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347)
    at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1805)
    at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2901)
    at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2949)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2863)
    at java.desktop/java.awt.Component.processEvent(Component.java:6355)
    at java.desktop/java.awt.Container.processEvent(Container.java:2259)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4961)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
    at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1955)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:827)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1096)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:966)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:792)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4842)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2758)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
    at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
    at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[catch] at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)


Best regards, Alex