groovy
  1. groovy
  2. GROOVY-3500

Exception running integration tests against service classes that return generics

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Incomplete
    • Affects Version/s: 1.6, 1.6.1, 1.5.8, 1.6.2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OSX, JDK 1.5
    • Number of attachments :
      0

      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.

        Issue Links

          Activity

          Hide
          Graeme Rocher added a comment -

          Grails already uses the joint compiler. This seems to be a Groovy issue

          Show
          Graeme Rocher added a comment - Grails already uses the joint compiler. This seems to be a Groovy issue
          Hide
          blackdrag blackdrag added a comment -

          there is not enough information to reproduce the issue

          Show
          blackdrag blackdrag added a comment - there is not enough information to reproduce the issue

            People

            • Assignee:
              blackdrag blackdrag
              Reporter:
              Chris Chen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: