4 Replies Latest reply on Dec 19, 2013 5:53 AM by jwe@livecycle

    Livecycle remote Functions Parameter ArrayList (Correspondence Management))

    jwe@livecycle

      Hi guys,

       

      I'm working on a custom remote function used by Correspondence Management. The implementation/interface class looks like the following:

       

      import com.adobe.exm.expeval.ServiceMethod;

      import java.util.ArrayList;

       

      interface EXMService {

          @ServiceMethod

          abstract String testString(String content);

         

          @ServiceMethod

          abstract String testList(ArrayList list);

      }

       

      import com.adobe.exm.expeval.ServiceMethod;

      import java.util.ArrayList;

       

      public class EXMServiceImpl implements EXMService {

          @ServiceMethod(enabled = true, displayName = "testFunc1", description = "works fine")

          public String testString(String content) {

              return "works";

          }

         

          @ServiceMethod(enabled = true, displayName = "testFunc2", description = "doesnt work")

          public String testList(ArrayList list) {           

              return "works";

          }

      }

       

      As soon as I install the bundle and try to get a list of all installed/available custom remote services (correspondence interface), I get an empty list and the following exception:

       

      13.12.2013 12:22:44.998 *INFO* DS.Message.Remoting.Sling Service started for remote invocation: ServiceInfoImpl{reference=[com.adobe.livecycle.content.test.EXMService], destinationId='test', started=true}

      13.12.2013 12:23:00.957 *ERROR* DS.Message.Remoting Error processing remote invocation: java.lang.IllegalArgumentException: Unsupported type java.util.ArrayList

        incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)

          operation = listServices

          clientId = 6FEEEB2B-EED0-4CBE-992A-01FC6425A3A1

          destination = lc.exm.functionService

          messageId = ED6A005A-1542-8A30-E923-EBB201BCEEE7

          timestamp = 1386933780957

          timeToLive = 0

          body =

          [

            null

          ]

          hdr(DSId) = D5AE6DA2-2225-4358-A7A7-B189E6A3DEF5

          hdr(DSEndpoint) = my-amf

      java.lang.IllegalArgumentException: Unsupported type java.util.ArrayList

      at com.adobe.exm.expeval.fn.MethodUtils.getType(MethodUtils.java:40)

      at com.adobe.exm.expeval.fn.FunctionServiceImpl.toFunctionParameterVO(FunctionServiceImpl.ja va:105)

      at com.adobe.exm.expeval.fn.FunctionServiceImpl.toFunctionVO(FunctionServiceImpl.java:150)

      at com.adobe.exm.expeval.fn.FunctionServiceImpl.listServices(FunctionServiceImpl.java:164)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:606)

      at flex.messaging.services.remoting.adapters.JavaAdapter.invoke(JavaAdapter.java:404)

      at flex.messaging.services.RemotingService.serviceMessage(RemotingService.java:183)

      at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1465)

      at flex.messaging.AsyncMessageBroker.filteredRouteMessageToService(AsyncMessageBroker.java:5 64)

      at flex.messaging.filters.SyncMessageFilterChain$MessageFilterContext.filterRequest(SyncMess ageFilterChain.java:219)

      at com.adobe.dataservices.impl.DelegatingSyncFilter$DelegatingMessageFilterContext.filterReq uest(DelegatingSyncFilter.java:95)

      at com.adobe.dataservices.impl.DelegatingSyncFilter$DelegatingMessageFilterContext.processRe quest(DelegatingSyncFilter.java:83)

      at com.adobe.dataservices.impl.DelegatingSyncFilter.filterRequest(DelegatingSyncFilter.java: 62)

      at flex.messaging.filters.SyncMessageFilterChain$MessageFilterContext.filterRequest(SyncMess ageFilterChain.java:215)

      at flex.messaging.filters.SyncMessageFilterChain$MessageFilterContext.processRequest(SyncMes sageFilterChain.java:201)

      at flex.messaging.filters.SyncMessageFilterChain.filterRequest(SyncMessageFilterChain.java:1 39)

      at flex.messaging.AsyncMessageBroker.routeMessageToService(AsyncMessageBroker.java:554)

      at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:1041)

      at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:103)

      at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)

      at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)

      at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)

      at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:192)

      at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:330)

      at com.adobe.dataservices.impl.ApplicationManagerImpl.service(ApplicationManagerImpl.java:67 3)

      at org.apache.jsp.libs.dataservices.components.messagebroker.POST_jsp._jspService(POST_jsp.j ava:98)

      at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:502)

      at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:449)

      at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :241)

      at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:86)

      at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:441)

      at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361)

      at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:171)

      at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 63)

      at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:508)

      at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

      at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:148)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:333 )

      at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:160)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:254)

      at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChai n.java:49)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

      at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:290)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.content.appcontext.impl.AppContextFilter.doFilter(AppContextFilter.ja va:58)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.content.sling.impl.ResourceResolverFilter.doFilter(ResourceResolverFi lter.java:34)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.crx.security.SpringSecurityBridgeFilter.doFilter(SpringSecurityBridge Filter.java:65)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.process.reporting.servlet.filter.ProcessReportingResourceResolverFilt er.doFilter(ProcessReportingResourceResolverFilter.java:70)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.lccomponent.util.LcComponentResourceResolverFilter.doFilter(LcCompone ntResourceResolverFilter.java:54)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.adobe.livecycle.dsc.clientsdk.internal.ResourceResolverHolderFilter.doFilter(Resource ResolverHolderFilter.java:37)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgre ssTrackerLogFilter.java:59)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.j ava:220)

      at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

      at com.day.cq.theme.impl.ThemeRe...

       

       

       

      Without the method testList everything works fine.

       

      Any Hint?

       

      Thx in advance

       

      jwe