pulumi / pulumi/pulumi-java

class file for javax.annotation.ParametersAreNonnullByDefault not found

Open
#1,001 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/docs kind/bug
Dominant language
Java
Stars
85
Forks
26
Avg merge
11h 49m
Merged PRs (30d)
22

Description

What happened?

Hello,

I'm getting this exception in my project

error: cannot access ParametersAreNonnullByDefault
  class file for javax.annotation.ParametersAreNonnullByDefault not found

it turned out after a lot of searching, that this dependency is required additionally

   implementation("com.google.code.findbugs:jsr305:3.0.2")

Looking into the dependencies of the Java SDK there are these two set to implementation

   implementation("com.google.code.findbugs:jsr305:3.0.2")
   implementation("com.google.code.gson:gson:2.8.9")

I think if it's up to the user to declare these dependencies, it should be documented somewhere, otherwise changed to api instead of implemented if possible, because at least for the jsr dependency the issue is not too obvious at first :)

Expected Behavior

not relevant

Steps to reproduce

not relevant

Output of pulumi about

not relevant

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Java SDK dependency declarations mentioned in the issue, especially jsr305 and gson, and determine whether consumers must declare them directly. Done means the dependency requirement is documented or the dependency visibility is changed so the reported missing-class error no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.