Hi,
I've been mostly using another thread for issues and questions concerning
running Tuscany/SCA on Android. Some progress has been made and a new thread
was needed.
Recently, Adriano reported some errors while testing changes to the android
sandbox and revision 674723 [1]. There was also a suggestion from Luciano to
look into calculator2 for coming up with a minimal set of modules necessary
to run calculator-android. I took the list of modules from the
tuscany-runtime2 and tuscany-api JARs of the revision that included
calculator2, and augmented it based on dependencies from revision 643746,
which was a previous revision, until the point in which I received the same
errors [2] that Adriano had reported. These errors result in the
RuntimeException shown below:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{calculator.android/calculator.android.CalculatorClient}:
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
Seeing this error the first question that came to mind was: how do I verify
whether the composite containing the service is being loaded? and, does it
actually exist? I was thinking that maybe the composite was not being
created and thus was resulting in the errors in [3]. To test this I changed
the first line of "calculator_composite" to read as follows:
<composite name="Calculator" autowire="true">
Setting the autowire attribute to true would make the runtime automatically
connect services and references in the composite, granted there actually was
one. This resulted in the error shown in [4] and included in more detail in
[5]. The fact that the runtime wires are being created makes me think that a
composite does exist, as documented in [6]. However, the error messages
confuse me and make me think otherwise, especially the one shown below:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{calculator.android/calculator.android.CalculatorClient}:
org.osoa.sca.ServiceRuntimeException:
org.osoa.sca.ServiceRuntimeException: Composite not found:
dex://calculator.android/raw/calculator.composite
Any suggestions or ideas from the Tuscany community to resolve this problem
will be greatly appreciated. As Adriano mentioned in the previous thread, we
have a feeling we're getting closer to successfully embedding Tuscany/SCA in
Android.
[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://androidindelft.googlepages.com/22Jul1.jpg
[5]
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/22Jul2008+-+Error+Stack+trace
[6]
http://tuscany.apache.org/sca-java-architecture-guide.html#SCAJavaArchitectureGuide-CompositeActivation
--
best,
-oscar
Oscar CastaƱeda