apache / apache/netbeans

java.lang.NullPointerException when trying to open remote file (could not open it)

Open
#8,905 4 comments 0 reactions 0 assignees View on GitHub
kind:bug needs:triage os:windows wait-for-feedback
Dominant language
Java
Stars
3.1k
Forks
935
Avg merge
2d 3h
Merged PRs (30d)
17

Description

### Apache NetBeans version

Apache NetBeans 27

### What happened

I was trying to open a file in a remote host to see it locally and the exception occurs.
The problem is systematic.
I am using Netbeans 27 in Windows 11. Tried both JDK19 and JDK 24 and the porblem happens with both
Does not happen with Netbeans 17 in Windows 11. Tried with JDK 19.

### Language / Project Type / NetBeans Component

_No response_

### How to reproduce

I click the button "open remote file", the file manager opens normally pointing to the remote filesytem, i select the desired file and when I click Ok to open it, the exception occurs.

### Did this work correctly in an earlier version?

Apache NetBeans 24 or earlier

### Operating System

Windows 11 version 10.0 running on amd64

### JDK

24.0.2; Java HotSpot(TM) 64-Bit Server VM 24.0.2+12-54

### Apache NetBeans packaging

Apache NetBeans binary zip

### Anything else

Problem is systematic.

Exception log:

```
java.lang.NullPointerException: Cannot invoke "org.netbeans.modules.remote.impl.fileoperations.spi.FileOperationsProvider.getFileOperations(org.openide.filesystems.FileSystem)" because the return value of "org.netbeans.modules.remote.impl.fileoperations.spi.FileOperationsProvider.getDefault()" is null
at org.netbeans.modules.remote.impl.fs.RemoteFileSystem$RootFileObject.getAttribute(RemoteFileSystem.java:1295)
at org.netbeans.modules.remote.impl.fs.RemoteFileObject.getAttribute(RemoteFileObject.java:450)
at org.netbeans.modules.versioning.core.api.VCSFileProxy.getAttribute(VCSFileProxy.java:492)
at org.netbeans.modules.versioning.core.api.VCSFileProxy.getFileProxyOperations(VCSFileProxy.java:478)
at org.netbeans.modules.versioning.core.api.VCSFileProxy.createFileProxy(VCSFileProxy.java:159)
at org.netbeans.modules.localhistory.LocalHistory$OpenedFilesListener.getFiles(LocalHistory.java:548)
at org.netbeans.modules.localhistory.LocalHistory$OpenedFilesListener.access$900(LocalHistory.java:431)
at org.netbeans.modules.localhistory.LocalHistory$OpenedFilesListener$1$1.propertyChange(LocalHistory.java:642)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
at org.openide.text.CloneableEditorSupport.firePropertyChange(CloneableEditorSupport.java:456)
at org.openide.text.CloneableEditor.componentClosed(CloneableEditor.java:306)
at org.netbeans.core.spi.multiview.text.MultiViewCloneableEditor.componentClosed(MultiViewCloneableEditor.java:95)
at org.netbeans.core.spi.multiview.text.MultiViewEditorElement.componentClosed(MultiViewEditorElement.java:106)
at org.netbeans.core.multiview.MultiViewPeer.peerComponentClosed(MultiViewPeer.java:304)
at org.netbeans.core.multiview.MultiViewCloneableTopComponent.componentClosed(MultiViewCloneableTopComponent.java:104)
[catch] at org.openide.windows.WindowManager.componentCloseNotify(WindowManager.java:297)
at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentClosed(WindowManagerImpl.java:1181)
at org.netbeans.core.windows.Central.removeModeTopComponent(Central.java:998)
at org.netbeans.core.windows.ModeImpl.removeTopComponent(ModeImpl.java:454)
at org.netbeans.core.windows.ModeImpl.close(ModeImpl.java:262)
at org.netbeans.core.windows.WindowManagerImpl.topComponentClose(WindowManagerImpl.java:1354)
at org.openide.windows.TopComponent.close(TopComponent.java:539)
at org.openide.windows.TopComponent.close(TopComponent.java:526)
at org.openide.text.CloneableEditorInitializer$2.run(CloneableEditorInitializer.java:277)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
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)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```

### Are you willing to submit a pull request?

No

Contributor guide

Open the contributing guide

Research direction

Start with org.netbeans.modules.remote.impl.fs.RemoteFileSystem.java at line 1295 and trace the call through VCSFileProxy.java into LocalHistory.java. Reproduce the failure by opening a remote file on Windows 11 with NetBeans 27, then verify that the file opens without the reported NullPointerException and that the relevant remote-file behavior remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.