You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Michael Laccetti <mi...@laccetti.com> on 2009/08/10 22:51:20 UTC

Service not found

I've been banging my head against the wall all day, so I figured I'd go to the source.  I am trying to port an old WebLogic specific web service to Tuscany.  When I try to run the composite I keep getting the following: "WARNING: Service not found for component service: Component = OdfImplementation Service = ODF".  Perhaps somebody can see what I am missing?  I've paste-binned the implementation stuff here: http://papernapkin.org/pastebin/view/6053/

Nothing too crazy, I thought, and yet I cannot run it.  I've created a test composite using a very similar setup, and it worked without any problems, so I'm pretty baffled.

Michael

Re: Service not found

Posted by Mike Edwards <mi...@gmail.com>.
Michael,

Michael Laccetti wrote:
> I've been banging my head against the wall all day, so I figured I'd go to the source.  I am trying to port an old WebLogic specific web service to Tuscany.  When I try to run the composite I keep getting the following: "WARNING: Service not found for component service: Component = OdfImplementation Service = ODF".  Perhaps somebody can see what I am missing?  I've paste-binned the implementation stuff here: http://papernapkin.org/pastebin/view/6053/
> 
> Nothing too crazy, I thought, and yet I cannot run it.  I've created a test composite using a very similar setup, and it worked without any problems, so I'm pretty baffled.
> 
> Michael

I've taken a look at your artifacts, and I think that the problem is the name of the service in your 
component.

The <component/> in your composite file calls the service "ODF".

Your implementation class implements the OdfWebService interface, which in turn is marked 
@Remotable.  There is no @Service annotation on the implementation class.  With this configuration, 
the implementation class is introspected as providing a single service with the interface defined by 
the OdfWebService interface and the NAME of the service is made the same as the name of the 
interface - i.e. OdfWebService.

The error message you are getting is saying that the component <service/> does not have a matching 
service in the implementation - they don't match because the names are different.

The simplest change is to use <service name="OdfWebService"> in the component declaration.


Hope this gets things working.


Yours,  Mike.

Re: Service not found

Posted by Simon Nash <na...@apache.org>.
Michael Laccetti wrote:
> Okay, that got it up and running - I was wondering where that is documented - I've been reading the Tuscany in Action MEAP and the online docs, but didn't seem to stumble across that (important) tidbit.
> ________________________________________
> From: Simon Nash [nash@apache.org]
> Sent: August-10-09 5:16 PM
> To: user@tuscany.apache.org
> Subject: Re: Service not found
> 
> Hi Michael,
> The name of your service in the component definition should
> be OdfWebService (the unqualified name of the Java interface),
> not ODF.
> 
>    Simon
> 
> 
Hi Michael,
Sections 2.2.1 and 2.2.3 of the Tuscany in Action MEAP talk about
service naming but not in quite as clear and direct a way as they
could.  The missing pieces are 1) the naming rules when there is
no @Service annotation, and 2) the importance of using the same
names in the component definition as are used in the implementation
and the component type.  We will address this in the next draft.

The other place you should be able to find this information is in
the osoa.org SCA specs.  For the case with @Service specified, the
naming rule is stated in section 1.8.17 of the Java Common Annotations
and APIs spec, with some examples in section 1.2.1.1 of the Java
Component Implementation spec.  However, I don't think either of
these specs say what name is used when @Service isn't present.
This omission is corrected in the OASIS version of the Java Component
Implementation spec (see section 8.1).

   Simon


RE: Service not found

Posted by Michael Laccetti <mi...@laccetti.com>.
Okay, that got it up and running - I was wondering where that is documented - I've been reading the Tuscany in Action MEAP and the online docs, but didn't seem to stumble across that (important) tidbit.
________________________________________
From: Simon Nash [nash@apache.org]
Sent: August-10-09 5:16 PM
To: user@tuscany.apache.org
Subject: Re: Service not found

Hi Michael,
The name of your service in the component definition should
be OdfWebService (the unqualified name of the Java interface),
not ODF.

   Simon


Re: Service not found

Posted by Simon Nash <na...@apache.org>.
Michael Laccetti wrote:
> I've been banging my head against the wall all day, so I figured I'd go to the source.  I am trying to port an old WebLogic specific web service to Tuscany.  When I try to run the composite I keep getting the following: "WARNING: Service not found for component service: Component = OdfImplementation Service = ODF".  Perhaps somebody can see what I am missing?  I've paste-binned the implementation stuff here: http://papernapkin.org/pastebin/view/6053/
> 
> Nothing too crazy, I thought, and yet I cannot run it.  I've created a test composite using a very similar setup, and it worked without any problems, so I'm pretty baffled.
> 
> Michael
> 
Hi Michael,
The name of your service in the component definition should
be OdfWebService (the unqualified name of the Java interface),
not ODF.

   Simon