Hi,
      I found a solution for resolving the warnings and with the solution I
run the example properly.

      My solution:
      I changed two files, BillServiceComposite.composite, and
RestaurantComposite.composite (see them at last part).
      The basic problem was that the Composite have the following service
              (*1) <sca:service name="BillService"
promote="BillServiceComponent/BillService"/>
      in where , I think that promoting was enough (please correct me if it
is wrong), because in BillServiceComponent is defined:
              <sca:service name="BillService">
                  <sca:interface.java
interface="restaurant_implemcomposite.api.BillService"/>
              </sca:service>

      Mi solution was redefine sca:service (*1) tag as follows:
             <sca:service name="BillService"
promote="BillServiceComponent/BillService">
                   <sca:interface.java
interface="restaurant_implemcomposite.api.BillService"/>
             </sca:service>

      In RestaurantComposite I redefine:
           <sca:service name="RestaurantService"
promote="RestaurantServiceComponent/RestaurantService"/>
      for:
           <sca:service name="RestaurantService"
promote="RestaurantServiceComponent/RestaurantService">
                 <sca:interface.java
interface="restaurant_implemcomposite.api.RestaurantService"/>
             </sca:service>

       With this changes the project works correctly.

       Someone in this mail list, can tell me if it is nonexistent
functionally in Tuscany 1.4 version or is my interpretation error of OSOA
specification?  have Any suggestion?

       Thanks,

                      Sebastián.





2009/4/23 Sebastián Groh <[email protected]>

> Hi Vincent,
>                     thanks for your help, I installed SCA Tools from
> http://download.eclipse.org/stp/sca/last/ and works fine, good work!
>
> Now I tried with one of the examples that is in  File -> New -> Example
> (SCA Examples), more precisely
> Restaurant - Composite. The right diagram shows how all components works
> together. In SCA Perspective I opened RestaurantComposite.composite_diagram
> and I saw the nice picture, but when I Run the example (over the class Test
> running it as Java Application or Over the Composite RestaurantComposite
> running it as SCA Application) I have the the exception:
> .
> .
> .
> WARNING: Component implementation not found: Component =
> BillServiceComposite Uri = null
> 23/04/2009 19:08:00
> org.apache.tuscany.sca.assembly.builder.impl.ComponentConfigurationBuilderImpl
> WARNING: Service not found for component service: Component =
> BillServiceComposite Service = BillService
> 23/04/2009 19:08:00
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: Component implementation not found: Component =
> BillServiceComposite Uri = null
> 23/04/2009 19:08:00
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBindingURIBuilderImpl
> WARNING: Service not found for component service: Component =
> BillServiceComposite Service = BillService
> java.lang.reflect.InvocationTargetException
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(Method.java:585)
>     at
> org.eclipse.stp.sca.deployment.mains.TuscanyMain1x.main(TuscanyMain1x.java:34)
> Caused by: org.osoa.sca.ServiceRuntimeException:
> java.lang.NullPointerException
>     at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:171)
>     at
> org.apache.tuscany.sca.node.impl.NodeFactoryImpl.createSCANodeFromClassLoader(NodeFactoryImpl.java:37)
>     at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:175)
>     at
> org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:97)
>     at
> org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:182)
>     at
> org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:63)
>     ... 5 more
> Caused by: java.lang.NullPointerException
>     at
> org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl.checkCompatibility(InterfaceContractMapperImpl.java:155)
>     at
> org.apache.tuscany.sca.interfacedef.impl.InterfaceContractMapperImpl.isCompatible(InterfaceContractMapperImpl.java:271)
>     at
> org.apache.tuscany.sca.assembly.builder.impl.BaseWireBuilderImpl.connectWires(BaseWireBuilderImpl.java:940)
>     at
> org.apache.tuscany.sca.assembly.builder.impl.BaseWireBuilderImpl.wireComponentReferences(BaseWireBuilderImpl.java:112)
>     at
> org.apache.tuscany.sca.assembly.builder.impl.ComponentReferenceWireBuilderImpl.build(ComponentReferenceWireBuilderImpl.java:42)
>     at
> org.apache.tuscany.sca.assembly.builder.impl.CompositeBuilderImpl.build(CompositeBuilderImpl.java:207)
>     at
> org.apache.tuscany.sca.node.impl.RuntimeBootStrapper.buildComposite(RuntimeBootStrapper.java:244)
>     at
> org.apache.tuscany.sca.node.impl.NodeImpl.configureNode(NodeImpl.java:572)
>     at org.apache.tuscany.sca.node.impl.NodeImpl.<init>(NodeImpl.java:167)
>     ... 10 more
>
> What I'm doing wrong? I always get the following:
> WARNING: Component implementation not found: Component =
> BillServiceComposite Uri = null.
>
> Is this example working? If exist any web or tutorial explaining this
> basics thing I'll apreciate it!
>
> Thanks for your help,
> Regards,
>                  Sebastián
>
>
>
>
> On Thu, Apr 23, 2009 at 11:50 AM, Vincent Zurczak <
> [email protected]> wrote:
>
>>  Hi Natasha, Sebastian.
>>
>> FYI, the last build version of SCA Tools is available here :
>> http://download.eclipse.org/stp/sca/last/
>> It is not the official Eclipse update site. This is the address where we
>> regularly release custom builds of the SCA tools.
>>
>>
>> Natasha Prokoshyna a écrit :
>>
>>  Have you tried to install the Tuscany Eclipse Plugin in Eclipse
>> Ganymede ? Eclipse should use their old install and still be able to
>> install it....
>>
>> If during install you get issues complaining about a jar, try to
>> install from a mirror (see TUSCANY-2866)
>>
>> [1] https://issues.apache.org/jira/browse/TUSCANY-2866
>>
>>  Yes, I previously tried to install from the old update and got jar errors. 
>> Using the new mirror link you provided still gets jar errors. [2
>>
>>
>>
>> Natasha, about model transformations, SCA Tools (again, sorry for the
>> invasion) embeds an EMF meta-model of SCA for Tuscany [0].
>> The last supported version is the 1.4 [1].
>>
>> One solution might be to transform your UML to an instance of this
>> meta-model.
>> And we are currently working on the generation of Java code skeleton of an
>> SCA application from a composite.
>> As an example, if you create a complete composite, writing the name of the
>> classes and so on (e.g. with the SCA Designer), you could then generate the
>> code of the interfaces and the implementations, with the right properties
>> and references in the code.
>> You would then just have to define the operations / methods in the Java
>> interfaces and implement them in the implementation classes.
>>
>> Regards,
>>
>>                    Vincent Zurczak.
>>
>>
>>
>> [0] : http://wiki.eclipse.org/STP/SCA_Component/SCA_Composite_Meta_Model
>> [1] : https://bugs.eclipse.org/bugs/show_bug.cgi?id=261222
>>
>> --
>> Vincent Zurczak
>> EBM WebSourcing
>> +33 (0) 4 38 12 16 77
>>
>>
>

Reply via email to