Skip to content

Missing required bundle and Missing required capability #2445

Closed

Description

@nicolasb29

Hi,

I'm working on an upgrade of the spotless plugin gradle from 5.16.0 to the latest (7.0.2).

I have this error when running the spotlessGroovyGradle task:

Missing required bundle org.eclipse.jdt.debug needed by [org.eclipse.jdt.launching, org.eclipse.jdt.launching.macosx]
Missing required capability osgi.extender:osgi.extender=osgi.serviceloader.processor needed by org.apache.commons.commons-logging
Missing required capability osgi.serviceloader:osgi.serviceloader=org.apache.commons.logging.LogFactory needed by org.apache.commons.commons-logging
Missing required capability osgi.serviceloader:osgi.serviceloader=org.apache.juli.logging.Log needed by org.mortbay.jasper.apache-jsp
Missing required capability osgi.extender:osgi.extender=osgi.serviceloader.processor needed by org.mortbay.jasper.apache-jsp
Recommend setting osgi.configuration.area to a directory, getDataFile will return null

I have made a sample project from a fresh spring boot project, the source code can be found here and the error in this output. I also made test on Ubuntu and MacOS and the problem is the same.

I have check there issues but it didn't work:

i.e.: the format.gradle file is on a separate file because in my case it's hosted on a central repository.

Activity

  1. added theissue type on Mar 13, 2025
  2. removed theissue type on Mar 13, 2025
  3. nedtwigg commented on Mar 13, 2025

    @nedtwigg
    Member

    It's not good, but I believe these are just warnings. We should still fix it though :)

  4. nicolasb29 commented on Mar 13, 2025

    @nicolasb29
    Author

    The spotless is working fine, so I agree it's warning messages.

    Is there a way to not display theses messages?

  5. glektarssza commented on Jun 11, 2025

    @glektarssza

    Ran into the same warnings on v7.0.4 and the solution given in #2089 worked for me. Made sure both mavenCentral() and gradlePluginPortal() were in my repositories list. Nuked the .gradle folder in my project workspace and re-ran Gradle. Issue went away.

    @nicolasb29 Your sample project is not minimally reproducible. It errors due to a typo on line 20 in gradle-scripts/format.gradle. If I remove the trailing "garbage" characters from that line it does reproduce the issue.

    Adding the suggested fix in #2089 to your sample repository does, indeed, remove the warnings.

    Full .diff of the changes I made to your sample repository which both got it to reproduce the problem and fixed the warnings:

    diff --git a/build.gradle b/build.gradle
    index 4fde493..d057eeb 100644
    --- a/build.gradle
    +++ b/build.gradle
    @@ -18,6 +18,7 @@ java {
     
     repositories {
     	mavenCentral()
    +    gradlePluginPortal()
     }
     
     dependencies {
    diff --git a/gradle-scripts/format.gradle b/gradle-scripts/format.gradle
    index c5e88fb..c2a19e0 100644
    --- a/gradle-scripts/format.gradle
    +++ b/gradle-scripts/format.gradle
    @@ -17,7 +17,7 @@ spotless {
                 include '**/*.java'
                 exclude '**/build/**/*', '**/out/**/*', '.gradle'
             }
    -        importOrder 'java', 'jakarta', 'javax', 'org', 'com', ''ava
    +        importOrder 'java', 'jakarta', 'javax', 'org', 'com'
             //removeUnusedImports()
             eclipse()
         }
    @@ -45,4 +45,4 @@ spotless {
             leadingTabsToSpaces()
             endWithNewline()
         }
    -}
    \ No newline at end of file
    +}
  6. nicolasb29 commented on Jun 11, 2025

    @nicolasb29
    Author

    Thank for your response.

    I add both mavenCentral and gradlePluginPortal, I fix the error in the file format.gradle but force no cache in gradle task and the warning is still here

    Locally, I have deleted the .gradle folder and run ./gradlew spotlessGroovyGradle --rerun-tasks but I still have the warning:

    ./gradlew spotlessGroovyGradle --rerun-tasks
    Downloading https://services.gradle.org/distributions/gradle-8.12.1-bin.zip
    .............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%.............100%
    
    Welcome to Gradle 8.12.1!
    
    Here are the highlights of this release:
     - Enhanced error and warning reporting with the Problems API
     - File-system watching support on Alpine Linux
     - Build and test Swift 6 libraries and apps
    
    For more details see https://docs.gradle.org/8.12.1/release-notes.html
    
    Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
    
    > Task :spotlessGroovyGradle
    Missing required bundle org.eclipse.jdt.debug needed by [org.eclipse.jdt.launching, org.eclipse.jdt.launching.macosx]
    Missing required capability osgi.extender:osgi.extender=osgi.serviceloader.processor needed by org.apache.commons.commons-logging
    Missing required capability osgi.serviceloader:osgi.serviceloader=org.apache.commons.logging.LogFactory needed by org.apache.commons.commons-logging
    Missing required capability osgi.serviceloader:osgi.serviceloader=org.apache.juli.logging.Log needed by org.mortbay.jasper.apache-jsp
    Missing required capability osgi.extender:osgi.extender=osgi.serviceloader.processor needed by org.mortbay.jasper.apache-jsp
    Recommend setting osgi.configuration.area to a directory, getDataFile will return null
    Starting Groovy-Eclipse compiler resolver. Specified compiler level: unspecified
    129 org.codehaus.groovy_5.0.0.v202406302347-e2406 RESOLVED
    
  7. glektarssza commented on Jun 12, 2025

    @glektarssza

    Interesting. I do see this behavior in your repository, yes, but only on the first build. All builds after the first do not have this problem.

    Image

    If I kill off my Gradle daemons the problem comes back.

  8. added a commit that references this issue on Sep 25, 2026
    f205892
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions