4 Replies Latest reply on Jul 15, 2013 7:07 AM by crinaldi

    CodeGen error with @InterceptedCall on methods with primitive or boxed @PathParams

    crinaldi Newbie



      I get the followin error when compiling a service interface annotated with @InterceptedCall:


      [INFO]    Computing all possible rebind results for 'org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader'


      [INFO]       Rebinding org.jboss.errai.enterprise.client.jaxrs.JaxrsProxyLoader

      [INFO]          Invoking generator org.jboss.errai.enterprise.rebind.JaxrsProxyLoaderGenerator

      [INFO]             [ERROR] Error generating JAX-RS extensions

      [INFO] org.jboss.errai.codegen.exception.InvalidTypeException: java.lang.String is not assignable from java.lang.Long

      [INFO] in method call: com.google.gwt.http.client.URL.encodePathSegment([java.lang.String])

      [INFO]           at org.jboss.errai.codegen.util.GenUtil.assertAssignableTypes(GenUtil.java:170)




      I'm working with JAX-RS and Jackson marshalling. My intercepted method looks simple:






      User findUserById(@PathParam("id") Long id);

      // The Interceptor


      public class SecurityInterceptor implements RestClientInterceptor { ... }



      The extrange fact, is that if I try to intercept a method with a @Portable parameter, it doesn't fails:






      void updateUser(User user);


      Is this an errai bug?

      Thanks in advance.