netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

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

Open andre-m-coquim-alb opened this issue 2 months ago • 4 comments

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

andre-m-coquim-alb avatar Oct 12 '25 09:10 andre-m-coquim-alb

Downgrade to NetBeans 24

anshulsharma0424 avatar Oct 12 '25 09:10 anshulsharma0424

@anshulsharma0424, I have installed it and I can confirm it does not work with Netbeans 24 either, it produces the same error log.

Why have you pointed me to that specific version to begin with?

Now the updated status becomes:

Netbeans 17 - Working Netbeans 24 - Not Working Netbeans 27 - Not Working

andre-m-coquim-alb avatar Oct 12 '25 11:10 andre-m-coquim-alb

Additional information: RemoteFileSystem comes from hudson integration. Detailed steps to reproduce are missing. With the provided info you have to guess click ways, setup setups and general use.

To actually reproduce some public accessible system to is required, combined with information how to setup a test system, that shows the problematic behavior.

matthiasblaesing avatar Oct 12 '25 12:10 matthiasblaesing

I suspect you somehow still have the C++ (dlight) modules installed because that's what the stacktrace looks like:

https://github.com/emilianbold/netbeans-releases/blob/2fd6dc84c187e3c79a959b3ddb4da1a9703659c7/dlight.remote.impl/src/org/netbeans/modules/remote/impl/fs/RemoteFileSystem.java#L1292-L1298

emilianbold avatar Nov 07 '25 19:11 emilianbold