Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.3
    • Fix Version/s: 2.1.8
    • Component/s: None
    • Labels:
      None

      Description

      Groovy appears not to be able to run TestNG tests. The code:

      @Grab('org.testng:testng:6.8.5')
      @Grab('org.codehaus.groovy:groovy-testng:2.2.0-SNAPSHOT')
      import org.testng.annotations.Test
      import static org.testng.Assert.assertEquals
      
      class testngFails {
        @Test void calculateTheResult() {
          assertEquals('Hello World.', 'Hello World.')
        }
      }
      

      when executed results in the output:

      Caught: org.testng.TestNGException:
      An error occurred while instantiating class testngFails: null
      org.testng.TestNGException:
      An error occurred while instantiating class testngFails: null
      at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:398)
      at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
      at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
      at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
      at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
      at org.testng.TestRunner.initMethods(TestRunner.java:409)
      at org.testng.TestRunner.init(TestRunner.java:235)
      at org.testng.TestRunner.init(TestRunner.java:205)
      at org.testng.TestRunner.<init>(TestRunner.java:153)
      at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
      at org.testng.SuiteRunner.init(SuiteRunner.java:157)
      at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
      at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
      at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
      at org.testng.TestNG.run(TestNG.java:1031)
      Caused by: java.lang.ExceptionInInitializerError
      at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
      at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
      ... 15 more
      Caused by: java.lang.RuntimeException: No suitable ClassLoader found for grab
      at testngFails.<clinit>(testngFails.groovy)
      ... 17 more

        Issue Links

          Activity

          Pascal Schumacher made changes -
          Fix Version/s 1.8.10 [ 12331944 ]
          Pascal Schumacher made changes -
          Affects Version/s 2.2.x [ 12331943 ]
          Mark Thomas made changes -
          Workflow jira [ 12973714 ] Default workflow, editable Closed status [ 12980885 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
          Mark Thomas made changes -
          Workflow jira [ 12735068 ] Default workflow, editable Closed status [ 12746813 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
          Paul King made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Guillaume Delcroix made changes -
          Resolution Fixed [ 1 ]
          Status Reopened [ 4 ] Resolved [ 5 ]
          Russel Winder made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Cédric Champeau made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Cedric Champeau [ melix ]
          Fix Version/s 1.8.10 [ 19098 ]
          Fix Version/s 2.1.8 [ 19570 ]
          Resolution Fixed [ 1 ]
          Pascal Schumacher made changes -
          Link This issue relates to GROOVY-6279 [ GROOVY-6279 ]
          Pascal Schumacher made changes -
          Summary Grapes does not work with JDK8 Grapes/@Grab does not work with JDK8
          Russel Winder made changes -
          Priority Blocker [ 1 ] Critical [ 2 ]
          Russel Winder made changes -
          Summary Grapes does not work Grapes does not work with JDK8
          Russel Winder made changes -
          Environment Indy jars
          Russel Winder made changes -
          Summary Grapes does not work with Indy Artefacts Grapes does not work
          Paul King made changes -
          Affects Version/s 2.1.3 [ 19156 ]
          Environment Indy jars
          Russel Winder made changes -
          Summary Grapes does not work with Indy Grapes does not work with Indy Artefacts
          Russel Winder made changes -
          Priority Critical [ 2 ] Blocker [ 1 ]
          Summary TestNG does not work Grapes does not work with Indy
          Russel Winder made changes -
          Field Original Value New Value
          Description Groovy appears not to be able to run TestNG tests. The code:
          {quote}
          @Grab('org.testng:testng:6.8.5')
          @Grab('org.codehaus.groovy:groovy-testng:2.2.0-SNAPSHOT')
          import org.testng.annotations.Test
          import static org.testng.Assert.assertEquals

          class testngFails {
            @Test void calculateTheResult() {
              assertEquals('Hello World.', 'Hello World.')
            }
          }
          {quote}
          when executed results in the output:
          {quote}
          Caught: org.testng.TestNGException:
          An error occurred while instantiating class testngFails: null
          org.testng.TestNGException:
          An error occurred while instantiating class testngFails: null
          at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:398)
          at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
          at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
          at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
          at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
          at org.testng.TestRunner.initMethods(TestRunner.java:409)
          at org.testng.TestRunner.init(TestRunner.java:235)
          at org.testng.TestRunner.init(TestRunner.java:205)
          at org.testng.TestRunner.<init>(TestRunner.java:153)
          at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
          at org.testng.SuiteRunner.init(SuiteRunner.java:157)
          at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
          at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
          at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
          at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
          at org.testng.TestNG.run(TestNG.java:1031)
          Caused by: java.lang.ExceptionInInitializerError
          at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
          at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
          ... 15 more
          Caused by: java.lang.RuntimeException: No suitable ClassLoader found for grab
          at testngFails.<clinit>(testngFails.groovy)
          ... 17 more
          {quote}
          Groovy appears not to be able to run TestNG tests. The code:
          {code}
          @Grab('org.testng:testng:6.8.5')
          @Grab('org.codehaus.groovy:groovy-testng:2.2.0-SNAPSHOT')
          import org.testng.annotations.Test
          import static org.testng.Assert.assertEquals

          class testngFails {
            @Test void calculateTheResult() {
              assertEquals('Hello World.', 'Hello World.')
            }
          }
          {code}
          when executed results in the output:
          {quote}
          Caught: org.testng.TestNGException:
          An error occurred while instantiating class testngFails: null
          org.testng.TestNGException:
          An error occurred while instantiating class testngFails: null
          at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:398)
          at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:299)
          at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:110)
          at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:186)
          at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
          at org.testng.TestRunner.initMethods(TestRunner.java:409)
          at org.testng.TestRunner.init(TestRunner.java:235)
          at org.testng.TestRunner.init(TestRunner.java:205)
          at org.testng.TestRunner.<init>(TestRunner.java:153)
          at org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:522)
          at org.testng.SuiteRunner.init(SuiteRunner.java:157)
          at org.testng.SuiteRunner.<init>(SuiteRunner.java:111)
          at org.testng.TestNG.createSuiteRunner(TestNG.java:1273)
          at org.testng.TestNG.createSuiteRunners(TestNG.java:1260)
          at org.testng.TestNG.runSuitesLocally(TestNG.java:1114)
          at org.testng.TestNG.run(TestNG.java:1031)
          Caused by: java.lang.ExceptionInInitializerError
          at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29)
          at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:387)
          ... 15 more
          Caused by: java.lang.RuntimeException: No suitable ClassLoader found for grab
          at testngFails.<clinit>(testngFails.groovy)
          ... 17 more
          {quote}
          Russel Winder created issue -

            People

            • Assignee:
              Cédric Champeau
              Reporter:
              Russel Winder
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development