hi, "lee zhenghui" <[EMAIL PROTECTED]> wrote on 08/23/2007 02:34:14 AM:
> hi, > My test case -- multiple serivces per component run into a familiar > issue like this: > Exception in thread "main" org.osoa.sca.ServiceRuntimeException: The > component doesn't have exactly one service > at > org.apache.tuscany.sca.core.component.ComponentContextHelper.getSingleService > (ComponentContextHelper.java:280) > at > org.apache.tuscany.sca.core.component.ComponentContextImpl.createSelfReference > (ComponentContextImpl.java:121) > at > org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.getServiceReference > (DefaultSCADomain.java:379) > at org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.getService > (DefaultSCADomain.java:323) > at tuscany.sample.sync.client.Client.main(Client.java:33) > > I opened a JIRA 1560 to trace this issue. I commented some possible fixed on this issue, at least what I found out and what solved the problems for me. Check out here: https://issues.apache.org/jira/browse/TUSCANY-1560 -Florian > On 8/23/07, Florian Rosenberg <[EMAIL PROTECTED]> wrote: > > > > > > I finally could fix it. I stepped through with the debugger and found out > > that the reference to the implemention in the RuntimeComponent was always > > null which indicated that my ArtifactProcessor was not loaded. > > > > I had the following code in the > > org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor: > > com.ibm.sca.implementation.splice.SpliceArtifactProcessor;type= > > http://www.osoa.org/xmlns/sca/1.0#implementation.splice,model=com. > ibm.sca.implementation.splice.SpliceImplementation > > > > but actually the "type=" is now "qname=". It works again. > > > > -Florian > > > > ----- Forwarded by Florian Rosenberg/Watson/IBM on 08/22/2007 10:16 PM > > ----- > > > > "Raymond Feng" <[EMAIL PROTECTED]> wrote on 08/22/2007 02:48:24 PM: > > > > > It seems that "implementation.splice" is not correctly handled. Do you > > have > > > the new implementation type registered with Tuscany? You probably need > > to > > > > > have following files: > > > > > > 1) > > > META-INF/services/org.apache.tuscany.sca.contribution.processor. > > > StAXArtifactProcessor > > > 2) > > > META-INF/services/org.apache.tuscany.sca.provider. > > > ImplementationProviderFactory > > > > > > Please refer to > > > https://svn.apache. > > > > > > > org/repos/asf/incubator/tuscany/java/sca/samples/implementation- > crud-extension > > > > > for an example. > > > > > > Thanks, > > > Raymond > > > > > > ----- Original Message ----- > > > From: "Florian Rosenberg" <[EMAIL PROTECTED]> > > > To: <[email protected]> > > > Sent: Wednesday, August 22, 2007 11:08 AM > > > Subject: Re: component type impl > > > > > > > > > > > > > > > > > > "Luciano Resende" <[EMAIL PROTECTED]> wrote on 08/22/2007 01:57:46 > > PM: > > > > > > > >> So, a quick explanation for this is that, recent changes made the > > > >> runtime behavior different. If you are doing getService("ABC"), you > > > >> need to make sure that the target component has only one service, > > > >> otherwise you should use getService("ABC/ServiceName"). Please see if > > > >> this helps in your case. > > > > > > > > thanks, but it does not help. I register my service internally using a > > > > JavaInterfaceContract in the implementation provider and it is the > > only > > > > service I have. > > > > > > > > either this code > > > > SpliceService spliceService = scaDomain.getService (SpliceService.class > > , > > > > "FeedAggregatorComponent/SpliceService"); > > > > > > > > nor the old version below without the /SpliceService work. > > > > > > > > Any other ideas? > > > > > > > > Thanks, > > > > -Florian > > > > > > > >> In my case, i had a bug where the composite wasn't finding the > > > >> components, and I was getting the same error message... > > > >> > > > >> > > > >> On 8/22/07, Florian Rosenberg <[EMAIL PROTECTED]> wrote: > > > >> > > > > >> > > > > >> > "Luciano Resende" <[EMAIL PROTECTED]> wrote on 08/22/2007 > > 01:14:45 > > > > PM: > > > >> > > > > >> > > This seems like a bug on latest SVN code, and I'm also seeing > > this > > > > for > > > >> > > other modules. Let me see if I can figure out what is causing > > this, > > > > as > > > >> > > it's affecting me as well. > > > >> > > > > >> > shall i open a jira issue for that?. > > > >> > > > > >> > -Florian > > > >> > > > > >> > > > > >> > > On 8/22/07, Florian Rosenberg <[EMAIL PROTECTED]> wrote: > > > >> > > > > > > >> > > > hi, > > > >> > > > > > > >> > > > I'm implementing a component type for running RESTful workflows > > (or > > > >> > > > compositions - whatever you wanna call it) within SCA. The > > > >> > implementation > > > >> > > > worked fine but since I updated to the latest SVN head today it > > get > > > > the > > > >> > > > following error message when running it. After some time of > > > > debugging I > > > >> > > > couldn't really figure out what the problem is. > > > >> > > > > > > >> > > > This is the composite file is like this (the location indicates > > the > > > >> > > > directory where to workflows are stored):) > > > >> > > > > > > >> > > > <component name="FeedAggregatorComponent"> > > > >> > > > <implementation.splice location="c:/somelocation/" ... " /> > > > >> > > > </component> > > > >> > > > > > > >> > > > Internally in the implementation calls, I register a service > > called > > > >> > > > SpliceService as JavaInterfaceContract which is the business > > > > interface > > > >> > for > > > >> > > > talking to my engine. In my test program I have to following: > > > >> > > > > > > >> > > > public static void main(String[] args) throws IOException { > > > >> > > > SCADomain scaDomain = SCADomain.newInstance > > > >> > ("FeedAggregator.composite" > > > >> > > > ); > > > >> > > > SpliceService spliceService = scaDomain.getService > > > >> > (SpliceService.class, > > > >> > > > "FeedAggregatorComponent"); > > > >> > > > > > > >> > > > spliceService.performReceive("samples/feeds3/"., > > "getFeeds", > > > >> > > > "sortSample3", "text/plain"); > > > >> > > > > > > >> > > > System.in.read(); > > > >> > > > scaDomain.close(); > > > >> > > > } > > > >> > > > > > > >> > > > The exception I receive is the following: > > > >> > > > ----------------------------------------- > > > >> > > > Aug 22, 2007 12:17:38 PM > > > >> > > > > > org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl$1 > > > >> > problem > > > >> > > > WARNING: [WARNING] No implementation for component: > > > >> > FeedAggregatorComponent > > > >> > > > null > > > >> > > > > > > >> > > > Exception in thread "main" org.osoa.sca.ServiceRuntimeException > > : > > > > The > > > >> > > > component doesn't have exactly one service > > > >> > > > at > > > >> > > > org.apache.tuscany.sca.core.component.ComponentContextImpl. > > > >> > > createSelfReference > > > >> > > > ( > > > >> > > > ComponentContextImpl.java:135) > > > >> > > > at > > > >> > > > org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain. > > > >> > > getServiceReference > > > >> > > > ( > > > >> > > > DefaultSCADomain.java:377) > > > >> > > > at > > > >> > > > > > > > org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.getService( > > > >> > > > DefaultSCADomain.java:321) > > > >> > > > at com.ibm.sca.implementation.splice.SpliceScaTester.main > > ( > > > >> > > > SpliceScaTester.java:17) > > > >> > > > > > > >> > > > > > > >> > > > Any pointer are appreciated. > > > >> > > > > > > >> > > > Thanks, > > > >> > > > -Florian > > > >> > > > > > > >> > > > > > > >> > > > > > > > --------------------------------------------------------------------- > > > >> > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > >> > > > > > > >> > > > > > > >> > > > > > >> > > > > > >> > > -- > > > >> > > Luciano Resende > > > >> > > Apache Tuscany Committer > > > >> > > http://people.apache.org/~lresende > > > >> > > http://lresende.blogspot.com/ > > > >> > > > > > >> > > > > --------------------------------------------------------------------- > > > >> > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> > > For additional commands, e-mail: [EMAIL PROTECTED] > > > >> > > > > > >> > > > > >> > > > > >> > > > --------------------------------------------------------------------- > > > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> > For additional commands, e-mail: [EMAIL PROTECTED] > > > >> > > > > >> > > > > >> > > > >> > > > >> -- > > > >> Luciano Resende > > > >> Apache Tuscany Committer > > > >> http://people.apache.org/~lresende > > > >> http://lresende.blogspot.com/ > > > >> > > > >> --------------------------------------------------------------------- > > > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > > > >> For additional commands, e-mail: [EMAIL PROTECTED] > > > >> > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Thanks & Best Wishes > ----------------------------------- > Zhenghui Li(李正辉)
