Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: runtime
    • Labels:
      None
    • Environment:
    • Number of attachments :
      3

      Description

      When running gmaven on ibm jdk, it fails with the following stack trace:

      java.lang.Error: No providers discovered
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderLoader.findProviders(DefaultProviderLoader.java:93)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderLoader.load(DefaultProviderLoader.java:69)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderSelector.load(DefaultProviderSelector.java:216)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderSelector.discover(DefaultProviderSelector.java:178)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderSelector.register(DefaultProviderSelector.java:122)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderSelector.select(DefaultProviderSelector.java:71)
      at org.codehaus.groovy.maven.runtime.loader.DefaultProviderManager.select(DefaultProviderManager.java:102)
      at org.codehaus.groovy.maven.plugin.ProviderMojoSupport.provider(ProviderMojoSupport.java:120)
      at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:49)
      at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.feature(ComponentMojoSupport.java:42)
      at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:53)
      at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:618)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      I've attached a sample pom that demo's this. It appears that this is a change between 1.0-rc-3 and 1.0-rc-4. With 1.0-rc-3, it would generate a stack trace but still work.

      1. DefaultProviderSelector.java
        9 kB
        Dominik Bartholdi
      2. DefaultProviderSelector.patch
        1 kB
        Dominik Bartholdi
      3. groovy-pom.xml
        1 kB
        Jim Sellers

        Activity

        Hide
        Oliver Burn added a comment -

        I am also being impacted by this bug.

        Apache Maven 2.1.0 (r755702; 2009-03-19 06:10:27+1100)
        Java version: 1.5.0
        Java home: c:\apps\ibm-jdk-1.5.0\jre
        Default locale: en_AU, platform encoding: Cp1252
        OS name: "windows xp" version: "5.1 build 2600 service pack 3" arch: "x86" Family: "dos"

        Show
        Oliver Burn added a comment - I am also being impacted by this bug. Apache Maven 2.1.0 (r755702; 2009-03-19 06:10:27+1100) Java version: 1.5.0 Java home: c:\apps\ibm-jdk-1.5.0\jre Default locale: en_AU, platform encoding: Cp1252 OS name: "windows xp" version: "5.1 build 2600 service pack 3" arch: "x86" Family: "dos"
        Hide
        Horst Gaussmann added a comment -

        I am also affected - because i must use an IBM VM...

        So i turned on the gmaven.debug flag and found that using an IBM VM the DefaultProviderLoader is used - which cannot find providers.

        [DEBUG] DefaultProviderSelector - Trying to load 1.6 from org.codehaus.groovy.maven.runtime.loader.DefaultProviderLoader@47b247b2

        Using a Sun (1.6) VM then the ArtifactProviderLoader is used - which works:

        [DEBUG] Trying to load 1.6 from org.codehaus.groovy.maven.runtime.loader.artifact.ArtifactProviderLoader@5ebac9

        Maybe that helps...

        Show
        Horst Gaussmann added a comment - I am also affected - because i must use an IBM VM... So i turned on the gmaven.debug flag and found that using an IBM VM the DefaultProviderLoader is used - which cannot find providers. [DEBUG] DefaultProviderSelector - Trying to load 1.6 from org.codehaus.groovy.maven.runtime.loader.DefaultProviderLoader@47b247b2 Using a Sun (1.6) VM then the ArtifactProviderLoader is used - which works: [DEBUG] Trying to load 1.6 from org.codehaus.groovy.maven.runtime.loader.artifact.ArtifactProviderLoader@5ebac9 Maybe that helps...
        Hide
        Dominik Bartholdi added a comment -

        I think I fixed the problem - I attached a patch for the class org.codehaus.gmaven.runtime.loader.DefaultProviderSelector.

        The problem is, that on the IBM JVM the order of the org.codehaus.gmaven.feature.ProviderSelector's found in the PlexusContainer is not the same as on other JVMs (why? I don't know...). It always returns the DefaultProviderLoader as the first and this one always fails.
        The provided fix just makes sure the "default" provider is the last within the map of found the selectors and that seems to fix the problem - and it still works on the SUN JVM, as the order is now the same for both.

        btw: I also tried to use the default provider on the SUN JVM and there it did not work for me too (but I'm not sure if it has to).

        The patch is tested with:
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20080907 (SR8a + IZ29767 + IZ30684 + IZ31214 + IZ312
        13))
        IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Vista x86-32 j9vmwi3223ifx-20080811 (JIT enabled)
        J9VM - 20080809_21892_lHdSMr
        JIT - 20080620_1845_r8
        GC - 200806_19)
        JCL - 20080907

        and:
        java version "1.6.0_14"
        Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
        Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

        regards Domi

        Show
        Dominik Bartholdi added a comment - I think I fixed the problem - I attached a patch for the class org.codehaus.gmaven.runtime.loader.DefaultProviderSelector. The problem is, that on the IBM JVM the order of the org.codehaus.gmaven.feature.ProviderSelector's found in the PlexusContainer is not the same as on other JVMs (why? I don't know...). It always returns the DefaultProviderLoader as the first and this one always fails. The provided fix just makes sure the "default" provider is the last within the map of found the selectors and that seems to fix the problem - and it still works on the SUN JVM, as the order is now the same for both. btw: I also tried to use the default provider on the SUN JVM and there it did not work for me too (but I'm not sure if it has to). The patch is tested with: java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build pwi32devifx-20080907 (SR8a + IZ29767 + IZ30684 + IZ31214 + IZ312 13)) IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows Vista x86-32 j9vmwi3223ifx-20080811 (JIT enabled) J9VM - 20080809_21892_lHdSMr JIT - 20080620_1845_r8 GC - 200806_19) JCL - 20080907 and: java version "1.6.0_14" Java(TM) SE Runtime Environment (build 1.6.0_14-b08) Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing) regards Domi
        Hide
        Jason Dillon added a comment -

        Patch applied

        Show
        Jason Dillon added a comment - Patch applied
        Hide
        Jesus Nuņez added a comment -

        Hi,
        First of all, thanks for the great job with groovy and gmaven.

        This is not specifically a failure of gmaven because of IBM JDK, but a failure of groovy (GROOVY-3568) which seems to be solved from groovy 1.6.4 on.
        My problem is that my current gmaven configuration seems to be working with groovy 1.6.0, and I don't know how to set gmaven to use groovy 1.6.4 or older.

        My pom looks like:

        </dependencies>
        ...
        <!-- groovy support -->
        <dependency>
        <groupId>org.codehaus.groovy.maven.runtime</groupId>
        <artifactId>gmaven-runtime-1.6</artifactId>
        <version>1.0</version>
        </dependency>
        ...

        </dependencies>

        ...

        <plugins>
        <plugin>
        ...
        <!-- Compile Groovy classes -->
        <plugin>
        <groupId>org.codehaus.groovy.maven</groupId>
        <artifactId>gmaven-plugin</artifactId>
        <version>1.0</version>
        <executions>
        ...

        I've tried changing

        gmaven-runtime-1.6
        to
        gmaven-runtime-1.6.5

        or using

        mvn -Dgmaven.runtime=1.6.5 clean install

        But always get something like:

        Missing:
        ----------
        1) org.codehaus.groovy.maven.runtime:gmaven-runtime-1.6.5:jar:1.0

        Try downloading the file manually from the project website.
        ...

        I've also tried to define a custom version as in http://docs.codehaus.org/display/GMAVEN/Groovy+Runtime but it didn't work.

        Sorry if this is not the right place for the question, but I couldn't find the gmaven mailing list; if you can tell me a better place for the question I'll be happy to move it there.

        Thanks in advance,
        Jesus

        Show
        Jesus Nuņez added a comment - Hi, First of all, thanks for the great job with groovy and gmaven. This is not specifically a failure of gmaven because of IBM JDK, but a failure of groovy ( GROOVY-3568 ) which seems to be solved from groovy 1.6.4 on. My problem is that my current gmaven configuration seems to be working with groovy 1.6.0, and I don't know how to set gmaven to use groovy 1.6.4 or older. My pom looks like: </dependencies> ... <!-- groovy support --> <dependency> <groupId>org.codehaus.groovy.maven.runtime</groupId> <artifactId>gmaven-runtime-1.6</artifactId> <version>1.0</version> </dependency> ... </dependencies> ... <plugins> <plugin> ... <!-- Compile Groovy classes --> <plugin> <groupId>org.codehaus.groovy.maven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.0</version> <executions> ... I've tried changing gmaven-runtime-1.6 to gmaven-runtime-1.6.5 or using mvn -Dgmaven.runtime=1.6.5 clean install But always get something like: Missing: ---------- 1) org.codehaus.groovy.maven.runtime:gmaven-runtime-1.6.5:jar:1.0 Try downloading the file manually from the project website. ... I've also tried to define a custom version as in http://docs.codehaus.org/display/GMAVEN/Groovy+Runtime but it didn't work. Sorry if this is not the right place for the question, but I couldn't find the gmaven mailing list; if you can tell me a better place for the question I'll be happy to move it there. Thanks in advance, Jesus
        Hide
        Dominik Bartholdi added a comment -

        Jesus,

        you'r right this is not the right place to ask this kind of questions... but to make it short for you
        the documentation at http://gmaven.codehaus.org/ is very mutch out dated...
        You should have a try with the newest version of the plugin:
        org.codehaus.gmaven:gmaven-plugin:1.1
        and
        org.codehaus.gmaven.runtime:gmaven-runtime:1.7

        please take not, that the groupId has changed!

        reg Domi

        Show
        Dominik Bartholdi added a comment - Jesus, you'r right this is not the right place to ask this kind of questions... but to make it short for you the documentation at http://gmaven.codehaus.org/ is very mutch out dated... You should have a try with the newest version of the plugin: org.codehaus.gmaven:gmaven-plugin:1.1 and org.codehaus.gmaven.runtime:gmaven-runtime:1.7 please take not, that the groupId has changed! reg Domi
        Hide
        Jason Dillon added a comment -

        ya, and I can't say I love (or even like) IBM, so any IBM-related problems are always last on my list.

        Show
        Jason Dillon added a comment - ya, and I can't say I love (or even like) IBM, so any IBM-related problems are always last on my list.

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Jim Sellers
          • Votes:
            5 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: