On Mon, 28 Jan 2013 07:53:52 -0200, llama-king <p.hv...@albourne.com> wrote:

Sorry to dig up an old thread but seems I'm experiencing precisely the same issue. Running on 5.3.6, injecting a service, calling method in service that takes varargs.

Any ideas what might be the cause?

This doesn't look like it's related to varargs at all.


java.lang.LinkageError: loader constraint violation: when resolving method
"com.albourne.web.services.AjaxRenderHelper.render([Lorg/apache/tapestry5/corelib/components/Zone;)V"
the class loader (instance of
org/apache/tapestry5/internal/plastic/PlasticClassLoader) of the current
class, com/albourne/web/components/hf/risk/ListingConditionNew, and the
class loader (instance of runjettyrun/ProjectClassLoader) for resolved
class, com/albourne/web/services/AjaxRenderHelper, have different Class
objects for the type apestry5/corelib/components/Zone;)V used in the
signature

You seem to be receiving an instance of a page or component or mixin in a service. Never do that. As Tapestry changes that classes in a different classpath when they're loaded, non-transformed classes (like your service) only see the original, non-transformed page, component or mixin.

The solution is to create an interface, make the page, component or mixin implement it and then use the new interface as the parameter in your service.

--
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to