Jim Marino wrote:
I think this may be related to the wrong interface type being loaded
in the proxy factory. Sebastien, could you take a quick look at this?
Jim
On Mar 8, 2006, at 8:28 AM, Jim Marino (JIRA) wrote:
[
http://issues.apache.org/jira/browse/TUSCANY-75?page=comments#action_12369489
]
Jim Marino commented on TUSCANY-75:
-----------------------------------
I noticed the wrong business interfaceis being set on
HelloWorldServiceComponent (it is the impl class). I set a
breakpoint at JDKProxyFactory line 81 to see this. I need to do
something else for about an hour but I can look at it a bit after. In
the meantime, if someone wants to take a look that would be great.
Hellowordwsclient fails
-----------------------
Key: TUSCANY-75
URL: http://issues.apache.org/jira/browse/TUSCANY-75
Project: Tuscany
Type: Bug
Components: Java SCA Core
Environment: WinXp
URL: https://svn.apache.org/repos/asf/incubator/tuscany/java
Last Changed Rev: 384161
Last Changed Date: 2006-03-08 04:03:21 -0500 (Wed, 08 Mar 2006)
Reporter: Rick Rineholt
Priority: Blocker
Helloworldwsclient fails and so does it's associate testing\tomcat
\helloworldws
Exception in thread "main" java.lang.IllegalArgumentException
at
sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
at java.lang.reflect.Field.set(Field.java:656)
at
org.apache.tuscany.core.injection.FieldInjector.inject(FieldInjector.java:40)
at
org.apache.tuscany.core.injection.PojoObjectFactory.getInstance(PojoObjectFactory.java:64)
at
org.apache.tuscany.container.java.context.JavaComponentContext.getInstance(JavaComponentContext.java:113)
at
org.apache.tuscany.core.context.impl.AggregateContextImpl.locateService(AggregateContextImpl.java:98)
at
org.apache.tuscany.samples.helloworldwsclient.HelloWorldClient.main(HelloWorldClient.java:42)
Test failing line HelloWorldService helloworldService =
(HelloWorldService)
moduleContext.locateService("HelloWorldServiceComponent");
It looks like on FieldInjector line 40 objectFactory is
NullMonitorFactory ... this seems to be off?
--This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
Jim,
It looks like the runtime is trying to inject an instance of
HelloWorldServiceImpl into a reference field expecting an instance of
HelloWorldService. The HelloWorldServiceImpl interface is generated from
the WSDL portType declared on the external Web Service. This scenario
was working yesterday so I'm thinking that the problem may be caused by
some very recent changes in container.java or core maybe?
I think that this kind of scenario should work (independent of the fact
that you're using WSDL and/or Java interfaces):
- a component has a reference requiring an instance of an interface X
- the reference is wired to a service exposing an interface Y
- X and Y are not identical, but they are compatible (Y is a superset of
the methods on X)
- the component should be injected with an instance of interface X
The bug here is that our wiring builder+resolution algorithm injects
into the component an instance of Y instead of X. Jim, does that ring a
bell? are we making sure that the correct interface specified on the
reference is used to configure the proxy factory?
--
Jean-Sebastien