2 Replies Latest reply on Sep 14, 2010 3:53 AM by Balaji Sridhar

    Class contains overloaded method and is not supported for introspection

    Sebastien Arbogast

      Sorry to crosspost this as I already posted this question in Flex forum (http://forums.adobe.com/message/2974245#2974245) but I didn't get any answer there so I'm hoping I'll have more luck here as it is more of a Flash Builder issue.

       

      I'm having some trouble with Flash Builder's Data Connectivity  wizard. I'm trying to generate service stubs for a Grails application.  It's Groovy code so it ends up being compiled into pure Java byte code.  I've got flex.rds.server.servlet.FrontEndServlet running fine and when I  click "Connect to Data/Service...", choose BlazeDS and hit next, I can  see my service in the list. But then when I hit "Finish", I get an error  message saying "com.epseelon.grails.blazeds.EchoService contains  overloaded method and is not supported for introspection".

       

      Yet when I  decompile the class, here is my service class:

       

      package org.epseelon.grails.blazeds.test;

       

      import groovy.lang.GroovyObject;

       

      import groovy.lang.MetaClass;

       

      import org.codehaus.groovy.runtime.ScriptBytecodeAdapter;

       

      import org.codehaus.groovy.runtime.callsite.CallSite;

       

      public class EchoService

       

        implements GroovyObject

       

      {

       

        private static Object transactional;

       

        private static Object expose;

       

        public EchoService()

       

        {

       

          EchoService this;

       

          CallSite[] arrayOfCallSite = $getCallSiteArray();

       

          MetaClass tmp12_9 = $getStaticMetaClass(); this.metaClass = ((MetaClass)ScriptBytecodeAdapter.castToType(tmp12_9, $get$$class$groovy$lang$MetaClass())); tmp12_9;

       

        }

       

        public String echo(String message)


        {
          CallSite[] arrayOfCallSite = $getCallSiteArray(); return (String)ScriptBytecodeAdapter.castToType(arrayOfCallSite[0].call(message), $get$$class$java$lang$String());
        }

       

        static
        {
           tmp10_7 = new Long(0L); __timeStamp__239_neverHappen1279144719333 = (Long)tmp10_7; tmp10_7;
           tmp28_25 = new Long(1279144719333L); __timeStamp = (Long)tmp28_25; tmp28_25; (EchoService.transactional = Boolean.TRUE); (EchoService.expose = ScriptBytecodeAdapter.createList(new Object[] { "blazeds" })); return;
        }

       

        public static Object getTransactional()
        {
          return transactional;
        }

       

        public static void setTransactional(Object paramObject)
        {
          transactional = paramObject;
        }

       

        public static Object getExpose()
        {
          return expose;
        }

       

        public static void setExpose(Object paramObject)
        {
          expose = paramObject;
        }
      }

       

      Note that I cannot really change a lot in this class as it's compiled from Groovy based on the following source:

       

      package org.epseelon.grails.blazeds.test

       

      class EchoService {

       

          static transactional = true

       

          static expose = ["blazeds"]

       

          String echo(String message) {
              return message.reverse()
          }
      }

       

      Why is Flash Builder's introspector so restrictive? Why can't it just  ignore the parts it doesn't know how to deal with? Is there any workaround for this?

       

      Note that I'm using Flash Builder 4.0.1.