You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Matthew Phillips (Jira)" <ji...@apache.org> on 2020/12/17 11:53:00 UTC

[jira] [Commented] (NETBEANS-5165) Project dependencies are not found

    [ https://issues.apache.org/jira/browse/NETBEANS-5165?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17251028#comment-17251028 ] 

Matthew Phillips commented on NETBEANS-5165:
--------------------------------------------

Progress was made by updating the referenced classes after which some sort of 'background scan' was done. However, there was one class that refused to be acknowledged by Netbeans. Let's say this class is called StringX and it's used in ThingUsingStringX. ThingUsingStringX cannot see StringX (for no apparent reason). So, delete StringX and create StringY in Netbeans (Netbeans was unable to delete StringX so had to do it using PowerShell). Anyway, created StringY and updated ThingUsingStringX to use StringY (ThingUsingStringX could now see StringY). I then refactored (renamed) StringY to StringX and got a class cast exception ("Module Java Refactoring threw java.lang.ClassCastException. Please report a bug against Java Refactoring Module and attach your var/log/messages.log - can't one print the full directory path here?). Here are the last few lines of the log file (no timestamps, you kidding?)...



INFO [org.netbeans.core.netigso.Netigso]: bundle org.apache.commons.io@2.6.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.eclipse.mylyn.wikitext.textile.core@2.6.0.v20150901-2143 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.eclipse.mylyn.wikitext.confluence.core@2.6.0.v20150901-2143 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.eclipse.mylyn.wikitext.markdown.core@2.6.0.v20150901-2143 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.json@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.boot.fx@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.boot@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.netbeans.html.ko4j@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.netbeans.html.xhr4j@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.geo@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.boot.script@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle net.java.html.sound@1.7.0 resolved
INFO [org.netbeans.core.netigso.Netigso]: bundle org.eclipse.osgi@3.9.1.v20140110-1610 started
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy resolver: Windows
INFO [org.netbeans.core.network.proxy.windows.WindowsNetworkProxy]: Windows system proxy resolver: auto detect
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy reloading succeeded.
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy - mode: direct
INFO [org.netbeans.core.network.proxy.NetworkProxyReloader]: System network proxy: fell to default (correct if direct mode went before)
INFO [org.netbeans.modules.autoupdate.updateprovider.DownloadListener]: Reading URL https://netbeans.apache.org/nb/updates/12.0/updates.xml.gz?unique=0 failed (java.net.UnknownHostException: netbeans.apache.org)

 

Anyway, I proceeded with the refactoring and, again, once it was renamed to StringX, StringX was still invisible to ThingUsingStringX

> Project dependencies are not found
> ----------------------------------
>
>                 Key: NETBEANS-5165
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5165
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Compiler
>    Affects Versions: 12.0
>         Environment: Windows 10 (Home, build 10.0.18363 Build 18363)
>            Reporter: Matthew Phillips
>            Priority: Blocker
>
> This is a tough one to reproduce (cannot seem to reset the system to what it was prior to a Netbeans install - more about that later), but happens in situations where there are multiple projects each with multiple modules. Essentially when importing a Maven (POM) based Java project, then selecting all the modules in each project and opening them (so that types show up when pressing CTRL-O), there are dependency issues.
> These dependency issues occur even between two different modules within the same project. Basically imports cannot be found. Clearing the cache does not help. Reinstalling the Netbeans application does not help (along with clearing the cache). In fact in this latter scenario (uninstalling and clearing cache), it seems that Netbeans already knows about my project when reinstalled. How can that be if everything has been cleared / uninstalled? Where does Netbeans keep its internal / system files if not in the cache or project?
> Sharing code here will not really illustrate the problem, but would be happy to do an interactive screen share session with one of your developers if required to demonstrate the issue.
> All these dependency issues happen between different source code packages / directories (as opposed to JAR files or other external libraries). Another example of where this happens is where I have a test class in the same package, but different directory, as the class that's being tested (i.e. no import statement should be required in the test class). The test class cannot see the class it's supposed to be testing.
> Also, I see no Netbeans specific project files (eg. nbbuild). Can I assume that, for Maven based project, Netbeans relies on solely on POM files to define the project?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists