Great Oscar, it seems we really are making some progress : )

I was trying the same approach here, using the modules from rev 643746, but
I got some errors when trying to use only the SCA modules set used by the
calc2. The modules from revision 643746 requires some extra modules as
tuscany-node, tuscany-node-api, tuscany-domain, etc...Was it necessary to
change some code to get no errors using only the modules from rev 643746? If
the answer is yes, please, create a JIRA and send a patch to us : )

About the exception, I think it's a good idea to open a new thread just
about it...it's probably a very common exception, otherwise it would not be
so detailed. When creating a new thread you will call the attention of the
entire community and they will probably tell where is our mistake.

Regards,
Adriano Crestani

On Mon, Jul 21, 2008 at 3:33 PM, Oscar Castaneda <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> These last few days I've been looking into calculator2, as suggested by
> Luciano. I took a list of necessary modules that Adriano sent me from the
> calculator2 jars and augmented it until the point in which I received the
> same error stack trace [1] that he reported in this thread. I am now getting
> the same errors on the Android Emulator [2] and have posted the error stack
> trace in [3]. An excerpt of this trace is included below and a couple of
> questions follow it afterwards.
>
> ERROR/AndroidRuntime(2255): Caused by: 
> org.osoa.sca.ServiceUnavailableException: Service not found for component 
> CalculatorServiceComponent reference setAddService (bindingURI=null 
> operation=add). Ensure that the composite containing the service is loaded 
> and started somewhere in the SCA domain and that if running in a remote node 
> that the interface of the target service marked as @Remotable
>
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingProvider.createInvoker(RuntimeSCAReferenceBindingProvider.java:247)
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addReferenceBindingInterceptor(RuntimeWireImpl.java:228)
>
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationChains(RuntimeWireImpl.java:167)
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationChains(RuntimeWireImpl.java:109)
>
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvocationChain(JDKInvocationHandler.java:243)
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:148)
>
> ERROR/AndroidRuntime(2255):     at $Proxy2.add(Native Method)
> ERROR/AndroidRuntime(2255):     at 
> calculator.CalculatorServiceImpl.add(CalculatorServiceImpl.java:55)
> ERROR/AndroidRuntime(2255):     at 
> java.lang.reflect.Method.invokeNative(Native Method)
>
> ERROR/AndroidRuntime(2255):     at 
> java.lang.reflect.Method.invoke(Method.java:356)
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:109)
>
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:286)
>
> ERROR/AndroidRuntime(2255):     at 
> org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
> ERROR/AndroidRuntime(2255):     at $Proxy1.add(Native Method)
>
> How can I ensure that the composite containing the service is being loaded? 
> The full stack trace includes warnings for CompositeBuilderImpl not having 
> the appropriate component references. This makes me think that the composite 
> is not being created and thus results in the errors above. Am I missing 
> something? Suggestions are welcomed and appreciated.
> The resulting set of modules is based on the tuscany-runtime2 and tuscany-api 
> jars from revision 673092. In the context of this thread [4] in which 
> grouping and aggregating modules was discussed I am now a user looking to 
> embed Tuscany functionality in Android. The thread helped me to identify the 
> subset of Tuscany to port, it consists of the modules shown below:
>
> android-jdk-classes
> tuscany-assembly
> tuscany-assembly-xml
> tuscany-binding-sca
> tuscany-binding-sca-xml
> tuscany-contribution
> tuscany-contribution-impl
> tuscany-contribution-java
> tuscany-contribution-namespace
>
> tuscany-contribution-resource
> tuscany-contribution-xml
> tuscany-core
> tuscany-core-databinding
> tuscany-core-spi
> tuscany-databinding
> tuscany-databinding-jaxb
> tuscany-definitions
> tuscany-definitions-xml
>
> tuscany-domain
> tuscany-domain-api
> tuscany-extensibility
> tuscany-host-embedded
> tuscany-host-http
> tuscany-host-webapp
> tuscany-host-webapp-junit
> tuscany-implementation-java
> tuscany-implementation-java-runtime
>
> tuscany-implementation-java-xml
> tuscany-interface
> tuscany-interface-java
> tuscany-interface-java-jaxws
> tuscany-interface-java-xml
> tuscany-node
> tuscany-node-api
> tuscany-policy
> tuscany-policy-logging
>
> tuscany-policy-xml
> tuscany-sca-api
>
> [1]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/SCA+Android+Exception+after+revision+674723
> [2] http://androidindelft.googlepages.com/21Jul2.jpg
> [3]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/21Jul2008-2+-+Error+Stack+trace
> [4] http://www.mail-archive.com/[email protected]/msg00390.html
>
> On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <
> [EMAIL PROTECTED]> wrote:
>
>> Thanks Luciano, good suggestion...I will check this sample later ; )
>>
>> For now, I have commited some modifications I have done on the android
>> sandbox:
>>
>> - the code that uses the Java RMI API was commented
>>
>> - the code that uses the JWS API was also commented
>>
>> - the code that uses the Introspector.decapitalize() (Java Beans API)
>> method was replaced by the logic this method provides
>>
>> - It was also throwing a NPE when SCA tries to load the
>> TransformationExtensionPoint, so I loaded the
>> DefaultTransformationExtensionPoint programatically
>>
>> After this modifications, I had to add the core-databinding,
>> interface-java and inteface-java-jws modules to the android sandbox.
>>
>> I think we are almost there to get the SCA first-run on the Android
>> platform...for now we are getting this exception: [1]
>>
>> Adriano Crestani
>>
>> [1] -
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/SCA+Android+Exception+after+revision+674723
>>
>>
>>
>> On Mon, Jul 7, 2008 at 3:58 PM, Luciano Resende <[EMAIL PROTECTED]>
>> wrote:
>>
>>> Just my 2c, Did you guys see what Ant did with calculator2 ? That
>>> should give you some ideas on how to minimize the dependencies and
>>> only bring the bare minimun to run calculator app.
>>>
>>>
>
> --
> best,
> -oscar
>
> Oscar CastaƱeda
>

Reply via email to