Alessandro Falappa created NETBEANS-2029:
--------------------------------------------

             Summary: Unloadable Spring Initializr gradle project
                 Key: NETBEANS-2029
                 URL: https://issues.apache.org/jira/browse/NETBEANS-2029
             Project: NetBeans
          Issue Type: Bug
    Affects Versions: 11.0
         Environment: Product Version: Apache NetBeans IDE Dev (Build 
incubator-netbeans-linux-987-on-20190129)
Java: 1.8.0_201; Java HotSpot(TM) 64-Bit Server VM 25.201-b09
Runtime: Java(TM) SE Runtime Environment 1.8.0_201-b09
System: Linux version 4.15.0-43-generic running on amd64; UTF-8; it_IT (nb)
User directory: /home/sasha/.netbeans/dev
Cache directory: /home/sasha/.cache/netbeans/dev
            Reporter: Alessandro Falappa
            Assignee: Laszlo Kishalmi


I generated a basic Spring Boot gradle project on 
[http://start.spring.io|http://start.spring.io/] (choose gradle project type 
then press generate, unzip downloaded archive).

I opened the generated project in NB11.

The following exception pops-up almost immediately after opening:
{code:java}
java.lang.NullPointerException: The file parameter cannot be null
at org.openide.util.Parameters.notNull(Parameters.java:64)
at org.openide.filesystems.FileUtil.toFileObject(FileUtil.java:853)
at 
org.netbeans.modules.gradle.queries.GradleSourceForBinary.findSourceRoots2(GradleSourceForBinary.java:59)
at 
org.netbeans.api.java.queries.SourceForBinaryQuery.findSourceRoots2(SourceForBinaryQuery.java:101)
at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.createResources(PathRegistry.java:728)
at 
org.netbeans.modules.parsing.impl.indexing.PathRegistry.getSources(PathRegistry.java:275)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$RootsWork.getDone(RepositoryUpdater.java:4888)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$InitialRootsWork.getDone(RepositoryUpdater.java:5821)
[catch] at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Work.doTheWork(RepositoryUpdater.java:3420)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task._run(RepositoryUpdater.java:6183)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task.access$4300(RepositoryUpdater.java:5834)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2$1.run(RepositoryUpdater.java:6099)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
at 
org.netbeans.modules.parsing.impl.RunWhenScanFinishedSupport.performScan(RunWhenScanFinishedSupport.java:83)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6095)
at 
org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater$Task$2.call(RepositoryUpdater.java:6091)
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.indexing.RepositoryUpdater$Task.run(RepositoryUpdater.java:6091)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
{code}
The resulting project is unloadable and unbuildable.

A notification is also generated with a warning telling:
{code:java}
null
Could not run build action using Gradle installation 'null'{code}
The latter may be a distinct problem.

On the console there is also another exception thrown (reporting essential 
part):
{code:java}
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor 
org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator$1
java.lang.NullPointerException
at 
org.netbeans.modules.gradle.classpath.AbstractGradleScriptClassPath.getResources(AbstractGradleScriptClassPath.java:107)
at org.netbeans.api.java.classpath.ClassPath.entries(ClassPath.java:363)
at org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.java:248)
at org.netbeans.api.java.classpath.ClassPath.findOwnerRoot(ClassPath.java:544)
at 
org.netbeans.modules.parsing.impl.indexing.errors.Utilities.getSourceClassPathFor(Utilities.java:65)
at 
org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.computePersistentFile(TaskCache.java:434)
at 
org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.getErrors(TaskCache.java:119)
at 
org.netbeans.modules.parsing.impl.indexing.errors.TaskCache.isInError(TaskCache.java:359)
at 
org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator$1.run(ErrorAnnotator.java:286)
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)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
at org.openide.util.RequestProcessor$Task.schedule(RequestProcessor.java:1459)
at 
org.netbeans.modules.parsing.ui.indexing.errors.ErrorAnnotator.enqueue(ErrorAnnotator.java:230)
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to