netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Exception when trying to download Node.js sources 20.17.0

Open clayboc opened this issue 2 years ago • 5 comments

Apache NetBeans version

Apache NetBeans 23

What happened

java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemProperties
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at org.netbeans.ProxyClassLoader.doFindClass(ProxyClassLoader.java:224)
Caused: java.lang.ClassNotFoundException: org.apache.commons.lang3.SystemProperties starting from ModuleCL@7c783264[org.netbeans.libs.commons_compress] with possible defining loaders [Netigso[reference:file:platform/modules/org-apache-commons-lang3.jar]] and declared parents [ModuleCL@990e0f4[org.apache.commons.commons_io]]
	at org.netbeans.ProxyClassLoader.doFindClass(ProxyClassLoader.java:226)
	at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:140)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
Caused: java.lang.NoClassDefFoundError: org/apache/commons/lang3/SystemProperties
	at org.apache.commons.compress.archivers.tar.TarArchiveEntry.normalizeFileName(TarArchiveEntry.java:231)
	at org.apache.commons.compress.archivers.tar.TarArchiveEntry.setName(TarArchiveEntry.java:1871)
	at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:452)
	at org.netbeans.modules.javascript.nodejs.util.FileUtils.decompressTarGz(FileUtils.java:398)
	at org.netbeans.modules.javascript.nodejs.util.FileUtils.downloadNodeSources(FileUtils.java:313)
	at org.netbeans.modules.javascript.nodejs.ui.NodeJsPathPanel$3.run(NodeJsPathPanel.java:281)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1403)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:287)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2018)

View is stuck after attempting to download sources, says "Downloading" The progress bar completes and then the exception is thrown

Language / Project Type / NetBeans Component

Node.js

How to reproduce

Attempt to use Download button on the node.js sources field

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 11

JDK

JDK 21

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

clayboc avatar Oct 01 '24 14:10 clayboc

I should have said I'm behind a corp proxy, so maybe that has something to do with it? If the sources are downloaded correctly will it fix the issue with the IDE not recognizing node.js native objects like "process" for example? How can I point to the "sources" using the browse option? Thanks! @mbien

clayboc avatar Oct 01 '24 16:10 clayboc

@clayboc please check the build available from PR #7816:

Checkspage, Direct download

This might or might not fix your code completion problem, but is only targetted at fixing the download problem.

matthiasblaesing avatar Oct 01 '24 18:10 matthiasblaesing

@matthiasblaesing The node.js sources download worked as expected. The native node.js objects are now known ( defined ) and code completion is working as expected. Excellent job!

clayboc avatar Oct 01 '24 19:10 clayboc

@matthiasblaesing Well spoke too soon, the IDE is still showing that the native objects are not "declared" but the object completion is working and the download of the node.js sources completed without errors. I will restart the IDE and see if that "fixes" the "not declared" warnings.

clayboc avatar Oct 01 '24 19:10 clayboc

@matthiasblaesing The node.js downloads is fixed so this can be closed. The "not declared" stuff looks like it has other known fixes, so yes it is unrelated. Thank you!

clayboc avatar Oct 01 '24 19:10 clayboc