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

Exception running integration tests against service classes that return generics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 1.6, 1.6.1, 1.5.8, 1.6.2
    • None
    • None
    • None
    • Mac OSX, JDK 1.5

    Description

      Going through the upgrade from 1.0.3 to 1.1RC2, my integration tests are failing. It won't compile at all. The exception I receive is the following:

      java.lang.TypeNotPresentException: Type INode not present
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50)

      Upon doing some searching online, I found a Groovy-related issue to this:

      http://jira.codehaus.org/browse/GROOVY-3157

      At this point, I looked into my service classes. My service classes implement GWT service interfaces and then implements the methods as standard java methods (ie. no groovy "def" terms). For example:

      class MyService implements MyGWTService {
        public Map<Item, ItemValue> getItemValues() {
        }
      }
      

      Item and ItemValue classes are located in src/java.

      This compiled and tested fine under Grails 1.0.3.

      Based on what the above Groovy issue says, it could possibly be an issue with the joint compilation when running "grails test-app". Grails test-app is might not be doing a joint compiling which includes the src/java source files.

      My current workaround is to redefine all my service methods to use the "def". This is ok, but since Groovy 1.6 support true generics, Grails should take the opportunity to become fully generics-capable.

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              ckchris Chris Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: