Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6897

java.lang.NoSuchMethodError: groovy.xml.StreamingMarkupBuilder.bind(Ljava/lang/Object;)Ljava/lang/Object;

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.3
    • 2.3.4
    • XML Processing
    • None
    • Grails 2.4.2, java 7 openjdk

    Description

      I get the following stacktrace when running some tests using either groovy http-builder 0.7.2 or the grails rest-client-builder plugin 2.0.3. The problem goes away in grails 2.3.10. I believe the bug is in groovy 2.3.X and is caused by the following commit in StreamingMarkupBuilder where the return type for the bind() method was changed to Writeable:

      https://github.com/groovy/groovy-core/commit/77040982113e08175e0dfd19950fcb2fae177102#diff-5bfd9ab05363e18c9afd9d9076d341c8

      Here is a sample stacktrace:

      Failure: testGetLastTransactions(grails.plugins.pinpayments.PinPaymentsServiceTests)
      java.lang.NoSuchMethodError: groovy.xml.StreamingMarkupBuilder.bind(Ljava/lang/Object;)Ljava/lang/Object;
      at grails.plugins.rest.client.RequestCustomizer.xml(RequestCustomizer.groovy:259)
      at grails.plugins.pinpayments.PinPaymentsService$_createSubscriber_closure1.doCall(PinPaymentsService.groovy:38)
      at grails.plugins.rest.client.RestBuilder.doRequestInternal(RestBuilder.groovy:269)
      at grails.plugins.rest.client.RestBuilder.doRequestInternal(RestBuilder.groovy:261)
      at grails.plugins.rest.client.RestBuilder.post(RestBuilder.groovy:147)
      at grails.plugins.pinpayments.PinPaymentsService.createSubscriber(PinPaymentsService.groovy:36)
      at grails.plugins.pinpayments.PinPaymentsServiceTests.testGetLastTransactions(PinPaymentsServiceTests.groovy:204)
      at junit.framework.TestCase.runTest(TestCase.java:176)
      at junit.framework.TestCase.runBare(TestCase.java:141)
      at junit.framework.TestResult$1.protect(TestResult.java:122)
      at junit.framework.TestResult.runProtected(TestResult.java:142)
      at junit.framework.TestResult.run(TestResult.java:125)
      at junit.framework.TestCase.run(TestCase.java:129)
      at junit.framework.TestSuite.runTest(TestSuite.java:255)
      at junit.framework.TestSuite.run(TestSuite.java:250)

      Attachments

        Activity

          People

            melix Cédric Champeau
            kaaloo Luis Arias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: