Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle: "Failed to retrieve project information" (Gradle 6.1.1) #4965

Closed
errael opened this issue Nov 14, 2022 · 3 comments · Fixed by #4995
Closed

Gradle: "Failed to retrieve project information" (Gradle 6.1.1) #4965

errael opened this issue Nov 14, 2022 · 3 comments · Fixed by #4995
Assignees
Labels
Gradle [ci] enable "build tools" tests kind:bug Bug report or fix
Milestone

Comments

@errael
Copy link
Contributor

errael commented Nov 14, 2022

Apache NetBeans version

Apache NetBeans 16 release candidate

What happened

Considering a use for Glazed lists, I download https://github.com/glazedlists/glazedlists-tutorial. gw build works from the command line, There's an exception loading it under NetBeans. I haven't looked into the project itself, but this issue seems topical, may be a good example. Copying exception in next msg. FYI: @sdedic, @lkishalmi .

BTW: My interest in the project is running the examples; expect to update project to gradle 7.5.1

How to reproduce

Open the project in NetBeans.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Linux harmony 5.19.16-76051916-generic #202210150742166605324422.04~cf07008 SMP PREEMPT_DYNAMIC Tue O x86_64 x86_64 x86_64 GNU/Linux

JDK

openjdk version "11.0.2" 2019-01-15 OpenJDK Runtime Environment 18.9 (build 11.0.2+9) OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

Code of Conduct

Yes

@errael errael added kind:bug Bug report or fix needs:triage Requires attention from one of the committers labels Nov 14, 2022
@errael
Copy link
Contributor Author

errael commented Nov 14, 2022

Line numbers from: Apache NetBeans IDE 16-rc4
Full traced is attached in later msg

INFO [org.netbeans.modules.gradle.loaders.GradleProjectLoaderImpl]: Load aiming FULL_ONLINE for Gradle: glazedlists-tutorial[FALLBACK]
Failed to retrieve project information for: /src/swingset/glazedlists-tutorial
Reason: java.lang.NullPointerException
java.lang.NullPointerException
	at org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.sinceGradleOrDefault(NbProjectInfoBuilder.java:1619)
	at org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.sinceGradle(NbProjectInfoBuilder.java:1624)
	at org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder.access$100(NbProjectInfoBuilder.java:115)
	at org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder$DependencyWalker.walkChildren(NbProjectInfoBuilder.java:1238)
	at org.netbeans.modules.gradle.tooling.NbProjectInfoBuilder$DependencyWalker.walkResolutionResult(NbProjectInfoBuilder.java:1178)

@errael
Copy link
Contributor Author

errael commented Nov 14, 2022

This may demonstrate more of a problem than suspected. Seems Gradle support gets in a bad state that requires a restart of NetBeans.

  1. Starting with fresh cachedir, start NetBeans. Open clean glazedlists-tutorial. Exception when resolve problems.
  2. Add id 'application' plugin; remove apply plugin: 'java'`
  3. On console do gradle wrapper --gradle-version 7.5.1
  4. Project glazedlists-tutorial > ResolveProjectProblems > Resolve
    Observe NPE
  5. Close glazedlists-tutorial, reopen still NPE
  6. Restart NetBeans
    Observe glazedlists-tutorial loads OK

@errael
Copy link
Contributor Author

errael commented Nov 15, 2022

Attaching full stack trace
log.txt

@sdedic sdedic self-assigned this Nov 15, 2022
@mbien mbien added Gradle [ci] enable "build tools" tests and removed needs:triage Requires attention from one of the committers labels Nov 16, 2022
@sdedic sdedic added this to the NB16 milestone Nov 21, 2022
sdedic added a commit to sdedic/incubator-netbeans that referenced this issue Nov 21, 2022
@sdedic sdedic linked a pull request Nov 21, 2022 that will close this issue
lkishalmi pushed a commit to sdedic/incubator-netbeans that referenced this issue Nov 27, 2022
lkishalmi pushed a commit that referenced this issue Nov 27, 2022
* Fix #4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
lkishalmi pushed a commit to lkishalmi/netbeans that referenced this issue Nov 27, 2022
* Fix apache#4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
lkishalmi pushed a commit that referenced this issue Dec 6, 2022
* Fix #4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
lkishalmi pushed a commit that referenced this issue Dec 15, 2022
* Fix #4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
Chris2011 pushed a commit to Chris2011/netbeans that referenced this issue Dec 15, 2022
* Fix apache#4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
pepness pushed a commit to pepness/incubator-netbeans that referenced this issue Jan 9, 2023
* Fix apache#4965: Avoid NPE: return null for no supplier.

* Improve compatibility for Gradle < 6.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gradle [ci] enable "build tools" tests kind:bug Bug report or fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants