[
https://issues.apache.org/jira/browse/TUSCANY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731451#action_12731451
]
Simon Laws commented on TUSCANY-3140:
-------------------------------------
It's difficult to know how to approach this one. The problem is that component
types are constructed and the Tuscany runtime model is obviously set up before
the runtime is started. If different class loaders are used to introspect the
model compared to the ones used at runtime to build messages that are intended
to pass across the Tuscany wires then there will be problems. The Tuscany
runtime won't be able to equate the types of the messages with the types that
have been used to describe the interfaces in the Tuscany model.
I can't think of a neat way of locating the runtime classes for references. The
fix I have that might work for you is to replace the interface on the wire with
the interface passed in when a reference is requested. This at least has a
chance of setting up the wire interfaces correctly before the wire chains are
created and the databinding interceptors are put in place.
I hope to attach a patch here shortly based on the 1.5.1 code base. I'll ask
you to give it a spin and let me know how it goes. If it's successful I could
potentially get it into 1.5.1
> Implementation.jee: The interface bound to the Runtimewire is not loaded with
> the class loader from implementation
> ------------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3140
> URL: https://issues.apache.org/jira/browse/TUSCANY-3140
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Misc Implementation Extensions
> Affects Versions: Java-SCA-1.5
> Reporter: Anbu Ponniah
> Assignee: Simon Laws
>
> In external EAR scenario, the class loader used to resolve interface
> contracts on references is different from the run time class loader used to
> create the reference proxies. This causes "argument type mismatch" errors in
> data binding layer when custom data types are used as arguments in the
> referred service.
> Example scenario:
> An JavaEE application with a EJB session bean using a reference to an SCA
> service (via reference injection). The SCA service operation receives a Jaxb
> generated class as its input argument.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.