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

Travis commented on NETBEANS-2956:
----------------------------------

I'm aware that my previous comment showed a different exception than the one in 
the original description, and that this may represent two unrelated bugs.

This is about the 5th or 6th random exception I've seen after we migrated our 
project from Oracle JDK 8 to OpenJDK 12.  Netbeans was my favorite stable IDE 
prior to that.  Now I'm just getting more and more discouraged about the number 
of scary and complex looking exceptions that I'm getting while attempting to do 
my normal work.  And the various exceptions are totally blocking me from using 
the IDE as well.  I'm forced to use another IDE for the time being.

But I am still willing to continue to spent a small portion of my time 
contributing to the Netbeans project by attempting to provide helpful tickets 
about the problems I'm getting.

 

That's all the time that I have for this today, but later I will still try to 
reduce my project down to a tiny obfuscated code example that reproduces one of 
the exceptions mentioned here.

> NullPointerException during Import Classes operation after pasting Java code 
> into Editor
> ----------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-2956
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-2956
>             Project: NetBeans
>          Issue Type: Bug
>          Components: java - Source
>    Affects Versions: 11.0, 11.1
>         Environment: Project is being built using OpenJDK 12
> Same on Windows 10 and Linux
> Same when Netbeans is running on either JDK 8 or OpenJDK 12
> Same on Netbeans 11.0 and Netbeans 11.1 (both with nb-javac 1.6 installed)
> Same with new built-in Gradle plugin, or old Gradle Support plugin 2.0.0
> Gradle 5.5
>            Reporter: Travis
>            Assignee: ARUNAVA SINHA
>            Priority: Major
>
> I'm building my Java project using OpenJDK 12 and Netbeans 11.1.  Everything 
> was working fine with the same project when it was built on JDK 8.  We 
> recently updated to JDK 12 and this problem appeared immediately at that time.
>  
> The problem happens reliably whenever I copy-paste code from one file to 
> another, and the code requires several imports to be added to the destination 
> file.  This causes the "Import Classes" dialog to appear.  When I hit "OK" 
> button there, I immediately get the NullPointerException shown below.  After 
> the exception, the code is still pasted, but the necessary import lines do 
> not get added.  Furthermore, manually running "Source:Fix Imports..." 
> afterward also fails to add the necessary imports.
> This bug makes the IDE pretty unusable for ongoing development work.  This is 
> forcing me and others on my team, sadly, to use a different IDE for now, as 
> we have found no workaround yet.
>  
> java.lang.NullPointerException
>  at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:334)
>  at 
> org.netbeans.lib.nbjavac.services.NBResolve.isAccessible(NBResolve.java:72)
>  at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:379)
>  at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:441)
>  at 
> org.netbeans.lib.nbjavac.services.NBResolve.isAccessible(NBResolve.java:66)
>  at com.sun.tools.javac.api.JavacTrees.isAccessible(JavacTrees.java:913)
>  at 
> org.netbeans.api.java.source.GeneratorUtilities.getImportedElement(GeneratorUtilities.java:1826)
>  at 
> org.netbeans.api.java.source.GeneratorUtilities.addImports(GeneratorUtilities.java:1173)
>  at 
> org.netbeans.modules.java.editor.imports.ClipboardHandler$1.run(ClipboardHandler.java:159)
>  at 
> org.netbeans.modules.java.editor.imports.ClipboardHandler$1.run(ClipboardHandler.java:126)
>  at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
>  at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
>  at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>  at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
>  at 
> org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
>  at 
> org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
>  at 
> org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
>  at 
> org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
>  at 
> org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
>  at 
> org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
>  at 
> org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
>  at 
> org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
>  at 
> org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
>  at 
> org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
>  at 
> org.netbeans.modules.java.editor.imports.ClipboardHandler.doImport(ClipboardHandler.java:126)
>  at 
> org.netbeans.modules.java.editor.imports.ClipboardHandler.access$100(ClipboardHandler.java:113)
>  at 
> org.netbeans.modules.java.editor.imports.ClipboardHandler$4$1.run(ClipboardHandler.java:216)
>  at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>  at 
> org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>  at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
> [catch] at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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

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

Reply via email to