You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Adriano Crestani <ad...@apache.org> on 2008/03/14 22:13:32 UTC

Running Tuscany/SCA in Google Android mobile platform

Hi,

Luciano and me have been trying to run the SCA calculator sample on the
Google Android platform, that is a platform for mobile devices. As the
Android platform apps are written in Java language, we tried to run the Java
SCA calculator sample on it.

Although the apps for Android are coded in Java, it's only coded in Java
language. When it's compiled, it generates not .class files, but a file
called .dex, that is equivalent to .jar files. The .dex files are not
compound of Java standard bytecode, but a special bytecode that is intended
to run only on Android VM: Dalvik.

So, in our first try to compile the calculator sample, only importing the
needed SCA jars were not successful, because the SCA jars are compiled using
JDK compiler and do not have the Android special bytecode format.

Fortunately, when you import the SCA jars into an eclipse Android project,
it automatically tries to convert the JDK bytecode to Android bytecode
before execute it. But something was not going correctly yet, cause when it
tries to execute the service I get this exception:

Application Error: com.android.hello An error in com.android.hello. Unnable
to start activity
ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.

I wasn't sure about what was happening, and then I tried another approach:
not import the SCA jars, but place the SCA source code needed by the
calculator sample into the Android app src folder. This way the SCA would be
compiled directly to Android bytecode.

Unfortunately, the Android is not Java and does not have the entire set of
classes that J2SE provides. It provides only some java classes as java.langand
java.util classes which Android developers kept with the same package/class
names and method signature for easy portability of Java app codes. So, the
common Java classes used on Java SCA were compatible. But, the Java SCA uses
a lot the javax.xml package and Android implements only part of this package
on its platform, so I was getting a lot of errors because the missing
classes that should be contained in this package. I solved it downloading
the StAX source code and JDK javax.xml API source code, and placing it
directly on my Android app project. Finally I got it compiled.

Then, I got another error. I found out that the Android compiler fist
compile the Java code to .class files and then compile the .class files to a
.dex file. The first process everything goes fine, meaning the package
dependencies and code syntax are OK. But on the second process, when it
tries convert the .class files to .dex, I get 4 warnings and 1 error that
are lightly described:

*[2008-03-14 14:25:27 - HelloAndroid]
trouble processing:
[2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
...while parsing attributes[1]
...while parsing javax/xml/bind/annotation/XmlNs.class
...while processing javax/xml/bind/annotation/XmlNs.class
[2008-03-14 14:25:27 - HelloAndroid]
trouble processing:
[2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
...while parsing AnnotationDefault attribute at offset 000002b8
...while parsing attributes[0]
...while parsing methods[0]
...while parsing javax/xml/bind/annotation/XmlSchema.class
...while processing javax/xml/bind/annotation/XmlSchema.class
[2008-03-14 14:25:28 - HelloAndroid]
trouble processing:
[2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
...while parsing AnnotationDefault attribute at offset 00000204
...while parsing attributes[0]
...while parsing methods[2]
...while parsing javax/xml/ws/Action.class
...while processing javax/xml/ws/Action.class
[2008-03-14 14:25:29 - HelloAndroid]
trouble processing:
[2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
...while parsing AnnotationDefault attribute at offset 0000020b
...while parsing attributes[1]
...while parsing methods[0]
...while parsing org/osoa/sca/annotations/Service.class
...while processing org/osoa/sca/annotations/Service.class
[2008-03-14 14:25:30 - HelloAndroid] 4 warnings
[2008-03-14 14:25:30 - HelloAndroid]
trouble writing output: not found
[2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed with
error 2

*
So, I got nothing running so far : ( . Is there anyone with some Android
knowledge that could help us with it?

I will probably send this doubts to Android community and see if they can
help us : )

Thanks in advance ; )

Adriano Crestani

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

Thanks, I was able to checkout the code again and build it with no problems.
When I run calculator-android I get the errors in [1].

I also started looking into calculator2. I was able to run CalculatorClient
with only tuscany-api and tuscany-runtime2. I tried to do the same for
calculator-android (after retrotranslating the jars) but was getting errors
in conversion to dex format since the two jars have duplicate classes.

I decided to create a new jar with all the classes in both tuscany-api and
tuscany-runtime2. I was careful to include the updated code from
mobile-android, like that from host-android
(org.apache.tuscany.sca.host.embedded). I am now getting the errors in [2].
Any idea why it might be failing?

These are the lines that puzzle me:

ERROR/AndroidRuntime(1718): java.lang.NoSuchMethodError: <init>
ERROR/AndroidRuntime(1718):     at
org.apache.tuscany.sca.host.embedded.impl.ReallySmallRuntime.start(ReallySmallRuntime.java:124)
ERROR/AndroidRuntime(1718):     at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.init(DefaultSCADomain.java:142)
ERROR/AndroidRuntime(1718):     at
org.apache.tuscany.sca.host.embedded.impl.DefaultSCADomain.<init>(DefaultSCADomain.java:133)
ERROR/AndroidRuntime(1718):     at
org.apache.tuscany.sca.host.embedded.SCADomain.createNewInstance(SCADomain.java:296)
ERROR/AndroidRuntime(1718):     at
org.apache.tuscany.sca.host.embedded.SCADomain.newInstance(SCADomain.java:92)


[1]
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/17Jul2008+-+Error+Stack+Trace
[2]
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jul2008+-+Error+Stack+trace

On Thu, Jul 17, 2008 at 10:55 AM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi,
>
> Sorry Oscar, I should have tested again the last modules I have uploaded to
> the android sandbox, the modules had the Java Builder builder unchecked...it
> causes some errors when you import them into another workspace :S...I
> already fixed that : )
>
> Also, run the mvn on mobile-sandbox/tuscany-interface-java-jaxws/
> module...its eclipse project requires a folder that is only created when the
> mvn runs on this module.
>
> I have updated the instruction file you created with the new instructions :
> )
>
> If you still get any problem, just let us know ; )
>
> Regards,
> Adriano Crestani
>
>
> On Wed, Jul 16, 2008 at 6:55 AM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
>> Hi Adriano,
>>
>> I have been trying to reproduce the Exception you are getting. I found out
>> that the Corba errors were related to [1] so I tried with the latest
>> revision. I'm able to build it with maven with no problems. However, when I
>> import the projects into Eclipse I get all sorts of errors when doing a
>> build.
>>
>> I guess I'm confused by your reference to revision 674723 in the the URL
>> you provided for the Exception. So I tried with revision 643746, which is
>> the one you referenced originally on this thread on May 6th. Same story
>> here, I can build with maven but when I import the projects into Eclipse I
>> get all sorts of errors.
>>
>> Looking closer at the errors I found that they are related to
>> tuscany-interface-java-jaxws. More specifically, some imports (like those
>> shown below for example) cannot be resolved. The result is that all the
>> modules that reference tuscany-interface-java-jaxws end up in error.
>>
>> import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
>> import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
>> import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
>>
>> Am I missing anything to reproduce your workspace?
>>
>> [1] http://www.mail-archive.com/dev@tuscany.apache.org/msg00587.html
>>
>>
>> On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <
>> adrianocrestani@apache.org> 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 <lu...@gmail.com>
>>> 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.
>>>>
>>>> On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
>>>> <os...@gmail.com> wrote:
>>>> > Thanks Adriano. I have been testing the workarounds for RMI and Beans
>>>> API. I
>>>> > am also working to integrate retrotranslator into maven.
>>>> >
>>>> > Today, I tested the newest version of retrotranslator (thanks for the
>>>> tip).
>>>> > With this new version RMI related issues are not appearing (not
>>>> initially,
>>>> > at least) but instead Beans issues are. I've commented
>>>> > java.beans.Introspector import and related code from
>>>> > JavaIntrospectionHelper.java and now get other errors [1] related to
>>>> > javax.jws.WebService. Suggestions are welcome and appreciated.
>>>> >
>>>> > I've noted down these issues on the porting limitations page [2],
>>>> which I
>>>> > have updated with the current progress.
>>>> >
>>>> > [1]
>>>> >
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
>>>> > [2]
>>>> >
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>>> >
>>>> > On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
>>>> > <ad...@apache.org> wrote:
>>>> >>
>>>> >> I added to the wiki a page [1] about all the issues we have found so
>>>> far
>>>> >> when trying to port the SCA Java to the Android platform.
>>>> >>
>>>> >> [1] -
>>>> >>
>>>> >>
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>>> >>
>>>> >> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
>>>> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >>
>>>> >> > Hi Luciano,
>>>> >> >
>>>> >> > Thanks for the tip. Before testing it I generated a JIRA ticket [1]
>>>> for
>>>> >> > the
>>>> >> > Retrotranslator progress, and when I got around to testing I
>>>> noticed a
>>>> >> > different ClassNotFoundException. This time its for
>>>> >> > java.beans.Introspector.  I made sure to include this in the JIRA
>>>> ticket
>>>> >> > and
>>>> >> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
>>>> >> >
>>>> >> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
>>>> >> > [2]
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>>>> >> >
>>>> >> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <
>>>> luckbr1975@gmail.com>
>>>> >> > wrote:
>>>> >> >
>>>> >> > > Removing RMI should be as simple as removing the
>>>> tuscany-binding-rmi
>>>> >> > > dependency from host-android.
>>>> >> > >
>>>> >> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
>>>> >> > > <os...@gmail.com> wrote:
>>>> >> > > > Hi Luciano,
>>>> >> > > >
>>>> >> > > > It's going better after the progress last week with
>>>> retrotranslator.
>>>> >> > I'm
>>>> >> > > now
>>>> >> > > > able to translate the SCA classes and run calculator-android
>>>> without
>>>> >> > > getting
>>>> >> > > > Annotation related issues. The problems now are related to RMI.
>>>> In
>>>> >> > > relation
>>>> >> > > > to this, and from your comment about blocking issues, I created
>>>> a
>>>> >> > > > child
>>>> >> > > page
>>>> >> > > > [1] in the project wiki for Blocking issues. Currently, the
>>>> page
>>>> >> > > > lists
>>>> >> > > the
>>>> >> > > > RMI issue and suggested workarounds.
>>>> >> > > >
>>>> >> > > > I think your suggestion about integration with maven is really
>>>> good.
>>>> >> > > > Especially because there is a retrotranslator plugin for maven.
>>>> I'll
>>>> >> > > start
>>>> >> > > > looking into using this plugin. I also agree about reviewing
>>>> the
>>>> >> > > > scope
>>>> >> > of
>>>> >> > > > support. Right now, I see a need to reduce the dependency on
>>>> RMI,
>>>> >> > either
>>>> >> > > by
>>>> >> > > > commenting all the code that uses the RMI API, or by following
>>>> the
>>>> >> > > > suggestions from Taras [3] to either replace java.rmi.Remote
>>>> with
>>>> >> > > > java.lang.Cloneable (as the result of using a retrotranslator
>>>> >> > > > option)
>>>> >> > or
>>>> >> > > > taking the RMI source from Apache Harmony and putting it in a
>>>> >> > > > retrotranslated JAR. What would you recommend? Hopefully after
>>>> the
>>>> >> > > > dependency reduction Android will be able to run
>>>> calculator-android.
>>>> >> > > Based
>>>> >> > > > on the results of this experiment we can better consider the
>>>> >> > > > reduction
>>>> >> > of
>>>> >> > > > component types and bindings. Please let me know your thoughts
>>>> on
>>>> >> > > > this
>>>> >> > > idea.
>>>> >> > > >
>>>> >> > > > [1]
>>>> >> > >
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
>>>> >> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
>>>> >> > > > [3]
>>>> >> > > >
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>>>> >> > > >
>>>> >> > > >
>>>> >> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
>>>> >> > luckbr1975@gmail.com>
>>>> >> > > > wrote:
>>>> >> > > >
>>>> >> > > >> How is it going here ? I just want to check if there is any
>>>> >> > > >> blocking
>>>> >> > > >> issues with Android at the moment, if so, is there a list of
>>>> these
>>>> >> > > >> issues somewhere ?
>>>> >> > > >>
>>>> >> > > >> Also, some general suggestions/recommendations.: It would be
>>>> great
>>>> >> > > >> if
>>>> >> > > >> we could spend sometime to get the modules well integrated
>>>> using
>>>> >> > > >> maven, this way it would be easier for anyone on the community
>>>> to
>>>> >> > > >> checkout the trunk + android sandbox and jump on the code to
>>>> help.
>>>> >> > > >> Also, we should review the scope of the support we are trying
>>>> to
>>>> >> > > >> acomplish, I'd suggest to minimize the number of component
>>>> types
>>>> >> > > >> supported (java) and bindings (default sca binding) and then
>>>> try to
>>>> >> > > >> run the calculator sample application. Once we have
>>>> acomplished
>>>> >> > > >> this
>>>> >> > > >> first milestone, we could then discuss our next steps.
>>>> >> > > >>
>>>> >> > > >> Thoughts ?
>>>> >> > > >>
>>>> >> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>>>> >> > > >> <ad...@apache.org> wrote:
>>>> >> > > >> > Ah, here is a tip to assure the classes are not recompiled
>>>> again.
>>>> >> > > Build
>>>> >> > > >> the
>>>> >> > > >> > project, then go in each project builder (in the properties
>>>> >> > > >> > window)
>>>> >> > > and
>>>> >> > > >> > disable all the builders, then not even a clean/build will
>>>> modify
>>>> >> > your
>>>> >> > > >> > project ; )
>>>> >> > > >> >
>>>> >> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>>>> >> > > >> adrianocrestani@apache.org>
>>>> >> > > >> > wrote:
>>>> >> > > >> >
>>>> >> > > >> >> Hi Oscar,
>>>> >> > > >> >>
>>>> >> > > >> >> I say that it is more difficult to debug because you need
>>>> attach
>>>> >> > > >> >> a
>>>> >> > > >> source
>>>> >> > > >> >> code to each jar and etc, and when you are using projects,
>>>> >> > > >> >> eclipse
>>>> >> > > >> already
>>>> >> > > >> >> knows where to find the source code : )
>>>> >> > > >> >>
>>>> >> > > >> >> The reply made sense to me, especially with regards to the
>>>> fact
>>>> >> > that
>>>> >> > > >> with
>>>> >> > > >> >> the Android plugin Eclipse compiles sources into classes
>>>> and
>>>> >> > > >> >> then
>>>> >> > > into
>>>> >> > > >> dex
>>>> >> > > >> >> files, so retrotranslator has no chance to translate
>>>> classes in
>>>> >> > > between
>>>> >> > > >> >> these steps - even if I do that outside of Eclipse. This
>>>> shows
>>>> >> > > >> >> from
>>>> >> > > the
>>>> >> > > >> use
>>>> >> > > >> >> of non-translated binaries (as indicated by the
>>>> >> > > >> >> java.lang.Class.isAnnotationPr
>>>> >> > > >> >> esent(Class.java:1131) error in the stack
>>>> >> > > >> >> trace) that might have been related to the use of
>>>> pre-existing
>>>> >> > > >> >> dex
>>>> >> > > files
>>>> >> > > >> or
>>>> >> > > >> >> over-writing of files by Eclipse. So unless I modify the
>>>> ADT
>>>> >> > > >> >> plugin
>>>> >> > > the
>>>> >> > > >> >> result would still be the same, even if I use a simpler
>>>> >> > > >> >> scenario.
>>>> >> > > >> >>
>>>> >> > > >> >> Sorry, I really did not comment this email yet. It does not
>>>> make
>>>> >> > > >> >> so
>>>> >> > > much
>>>> >> > > >> >> sense for me. First, as you already know, eclipse android
>>>> >> > > >> >> projects
>>>> >> > > does
>>>> >> > > >> not
>>>> >> > > >> >> recognize any modifications in the imported projects, so it
>>>> does
>>>> >> > not
>>>> >> > > >> call
>>>> >> > > >> >> the build or incremental build even if the imported
>>>> projects
>>>> >> > > >> >> have
>>>> >> > > their
>>>> >> > > >> >> source code modified. Just to make sure I tested it again:
>>>> >> > > >> >>
>>>> >> > > >> >> 1-  imported in my workspace all the projects included in
>>>> the
>>>> >> > > >> >> calculator-android, cleaned and built them...it takes a
>>>> loooong
>>>> >> > time,
>>>> >> > > as
>>>> >> > > >> you
>>>> >> > > >> >> already know.
>>>> >> > > >> >>
>>>> >> > > >> >> 2- imported the calculator-android project, cleaned and
>>>> built it
>>>> >> > > (only
>>>> >> > > >> the
>>>> >> > > >> >> calculator-android project), and this process was too much
>>>> >> > > >> >> faster
>>>> >> > > than
>>>> >> > > >> when
>>>> >> > > >> >> all the modules are built, so the imported projects were
>>>> not
>>>> >> > > recompiled,
>>>> >> > > >> >> otherwise it would take too much more time. I suppose here
>>>> that
>>>> >> > > >> >> the
>>>> >> > > >> android
>>>> >> > > >> >> project compiles the .java contained in the android project
>>>> and
>>>> >> > > convert
>>>> >> > > >> all
>>>> >> > > >> >> the .class files (generated by imported projects and
>>>> android
>>>> >> > project)
>>>> >> > > to
>>>> >> > > >> dex
>>>> >> > > >> >> format.
>>>> >> > > >> >>
>>>> >> > > >> >> So, it does not recompile the external class files (the
>>>> ones
>>>> >> > > contained
>>>> >> > > >> in
>>>> >> > > >> >> the imported projects) cause it seems not to check if it
>>>> was
>>>> >> > modified
>>>> >> > > or
>>>> >> > > >> >> not. Of course, I never tested it modifing the .class
>>>> files, I'm
>>>> >> > just
>>>> >> > > >> >> assuming that, because when you modify .java files it does
>>>> not
>>>> >> > > >> >> get
>>>> >> > > >> >> recompiled.
>>>> >> > > >> >>
>>>> >> > > >> >> What do you think?
>>>> >> > > >> >>
>>>> >> > > >> >> As I mentioned before, your comments are really helpful as
>>>> they
>>>> >> > give
>>>> >> > > me
>>>> >> > > >> a
>>>> >> > > >> >> sense of direction. Please let me know if you still think
>>>> we
>>>> >> > > >> >> should
>>>> >> > > >> pursue
>>>> >> > > >> >> retrotranslator for files inside a folder.
>>>> >> > > >> >>
>>>> >> > > >> >> I really think you should try at first the simpler scenario
>>>> and
>>>> >> > > >> >> try
>>>> >> > > to
>>>> >> > > >> >> understand how it works and IF it works. Also, you can try
>>>> what
>>>> >> > > >> >> you
>>>> >> > > were
>>>> >> > > >> >> planning: to retrotranslate the each modules' jar, but I
>>>> suppose
>>>> >> > it's
>>>> >> > > a
>>>> >> > > >> lot
>>>> >> > > >> >> of work, because there are so many modules :S. So, as I've
>>>> >> > > >> >> already
>>>> >> > > said,
>>>> >> > > >> if
>>>> >> > > >> >> you think it's getting to complicated, forget it and go on
>>>> with
>>>> >> > > >> Luciano's
>>>> >> > > >> >> suggestion.
>>>> >> > > >> >>
>>>> >> > > >> >> Feel free to choose the direction you want to take, and if
>>>> there
>>>> >> > > >> >> is
>>>> >> > > >> another
>>>> >> > > >> >> approach you think is better, just let us know ; )...you
>>>> are the
>>>> >> > best
>>>> >> > > >> person
>>>> >> > > >> >> to choose the directions, cause you are working directly on
>>>> it,
>>>> >> > > >> >> we
>>>> >> > > are
>>>> >> > > >> just
>>>> >> > > >> >> guinding/helping you ; )
>>>> >> > > >> >>
>>>> >> > > >> >> Thanks,
>>>> >> > > >> >> Adriano Crestani
>>>> >> > > >> >>
>>>> >> > > >> >>
>>>> >> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>>>> >> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>
>>>> >> > > >> >>> Hi Adriano,
>>>> >> > > >> >>>
>>>> >> > > >> >>> If there is an option on retrotranslator to retrotranslate
>>>> all
>>>> >> > > >> >>> the
>>>> >> > > >> classes
>>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>>> classes
>>>> >> > inside
>>>> >> > > >> .jar
>>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>>> >> > > >> >>> > first
>>>> >> > > >> approach
>>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>>> working
>>>> >> > > trying
>>>> >> > > >> a
>>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >> >>> I agree that it's good to try out a simpler scenario to
>>>> better
>>>> >> > > >> understand
>>>> >> > > >> >>> the problem. I haven't tried it yet because using
>>>> >> > > >> >>> retrotranslator
>>>> >> > > for
>>>> >> > > >> >>> classes inside a folder doesn't seem to be a solution to
>>>> the
>>>> >> > > problem.
>>>> >> > > >> >>> Here's
>>>> >> > > >> >>> my reasoning:
>>>> >> > > >> >>>
>>>> >> > > >> >>> Yes, there is an option to translate classes in a folder.
>>>> I
>>>> >> > > >> >>> tried
>>>> >> > it
>>>> >> > > >> and
>>>> >> > > >> >>> it
>>>> >> > > >> >>> successfully translated the classes inside my Eclipse
>>>> >> > > >> >>> workspace.
>>>> >> > > When I
>>>> >> > > >> >>> ran
>>>> >> > > >> >>> the calculator-android application using the newly
>>>> translated
>>>> >> > > classes I
>>>> >> > > >> >>> was
>>>> >> > > >> >>> getting the errors in [1]. I posted a question in Android
>>>> >> > Developers
>>>> >> > > >> about
>>>> >> > > >> >>> this error and received a reply [2].
>>>> >> > > >> >>>
>>>> >> > > >> >>> The reply made sense to me, especially with regards to the
>>>> fact
>>>> >> > that
>>>> >> > > >> with
>>>> >> > > >> >>> the Android plugin Eclipse compiles sources into classes
>>>> and
>>>> >> > > >> >>> then
>>>> >> > > into
>>>> >> > > >> dex
>>>> >> > > >> >>> files, so retrotranslator has no chance to translate
>>>> classes in
>>>> >> > > between
>>>> >> > > >> >>> these steps - even if I do that outside of Eclipse. This
>>>> shows
>>>> >> > from
>>>> >> > > the
>>>> >> > > >> >>> use
>>>> >> > > >> >>> of non-translated binaries (as indicated by the
>>>> >> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error
>>>> in
>>>> >> > > >> >>> the
>>>> >> > > stack
>>>> >> > > >> >>> trace) that might have been related to the use of
>>>> pre-existing
>>>> >> > > >> >>> dex
>>>> >> > > >> files
>>>> >> > > >> >>> or
>>>> >> > > >> >>> over-writing of files by Eclipse. So unless I modify the
>>>> ADT
>>>> >> > plugin
>>>> >> > > the
>>>> >> > > >> >>> result would still be the same, even if I use a simpler
>>>> >> > > >> >>> scenario.
>>>> >> > > >> >>>
>>>> >> > > >> >>> The reply suggested to use JAR's instead. This also made
>>>> sense
>>>> >> > > >> >>> to
>>>> >> > me
>>>> >> > > >> and
>>>> >> > > >> >>> seemed like a simpler way of solving the problem. I didn't
>>>> see
>>>> >> > > >> >>> the
>>>> >> > > >> >>> disadvantage of debugging, which as you point out is more
>>>> >> > difficult
>>>> >> > > >> with
>>>> >> > > >> >>> JAR's instead of Eclipse projects.
>>>> >> > > >> >>>
>>>> >> > > >> >>> As I mentioned before, your comments are really helpful as
>>>> they
>>>> >> > give
>>>> >> > > me
>>>> >> > > >> a
>>>> >> > > >> >>> sense of direction. Please let me know if you still think
>>>> we
>>>> >> > should
>>>> >> > > >> pursue
>>>> >> > > >> >>> retrotranslator for files inside a folder.
>>>> >> > > >> >>>
>>>> >> > > >> >>>
>>>> >> > > >> >>> [1]
>>>> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>>>> >> > > >> >>> [2]
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>>> >> > > >> >>>
>>>> >> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>>>> >> > > >> >>> adrianocrestani@apache.org>
>>>> >> > > >> >>> wrote:
>>>> >> > > >> >>>
>>>> >> > > >> >>> > Hi Oscar,
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Yup, you're right - there are indeed Eclipse files
>>>> inside the
>>>> >> > > >> folders. I
>>>> >> > > >> >>> > guess I was confused by the different names in [1] than
>>>> those
>>>> >> > that
>>>> >> > > >> >>> result
>>>> >> > > >> >>> > [2] from importing to an Eclipse workspace - after which
>>>> I
>>>> >> > > >> >>> > see
>>>> >> > 13
>>>> >> > > >> >>> projects
>>>> >> > > >> >>> > in both cases. So please ignore my previous remark.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > I have added the projects, but still haven't changed
>>>> their
>>>> >> > names.
>>>> >> > > I
>>>> >> > > >> was
>>>> >> > > >> >>> > planning to modify their project names when we get it
>>>> >> > > >> >>> > integrated
>>>> >> > > to
>>>> >> > > >> SCA,
>>>> >> > > >> >>> > mainly because we will need to change the poms. Anyway,
>>>> feel
>>>> >> > free
>>>> >> > > to
>>>> >> > > >> >>> modify
>>>> >> > > >> >>> > the names whenever you want ; )
>>>> >> > > >> >>> >
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Per the reply I received on the Android Developers list
>>>> [3] I
>>>> >> > > started
>>>> >> > > >> >>> using
>>>> >> > > >> >>> > retrotranslator on JAR's instead of class files. For
>>>> this I
>>>> >> > > created a
>>>> >> > > >> >>> big
>>>> >> > > >> >>> > JAR file with all the Tuscany modules (including those
>>>> you
>>>> >> > > modified
>>>> >> > > >> for
>>>> >> > > >> >>> > Android). I translated this big JAR (around 15MB) with
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> [4].
>>>> >> > > >> >>> > Then I created a new workspace with only
>>>> calculator-android
>>>> >> > > >> >>> > and
>>>> >> > > >> >>> > android-jdk-classes as projects and added the translated
>>>> JAR
>>>> >> > > >> >>> > as
>>>> >> > an
>>>> >> > > >> >>> external
>>>> >> > > >> >>> > library for both projects. This resulted in errors [4]
>>>> from
>>>> >> > > >> >>> > the
>>>> >> > > >> Android
>>>> >> > > >> >>> > build process.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > I really do not understand this errors, but as this
>>>> errors
>>>> >> > > >> >>> > are
>>>> >> > > only
>>>> >> > > >> >>> related
>>>> >> > > >> >>> > to testcase classes they can be ignored (removed from
>>>> the
>>>> >> > > >> >>> > jars).
>>>> >> > I
>>>> >> > > >> also
>>>> >> > > >> >>> did
>>>> >> > > >> >>> > not understand why it's not find the .apk file:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not
>>>> find
>>>> >> > > >> >>> > /bin/calculator-android.apk!"
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > To work around these errors I decided to take a
>>>> different
>>>> >> > approach
>>>> >> > > >> and
>>>> >> > > >> >>> copy
>>>> >> > > >> >>> > all the jar files contained in the individual modules to
>>>> a
>>>> >> > > separate
>>>> >> > > >> >>> folder
>>>> >> > > >> >>> > and then run retrotranslator on each JAR. The jars are
>>>> found
>>>> >> > > inside
>>>> >> > > >> the
>>>> >> > > >> >>> > target folder of each module and are named as shown
>>>> below:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > From this I found that only the SCA modules have these
>>>> JAR
>>>> >> > > >> >>> > files
>>>> >> > > >> inside
>>>> >> > > >> >>> > their respective target folders, whereas the Android
>>>> modules
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> downloaded
>>>> >> > > >> >>> > from [1] don't have these files at all
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Yep, this .jars are generated when the maven is
>>>> executed. I'm
>>>> >> > not
>>>> >> > > >> sure
>>>> >> > > >> >>> if
>>>> >> > > >> >>> > you should use this .jars, because they were compiled
>>>> with no
>>>> >> > > >> reference
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > Android library. That's also why there are no .jar files
>>>> for
>>>> >> > > android
>>>> >> > > >> >>> > modules, because you did not execute the maven on them
>>>>  (and
>>>> >> > > >> >>> > you
>>>> >> > > >> >>> > shouldn't).
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > So I decided to keep the Android
>>>> >> > > >> >>> > modules [2] and add the translated JARs as libraries
>>>> where
>>>> >> > needed
>>>> >> > > to
>>>> >> > > >> >>> have
>>>> >> > > >> >>> > the workspace build with no problems. If I get this
>>>> running I
>>>> >> > > would
>>>> >> > > >> look
>>>> >> > > >> >>> > into creating JAR files from the Android modules and
>>>> then
>>>> >> > > >> >>> > return
>>>> >> > > to
>>>> >> > > >> only
>>>> >> > > >> >>> > having calculator-android and android-jdk-classes as
>>>> projects
>>>> >> > and
>>>> >> > > the
>>>> >> > > >> >>> rest
>>>> >> > > >> >>> > as JAR's added as external libraries. If this works out
>>>> I
>>>> >> > > >> >>> > could
>>>> >> > > then
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > into seeing which JAR's are important and which are not,
>>>> in
>>>> >> > > >> >>> > this
>>>> >> > > way
>>>> >> > > >> >>> > reducing the total memory footprint and coming up with a
>>>> >> > > "lightweight
>>>> >> > > >> >>> > mobile
>>>> >> > > >> >>> > SCA core/runtime." Please let me know your thoughts on
>>>> these
>>>> >> > > efforts.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > You haven't tried this yet, right? You may try it, but I
>>>> do
>>>> >> > > >> >>> > not
>>>> >> > > like
>>>> >> > > >> >>> this
>>>> >> > > >> >>> > approach, because it will get difficult to debug sca
>>>> classes
>>>> >> > > >> >>> > as
>>>> >> > > they
>>>> >> > > >> are
>>>> >> > > >> >>> > not
>>>> >> > > >> >>> > imported as eclipse projects.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > If there is an option on retrotranslator to
>>>> retrotranslate
>>>> >> > > >> >>> > all
>>>> >> > the
>>>> >> > > >> >>> classes
>>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>>> classes
>>>> >> > inside
>>>> >> > > >> .jar
>>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>>> >> > > >> >>> > first
>>>> >> > > >> approach
>>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>>> working
>>>> >> > > trying
>>>> >> > > >> a
>>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Also, if the restrotranslator gets to complicated, you
>>>> may
>>>> >> > > >> >>> > try
>>>> >> > the
>>>> >> > > >> >>> > Luciano's
>>>> >> > > >> >>> > suggestion ; )
>>>> >> > > >> >>> >
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Kind Regards,
>>>> >> > > >> >>> > Adriano Crestani
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>>>> >> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > > Hi Adriano,
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside
>>>> its
>>>> >> > folders,
>>>> >> > > >> there
>>>> >> > > >> >>> > are
>>>> >> > > >> >>> > > > the
>>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>>> by
>>>> >> > > >> >>> > > > the
>>>> >> > > >> eclipse
>>>> >> > > >> >>> > import
>>>> >> > > >> >>> > > > tool as an eclipse project.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Yup, you're right - there are indeed Eclipse files
>>>> inside
>>>> >> > > >> >>> > > the
>>>> >> > > >> folders.
>>>> >> > > >> >>> I
>>>> >> > > >> >>> > > guess I was confused by the different names in [1]
>>>> than
>>>> >> > > >> >>> > > those
>>>> >> > > that
>>>> >> > > >> >>> result
>>>> >> > > >> >>> > > [2] from importing to an Eclipse workspace - after
>>>> which I
>>>> >> > > >> >>> > > see
>>>> >> > > 13
>>>> >> > > >> >>> > projects
>>>> >> > > >> >>> > > in both cases. So please ignore my previous remark.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > I don't think introspection is a good solution, hence
>>>> you
>>>> >> > > >> >>> > > will
>>>> >> > > need
>>>> >> > > >> to
>>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>>> and
>>>> >> > also
>>>> >> > > >> >>> services
>>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>>> on
>>>> >> > > Android.
>>>> >> > > >> >>> Let's
>>>> >> > > >> >>> > > avoid
>>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> in
>>>> >> > > >> >>> > > > mind
>>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>>> SDK
>>>> >> > > release
>>>> >> > > >> :S
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > >  Also, if you get the retrotranslator working,
>>>> forget the
>>>> >> > > >> Luciano's
>>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>>> same
>>>> >> > > >> >>> > > > time
>>>> >> > ;
>>>> >> > > )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in
>>>> the
>>>> >> > right
>>>> >> > > >> >>> > direction
>>>> >> > > >> >>> > > :-)
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Now, a summary of what I've done up to now:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Per the reply I received on the Android Developers
>>>> list [3]
>>>> >> > > >> >>> > > I
>>>> >> > > >> started
>>>> >> > > >> >>> > using
>>>> >> > > >> >>> > > retrotranslator on JAR's instead of class files. For
>>>> this I
>>>> >> > > created
>>>> >> > > >> a
>>>> >> > > >> >>> big
>>>> >> > > >> >>> > > JAR file with all the Tuscany modules (including those
>>>> you
>>>> >> > > modified
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> > [4].
>>>> >> > > >> >>> > > Then I created a new workspace with only
>>>> calculator-android
>>>> >> > and
>>>> >> > > >> >>> > > android-jdk-classes as projects and added the
>>>> translated
>>>> >> > > >> >>> > > JAR
>>>> >> > as
>>>> >> > > an
>>>> >> > > >> >>> > external
>>>> >> > > >> >>> > > library for both projects. This resulted in errors [4]
>>>> from
>>>> >> > the
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > build process.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > To work around these errors I decided to take a
>>>> different
>>>> >> > > approach
>>>> >> > > >> and
>>>> >> > > >> >>> > copy
>>>> >> > > >> >>> > > all the jar files contained in the individual modules
>>>> to a
>>>> >> > > separate
>>>> >> > > >> >>> > folder
>>>> >> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
>>>> >> > > >> >>> > > found
>>>> >> > > inside
>>>> >> > > >> >>> the
>>>> >> > > >> >>> > > target folder of each module and are named as shown
>>>> below:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > From this I found that only the SCA modules have these
>>>> JAR
>>>> >> > files
>>>> >> > > >> >>> inside
>>>> >> > > >> >>> > > their respective target folders, whereas the Android
>>>> >> > > >> >>> > > modules I
>>>> >> > > >> >>> downloaded
>>>> >> > > >> >>> > > from [1] don't have these files at all. So I decided
>>>> to
>>>> >> > > >> >>> > > keep
>>>> >> > the
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > modules [2] and add the translated JARs as libraries
>>>> where
>>>> >> > > needed
>>>> >> > > >> to
>>>> >> > > >> >>> have
>>>> >> > > >> >>> > > the workspace build with no problems. If I get this
>>>> running
>>>> >> > > >> >>> > > I
>>>> >> > > would
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > > into creating JAR files from the Android modules and
>>>> then
>>>> >> > return
>>>> >> > > to
>>>> >> > > >> >>> only
>>>> >> > > >> >>> > > having calculator-android and android-jdk-classes as
>>>> >> > > >> >>> > > projects
>>>> >> > > and
>>>> >> > > >> the
>>>> >> > > >> >>> > rest
>>>> >> > > >> >>> > > as JAR's added as external libraries. If this works
>>>> out I
>>>> >> > could
>>>> >> > > >> then
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > > into seeing which JAR's are important and which are
>>>> not, in
>>>> >> > this
>>>> >> > > >> way
>>>> >> > > >> >>> > > reducing the total memory footprint and coming up with
>>>> a
>>>> >> > > >> "lightweight
>>>> >> > > >> >>> > > mobile
>>>> >> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
>>>> >> > > >> >>> > > these
>>>> >> > > >> efforts.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > [1]
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>>>> >> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>>>> >> > > >> >>> > > [3]
>>>> >> > > >>
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>>> >> > > >> >>> > > [4]
>>>> >> > > >>
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>>>> >> > > >> >>> > > adrianocrestani@apache.org>
>>>> >> > > >> >>> > > wrote:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > > Hi Oscar,
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > When I imported the projects from [3] the following
>>>> >> > > >> >>> > > > projects
>>>> >> > > were
>>>> >> > > >> >>> not
>>>> >> > > >> >>> > > > imported:
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > core-android
>>>> >> > > >> >>> > > > host-android
>>>> >> > > >> >>> > > > extensibility
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Is this normal? Should they be imported?
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside
>>>> its
>>>> >> > folders,
>>>> >> > > >> there
>>>> >> > > >> >>> > are
>>>> >> > > >> >>> > > > the
>>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>>> by
>>>> >> > > >> >>> > > > the
>>>> >> > > >> eclipse
>>>> >> > > >> >>> > import
>>>> >> > > >> >>> > > > tool as an eclipse project.
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Thanks for the detailed explanation. I'm going to
>>>> give
>>>> >> > > >> >>> > > > this
>>>> >> > a
>>>> >> > > try
>>>> >> > > >> as
>>>> >> > > >> >>> I
>>>> >> > > >> >>> > > > found
>>>> >> > > >> >>> > > > an introspection related comment [2] as a workaround
>>>> to
>>>> >> > > another
>>>> >> > > >> >>> > > annotations
>>>> >> > > >> >>> > > > problem with the current SDK.
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > I don't think introspection is a good solution,
>>>> hence you
>>>> >> > will
>>>> >> > > >> need
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>>> and
>>>> >> > also
>>>> >> > > >> >>> services
>>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>>> on
>>>> >> > > Android.
>>>> >> > > >> >>> Let's
>>>> >> > > >> >>> > > avoid
>>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> in
>>>> >> > > >> >>> > > > mind
>>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>>> SDK
>>>> >> > > release
>>>> >> > > >> :S
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Also, if you get the retrotranslator working, forget
>>>> the
>>>> >> > > >> Luciano's
>>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>>> same
>>>> >> > > >> >>> > > > time
>>>> >> > ;
>>>> >> > > )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Any progress testing retrotranslator on a simpler
>>>> >> > > >> >>> > > > scenario,
>>>> >> > > just
>>>> >> > > >> let
>>>> >> > > >> >>> us
>>>> >> > > >> >>> > > > know
>>>> >> > > >> >>> > > > ; )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Kind Regards,
>>>> >> > > >> >>> > > > Adriano Crestani
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>>>> >> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > > Hi Adriano,
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > At first, build a simple, but equivalent scenario,
>>>> and
>>>> >> > test
>>>> >> > > it.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > I think this is a great idea, especially because I
>>>> >> > > >> >>> > > > > found
>>>> >> > > that
>>>> >> > > >> the
>>>> >> > > >> >>> > > "native
>>>> >> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
>>>> >> > > >> >>> > > > > still
>>>> >> > > >> related
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > the
>>>> >> > > >> >>> > > > > annotations problem. I'm getting the same errors
>>>> when
>>>> >> > > >> converting
>>>> >> > > >> >>> the
>>>> >> > > >> >>> > > code
>>>> >> > > >> >>> > > > > to
>>>> >> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator
>>>> is
>>>> >> > > actually
>>>> >> > > >> not
>>>> >> > > >> >>> > > > working.
>>>> >> > > >> >>> > > > > Hopefully, testing with a simpler scenario will
>>>> help me
>>>> >> > > >> >>> > > > > to
>>>> >> > > >> >>> understand
>>>> >> > > >> >>> > > the
>>>> >> > > >> >>> > > > > problem better.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant
>>>> you
>>>> >> > > >> >>> > > > > to
>>>> >> > > do:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>>> >> > > >> >>> Class.isAnnotationPresent
>>>> >> > > >> >>> > > or
>>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>>> checks
>>>> >> > for
>>>> >> > > a
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > @Remotable
>>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>>> class.isAnnotationPresent
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> (Remotable.class); =>
>>>> >> > > >> >>> > > > > >> Annotation isRemotable = true;
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> otherwise, which means, when it's not checking
>>>> for
>>>> >> > > >> >>> > > > > >> the
>>>> >> > > >> >>> @Remotable
>>>> >> > > >> >>> > > > > >> annnotation, force to false. For example:
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> Annotation isReference =
>>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>>> >> > > >> >>> > > > =>
>>>> >> > > >> >>> > > > > >> Annotation isReference = false;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to
>>>> give
>>>> >> > this
>>>> >> > > a
>>>> >> > > >> try
>>>> >> > > >> >>> as
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> > > > > found
>>>> >> > > >> >>> > > > > an introspection related comment [2] as a
>>>> workaround to
>>>> >> > > another
>>>> >> > > >> >>> > > > annotations
>>>> >> > > >> >>> > > > > problem with the current SDK.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Also, I have another question for you...
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > When I imported the projects from [3] the
>>>> following
>>>> >> > projects
>>>> >> > > >> were
>>>> >> > > >> >>> not
>>>> >> > > >> >>> > > > > imported:
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > core-android
>>>> >> > > >> >>> > > > > host-android
>>>> >> > > >> >>> > > > > extensibility
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Is this normal? Should they be imported?
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > [1]
>>>> >> > > >> >>>
>>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > [2]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>>>> >> > > >> >>> > > > > [3]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>>>> >> > > >> >>> > > > > adrianocrestani@apache.org>
>>>> >> > > >> >>> > > > > wrote:
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > > Well detailed Oscar ; )
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > It is one thing I learnt after playing hours
>>>> with
>>>> >> > Android,
>>>> >> > > >> you
>>>> >> > > >> >>> need
>>>> >> > > >> >>> > > to
>>>> >> > > >> >>> > > > > > rebuild every modified project which is imported
>>>> in
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> android
>>>> >> > > >> >>> > > > project,
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> > > > > > android project itself does not check for
>>>> >> > > >> >>> > > > > > modifications
>>>> >> > on
>>>> >> > > >> its
>>>> >> > > >> >>> > > > > dependencies
>>>> >> > > >> >>> > > > > > :S...so, when you rebuilt the imported project
>>>> it
>>>> >> > > recompiled
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > > uncommented
>>>> >> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
>>>> >> > > >> >>> > > > > > started
>>>> >> > to
>>>> >> > > >> check
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > > > > annotations once again, so you got the errors on
>>>> [1],
>>>> >> > > which
>>>> >> > > >> >>> means
>>>> >> > > >> >>> > > > > > retrotranslator is still not working. Have you
>>>> tested
>>>> >> > > >> >>> > > > > > it
>>>> >> > > on a
>>>> >> > > >> >>> > simpler
>>>> >> > > >> >>> > > > > > application as I previously suggested? Did it
>>>> work?
>>>> >> > > >> >>> > > > > > What
>>>> >> > > was
>>>> >> > > >> the
>>>> >> > > >> >>> > most
>>>> >> > > >> >>> > > > > > critical scenario you tested it and it worked?
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>>>> >> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar
>>>> -srcdir
>>>> >> > > >> /../workspace
>>>> >> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot
>>>> -classpath
>>>> >> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > You should also check if it's is working as
>>>> expected,
>>>> >> > > >> >>> > > > > > as
>>>> >> > I
>>>> >> > > >> >>> already
>>>> >> > > >> >>> > > > said,
>>>> >> > > >> >>> > > > > > does not go directly testing complex solutions
>>>> on
>>>> >> > complex
>>>> >> > > >> things
>>>> >> > > >> >>> > like
>>>> >> > > >> >>> > > > > SCA.
>>>> >> > > >> >>> > > > > > At first, build a simple, but equivalent
>>>> scenario,
>>>> >> > > >> >>> > > > > > and
>>>> >> > > test
>>>> >> > > >> it.
>>>> >> > > >> >>> For
>>>> >> > > >> >>> > > > > > example,
>>>> >> > > >> >>> > > > > > a simple android app project that uses an java
>>>> >> > > >> >>> > > > > > library
>>>> >> > > >> project
>>>> >> > > >> >>> > which
>>>> >> > > >> >>> > > > > access
>>>> >> > > >> >>> > > > > > annotations on classes placed on the android
>>>> project.
>>>> >> > Like
>>>> >> > > >> our
>>>> >> > > >> >>> > > android
>>>> >> > > >> >>> > > > > > calculator, it's an android app project
>>>> >> > > (calculator-android)
>>>> >> > > >> >>> which
>>>> >> > > >> >>> > > uses
>>>> >> > > >> >>> > > > > > java
>>>> >> > > >> >>> > > > > > library projects (sca modules), and these
>>>> libraries
>>>> >> > checks
>>>> >> > > >> for
>>>> >> > > >> >>> > > > > annotations
>>>> >> > > >> >>> > > > > > on classes located at the android app project
>>>> >> > > >> >>> > > (CalculatorService.java,
>>>> >> > > >> >>> > > > > > AddService.java, etc). When you get it working
>>>> on the
>>>> >> > > simpler
>>>> >> > > >> >>> > > scenario,
>>>> >> > > >> >>> > > > > > then
>>>> >> > > >> >>> > > > > > you are ready to test it on the complexer
>>>> sceneario
>>>> >> > > >> >>> > > > (calculator-android).
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Please, if you get the retrotranslator working
>>>> in the
>>>> >> > > simpler
>>>> >> > > >> >>> > > scenario,
>>>> >> > > >> >>> > > > > > send
>>>> >> > > >> >>> > > > > > us a patch with it. You can create a JIRA and
>>>> attach
>>>> >> > > >> >>> > > > > > it.
>>>> >> > > If
>>>> >> > > >> you
>>>> >> > > >> >>> > need
>>>> >> > > >> >>> > > > any
>>>> >> > > >> >>> > > > > > help, just ask ; )
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > "code that checks for @Remotable you force to
>>>> true,
>>>> >> > > otherwise
>>>> >> > > >> >>> force
>>>> >> > > >> >>> > > to
>>>> >> > > >> >>> > > > > > false."
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I
>>>> meant
>>>> >> > > >> >>> > > > > > you
>>>> >> > to
>>>> >> > > do:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>>> >> > > >> >>> Class.isAnnotationPresent
>>>> >> > > >> >>> > > or
>>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>>> checks
>>>> >> > for
>>>> >> > > a
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > @Remotable
>>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>>> >> > > >> >>> > class.isAnnotationPresent(Remotable.class);
>>>> >> > > >> >>> > > =>
>>>> >> > > >> >>> > > > > > Annotation isRemotable = true;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > otherwise, which means, when it's not checking
>>>> for
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> @Remotable
>>>> >> > > >> >>> > > > > > annnotation, force to false. For example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isReference =
>>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>>> >> > > >> >>> > > =>
>>>> >> > > >> >>> > > > > > Annotation isReference = false;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > [1] -
>>>> >> > > >> >>> > >
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Kind Regards,
>>>> >> > > >> >>> > > > > > Adriano Crestani
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda
>>>> <
>>>> >> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > > Hi Adriano,
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > I continued testing retrotranslator. Here's
>>>> what
>>>> >> > > >> >>> > > > > > > I've
>>>> >> > > done
>>>> >> > > >> up
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > now.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and
>>>> installed as
>>>> >> > > shown
>>>> >> > > >> >>> below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > svn checkout --revision 643746
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > >
>>>> >> > > >>
>>>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > cd modules
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > mvn clean install -Dtest=no
>>>> >> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set
>>>> the
>>>> >> > M2_REPO
>>>> >> > > >> >>> variable
>>>> >> > > >> >>> > as
>>>> >> > > >> >>> > > > > shown
>>>> >> > > >> >>> > > > > > > below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>>>> >> > > >> >>> > eclipse:add-maven-repo
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build
>>>> errors,
>>>> >> > added
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > > library
>>>> >> > > >> >>> > > > > > to
>>>> >> > > >> >>> > > > > > > required modules, fixed references to jar
>>>> files and
>>>> >> > > other
>>>> >> > > >> >>> > > libraries.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 5. Uncommented lines in
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the
>>>> project
>>>> >> > site
>>>> >> > > >> [3]
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > > shown
>>>> >> > > >> >>> > > > > > > below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>>>> >> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar
>>>> -srcdir
>>>> >> > > >> >>> /../workspace
>>>> >> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot
>>>> -classpath
>>>> >> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  The output can be found in [4].
>>>> >> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > and then re-ran retrotranslator.
>>>> >> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in
>>>> [5]
>>>> >> > > >> >>> > > > > > > and
>>>> >> > > >> Android
>>>> >> > > >> >>> > > errors
>>>> >> > > >> >>> > > > in
>>>> >> > > >> >>> > > > > > > [6].
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > As always, I'm documenting my progress on the
>>>> >> > > >> >>> > > > > > > project
>>>> >> > > log.
>>>> >> > > >> I
>>>> >> > > >> >>> > > haven't
>>>> >> > > >> >>> > > > > > fully
>>>> >> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
>>>> >> > > >> >>> > > > > > > puzzled
>>>> >> > by
>>>> >> > > >> what
>>>> >> > > >> >>> you
>>>> >> > > >> >>> > > > mean
>>>> >> > > >> >>> > > > > by
>>>> >> > > >> >>> > > > > > > this:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > "code that checks for @Remotable you force to
>>>> true,
>>>> >> > > >> otherwise
>>>> >> > > >> >>> > force
>>>> >> > > >> >>> > > > to
>>>> >> > > >> >>> > > > > > > false."
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > I'll continue looking into it and hopefully
>>>> get
>>>> >> > > >> >>> retrotranslator
>>>> >> > > >> >>> > to
>>>> >> > > >> >>> > > > > work.
>>>> >> > > >> >>> > > > > > I
>>>> >> > > >> >>> > > > > > > also think it's a simpler option.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [1]
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [2]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>>
>>>> >> > >
>>>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [3]
>>>> http://retrotranslator.sourceforge.net/#android
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [4]
>>>> >> > > >> >>> >
>>>> http://androidindelft.googlepages.com/rt_output_30may2008.txt
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [5]
>>>> >> > > >> >>> > >
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > > > [6]
>>>> http://androidindelft.googlepages.com/2Jun1.jpg
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano
>>>> Crestani <
>>>> >> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > > Hi,
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > I tried what Luciano suggested. It really
>>>> works.
>>>> >> > > >> >>> > > > > > > > To
>>>> >> > > get
>>>> >> > > >> it
>>>> >> > > >> >>> > > working
>>>> >> > > >> >>> > > > > you
>>>> >> > > >> >>> > > > > > > > simply need to search on all modules where
>>>> the
>>>> >> > > >> >>> > > > > > > > code
>>>> >> > > >> checks
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > > > > @Remotable
>>>> >> > > >> >>> > > > > > > > annotation and force it to true:
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) !=
>>>> null"
>>>> >> > > >> >>> > > > > > > > =>
>>>> >> > > true
>>>> >> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)"
>>>> =>
>>>> >> > > >> >>> > > > > > > > true
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > It works fine on the sca revision we are
>>>> testing
>>>> >> > > >> >>> > > > > > > > on
>>>> >> > > >> Android
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > the
>>>> >> > > >> >>> > > > > > most
>>>> >> > > >> >>> > > > > > > > recent revision. I only tested it as a java
>>>> >> > > application,
>>>> >> > > >> not
>>>> >> > > >> >>> as
>>>> >> > > >> >>> > > an
>>>> >> > > >> >>> > > > > > > android
>>>> >> > > >> >>> > > > > > > > application.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Unfortunatelly, I still think
>>>> retrotranslator is
>>>> >> > > >> >>> > > > > > > > a
>>>> >> > > faster
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > > simpler
>>>> >> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion
>>>> only
>>>> >> > forces
>>>> >> > > >> the
>>>> >> > > >> >>> SCA
>>>> >> > > >> >>> > to
>>>> >> > > >> >>> > > > > > > recognize
>>>> >> > > >> >>> > > > > > > > the services with no annotations declared on
>>>> >> > > >> >>> > > > > > > > their
>>>> >> > > >> >>> interfaces,
>>>> >> > > >> >>> > > but
>>>> >> > > >> >>> > > > it
>>>> >> > > >> >>> > > > > > > does
>>>> >> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when
>>>> the
>>>> >> > > >> >>> > > > > > > > SCA
>>>> >> > > >> invokes
>>>> >> > > >> >>> > > > methods
>>>> >> > > >> >>> > > > > > that
>>>> >> > > >> >>> > > > > > > > read annotations. So, our current problem is
>>>> that
>>>> >> > > >> >>> > > > > > > > we
>>>> >> > > are
>>>> >> > > >> not
>>>> >> > > >> >>> > > being
>>>> >> > > >> >>> > > > > able
>>>> >> > > >> >>> > > > > > > to
>>>> >> > > >> >>> > > > > > > > use these methods and not only because we
>>>> are not
>>>> >> > > being
>>>> >> > > >> able
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > > read
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> > > > > > > > annotations.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
>>>> >> > > >> >>> > > > > > > > suggestion,
>>>> >> > > you
>>>> >> > > >> will
>>>> >> > > >> >>> > need
>>>> >> > > >> >>> > > > to
>>>> >> > > >> >>> > > > > > > > comment/adapt every sca code that tries to
>>>> read
>>>> >> > > >> >>> > > > > > > > the
>>>> >> > > class
>>>> >> > > >> >>> > > > > annotations.
>>>> >> > > >> >>> > > > > > It
>>>> >> > > >> >>> > > > > > > > is
>>>> >> > > >> >>> > > > > > > > not necessary to comment/adapt the methods
>>>> that
>>>> >> > > >> >>> > > > > > > > read
>>>> >> > > >> Method
>>>> >> > > >> >>> > > > > > annotations,
>>>> >> > > >> >>> > > > > > > > they are not throwning any exception. So,
>>>> every
>>>> >> > > >> >>> > > > > > > > code
>>>> >> > > that
>>>> >> > > >> >>> > checks
>>>> >> > > >> >>> > > > for
>>>> >> > > >> >>> > > > > > > > @Remotable you force to true, otherwise
>>>> force to
>>>> >> > > false.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Any doubt about what I have said, just let
>>>> me
>>>> >> > > >> >>> > > > > > > > know ;
>>>> >> > )
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Suggestions are welcome : )
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Adriano Crestani
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano
>>>> Resende
>>>> >> > > >> >>> > > > > > > > <
>>>> >> > > >> >>> > > > > > luckbr1975@gmail.com>
>>>> >> > > >> >>> > > > > > > > wrote:
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > > FYI, if you comment out the code that
>>>> checks if
>>>> >> > > >> >>> > > > > > > > > a
>>>> >> > > >> >>> interface
>>>> >> > > >> >>> > is
>>>> >> > > >> >>> > > > > > > > > remoteble, you could have a version of the
>>>> >> > > calculator
>>>> >> > > >> >>> without
>>>> >> > > >> >>> > > any
>>>> >> > > >> >>> > > > > > > > > annotations, and the runtime would
>>>> introspect
>>>> >> > > >> >>> > > > > > > > > the
>>>> >> > > >> >>> references
>>>> >> > > >> >>> > > for
>>>> >> > > >> >>> > > > > the
>>>> >> > > >> >>> > > > > > > > > multiple services. But note that, the
>>>> >> > introspection
>>>> >> > > >> code
>>>> >> > > >> >>> will
>>>> >> > > >> >>> > > > only
>>>> >> > > >> >>> > > > > be
>>>> >> > > >> >>> > > > > > > > > activated if there is no SCA annotations
>>>> on the
>>>> >> > > class.
>>>> >> > > >> >>> > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
>>>> >> > > >> >>> > > > > > > > > Crestani
>>>> >> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
>>>> >> > > >> >>> > > > > > > > > > Ah, the expected exception should look
>>>> like
>>>> >> > > >> >>> > > > > > > > > > this
>>>> >> > > on
>>>> >> > > >> >>> android
>>>> >> > > >> >>> > > > > > emulator:
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > >
>>>> >> >
>>>> >> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > <
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> <
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>>
>>>> >> > > >> >>> <
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > >
>>>> >> > > >> >>> > <
>>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > > >
>>>> >> > > >> >>> > > <
>>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >
>>>> >> > > >> >>> > > > <
>>>> >> > > >>
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > <
>>>> >> > > >>
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > > > > > <
>>>> >> > > >> >>>
>>>> >> > > >> >>>
>>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > > > <
>>>> >> > > >> >>> >
>>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > > > > <
>>>> >> > > >> >>> > >
>>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM,
>>>> Adriano
>>>> >> > Crestani
>>>> >> > > <
>>>> >> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > >> Hi Oscar,
>>>> >> > > >> >>> > > > > > > > > >>
>>>> >> > > >> >>> > > > > > >
>>>>
>>> ...
>
> [Message clipped]




-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,

Couldn't a script (e.g. apache ant) that involkes the retrotranlator app
from the maven?

Adriano Crestani

On Sat, Jul 19, 2008 at 4:33 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Luciano,
>
> An update is that the reflection and stripannot options from
> retrotranslator command-line are not present in the maven plugin. I created
> a JIRA [1] for this issue for the Mojo project that produces the plugin.
>
> Both options are required. The first option (reflection) includes metadata
> into classes to make reflection work even if the classes are unavailable as
> resources after translation. The second option (stripannot) removes
> annotations and related attributes. The fact that both options are not
> available in the maven plugin for retrotranslator makes the Maven
> integration with Retrotranslator even less of an option for running Tuscany
> on Android.
>
> [1] http://jira.codehaus.org/browse/MRETRO-30
>
>
> On Sat, Jul 19, 2008 at 12:50 AM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
>> Hi Luciano,
>>
>> There was some progress today. I added the retrotranslator-maven-plugin
>> (excerpt show below) to the pom.xml files for all modules. I was able to
>> build (including retrotranslation) with no problems with:
>>
>> mvn clean install -Dtest=no
>> mvn -Peclipse eclipse:eclipse -Dtest=no
>>
>> However, it's not as simple as only these two steps in maven. Even though
>> the modules will be retrotranslated with no problems, a user looking to
>> reproduce the workspace will still need to add the projects to Eclipse and
>> go through the steps in the retrotranslator_readme. This includes building
>> all projects in Eclipse which will unfortunately "undo" the retrotranslation
>> done with Maven. IMO it's still easier to run retrotranslator on the trunk
>> or workspace.
>>
>> Additionally, the android sandbox would need to be integrated. Currently,
>> it is checked out separately and put together with the other modules until
>> projects are imported into Eclipse.
>>
>> Below are the extra lines for the pom.xml files. I'm currently checking
>> out if the reflection and stripannot options are available in the plugin as
>> they are not documented in the plugin project page [1].
>>
>> <plugin>
>>     <groupId>org.codehaus.mojo</groupId>
>>     <artifactId>retrotranslator-maven-plugin</artifactId>
>>     <executions>
>>         <execution>
>>             <phase>process-classes</phase>
>>             <goals>
>>                 <goal>translate</goal>
>>             </goals>
>>             <configuration>
>>                 <filesets>
>>                     <fileset>
>>
>> <directory>${project.build.outputDirectory}</directory>
>>                         <includes>
>>                             <include>**/*.class</include>
>>                         </includes>
>>                     </fileset>
>>                 </filesets>
>>                 <target>1.5</target>
>>                 <reflection>safe</reflection>
>>                 <stripannot>true</stripannot>
>>                 <verbose>true</verbose>
>>             </configuration>
>>         </execution>
>>     </executions>
>> </plugin>
>>
>> [1]
>> http://mojo.codehaus.org/retrotranslator-maven-plugin/translate-mojo.html
>>
>>
>> On Thu, Jul 17, 2008 at 7:37 PM, Luciano Resende <lu...@gmail.com>
>> wrote:
>>
>>> Any progress on getting "these instructions" down to a simple maven
>>> command like :
>>>
>>> mvn clean install
>>> mvn -o -Peclipse eclipse:eclipse
>>>
>>>
>>>
>> --
>> best,
>> -oscar
>>
>> Oscar Castañeda
>>
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Luciano,

An update is that the reflection and stripannot options from retrotranslator
command-line are not present in the maven plugin. I created a JIRA [1] for
this issue for the Mojo project that produces the plugin.

Both options are required. The first option (reflection) includes metadata
into classes to make reflection work even if the classes are unavailable as
resources after translation. The second option (stripannot) removes
annotations and related attributes. The fact that both options are not
available in the maven plugin for retrotranslator makes the Maven
integration with Retrotranslator even less of an option for running Tuscany
on Android.

[1] http://jira.codehaus.org/browse/MRETRO-30

On Sat, Jul 19, 2008 at 12:50 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Luciano,
>
> There was some progress today. I added the retrotranslator-maven-plugin
> (excerpt show below) to the pom.xml files for all modules. I was able to
> build (including retrotranslation) with no problems with:
>
> mvn clean install -Dtest=no
> mvn -Peclipse eclipse:eclipse -Dtest=no
>
> However, it's not as simple as only these two steps in maven. Even though
> the modules will be retrotranslated with no problems, a user looking to
> reproduce the workspace will still need to add the projects to Eclipse and
> go through the steps in the retrotranslator_readme. This includes building
> all projects in Eclipse which will unfortunately "undo" the retrotranslation
> done with Maven. IMO it's still easier to run retrotranslator on the trunk
> or workspace.
>
> Additionally, the android sandbox would need to be integrated. Currently,
> it is checked out separately and put together with the other modules until
> projects are imported into Eclipse.
>
> Below are the extra lines for the pom.xml files. I'm currently checking out
> if the reflection and stripannot options are available in the plugin as they
> are not documented in the plugin project page [1].
>
> <plugin>
>     <groupId>org.codehaus.mojo</groupId>
>     <artifactId>retrotranslator-maven-plugin</artifactId>
>     <executions>
>         <execution>
>             <phase>process-classes</phase>
>             <goals>
>                 <goal>translate</goal>
>             </goals>
>             <configuration>
>                 <filesets>
>                     <fileset>
>
> <directory>${project.build.outputDirectory}</directory>
>                         <includes>
>                             <include>**/*.class</include>
>                         </includes>
>                     </fileset>
>                 </filesets>
>                 <target>1.5</target>
>                 <reflection>safe</reflection>
>                 <stripannot>true</stripannot>
>                 <verbose>true</verbose>
>             </configuration>
>         </execution>
>     </executions>
> </plugin>
>
> [1]
> http://mojo.codehaus.org/retrotranslator-maven-plugin/translate-mojo.html
>
>
> On Thu, Jul 17, 2008 at 7:37 PM, Luciano Resende <lu...@gmail.com>
> wrote:
>
>> Any progress on getting "these instructions" down to a simple maven
>> command like :
>>
>> mvn clean install
>> mvn -o -Peclipse eclipse:eclipse
>>
>>
>>
> --
> best,
> -oscar
>
> Oscar Castañeda
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Luciano,

There was some progress today. I added the retrotranslator-maven-plugin
(excerpt show below) to the pom.xml files for all modules. I was able to
build (including retrotranslation) with no problems with:

mvn clean install -Dtest=no
mvn -Peclipse eclipse:eclipse -Dtest=no

However, it's not as simple as only these two steps in maven. Even though
the modules will be retrotranslated with no problems, a user looking to
reproduce the workspace will still need to add the projects to Eclipse and
go through the steps in the retrotranslator_readme. This includes building
all projects in Eclipse which will unfortunately "undo" the retrotranslation
done with Maven. IMO it's still easier to run retrotranslator on the trunk
or workspace.

Additionally, the android sandbox would need to be integrated. Currently, it
is checked out separately and put together with the other modules until
projects are imported into Eclipse.

Below are the extra lines for the pom.xml files. I'm currently checking out
if the reflection and stripannot options are available in the plugin as they
are not documented in the plugin project page [1].

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>retrotranslator-maven-plugin</artifactId>
    <executions>
        <execution>
            <phase>process-classes</phase>
            <goals>
                <goal>translate</goal>
            </goals>
            <configuration>
                <filesets>
                    <fileset>

<directory>${project.build.outputDirectory}</directory>
                        <includes>
                            <include>**/*.class</include>
                        </includes>
                    </fileset>
                </filesets>
                <target>1.5</target>
                <reflection>safe</reflection>
                <stripannot>true</stripannot>
                <verbose>true</verbose>
            </configuration>
        </execution>
    </executions>
</plugin>

[1]
http://mojo.codehaus.org/retrotranslator-maven-plugin/translate-mojo.html


On Thu, Jul 17, 2008 at 7:37 PM, Luciano Resende <lu...@gmail.com>
wrote:

> Any progress on getting "these instructions" down to a simple maven
> command like :
>
> mvn clean install
> mvn -o -Peclipse eclipse:eclipse
>
>
>
-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
Any progress on getting "these instructions" down to a simple maven
command like :

mvn clean install
mvn -o -Peclipse eclipse:eclipse

On Thu, Jul 17, 2008 at 1:55 AM, Adriano Crestani
<ad...@apache.org> wrote:
> Hi,
>
> Sorry Oscar, I should have tested again the last modules I have uploaded to
> the android sandbox, the modules had the Java Builder builder unchecked...it
> causes some errors when you import them into another workspace :S...I
> already fixed that : )
>
> Also, run the mvn on mobile-sandbox/tuscany-interface-java-jaxws/
> module...its eclipse project requires a folder that is only created when the
> mvn runs on this module.
>
> I have updated the instruction file you created with the new instructions :
> )
>
> If you still get any problem, just let us know ; )
>
> Regards,
> Adriano Crestani
>
> On Wed, Jul 16, 2008 at 6:55 AM, Oscar Castaneda
> <os...@gmail.com> wrote:
>>
>> Hi Adriano,
>>
>> I have been trying to reproduce the Exception you are getting. I found out
>> that the Corba errors were related to [1] so I tried with the latest
>> revision. I'm able to build it with maven with no problems. However, when I
>> import the projects into Eclipse I get all sorts of errors when doing a
>> build.
>>
>> I guess I'm confused by your reference to revision 674723 in the the URL
>> you provided for the Exception. So I tried with revision 643746, which is
>> the one you referenced originally on this thread on May 6th. Same story
>> here, I can build with maven but when I import the projects into Eclipse I
>> get all sorts of errors.
>>
>> Looking closer at the errors I found that they are related to
>> tuscany-interface-java-jaxws. More specifically, some imports (like those
>> shown below for example) cannot be resolved. The result is that all the
>> modules that reference tuscany-interface-java-jaxws end up in error.
>>
>> import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
>> import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
>> import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
>>
>> Am I missing anything to reproduce your workspace?
>>
>> [1] http://www.mail-archive.com/dev@tuscany.apache.org/msg00587.html
>>
>> On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani
>> <ad...@apache.org> 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 <lu...@gmail.com>
>>> 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.
>>>>
>>>> On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
>>>> <os...@gmail.com> wrote:
>>>> > Thanks Adriano. I have been testing the workarounds for RMI and Beans
>>>> > API. I
>>>> > am also working to integrate retrotranslator into maven.
>>>> >
>>>> > Today, I tested the newest version of retrotranslator (thanks for the
>>>> > tip).
>>>> > With this new version RMI related issues are not appearing (not
>>>> > initially,
>>>> > at least) but instead Beans issues are. I've commented
>>>> > java.beans.Introspector import and related code from
>>>> > JavaIntrospectionHelper.java and now get other errors [1] related to
>>>> > javax.jws.WebService. Suggestions are welcome and appreciated.
>>>> >
>>>> > I've noted down these issues on the porting limitations page [2],
>>>> > which I
>>>> > have updated with the current progress.
>>>> >
>>>> > [1]
>>>> >
>>>> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
>>>> > [2]
>>>> >
>>>> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>>> >
>>>> > On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
>>>> > <ad...@apache.org> wrote:
>>>> >>
>>>> >> I added to the wiki a page [1] about all the issues we have found so
>>>> >> far
>>>> >> when trying to port the SCA Java to the Android platform.
>>>> >>
>>>> >> [1] -
>>>> >>
>>>> >>
>>>> >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>>> >>
>>>> >> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
>>>> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >>
>>>> >> > Hi Luciano,
>>>> >> >
>>>> >> > Thanks for the tip. Before testing it I generated a JIRA ticket [1]
>>>> >> > for
>>>> >> > the
>>>> >> > Retrotranslator progress, and when I got around to testing I
>>>> >> > noticed a
>>>> >> > different ClassNotFoundException. This time its for
>>>> >> > java.beans.Introspector.  I made sure to include this in the JIRA
>>>> >> > ticket
>>>> >> > and
>>>> >> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
>>>> >> >
>>>> >> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
>>>> >> > [2]
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>>>> >> >
>>>> >> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende
>>>> >> > <lu...@gmail.com>
>>>> >> > wrote:
>>>> >> >
>>>> >> > > Removing RMI should be as simple as removing the
>>>> >> > > tuscany-binding-rmi
>>>> >> > > dependency from host-android.
>>>> >> > >
>>>> >> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
>>>> >> > > <os...@gmail.com> wrote:
>>>> >> > > > Hi Luciano,
>>>> >> > > >
>>>> >> > > > It's going better after the progress last week with
>>>> >> > > > retrotranslator.
>>>> >> > I'm
>>>> >> > > now
>>>> >> > > > able to translate the SCA classes and run calculator-android
>>>> >> > > > without
>>>> >> > > getting
>>>> >> > > > Annotation related issues. The problems now are related to RMI.
>>>> >> > > > In
>>>> >> > > relation
>>>> >> > > > to this, and from your comment about blocking issues, I created
>>>> >> > > > a
>>>> >> > > > child
>>>> >> > > page
>>>> >> > > > [1] in the project wiki for Blocking issues. Currently, the
>>>> >> > > > page
>>>> >> > > > lists
>>>> >> > > the
>>>> >> > > > RMI issue and suggested workarounds.
>>>> >> > > >
>>>> >> > > > I think your suggestion about integration with maven is really
>>>> >> > > > good.
>>>> >> > > > Especially because there is a retrotranslator plugin for maven.
>>>> >> > > > I'll
>>>> >> > > start
>>>> >> > > > looking into using this plugin. I also agree about reviewing
>>>> >> > > > the
>>>> >> > > > scope
>>>> >> > of
>>>> >> > > > support. Right now, I see a need to reduce the dependency on
>>>> >> > > > RMI,
>>>> >> > either
>>>> >> > > by
>>>> >> > > > commenting all the code that uses the RMI API, or by following
>>>> >> > > > the
>>>> >> > > > suggestions from Taras [3] to either replace java.rmi.Remote
>>>> >> > > > with
>>>> >> > > > java.lang.Cloneable (as the result of using a retrotranslator
>>>> >> > > > option)
>>>> >> > or
>>>> >> > > > taking the RMI source from Apache Harmony and putting it in a
>>>> >> > > > retrotranslated JAR. What would you recommend? Hopefully after
>>>> >> > > > the
>>>> >> > > > dependency reduction Android will be able to run
>>>> >> > > > calculator-android.
>>>> >> > > Based
>>>> >> > > > on the results of this experiment we can better consider the
>>>> >> > > > reduction
>>>> >> > of
>>>> >> > > > component types and bindings. Please let me know your thoughts
>>>> >> > > > on
>>>> >> > > > this
>>>> >> > > idea.
>>>> >> > > >
>>>> >> > > > [1]
>>>> >> > >
>>>> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
>>>> >> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
>>>> >> > > > [3]
>>>> >> > > >
>>>> >> > > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>>>> >> > > >
>>>> >> > > >
>>>> >> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
>>>> >> > luckbr1975@gmail.com>
>>>> >> > > > wrote:
>>>> >> > > >
>>>> >> > > >> How is it going here ? I just want to check if there is any
>>>> >> > > >> blocking
>>>> >> > > >> issues with Android at the moment, if so, is there a list of
>>>> >> > > >> these
>>>> >> > > >> issues somewhere ?
>>>> >> > > >>
>>>> >> > > >> Also, some general suggestions/recommendations.: It would be
>>>> >> > > >> great
>>>> >> > > >> if
>>>> >> > > >> we could spend sometime to get the modules well integrated
>>>> >> > > >> using
>>>> >> > > >> maven, this way it would be easier for anyone on the community
>>>> >> > > >> to
>>>> >> > > >> checkout the trunk + android sandbox and jump on the code to
>>>> >> > > >> help.
>>>> >> > > >> Also, we should review the scope of the support we are trying
>>>> >> > > >> to
>>>> >> > > >> acomplish, I'd suggest to minimize the number of component
>>>> >> > > >> types
>>>> >> > > >> supported (java) and bindings (default sca binding) and then
>>>> >> > > >> try to
>>>> >> > > >> run the calculator sample application. Once we have
>>>> >> > > >> acomplished
>>>> >> > > >> this
>>>> >> > > >> first milestone, we could then discuss our next steps.
>>>> >> > > >>
>>>> >> > > >> Thoughts ?
>>>> >> > > >>
>>>> >> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>>>> >> > > >> <ad...@apache.org> wrote:
>>>> >> > > >> > Ah, here is a tip to assure the classes are not recompiled
>>>> >> > > >> > again.
>>>> >> > > Build
>>>> >> > > >> the
>>>> >> > > >> > project, then go in each project builder (in the properties
>>>> >> > > >> > window)
>>>> >> > > and
>>>> >> > > >> > disable all the builders, then not even a clean/build will
>>>> >> > > >> > modify
>>>> >> > your
>>>> >> > > >> > project ; )
>>>> >> > > >> >
>>>> >> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>>>> >> > > >> adrianocrestani@apache.org>
>>>> >> > > >> > wrote:
>>>> >> > > >> >
>>>> >> > > >> >> Hi Oscar,
>>>> >> > > >> >>
>>>> >> > > >> >> I say that it is more difficult to debug because you need
>>>> >> > > >> >> attach
>>>> >> > > >> >> a
>>>> >> > > >> source
>>>> >> > > >> >> code to each jar and etc, and when you are using projects,
>>>> >> > > >> >> eclipse
>>>> >> > > >> already
>>>> >> > > >> >> knows where to find the source code : )
>>>> >> > > >> >>
>>>> >> > > >> >> The reply made sense to me, especially with regards to the
>>>> >> > > >> >> fact
>>>> >> > that
>>>> >> > > >> with
>>>> >> > > >> >> the Android plugin Eclipse compiles sources into classes
>>>> >> > > >> >> and
>>>> >> > > >> >> then
>>>> >> > > into
>>>> >> > > >> dex
>>>> >> > > >> >> files, so retrotranslator has no chance to translate
>>>> >> > > >> >> classes in
>>>> >> > > between
>>>> >> > > >> >> these steps - even if I do that outside of Eclipse. This
>>>> >> > > >> >> shows
>>>> >> > > >> >> from
>>>> >> > > the
>>>> >> > > >> use
>>>> >> > > >> >> of non-translated binaries (as indicated by the
>>>> >> > > >> >> java.lang.Class.isAnnotationPr
>>>> >> > > >> >> esent(Class.java:1131) error in the stack
>>>> >> > > >> >> trace) that might have been related to the use of
>>>> >> > > >> >> pre-existing
>>>> >> > > >> >> dex
>>>> >> > > files
>>>> >> > > >> or
>>>> >> > > >> >> over-writing of files by Eclipse. So unless I modify the
>>>> >> > > >> >> ADT
>>>> >> > > >> >> plugin
>>>> >> > > the
>>>> >> > > >> >> result would still be the same, even if I use a simpler
>>>> >> > > >> >> scenario.
>>>> >> > > >> >>
>>>> >> > > >> >> Sorry, I really did not comment this email yet. It does not
>>>> >> > > >> >> make
>>>> >> > > >> >> so
>>>> >> > > much
>>>> >> > > >> >> sense for me. First, as you already know, eclipse android
>>>> >> > > >> >> projects
>>>> >> > > does
>>>> >> > > >> not
>>>> >> > > >> >> recognize any modifications in the imported projects, so it
>>>> >> > > >> >> does
>>>> >> > not
>>>> >> > > >> call
>>>> >> > > >> >> the build or incremental build even if the imported
>>>> >> > > >> >> projects
>>>> >> > > >> >> have
>>>> >> > > their
>>>> >> > > >> >> source code modified. Just to make sure I tested it again:
>>>> >> > > >> >>
>>>> >> > > >> >> 1-  imported in my workspace all the projects included in
>>>> >> > > >> >> the
>>>> >> > > >> >> calculator-android, cleaned and built them...it takes a
>>>> >> > > >> >> loooong
>>>> >> > time,
>>>> >> > > as
>>>> >> > > >> you
>>>> >> > > >> >> already know.
>>>> >> > > >> >>
>>>> >> > > >> >> 2- imported the calculator-android project, cleaned and
>>>> >> > > >> >> built it
>>>> >> > > (only
>>>> >> > > >> the
>>>> >> > > >> >> calculator-android project), and this process was too much
>>>> >> > > >> >> faster
>>>> >> > > than
>>>> >> > > >> when
>>>> >> > > >> >> all the modules are built, so the imported projects were
>>>> >> > > >> >> not
>>>> >> > > recompiled,
>>>> >> > > >> >> otherwise it would take too much more time. I suppose here
>>>> >> > > >> >> that
>>>> >> > > >> >> the
>>>> >> > > >> android
>>>> >> > > >> >> project compiles the .java contained in the android project
>>>> >> > > >> >> and
>>>> >> > > convert
>>>> >> > > >> all
>>>> >> > > >> >> the .class files (generated by imported projects and
>>>> >> > > >> >> android
>>>> >> > project)
>>>> >> > > to
>>>> >> > > >> dex
>>>> >> > > >> >> format.
>>>> >> > > >> >>
>>>> >> > > >> >> So, it does not recompile the external class files (the
>>>> >> > > >> >> ones
>>>> >> > > contained
>>>> >> > > >> in
>>>> >> > > >> >> the imported projects) cause it seems not to check if it
>>>> >> > > >> >> was
>>>> >> > modified
>>>> >> > > or
>>>> >> > > >> >> not. Of course, I never tested it modifing the .class
>>>> >> > > >> >> files, I'm
>>>> >> > just
>>>> >> > > >> >> assuming that, because when you modify .java files it does
>>>> >> > > >> >> not
>>>> >> > > >> >> get
>>>> >> > > >> >> recompiled.
>>>> >> > > >> >>
>>>> >> > > >> >> What do you think?
>>>> >> > > >> >>
>>>> >> > > >> >> As I mentioned before, your comments are really helpful as
>>>> >> > > >> >> they
>>>> >> > give
>>>> >> > > me
>>>> >> > > >> a
>>>> >> > > >> >> sense of direction. Please let me know if you still think
>>>> >> > > >> >> we
>>>> >> > > >> >> should
>>>> >> > > >> pursue
>>>> >> > > >> >> retrotranslator for files inside a folder.
>>>> >> > > >> >>
>>>> >> > > >> >> I really think you should try at first the simpler scenario
>>>> >> > > >> >> and
>>>> >> > > >> >> try
>>>> >> > > to
>>>> >> > > >> >> understand how it works and IF it works. Also, you can try
>>>> >> > > >> >> what
>>>> >> > > >> >> you
>>>> >> > > were
>>>> >> > > >> >> planning: to retrotranslate the each modules' jar, but I
>>>> >> > > >> >> suppose
>>>> >> > it's
>>>> >> > > a
>>>> >> > > >> lot
>>>> >> > > >> >> of work, because there are so many modules :S. So, as I've
>>>> >> > > >> >> already
>>>> >> > > said,
>>>> >> > > >> if
>>>> >> > > >> >> you think it's getting to complicated, forget it and go on
>>>> >> > > >> >> with
>>>> >> > > >> Luciano's
>>>> >> > > >> >> suggestion.
>>>> >> > > >> >>
>>>> >> > > >> >> Feel free to choose the direction you want to take, and if
>>>> >> > > >> >> there
>>>> >> > > >> >> is
>>>> >> > > >> another
>>>> >> > > >> >> approach you think is better, just let us know ; )...you
>>>> >> > > >> >> are the
>>>> >> > best
>>>> >> > > >> person
>>>> >> > > >> >> to choose the directions, cause you are working directly on
>>>> >> > > >> >> it,
>>>> >> > > >> >> we
>>>> >> > > are
>>>> >> > > >> just
>>>> >> > > >> >> guinding/helping you ; )
>>>> >> > > >> >>
>>>> >> > > >> >> Thanks,
>>>> >> > > >> >> Adriano Crestani
>>>> >> > > >> >>
>>>> >> > > >> >>
>>>> >> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>>>> >> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>
>>>> >> > > >> >>> Hi Adriano,
>>>> >> > > >> >>>
>>>> >> > > >> >>> If there is an option on retrotranslator to retrotranslate
>>>> >> > > >> >>> all
>>>> >> > > >> >>> the
>>>> >> > > >> classes
>>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>>> >> > > >> >>> > classes
>>>> >> > inside
>>>> >> > > >> .jar
>>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>>> >> > > >> >>> > first
>>>> >> > > >> approach
>>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>>> >> > > >> >>> > working
>>>> >> > > trying
>>>> >> > > >> a
>>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >> >>> I agree that it's good to try out a simpler scenario to
>>>> >> > > >> >>> better
>>>> >> > > >> understand
>>>> >> > > >> >>> the problem. I haven't tried it yet because using
>>>> >> > > >> >>> retrotranslator
>>>> >> > > for
>>>> >> > > >> >>> classes inside a folder doesn't seem to be a solution to
>>>> >> > > >> >>> the
>>>> >> > > problem.
>>>> >> > > >> >>> Here's
>>>> >> > > >> >>> my reasoning:
>>>> >> > > >> >>>
>>>> >> > > >> >>> Yes, there is an option to translate classes in a folder.
>>>> >> > > >> >>> I
>>>> >> > > >> >>> tried
>>>> >> > it
>>>> >> > > >> and
>>>> >> > > >> >>> it
>>>> >> > > >> >>> successfully translated the classes inside my Eclipse
>>>> >> > > >> >>> workspace.
>>>> >> > > When I
>>>> >> > > >> >>> ran
>>>> >> > > >> >>> the calculator-android application using the newly
>>>> >> > > >> >>> translated
>>>> >> > > classes I
>>>> >> > > >> >>> was
>>>> >> > > >> >>> getting the errors in [1]. I posted a question in Android
>>>> >> > Developers
>>>> >> > > >> about
>>>> >> > > >> >>> this error and received a reply [2].
>>>> >> > > >> >>>
>>>> >> > > >> >>> The reply made sense to me, especially with regards to the
>>>> >> > > >> >>> fact
>>>> >> > that
>>>> >> > > >> with
>>>> >> > > >> >>> the Android plugin Eclipse compiles sources into classes
>>>> >> > > >> >>> and
>>>> >> > > >> >>> then
>>>> >> > > into
>>>> >> > > >> dex
>>>> >> > > >> >>> files, so retrotranslator has no chance to translate
>>>> >> > > >> >>> classes in
>>>> >> > > between
>>>> >> > > >> >>> these steps - even if I do that outside of Eclipse. This
>>>> >> > > >> >>> shows
>>>> >> > from
>>>> >> > > the
>>>> >> > > >> >>> use
>>>> >> > > >> >>> of non-translated binaries (as indicated by the
>>>> >> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error
>>>> >> > > >> >>> in
>>>> >> > > >> >>> the
>>>> >> > > stack
>>>> >> > > >> >>> trace) that might have been related to the use of
>>>> >> > > >> >>> pre-existing
>>>> >> > > >> >>> dex
>>>> >> > > >> files
>>>> >> > > >> >>> or
>>>> >> > > >> >>> over-writing of files by Eclipse. So unless I modify the
>>>> >> > > >> >>> ADT
>>>> >> > plugin
>>>> >> > > the
>>>> >> > > >> >>> result would still be the same, even if I use a simpler
>>>> >> > > >> >>> scenario.
>>>> >> > > >> >>>
>>>> >> > > >> >>> The reply suggested to use JAR's instead. This also made
>>>> >> > > >> >>> sense
>>>> >> > > >> >>> to
>>>> >> > me
>>>> >> > > >> and
>>>> >> > > >> >>> seemed like a simpler way of solving the problem. I didn't
>>>> >> > > >> >>> see
>>>> >> > > >> >>> the
>>>> >> > > >> >>> disadvantage of debugging, which as you point out is more
>>>> >> > difficult
>>>> >> > > >> with
>>>> >> > > >> >>> JAR's instead of Eclipse projects.
>>>> >> > > >> >>>
>>>> >> > > >> >>> As I mentioned before, your comments are really helpful as
>>>> >> > > >> >>> they
>>>> >> > give
>>>> >> > > me
>>>> >> > > >> a
>>>> >> > > >> >>> sense of direction. Please let me know if you still think
>>>> >> > > >> >>> we
>>>> >> > should
>>>> >> > > >> pursue
>>>> >> > > >> >>> retrotranslator for files inside a folder.
>>>> >> > > >> >>>
>>>> >> > > >> >>>
>>>> >> > > >> >>> [1]
>>>> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>>>> >> > > >> >>> [2]
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>>> >> > > >> >>>
>>>> >> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>>>> >> > > >> >>> adrianocrestani@apache.org>
>>>> >> > > >> >>> wrote:
>>>> >> > > >> >>>
>>>> >> > > >> >>> > Hi Oscar,
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Yup, you're right - there are indeed Eclipse files
>>>> >> > > >> >>> > inside the
>>>> >> > > >> folders. I
>>>> >> > > >> >>> > guess I was confused by the different names in [1] than
>>>> >> > > >> >>> > those
>>>> >> > that
>>>> >> > > >> >>> result
>>>> >> > > >> >>> > [2] from importing to an Eclipse workspace - after which
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> > see
>>>> >> > 13
>>>> >> > > >> >>> projects
>>>> >> > > >> >>> > in both cases. So please ignore my previous remark.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > I have added the projects, but still haven't changed
>>>> >> > > >> >>> > their
>>>> >> > names.
>>>> >> > > I
>>>> >> > > >> was
>>>> >> > > >> >>> > planning to modify their project names when we get it
>>>> >> > > >> >>> > integrated
>>>> >> > > to
>>>> >> > > >> SCA,
>>>> >> > > >> >>> > mainly because we will need to change the poms. Anyway,
>>>> >> > > >> >>> > feel
>>>> >> > free
>>>> >> > > to
>>>> >> > > >> >>> modify
>>>> >> > > >> >>> > the names whenever you want ; )
>>>> >> > > >> >>> >
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Per the reply I received on the Android Developers list
>>>> >> > > >> >>> > [3] I
>>>> >> > > started
>>>> >> > > >> >>> using
>>>> >> > > >> >>> > retrotranslator on JAR's instead of class files. For
>>>> >> > > >> >>> > this I
>>>> >> > > created a
>>>> >> > > >> >>> big
>>>> >> > > >> >>> > JAR file with all the Tuscany modules (including those
>>>> >> > > >> >>> > you
>>>> >> > > modified
>>>> >> > > >> for
>>>> >> > > >> >>> > Android). I translated this big JAR (around 15MB) with
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> [4].
>>>> >> > > >> >>> > Then I created a new workspace with only
>>>> >> > > >> >>> > calculator-android
>>>> >> > > >> >>> > and
>>>> >> > > >> >>> > android-jdk-classes as projects and added the translated
>>>> >> > > >> >>> > JAR
>>>> >> > > >> >>> > as
>>>> >> > an
>>>> >> > > >> >>> external
>>>> >> > > >> >>> > library for both projects. This resulted in errors [4]
>>>> >> > > >> >>> > from
>>>> >> > > >> >>> > the
>>>> >> > > >> Android
>>>> >> > > >> >>> > build process.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > I really do not understand this errors, but as this
>>>> >> > > >> >>> > errors
>>>> >> > > >> >>> > are
>>>> >> > > only
>>>> >> > > >> >>> related
>>>> >> > > >> >>> > to testcase classes they can be ignored (removed from
>>>> >> > > >> >>> > the
>>>> >> > > >> >>> > jars).
>>>> >> > I
>>>> >> > > >> also
>>>> >> > > >> >>> did
>>>> >> > > >> >>> > not understand why it's not find the .apk file:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not
>>>> >> > > >> >>> > find
>>>> >> > > >> >>> > /bin/calculator-android.apk!"
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > To work around these errors I decided to take a
>>>> >> > > >> >>> > different
>>>> >> > approach
>>>> >> > > >> and
>>>> >> > > >> >>> copy
>>>> >> > > >> >>> > all the jar files contained in the individual modules to
>>>> >> > > >> >>> > a
>>>> >> > > separate
>>>> >> > > >> >>> folder
>>>> >> > > >> >>> > and then run retrotranslator on each JAR. The jars are
>>>> >> > > >> >>> > found
>>>> >> > > inside
>>>> >> > > >> the
>>>> >> > > >> >>> > target folder of each module and are named as shown
>>>> >> > > >> >>> > below:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > From this I found that only the SCA modules have these
>>>> >> > > >> >>> > JAR
>>>> >> > > >> >>> > files
>>>> >> > > >> inside
>>>> >> > > >> >>> > their respective target folders, whereas the Android
>>>> >> > > >> >>> > modules
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> downloaded
>>>> >> > > >> >>> > from [1] don't have these files at all
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Yep, this .jars are generated when the maven is
>>>> >> > > >> >>> > executed. I'm
>>>> >> > not
>>>> >> > > >> sure
>>>> >> > > >> >>> if
>>>> >> > > >> >>> > you should use this .jars, because they were compiled
>>>> >> > > >> >>> > with no
>>>> >> > > >> reference
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > Android library. That's also why there are no .jar files
>>>> >> > > >> >>> > for
>>>> >> > > android
>>>> >> > > >> >>> > modules, because you did not execute the maven on them
>>>> >> > > >> >>> >  (and
>>>> >> > > >> >>> > you
>>>> >> > > >> >>> > shouldn't).
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > So I decided to keep the Android
>>>> >> > > >> >>> > modules [2] and add the translated JARs as libraries
>>>> >> > > >> >>> > where
>>>> >> > needed
>>>> >> > > to
>>>> >> > > >> >>> have
>>>> >> > > >> >>> > the workspace build with no problems. If I get this
>>>> >> > > >> >>> > running I
>>>> >> > > would
>>>> >> > > >> look
>>>> >> > > >> >>> > into creating JAR files from the Android modules and
>>>> >> > > >> >>> > then
>>>> >> > > >> >>> > return
>>>> >> > > to
>>>> >> > > >> only
>>>> >> > > >> >>> > having calculator-android and android-jdk-classes as
>>>> >> > > >> >>> > projects
>>>> >> > and
>>>> >> > > the
>>>> >> > > >> >>> rest
>>>> >> > > >> >>> > as JAR's added as external libraries. If this works out
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> > could
>>>> >> > > then
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > into seeing which JAR's are important and which are not,
>>>> >> > > >> >>> > in
>>>> >> > > >> >>> > this
>>>> >> > > way
>>>> >> > > >> >>> > reducing the total memory footprint and coming up with a
>>>> >> > > "lightweight
>>>> >> > > >> >>> > mobile
>>>> >> > > >> >>> > SCA core/runtime." Please let me know your thoughts on
>>>> >> > > >> >>> > these
>>>> >> > > efforts.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > You haven't tried this yet, right? You may try it, but I
>>>> >> > > >> >>> > do
>>>> >> > > >> >>> > not
>>>> >> > > like
>>>> >> > > >> >>> this
>>>> >> > > >> >>> > approach, because it will get difficult to debug sca
>>>> >> > > >> >>> > classes
>>>> >> > > >> >>> > as
>>>> >> > > they
>>>> >> > > >> are
>>>> >> > > >> >>> > not
>>>> >> > > >> >>> > imported as eclipse projects.
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > If there is an option on retrotranslator to
>>>> >> > > >> >>> > retrotranslate
>>>> >> > > >> >>> > all
>>>> >> > the
>>>> >> > > >> >>> classes
>>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>>> >> > > >> >>> > classes
>>>> >> > inside
>>>> >> > > >> .jar
>>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>>> >> > > >> >>> > first
>>>> >> > > >> approach
>>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>>> >> > > >> >>> > working
>>>> >> > > trying
>>>> >> > > >> a
>>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Also, if the restrotranslator gets to complicated, you
>>>> >> > > >> >>> > may
>>>> >> > > >> >>> > try
>>>> >> > the
>>>> >> > > >> >>> > Luciano's
>>>> >> > > >> >>> > suggestion ; )
>>>> >> > > >> >>> >
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > Kind Regards,
>>>> >> > > >> >>> > Adriano Crestani
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>>>> >> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > > Hi Adriano,
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside
>>>> >> > > >> >>> > > > its
>>>> >> > folders,
>>>> >> > > >> there
>>>> >> > > >> >>> > are
>>>> >> > > >> >>> > > > the
>>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>>> >> > > >> >>> > > > by
>>>> >> > > >> >>> > > > the
>>>> >> > > >> eclipse
>>>> >> > > >> >>> > import
>>>> >> > > >> >>> > > > tool as an eclipse project.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Yup, you're right - there are indeed Eclipse files
>>>> >> > > >> >>> > > inside
>>>> >> > > >> >>> > > the
>>>> >> > > >> folders.
>>>> >> > > >> >>> I
>>>> >> > > >> >>> > > guess I was confused by the different names in [1]
>>>> >> > > >> >>> > > than
>>>> >> > > >> >>> > > those
>>>> >> > > that
>>>> >> > > >> >>> result
>>>> >> > > >> >>> > > [2] from importing to an Eclipse workspace - after
>>>> >> > > >> >>> > > which I
>>>> >> > > >> >>> > > see
>>>> >> > > 13
>>>> >> > > >> >>> > projects
>>>> >> > > >> >>> > > in both cases. So please ignore my previous remark.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > I don't think introspection is a good solution, hence
>>>> >> > > >> >>> > > you
>>>> >> > > >> >>> > > will
>>>> >> > > need
>>>> >> > > >> to
>>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>>> >> > > >> >>> > > > and
>>>> >> > also
>>>> >> > > >> >>> services
>>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>>> >> > > >> >>> > > > on
>>>> >> > > Android.
>>>> >> > > >> >>> Let's
>>>> >> > > >> >>> > > avoid
>>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> in
>>>> >> > > >> >>> > > > mind
>>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>>> >> > > >> >>> > > > SDK
>>>> >> > > release
>>>> >> > > >> :S
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > >  Also, if you get the retrotranslator working,
>>>> >> > > >> >>> > > > forget the
>>>> >> > > >> Luciano's
>>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>>> >> > > >> >>> > > > same
>>>> >> > > >> >>> > > > time
>>>> >> > ;
>>>> >> > > )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in
>>>> >> > > >> >>> > > the
>>>> >> > right
>>>> >> > > >> >>> > direction
>>>> >> > > >> >>> > > :-)
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Now, a summary of what I've done up to now:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > Per the reply I received on the Android Developers
>>>> >> > > >> >>> > > list [3]
>>>> >> > > >> >>> > > I
>>>> >> > > >> started
>>>> >> > > >> >>> > using
>>>> >> > > >> >>> > > retrotranslator on JAR's instead of class files. For
>>>> >> > > >> >>> > > this I
>>>> >> > > created
>>>> >> > > >> a
>>>> >> > > >> >>> big
>>>> >> > > >> >>> > > JAR file with all the Tuscany modules (including those
>>>> >> > > >> >>> > > you
>>>> >> > > modified
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> > [4].
>>>> >> > > >> >>> > > Then I created a new workspace with only
>>>> >> > > >> >>> > > calculator-android
>>>> >> > and
>>>> >> > > >> >>> > > android-jdk-classes as projects and added the
>>>> >> > > >> >>> > > translated
>>>> >> > > >> >>> > > JAR
>>>> >> > as
>>>> >> > > an
>>>> >> > > >> >>> > external
>>>> >> > > >> >>> > > library for both projects. This resulted in errors [4]
>>>> >> > > >> >>> > > from
>>>> >> > the
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > build process.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > To work around these errors I decided to take a
>>>> >> > > >> >>> > > different
>>>> >> > > approach
>>>> >> > > >> and
>>>> >> > > >> >>> > copy
>>>> >> > > >> >>> > > all the jar files contained in the individual modules
>>>> >> > > >> >>> > > to a
>>>> >> > > separate
>>>> >> > > >> >>> > folder
>>>> >> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
>>>> >> > > >> >>> > > found
>>>> >> > > inside
>>>> >> > > >> >>> the
>>>> >> > > >> >>> > > target folder of each module and are named as shown
>>>> >> > > >> >>> > > below:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > From this I found that only the SCA modules have these
>>>> >> > > >> >>> > > JAR
>>>> >> > files
>>>> >> > > >> >>> inside
>>>> >> > > >> >>> > > their respective target folders, whereas the Android
>>>> >> > > >> >>> > > modules I
>>>> >> > > >> >>> downloaded
>>>> >> > > >> >>> > > from [1] don't have these files at all. So I decided
>>>> >> > > >> >>> > > to
>>>> >> > > >> >>> > > keep
>>>> >> > the
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > modules [2] and add the translated JARs as libraries
>>>> >> > > >> >>> > > where
>>>> >> > > needed
>>>> >> > > >> to
>>>> >> > > >> >>> have
>>>> >> > > >> >>> > > the workspace build with no problems. If I get this
>>>> >> > > >> >>> > > running
>>>> >> > > >> >>> > > I
>>>> >> > > would
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > > into creating JAR files from the Android modules and
>>>> >> > > >> >>> > > then
>>>> >> > return
>>>> >> > > to
>>>> >> > > >> >>> only
>>>> >> > > >> >>> > > having calculator-android and android-jdk-classes as
>>>> >> > > >> >>> > > projects
>>>> >> > > and
>>>> >> > > >> the
>>>> >> > > >> >>> > rest
>>>> >> > > >> >>> > > as JAR's added as external libraries. If this works
>>>> >> > > >> >>> > > out I
>>>> >> > could
>>>> >> > > >> then
>>>> >> > > >> >>> look
>>>> >> > > >> >>> > > into seeing which JAR's are important and which are
>>>> >> > > >> >>> > > not, in
>>>> >> > this
>>>> >> > > >> way
>>>> >> > > >> >>> > > reducing the total memory footprint and coming up with
>>>> >> > > >> >>> > > a
>>>> >> > > >> "lightweight
>>>> >> > > >> >>> > > mobile
>>>> >> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
>>>> >> > > >> >>> > > these
>>>> >> > > >> efforts.
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > [1]
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>>>> >> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>>>> >> > > >> >>> > > [3]
>>>> >> > > >>
>>>> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>>> >> > > >> >>> > > [4]
>>>> >> > > >>
>>>> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>>>> >> > > >> >>> > > adrianocrestani@apache.org>
>>>> >> > > >> >>> > > wrote:
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> > > > Hi Oscar,
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > When I imported the projects from [3] the following
>>>> >> > > >> >>> > > > projects
>>>> >> > > were
>>>> >> > > >> >>> not
>>>> >> > > >> >>> > > > imported:
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > core-android
>>>> >> > > >> >>> > > > host-android
>>>> >> > > >> >>> > > > extensibility
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Is this normal? Should they be imported?
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside
>>>> >> > > >> >>> > > > its
>>>> >> > folders,
>>>> >> > > >> there
>>>> >> > > >> >>> > are
>>>> >> > > >> >>> > > > the
>>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>>> >> > > >> >>> > > > by
>>>> >> > > >> >>> > > > the
>>>> >> > > >> eclipse
>>>> >> > > >> >>> > import
>>>> >> > > >> >>> > > > tool as an eclipse project.
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Thanks for the detailed explanation. I'm going to
>>>> >> > > >> >>> > > > give
>>>> >> > > >> >>> > > > this
>>>> >> > a
>>>> >> > > try
>>>> >> > > >> as
>>>> >> > > >> >>> I
>>>> >> > > >> >>> > > > found
>>>> >> > > >> >>> > > > an introspection related comment [2] as a workaround
>>>> >> > > >> >>> > > > to
>>>> >> > > another
>>>> >> > > >> >>> > > annotations
>>>> >> > > >> >>> > > > problem with the current SDK.
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > I don't think introspection is a good solution,
>>>> >> > > >> >>> > > > hence you
>>>> >> > will
>>>> >> > > >> need
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>>> >> > > >> >>> > > > and
>>>> >> > also
>>>> >> > > >> >>> services
>>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>>> >> > > >> >>> > > > on
>>>> >> > > Android.
>>>> >> > > >> >>> Let's
>>>> >> > > >> >>> > > avoid
>>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>>> >> > > >> retrotranslator
>>>> >> > > >> >>> in
>>>> >> > > >> >>> > > > mind
>>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>>> >> > > >> >>> > > > SDK
>>>> >> > > release
>>>> >> > > >> :S
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Also, if you get the retrotranslator working, forget
>>>> >> > > >> >>> > > > the
>>>> >> > > >> Luciano's
>>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>>> >> > > >> >>> > > > same
>>>> >> > > >> >>> > > > time
>>>> >> > ;
>>>> >> > > )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Any progress testing retrotranslator on a simpler
>>>> >> > > >> >>> > > > scenario,
>>>> >> > > just
>>>> >> > > >> let
>>>> >> > > >> >>> us
>>>> >> > > >> >>> > > > know
>>>> >> > > >> >>> > > > ; )
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > Kind Regards,
>>>> >> > > >> >>> > > > Adriano Crestani
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>>>> >> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > > > > Hi Adriano,
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > At first, build a simple, but equivalent scenario,
>>>> >> > > >> >>> > > > > and
>>>> >> > test
>>>> >> > > it.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > I think this is a great idea, especially because I
>>>> >> > > >> >>> > > > > found
>>>> >> > > that
>>>> >> > > >> the
>>>> >> > > >> >>> > > "native
>>>> >> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
>>>> >> > > >> >>> > > > > still
>>>> >> > > >> related
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > the
>>>> >> > > >> >>> > > > > annotations problem. I'm getting the same errors
>>>> >> > > >> >>> > > > > when
>>>> >> > > >> converting
>>>> >> > > >> >>> the
>>>> >> > > >> >>> > > code
>>>> >> > > >> >>> > > > > to
>>>> >> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator
>>>> >> > > >> >>> > > > > is
>>>> >> > > actually
>>>> >> > > >> not
>>>> >> > > >> >>> > > > working.
>>>> >> > > >> >>> > > > > Hopefully, testing with a simpler scenario will
>>>> >> > > >> >>> > > > > help me
>>>> >> > > >> >>> > > > > to
>>>> >> > > >> >>> understand
>>>> >> > > >> >>> > > the
>>>> >> > > >> >>> > > > > problem better.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant
>>>> >> > > >> >>> > > > > you
>>>> >> > > >> >>> > > > > to
>>>> >> > > do:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>>> >> > > >> >>> Class.isAnnotationPresent
>>>> >> > > >> >>> > > or
>>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>>> >> > > >> >>> > > > > > checks
>>>> >> > for
>>>> >> > > a
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > @Remotable
>>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>>> >> > > >> >>> > > > > > class.isAnnotationPresent
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> (Remotable.class); =>
>>>> >> > > >> >>> > > > > >> Annotation isRemotable = true;
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> otherwise, which means, when it's not checking
>>>> >> > > >> >>> > > > > >> for
>>>> >> > > >> >>> > > > > >> the
>>>> >> > > >> >>> @Remotable
>>>> >> > > >> >>> > > > > >> annnotation, force to false. For example:
>>>> >> > > >> >>> > > > > >>
>>>> >> > > >> >>> > > > > >> Annotation isReference =
>>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>>> >> > > >> >>> > > > =>
>>>> >> > > >> >>> > > > > >> Annotation isReference = false;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to
>>>> >> > > >> >>> > > > > give
>>>> >> > this
>>>> >> > > a
>>>> >> > > >> try
>>>> >> > > >> >>> as
>>>> >> > > >> >>> > I
>>>> >> > > >> >>> > > > > found
>>>> >> > > >> >>> > > > > an introspection related comment [2] as a
>>>> >> > > >> >>> > > > > workaround to
>>>> >> > > another
>>>> >> > > >> >>> > > > annotations
>>>> >> > > >> >>> > > > > problem with the current SDK.
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Also, I have another question for you...
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > When I imported the projects from [3] the
>>>> >> > > >> >>> > > > > following
>>>> >> > projects
>>>> >> > > >> were
>>>> >> > > >> >>> not
>>>> >> > > >> >>> > > > > imported:
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > core-android
>>>> >> > > >> >>> > > > > host-android
>>>> >> > > >> >>> > > > > extensibility
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > Is this normal? Should they be imported?
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > [1]
>>>> >> > > >> >>>
>>>> >> > > >> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > [2]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>>>> >> > > >> >>> > > > > [3]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>>>> >> > > >> >>> > > > > adrianocrestani@apache.org>
>>>> >> > > >> >>> > > > > wrote:
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > > > > Well detailed Oscar ; )
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > It is one thing I learnt after playing hours
>>>> >> > > >> >>> > > > > > with
>>>> >> > Android,
>>>> >> > > >> you
>>>> >> > > >> >>> need
>>>> >> > > >> >>> > > to
>>>> >> > > >> >>> > > > > > rebuild every modified project which is imported
>>>> >> > > >> >>> > > > > > in
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> android
>>>> >> > > >> >>> > > > project,
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> > > > > > android project itself does not check for
>>>> >> > > >> >>> > > > > > modifications
>>>> >> > on
>>>> >> > > >> its
>>>> >> > > >> >>> > > > > dependencies
>>>> >> > > >> >>> > > > > > :S...so, when you rebuilt the imported project
>>>> >> > > >> >>> > > > > > it
>>>> >> > > recompiled
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > > uncommented
>>>> >> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
>>>> >> > > >> >>> > > > > > started
>>>> >> > to
>>>> >> > > >> check
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > > > > annotations once again, so you got the errors on
>>>> >> > > >> >>> > > > > > [1],
>>>> >> > > which
>>>> >> > > >> >>> means
>>>> >> > > >> >>> > > > > > retrotranslator is still not working. Have you
>>>> >> > > >> >>> > > > > > tested
>>>> >> > > >> >>> > > > > > it
>>>> >> > > on a
>>>> >> > > >> >>> > simpler
>>>> >> > > >> >>> > > > > > application as I previously suggested? Did it
>>>> >> > > >> >>> > > > > > work?
>>>> >> > > >> >>> > > > > > What
>>>> >> > > was
>>>> >> > > >> the
>>>> >> > > >> >>> > most
>>>> >> > > >> >>> > > > > > critical scenario you tested it and it worked?
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>>>> >> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar
>>>> >> > > >> >>> > > > > > -srcdir
>>>> >> > > >> /../workspace
>>>> >> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot
>>>> >> > > >> >>> > > > > > -classpath
>>>> >> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > You should also check if it's is working as
>>>> >> > > >> >>> > > > > > expected,
>>>> >> > > >> >>> > > > > > as
>>>> >> > I
>>>> >> > > >> >>> already
>>>> >> > > >> >>> > > > said,
>>>> >> > > >> >>> > > > > > does not go directly testing complex solutions
>>>> >> > > >> >>> > > > > > on
>>>> >> > complex
>>>> >> > > >> things
>>>> >> > > >> >>> > like
>>>> >> > > >> >>> > > > > SCA.
>>>> >> > > >> >>> > > > > > At first, build a simple, but equivalent
>>>> >> > > >> >>> > > > > > scenario,
>>>> >> > > >> >>> > > > > > and
>>>> >> > > test
>>>> >> > > >> it.
>>>> >> > > >> >>> For
>>>> >> > > >> >>> > > > > > example,
>>>> >> > > >> >>> > > > > > a simple android app project that uses an java
>>>> >> > > >> >>> > > > > > library
>>>> >> > > >> project
>>>> >> > > >> >>> > which
>>>> >> > > >> >>> > > > > access
>>>> >> > > >> >>> > > > > > annotations on classes placed on the android
>>>> >> > > >> >>> > > > > > project.
>>>> >> > Like
>>>> >> > > >> our
>>>> >> > > >> >>> > > android
>>>> >> > > >> >>> > > > > > calculator, it's an android app project
>>>> >> > > (calculator-android)
>>>> >> > > >> >>> which
>>>> >> > > >> >>> > > uses
>>>> >> > > >> >>> > > > > > java
>>>> >> > > >> >>> > > > > > library projects (sca modules), and these
>>>> >> > > >> >>> > > > > > libraries
>>>> >> > checks
>>>> >> > > >> for
>>>> >> > > >> >>> > > > > annotations
>>>> >> > > >> >>> > > > > > on classes located at the android app project
>>>> >> > > >> >>> > > (CalculatorService.java,
>>>> >> > > >> >>> > > > > > AddService.java, etc). When you get it working
>>>> >> > > >> >>> > > > > > on the
>>>> >> > > simpler
>>>> >> > > >> >>> > > scenario,
>>>> >> > > >> >>> > > > > > then
>>>> >> > > >> >>> > > > > > you are ready to test it on the complexer
>>>> >> > > >> >>> > > > > > sceneario
>>>> >> > > >> >>> > > > (calculator-android).
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Please, if you get the retrotranslator working
>>>> >> > > >> >>> > > > > > in the
>>>> >> > > simpler
>>>> >> > > >> >>> > > scenario,
>>>> >> > > >> >>> > > > > > send
>>>> >> > > >> >>> > > > > > us a patch with it. You can create a JIRA and
>>>> >> > > >> >>> > > > > > attach
>>>> >> > > >> >>> > > > > > it.
>>>> >> > > If
>>>> >> > > >> you
>>>> >> > > >> >>> > need
>>>> >> > > >> >>> > > > any
>>>> >> > > >> >>> > > > > > help, just ask ; )
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > "code that checks for @Remotable you force to
>>>> >> > > >> >>> > > > > > true,
>>>> >> > > otherwise
>>>> >> > > >> >>> force
>>>> >> > > >> >>> > > to
>>>> >> > > >> >>> > > > > > false."
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I
>>>> >> > > >> >>> > > > > > meant
>>>> >> > > >> >>> > > > > > you
>>>> >> > to
>>>> >> > > do:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>>> >> > > >> >>> Class.isAnnotationPresent
>>>> >> > > >> >>> > > or
>>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>>> >> > > >> >>> > > > > > checks
>>>> >> > for
>>>> >> > > a
>>>> >> > > >> the
>>>> >> > > >> >>> > > > > @Remotable
>>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>>> >> > > >> >>> > class.isAnnotationPresent(Remotable.class);
>>>> >> > > >> >>> > > =>
>>>> >> > > >> >>> > > > > > Annotation isRemotable = true;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > otherwise, which means, when it's not checking
>>>> >> > > >> >>> > > > > > for
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> @Remotable
>>>> >> > > >> >>> > > > > > annnotation, force to false. For example:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Annotation isReference =
>>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>>> >> > > >> >>> > > =>
>>>> >> > > >> >>> > > > > > Annotation isReference = false;
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > [1] -
>>>> >> > > >> >>> > >
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > Kind Regards,
>>>> >> > > >> >>> > > > > > Adriano Crestani
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda
>>>> >> > > >> >>> > > > > > <
>>>> >> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > > > > Hi Adriano,
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > I continued testing retrotranslator. Here's
>>>> >> > > >> >>> > > > > > > what
>>>> >> > > >> >>> > > > > > > I've
>>>> >> > > done
>>>> >> > > >> up
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > now.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and
>>>> >> > > >> >>> > > > > > > installed as
>>>> >> > > shown
>>>> >> > > >> >>> below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > svn checkout --revision 643746
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > >
>>>> >> > > >>
>>>> >> > > >> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > cd modules
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > mvn clean install -Dtest=no
>>>> >> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set
>>>> >> > > >> >>> > > > > > > the
>>>> >> > M2_REPO
>>>> >> > > >> >>> variable
>>>> >> > > >> >>> > as
>>>> >> > > >> >>> > > > > shown
>>>> >> > > >> >>> > > > > > > below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>>>> >> > > >> >>> > eclipse:add-maven-repo
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build
>>>> >> > > >> >>> > > > > > > errors,
>>>> >> > added
>>>> >> > > >> >>> Android
>>>> >> > > >> >>> > > > library
>>>> >> > > >> >>> > > > > > to
>>>> >> > > >> >>> > > > > > > required modules, fixed references to jar
>>>> >> > > >> >>> > > > > > > files and
>>>> >> > > other
>>>> >> > > >> >>> > > libraries.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 5. Uncommented lines in
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the
>>>> >> > > >> >>> > > > > > > project
>>>> >> > site
>>>> >> > > >> [3]
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > > shown
>>>> >> > > >> >>> > > > > > > below:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>>>> >> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar
>>>> >> > > >> >>> > > > > > > -srcdir
>>>> >> > > >> >>> /../workspace
>>>> >> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot
>>>> >> > > >> >>> > > > > > > -classpath
>>>> >> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >  The output can be found in [4].
>>>> >> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > and then re-ran retrotranslator.
>>>> >> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in
>>>> >> > > >> >>> > > > > > > [5]
>>>> >> > > >> >>> > > > > > > and
>>>> >> > > >> Android
>>>> >> > > >> >>> > > errors
>>>> >> > > >> >>> > > > in
>>>> >> > > >> >>> > > > > > > [6].
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > As always, I'm documenting my progress on the
>>>> >> > > >> >>> > > > > > > project
>>>> >> > > log.
>>>> >> > > >> I
>>>> >> > > >> >>> > > haven't
>>>> >> > > >> >>> > > > > > fully
>>>> >> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
>>>> >> > > >> >>> > > > > > > puzzled
>>>> >> > by
>>>> >> > > >> what
>>>> >> > > >> >>> you
>>>> >> > > >> >>> > > > mean
>>>> >> > > >> >>> > > > > by
>>>> >> > > >> >>> > > > > > > this:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > "code that checks for @Remotable you force to
>>>> >> > > >> >>> > > > > > > true,
>>>> >> > > >> otherwise
>>>> >> > > >> >>> > force
>>>> >> > > >> >>> > > > to
>>>> >> > > >> >>> > > > > > > false."
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > I'll continue looking into it and hopefully
>>>> >> > > >> >>> > > > > > > get
>>>> >> > > >> >>> retrotranslator
>>>> >> > > >> >>> > to
>>>> >> > > >> >>> > > > > work.
>>>> >> > > >> >>> > > > > > I
>>>> >> > > >> >>> > > > > > > also think it's a simpler option.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [1]
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > >
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>> > > >
>>>> >> > > >> >>> > >
>>>> >> > > >> >>> >
>>>> >> > > >> >>>
>>>> >> > > >>
>>>> >> > >
>>>> >> >
>>>> >> >
>>>> >> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [2]
>>>> >> > > >> >>> > > > >
>>>> >> > > >> >>>
>>>> >> > >
>>>> >> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [3]
>>>> >> > > >> >>> > > > > > > http://retrotranslator.sourceforge.net/#android
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [4]
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > [5]
>>>> >> > > >> >>> > >
>>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>>> >> > > >> >>> > > > > > > [6]
>>>> >> > > >> >>> > > > > > > http://androidindelft.googlepages.com/2Jun1.jpg
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano
>>>> >> > > >> >>> > > > > > > Crestani <
>>>> >> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
>>>> >> > > >> >>> > > > > > >
>>>> >> > > >> >>> > > > > > > > Hi,
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > I tried what Luciano suggested. It really
>>>> >> > > >> >>> > > > > > > > works.
>>>> >> > > >> >>> > > > > > > > To
>>>> >> > > get
>>>> >> > > >> it
>>>> >> > > >> >>> > > working
>>>> >> > > >> >>> > > > > you
>>>> >> > > >> >>> > > > > > > > simply need to search on all modules where
>>>> >> > > >> >>> > > > > > > > the
>>>> >> > > >> >>> > > > > > > > code
>>>> >> > > >> checks
>>>> >> > > >> >>> for
>>>> >> > > >> >>> > > > > > @Remotable
>>>> >> > > >> >>> > > > > > > > annotation and force it to true:
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) !=
>>>> >> > > >> >>> > > > > > > > null"
>>>> >> > > >> >>> > > > > > > > =>
>>>> >> > > true
>>>> >> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)"
>>>> >> > > >> >>> > > > > > > > =>
>>>> >> > > >> >>> > > > > > > > true
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > It works fine on the sca revision we are
>>>> >> > > >> >>> > > > > > > > testing
>>>> >> > > >> >>> > > > > > > > on
>>>> >> > > >> Android
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > the
>>>> >> > > >> >>> > > > > > most
>>>> >> > > >> >>> > > > > > > > recent revision. I only tested it as a java
>>>> >> > > application,
>>>> >> > > >> not
>>>> >> > > >> >>> as
>>>> >> > > >> >>> > > an
>>>> >> > > >> >>> > > > > > > android
>>>> >> > > >> >>> > > > > > > > application.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Unfortunatelly, I still think
>>>> >> > > >> >>> > > > > > > > retrotranslator is
>>>> >> > > >> >>> > > > > > > > a
>>>> >> > > faster
>>>> >> > > >> >>> and
>>>> >> > > >> >>> > > > simpler
>>>> >> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion
>>>> >> > > >> >>> > > > > > > > only
>>>> >> > forces
>>>> >> > > >> the
>>>> >> > > >> >>> SCA
>>>> >> > > >> >>> > to
>>>> >> > > >> >>> > > > > > > recognize
>>>> >> > > >> >>> > > > > > > > the services with no annotations declared on
>>>> >> > > >> >>> > > > > > > > their
>>>> >> > > >> >>> interfaces,
>>>> >> > > >> >>> > > but
>>>> >> > > >> >>> > > > it
>>>> >> > > >> >>> > > > > > > does
>>>> >> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when
>>>> >> > > >> >>> > > > > > > > the
>>>> >> > > >> >>> > > > > > > > SCA
>>>> >> > > >> invokes
>>>> >> > > >> >>> > > > methods
>>>> >> > > >> >>> > > > > > that
>>>> >> > > >> >>> > > > > > > > read annotations. So, our current problem is
>>>> >> > > >> >>> > > > > > > > that
>>>> >> > > >> >>> > > > > > > > we
>>>> >> > > are
>>>> >> > > >> not
>>>> >> > > >> >>> > > being
>>>> >> > > >> >>> > > > > able
>>>> >> > > >> >>> > > > > > > to
>>>> >> > > >> >>> > > > > > > > use these methods and not only because we
>>>> >> > > >> >>> > > > > > > > are not
>>>> >> > > being
>>>> >> > > >> able
>>>> >> > > >> >>> to
>>>> >> > > >> >>> > > > read
>>>> >> > > >> >>> > > > > > the
>>>> >> > > >> >>> > > > > > > > annotations.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
>>>> >> > > >> >>> > > > > > > > suggestion,
>>>> >> > > you
>>>> >> > > >> will
>>>> >> > > >> >>> > need
>>>> >> > > >> >>> > > > to
>>>> >> > > >> >>> > > > > > > > comment/adapt every sca code that tries to
>>>> >> > > >> >>> > > > > > > > read
>>>> >> > > >> >>> > > > > > > > the
>>>> >> > > class
>>>> >> > > >> >>> > > > > annotations.
>>>> >> > > >> >>> > > > > > It
>>>> >> > > >> >>> > > > > > > > is
>>>> >> > > >> >>> > > > > > > > not necessary to comment/adapt the methods
>>>> >> > > >> >>> > > > > > > > that
>>>> >> > > >> >>> > > > > > > > read
>>>> >> > > >> Method
>>>> >> > > >> >>> > > > > > annotations,
>>>> >> > > >> >>> > > > > > > > they are not throwning any exception. So,
>>>> >> > > >> >>> > > > > > > > every
>>>> >> > > >> >>> > > > > > > > code
>>>> >> > > that
>>>> >> > > >> >>> > checks
>>>> >> > > >> >>> > > > for
>>>> >> > > >> >>> > > > > > > > @Remotable you force to true, otherwise
>>>> >> > > >> >>> > > > > > > > force to
>>>> >> > > false.
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Any doubt about what I have said, just let
>>>> >> > > >> >>> > > > > > > > me
>>>> >> > > >> >>> > > > > > > > know ;
>>>> >> > )
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Suggestions are welcome : )
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > Adriano Crestani
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano
>>>> >> > > >> >>> > > > > > > > Resende
>>>> >> > > >> >>> > > > > > > > <
>>>> >> > > >> >>> > > > > > luckbr1975@gmail.com>
>>>> >> > > >> >>> > > > > > > > wrote:
>>>> >> > > >> >>> > > > > > > >
>>>> >> > > >> >>> > > > > > > > > FYI, if you comment out the code that
>>>> >> > > >> >>> > > > > > > > > checks if
>>>> >> > > >> >>> > > > > > > > > a
>>>> >> > > >> >>> interface
>>>> >> > > >> >>> > is
>>>> >> > > >> >>> > > > > > > > > remoteble, you could have a version of the
>>>> >> > > calculator
>>>> >> > > >> >>> without
>>>> >> > > >> >>> > > any
>>>> >> > > >> >>> > > > > > > > > annotations, and the runtime would
>>>> >> > > >> >>> > > > > > > > > introspect
>>>> >> > > >> >>> > > > > > > > > the
>>>> >> > > >> >>> references
>>>> >> > > >> >>> > > for
>>>> >> > > >> >>> > > > > the
>>>> >> > > >> >>> > > > > > > > > multiple services. But note that, the
>>>> >> > introspection
>>>> >> > > >> code
>>>> >> > > >> >>> will
>>>> >> > > >> >>> > > > only
>>>> >> > > >> >>> > > > > be
>>>> >> > > >> >>> > > > > > > > > activated if there is no SCA annotations
>>>> >> > > >> >>> > > > > > > > > on the
>>>> >> > > class.
>>>> >> > > >> >>> > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
>>>> >> > > >> >>> > > > > > > > > Crestani
>>>> >> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
>>>> >> > > >> >>> > > > > > > > > > Ah, the expected exception should look
>>>> >> > > >> >>> > > > > > > > > > like
>>>> >> > > >> >>> > > > > > > > > > this
>>>> >> > > on
>>>> >> > > >> >>> android
>>>> >> > > >> >>> > > > > > emulator:
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > >
>>>> >> >
>>>> >> >
>>>> >> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > >
>>>> >> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >>
>>>> >> > > >> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>>
>>>> >> > > >> >>>
>>>> >> > > >> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > >
>>>> >> > > >> >>> > <
>>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > > >
>>>> >> > > >> >>> > > <
>>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > <
>>>> >> > > >>
>>>> >> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > <
>>>> >> > > >>
>>>> >> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>>> >> > > >> >>> >
>>>> >> > > >> >>> > > > > > <
>>>> >> > > >> >>>
>>>> >> > > >> >>>
>>>> >> > > >> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > > > <
>>>> >> > > >> >>> >
>>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > > > > <
>>>> >> > > >> >>> > >
>>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM,
>>>> >> > > >> >>> > > > > > > > > > Adriano
>>>> >> > Crestani
>>>> >> > > <
>>>> >> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>>>> >> > > >> >>> > > > > > > > > >
>>>> >> > > >> >>> > > > > > > > > >> Hi Oscar,
>>>> >> > > >> >>> > > > > > > > > >>
>>>> >> > > >> >>> > > > > > >
>
> ...
>
> [Message clipped]



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi,

Sorry Oscar, I should have tested again the last modules I have uploaded to
the android sandbox, the modules had the Java Builder builder unchecked...it
causes some errors when you import them into another workspace :S...I
already fixed that : )

Also, run the mvn on mobile-sandbox/tuscany-interface-java-jaxws/
module...its eclipse project requires a folder that is only created when the
mvn runs on this module.

I have updated the instruction file you created with the new instructions :
)

If you still get any problem, just let us know ; )

Regards,
Adriano Crestani

On Wed, Jul 16, 2008 at 6:55 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> I have been trying to reproduce the Exception you are getting. I found out
> that the Corba errors were related to [1] so I tried with the latest
> revision. I'm able to build it with maven with no problems. However, when I
> import the projects into Eclipse I get all sorts of errors when doing a
> build.
>
> I guess I'm confused by your reference to revision 674723 in the the URL
> you provided for the Exception. So I tried with revision 643746, which is
> the one you referenced originally on this thread on May 6th. Same story
> here, I can build with maven but when I import the projects into Eclipse I
> get all sorts of errors.
>
> Looking closer at the errors I found that they are related to
> tuscany-interface-java-jaxws. More specifically, some imports (like those
> shown below for example) cannot be resolved. The result is that all the
> modules that reference tuscany-interface-java-jaxws end up in error.
>
> import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
> import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
> import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;
>
> Am I missing anything to reproduce your workspace?
>
> [1] http://www.mail-archive.com/dev@tuscany.apache.org/msg00587.html
>
>
> On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <
> adrianocrestani@apache.org> 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 <lu...@gmail.com>
>> 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.
>>>
>>> On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
>>> <os...@gmail.com> wrote:
>>> > Thanks Adriano. I have been testing the workarounds for RMI and Beans
>>> API. I
>>> > am also working to integrate retrotranslator into maven.
>>> >
>>> > Today, I tested the newest version of retrotranslator (thanks for the
>>> tip).
>>> > With this new version RMI related issues are not appearing (not
>>> initially,
>>> > at least) but instead Beans issues are. I've commented
>>> > java.beans.Introspector import and related code from
>>> > JavaIntrospectionHelper.java and now get other errors [1] related to
>>> > javax.jws.WebService. Suggestions are welcome and appreciated.
>>> >
>>> > I've noted down these issues on the porting limitations page [2], which
>>> I
>>> > have updated with the current progress.
>>> >
>>> > [1]
>>> >
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
>>> > [2]
>>> >
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>> >
>>> > On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
>>> > <ad...@apache.org> wrote:
>>> >>
>>> >> I added to the wiki a page [1] about all the issues we have found so
>>> far
>>> >> when trying to port the SCA Java to the Android platform.
>>> >>
>>> >> [1] -
>>> >>
>>> >>
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>> >>
>>> >> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
>>> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>> >>
>>> >> > Hi Luciano,
>>> >> >
>>> >> > Thanks for the tip. Before testing it I generated a JIRA ticket [1]
>>> for
>>> >> > the
>>> >> > Retrotranslator progress, and when I got around to testing I noticed
>>> a
>>> >> > different ClassNotFoundException. This time its for
>>> >> > java.beans.Introspector.  I made sure to include this in the JIRA
>>> ticket
>>> >> > and
>>> >> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
>>> >> >
>>> >> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
>>> >> > [2]
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>>> >> >
>>> >> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <
>>> luckbr1975@gmail.com>
>>> >> > wrote:
>>> >> >
>>> >> > > Removing RMI should be as simple as removing the
>>> tuscany-binding-rmi
>>> >> > > dependency from host-android.
>>> >> > >
>>> >> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
>>> >> > > <os...@gmail.com> wrote:
>>> >> > > > Hi Luciano,
>>> >> > > >
>>> >> > > > It's going better after the progress last week with
>>> retrotranslator.
>>> >> > I'm
>>> >> > > now
>>> >> > > > able to translate the SCA classes and run calculator-android
>>> without
>>> >> > > getting
>>> >> > > > Annotation related issues. The problems now are related to RMI.
>>> In
>>> >> > > relation
>>> >> > > > to this, and from your comment about blocking issues, I created
>>> a
>>> >> > > > child
>>> >> > > page
>>> >> > > > [1] in the project wiki for Blocking issues. Currently, the page
>>> >> > > > lists
>>> >> > > the
>>> >> > > > RMI issue and suggested workarounds.
>>> >> > > >
>>> >> > > > I think your suggestion about integration with maven is really
>>> good.
>>> >> > > > Especially because there is a retrotranslator plugin for maven.
>>> I'll
>>> >> > > start
>>> >> > > > looking into using this plugin. I also agree about reviewing the
>>> >> > > > scope
>>> >> > of
>>> >> > > > support. Right now, I see a need to reduce the dependency on
>>> RMI,
>>> >> > either
>>> >> > > by
>>> >> > > > commenting all the code that uses the RMI API, or by following
>>> the
>>> >> > > > suggestions from Taras [3] to either replace java.rmi.Remote
>>> with
>>> >> > > > java.lang.Cloneable (as the result of using a retrotranslator
>>> >> > > > option)
>>> >> > or
>>> >> > > > taking the RMI source from Apache Harmony and putting it in a
>>> >> > > > retrotranslated JAR. What would you recommend? Hopefully after
>>> the
>>> >> > > > dependency reduction Android will be able to run
>>> calculator-android.
>>> >> > > Based
>>> >> > > > on the results of this experiment we can better consider the
>>> >> > > > reduction
>>> >> > of
>>> >> > > > component types and bindings. Please let me know your thoughts
>>> on
>>> >> > > > this
>>> >> > > idea.
>>> >> > > >
>>> >> > > > [1]
>>> >> > >
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
>>> >> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
>>> >> > > > [3]
>>> >> > > >
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>>> >> > > >
>>> >> > > >
>>> >> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
>>> >> > luckbr1975@gmail.com>
>>> >> > > > wrote:
>>> >> > > >
>>> >> > > >> How is it going here ? I just want to check if there is any
>>> >> > > >> blocking
>>> >> > > >> issues with Android at the moment, if so, is there a list of
>>> these
>>> >> > > >> issues somewhere ?
>>> >> > > >>
>>> >> > > >> Also, some general suggestions/recommendations.: It would be
>>> great
>>> >> > > >> if
>>> >> > > >> we could spend sometime to get the modules well integrated
>>> using
>>> >> > > >> maven, this way it would be easier for anyone on the community
>>> to
>>> >> > > >> checkout the trunk + android sandbox and jump on the code to
>>> help.
>>> >> > > >> Also, we should review the scope of the support we are trying
>>> to
>>> >> > > >> acomplish, I'd suggest to minimize the number of component
>>> types
>>> >> > > >> supported (java) and bindings (default sca binding) and then
>>> try to
>>> >> > > >> run the calculator sample application. Once we have acomplished
>>> >> > > >> this
>>> >> > > >> first milestone, we could then discuss our next steps.
>>> >> > > >>
>>> >> > > >> Thoughts ?
>>> >> > > >>
>>> >> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>>> >> > > >> <ad...@apache.org> wrote:
>>> >> > > >> > Ah, here is a tip to assure the classes are not recompiled
>>> again.
>>> >> > > Build
>>> >> > > >> the
>>> >> > > >> > project, then go in each project builder (in the properties
>>> >> > > >> > window)
>>> >> > > and
>>> >> > > >> > disable all the builders, then not even a clean/build will
>>> modify
>>> >> > your
>>> >> > > >> > project ; )
>>> >> > > >> >
>>> >> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>>> >> > > >> adrianocrestani@apache.org>
>>> >> > > >> > wrote:
>>> >> > > >> >
>>> >> > > >> >> Hi Oscar,
>>> >> > > >> >>
>>> >> > > >> >> I say that it is more difficult to debug because you need
>>> attach
>>> >> > > >> >> a
>>> >> > > >> source
>>> >> > > >> >> code to each jar and etc, and when you are using projects,
>>> >> > > >> >> eclipse
>>> >> > > >> already
>>> >> > > >> >> knows where to find the source code : )
>>> >> > > >> >>
>>> >> > > >> >> The reply made sense to me, especially with regards to the
>>> fact
>>> >> > that
>>> >> > > >> with
>>> >> > > >> >> the Android plugin Eclipse compiles sources into classes and
>>> >> > > >> >> then
>>> >> > > into
>>> >> > > >> dex
>>> >> > > >> >> files, so retrotranslator has no chance to translate classes
>>> in
>>> >> > > between
>>> >> > > >> >> these steps - even if I do that outside of Eclipse. This
>>> shows
>>> >> > > >> >> from
>>> >> > > the
>>> >> > > >> use
>>> >> > > >> >> of non-translated binaries (as indicated by the
>>> >> > > >> >> java.lang.Class.isAnnotationPr
>>> >> > > >> >> esent(Class.java:1131) error in the stack
>>> >> > > >> >> trace) that might have been related to the use of
>>> pre-existing
>>> >> > > >> >> dex
>>> >> > > files
>>> >> > > >> or
>>> >> > > >> >> over-writing of files by Eclipse. So unless I modify the ADT
>>> >> > > >> >> plugin
>>> >> > > the
>>> >> > > >> >> result would still be the same, even if I use a simpler
>>> >> > > >> >> scenario.
>>> >> > > >> >>
>>> >> > > >> >> Sorry, I really did not comment this email yet. It does not
>>> make
>>> >> > > >> >> so
>>> >> > > much
>>> >> > > >> >> sense for me. First, as you already know, eclipse android
>>> >> > > >> >> projects
>>> >> > > does
>>> >> > > >> not
>>> >> > > >> >> recognize any modifications in the imported projects, so it
>>> does
>>> >> > not
>>> >> > > >> call
>>> >> > > >> >> the build or incremental build even if the imported projects
>>> >> > > >> >> have
>>> >> > > their
>>> >> > > >> >> source code modified. Just to make sure I tested it again:
>>> >> > > >> >>
>>> >> > > >> >> 1-  imported in my workspace all the projects included in
>>> the
>>> >> > > >> >> calculator-android, cleaned and built them...it takes a
>>> loooong
>>> >> > time,
>>> >> > > as
>>> >> > > >> you
>>> >> > > >> >> already know.
>>> >> > > >> >>
>>> >> > > >> >> 2- imported the calculator-android project, cleaned and
>>> built it
>>> >> > > (only
>>> >> > > >> the
>>> >> > > >> >> calculator-android project), and this process was too much
>>> >> > > >> >> faster
>>> >> > > than
>>> >> > > >> when
>>> >> > > >> >> all the modules are built, so the imported projects were not
>>> >> > > recompiled,
>>> >> > > >> >> otherwise it would take too much more time. I suppose here
>>> that
>>> >> > > >> >> the
>>> >> > > >> android
>>> >> > > >> >> project compiles the .java contained in the android project
>>> and
>>> >> > > convert
>>> >> > > >> all
>>> >> > > >> >> the .class files (generated by imported projects and android
>>> >> > project)
>>> >> > > to
>>> >> > > >> dex
>>> >> > > >> >> format.
>>> >> > > >> >>
>>> >> > > >> >> So, it does not recompile the external class files (the ones
>>> >> > > contained
>>> >> > > >> in
>>> >> > > >> >> the imported projects) cause it seems not to check if it was
>>> >> > modified
>>> >> > > or
>>> >> > > >> >> not. Of course, I never tested it modifing the .class files,
>>> I'm
>>> >> > just
>>> >> > > >> >> assuming that, because when you modify .java files it does
>>> not
>>> >> > > >> >> get
>>> >> > > >> >> recompiled.
>>> >> > > >> >>
>>> >> > > >> >> What do you think?
>>> >> > > >> >>
>>> >> > > >> >> As I mentioned before, your comments are really helpful as
>>> they
>>> >> > give
>>> >> > > me
>>> >> > > >> a
>>> >> > > >> >> sense of direction. Please let me know if you still think we
>>> >> > > >> >> should
>>> >> > > >> pursue
>>> >> > > >> >> retrotranslator for files inside a folder.
>>> >> > > >> >>
>>> >> > > >> >> I really think you should try at first the simpler scenario
>>> and
>>> >> > > >> >> try
>>> >> > > to
>>> >> > > >> >> understand how it works and IF it works. Also, you can try
>>> what
>>> >> > > >> >> you
>>> >> > > were
>>> >> > > >> >> planning: to retrotranslate the each modules' jar, but I
>>> suppose
>>> >> > it's
>>> >> > > a
>>> >> > > >> lot
>>> >> > > >> >> of work, because there are so many modules :S. So, as I've
>>> >> > > >> >> already
>>> >> > > said,
>>> >> > > >> if
>>> >> > > >> >> you think it's getting to complicated, forget it and go on
>>> with
>>> >> > > >> Luciano's
>>> >> > > >> >> suggestion.
>>> >> > > >> >>
>>> >> > > >> >> Feel free to choose the direction you want to take, and if
>>> there
>>> >> > > >> >> is
>>> >> > > >> another
>>> >> > > >> >> approach you think is better, just let us know ; )...you are
>>> the
>>> >> > best
>>> >> > > >> person
>>> >> > > >> >> to choose the directions, cause you are working directly on
>>> it,
>>> >> > > >> >> we
>>> >> > > are
>>> >> > > >> just
>>> >> > > >> >> guinding/helping you ; )
>>> >> > > >> >>
>>> >> > > >> >> Thanks,
>>> >> > > >> >> Adriano Crestani
>>> >> > > >> >>
>>> >> > > >> >>
>>> >> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>>> >> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
>>> >> > > >> >>
>>> >> > > >> >>> Hi Adriano,
>>> >> > > >> >>>
>>> >> > > >> >>> If there is an option on retrotranslator to retrotranslate
>>> all
>>> >> > > >> >>> the
>>> >> > > >> classes
>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>> classes
>>> >> > inside
>>> >> > > >> .jar
>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>> >> > > >> >>> > first
>>> >> > > >> approach
>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>> working
>>> >> > > trying
>>> >> > > >> a
>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >> >>> I agree that it's good to try out a simpler scenario to
>>> better
>>> >> > > >> understand
>>> >> > > >> >>> the problem. I haven't tried it yet because using
>>> >> > > >> >>> retrotranslator
>>> >> > > for
>>> >> > > >> >>> classes inside a folder doesn't seem to be a solution to
>>> the
>>> >> > > problem.
>>> >> > > >> >>> Here's
>>> >> > > >> >>> my reasoning:
>>> >> > > >> >>>
>>> >> > > >> >>> Yes, there is an option to translate classes in a folder. I
>>> >> > > >> >>> tried
>>> >> > it
>>> >> > > >> and
>>> >> > > >> >>> it
>>> >> > > >> >>> successfully translated the classes inside my Eclipse
>>> >> > > >> >>> workspace.
>>> >> > > When I
>>> >> > > >> >>> ran
>>> >> > > >> >>> the calculator-android application using the newly
>>> translated
>>> >> > > classes I
>>> >> > > >> >>> was
>>> >> > > >> >>> getting the errors in [1]. I posted a question in Android
>>> >> > Developers
>>> >> > > >> about
>>> >> > > >> >>> this error and received a reply [2].
>>> >> > > >> >>>
>>> >> > > >> >>> The reply made sense to me, especially with regards to the
>>> fact
>>> >> > that
>>> >> > > >> with
>>> >> > > >> >>> the Android plugin Eclipse compiles sources into classes
>>> and
>>> >> > > >> >>> then
>>> >> > > into
>>> >> > > >> dex
>>> >> > > >> >>> files, so retrotranslator has no chance to translate
>>> classes in
>>> >> > > between
>>> >> > > >> >>> these steps - even if I do that outside of Eclipse. This
>>> shows
>>> >> > from
>>> >> > > the
>>> >> > > >> >>> use
>>> >> > > >> >>> of non-translated binaries (as indicated by the
>>> >> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error
>>> in
>>> >> > > >> >>> the
>>> >> > > stack
>>> >> > > >> >>> trace) that might have been related to the use of
>>> pre-existing
>>> >> > > >> >>> dex
>>> >> > > >> files
>>> >> > > >> >>> or
>>> >> > > >> >>> over-writing of files by Eclipse. So unless I modify the
>>> ADT
>>> >> > plugin
>>> >> > > the
>>> >> > > >> >>> result would still be the same, even if I use a simpler
>>> >> > > >> >>> scenario.
>>> >> > > >> >>>
>>> >> > > >> >>> The reply suggested to use JAR's instead. This also made
>>> sense
>>> >> > > >> >>> to
>>> >> > me
>>> >> > > >> and
>>> >> > > >> >>> seemed like a simpler way of solving the problem. I didn't
>>> see
>>> >> > > >> >>> the
>>> >> > > >> >>> disadvantage of debugging, which as you point out is more
>>> >> > difficult
>>> >> > > >> with
>>> >> > > >> >>> JAR's instead of Eclipse projects.
>>> >> > > >> >>>
>>> >> > > >> >>> As I mentioned before, your comments are really helpful as
>>> they
>>> >> > give
>>> >> > > me
>>> >> > > >> a
>>> >> > > >> >>> sense of direction. Please let me know if you still think
>>> we
>>> >> > should
>>> >> > > >> pursue
>>> >> > > >> >>> retrotranslator for files inside a folder.
>>> >> > > >> >>>
>>> >> > > >> >>>
>>> >> > > >> >>> [1]
>>> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>>> >> > > >> >>> [2]
>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>> >> > > >> >>>
>>> >> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>>> >> > > >> >>> adrianocrestani@apache.org>
>>> >> > > >> >>> wrote:
>>> >> > > >> >>>
>>> >> > > >> >>> > Hi Oscar,
>>> >> > > >> >>> >
>>> >> > > >> >>> > Yup, you're right - there are indeed Eclipse files inside
>>> the
>>> >> > > >> folders. I
>>> >> > > >> >>> > guess I was confused by the different names in [1] than
>>> those
>>> >> > that
>>> >> > > >> >>> result
>>> >> > > >> >>> > [2] from importing to an Eclipse workspace - after which
>>> I
>>> >> > > >> >>> > see
>>> >> > 13
>>> >> > > >> >>> projects
>>> >> > > >> >>> > in both cases. So please ignore my previous remark.
>>> >> > > >> >>> >
>>> >> > > >> >>> > I have added the projects, but still haven't changed
>>> their
>>> >> > names.
>>> >> > > I
>>> >> > > >> was
>>> >> > > >> >>> > planning to modify their project names when we get it
>>> >> > > >> >>> > integrated
>>> >> > > to
>>> >> > > >> SCA,
>>> >> > > >> >>> > mainly because we will need to change the poms. Anyway,
>>> feel
>>> >> > free
>>> >> > > to
>>> >> > > >> >>> modify
>>> >> > > >> >>> > the names whenever you want ; )
>>> >> > > >> >>> >
>>> >> > > >> >>> >
>>> >> > > >> >>> > Per the reply I received on the Android Developers list
>>> [3] I
>>> >> > > started
>>> >> > > >> >>> using
>>> >> > > >> >>> > retrotranslator on JAR's instead of class files. For this
>>> I
>>> >> > > created a
>>> >> > > >> >>> big
>>> >> > > >> >>> > JAR file with all the Tuscany modules (including those
>>> you
>>> >> > > modified
>>> >> > > >> for
>>> >> > > >> >>> > Android). I translated this big JAR (around 15MB) with
>>> >> > > >> retrotranslator
>>> >> > > >> >>> [4].
>>> >> > > >> >>> > Then I created a new workspace with only
>>> calculator-android
>>> >> > > >> >>> > and
>>> >> > > >> >>> > android-jdk-classes as projects and added the translated
>>> JAR
>>> >> > > >> >>> > as
>>> >> > an
>>> >> > > >> >>> external
>>> >> > > >> >>> > library for both projects. This resulted in errors [4]
>>> from
>>> >> > > >> >>> > the
>>> >> > > >> Android
>>> >> > > >> >>> > build process.
>>> >> > > >> >>> >
>>> >> > > >> >>> > I really do not understand this errors, but as this
>>> errors
>>> >> > > >> >>> > are
>>> >> > > only
>>> >> > > >> >>> related
>>> >> > > >> >>> > to testcase classes they can be ignored (removed from the
>>> >> > > >> >>> > jars).
>>> >> > I
>>> >> > > >> also
>>> >> > > >> >>> did
>>> >> > > >> >>> > not understand why it's not find the .apk file:
>>> >> > > >> >>> >
>>> >> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not
>>> find
>>> >> > > >> >>> > /bin/calculator-android.apk!"
>>> >> > > >> >>> >
>>> >> > > >> >>> > To work around these errors I decided to take a different
>>> >> > approach
>>> >> > > >> and
>>> >> > > >> >>> copy
>>> >> > > >> >>> > all the jar files contained in the individual modules to
>>> a
>>> >> > > separate
>>> >> > > >> >>> folder
>>> >> > > >> >>> > and then run retrotranslator on each JAR. The jars are
>>> found
>>> >> > > inside
>>> >> > > >> the
>>> >> > > >> >>> > target folder of each module and are named as shown
>>> below:
>>> >> > > >> >>> >
>>> >> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>> >> > > >> >>> >
>>> >> > > >> >>> > From this I found that only the SCA modules have these
>>> JAR
>>> >> > > >> >>> > files
>>> >> > > >> inside
>>> >> > > >> >>> > their respective target folders, whereas the Android
>>> modules
>>> >> > > >> >>> > I
>>> >> > > >> >>> downloaded
>>> >> > > >> >>> > from [1] don't have these files at all
>>> >> > > >> >>> >
>>> >> > > >> >>> > Yep, this .jars are generated when the maven is executed.
>>> I'm
>>> >> > not
>>> >> > > >> sure
>>> >> > > >> >>> if
>>> >> > > >> >>> > you should use this .jars, because they were compiled
>>> with no
>>> >> > > >> reference
>>> >> > > >> >>> to
>>> >> > > >> >>> > Android library. That's also why there are no .jar files
>>> for
>>> >> > > android
>>> >> > > >> >>> > modules, because you did not execute the maven on them
>>>  (and
>>> >> > > >> >>> > you
>>> >> > > >> >>> > shouldn't).
>>> >> > > >> >>> >
>>> >> > > >> >>> > So I decided to keep the Android
>>> >> > > >> >>> > modules [2] and add the translated JARs as libraries
>>> where
>>> >> > needed
>>> >> > > to
>>> >> > > >> >>> have
>>> >> > > >> >>> > the workspace build with no problems. If I get this
>>> running I
>>> >> > > would
>>> >> > > >> look
>>> >> > > >> >>> > into creating JAR files from the Android modules and then
>>> >> > > >> >>> > return
>>> >> > > to
>>> >> > > >> only
>>> >> > > >> >>> > having calculator-android and android-jdk-classes as
>>> projects
>>> >> > and
>>> >> > > the
>>> >> > > >> >>> rest
>>> >> > > >> >>> > as JAR's added as external libraries. If this works out I
>>> >> > > >> >>> > could
>>> >> > > then
>>> >> > > >> >>> look
>>> >> > > >> >>> > into seeing which JAR's are important and which are not,
>>> in
>>> >> > > >> >>> > this
>>> >> > > way
>>> >> > > >> >>> > reducing the total memory footprint and coming up with a
>>> >> > > "lightweight
>>> >> > > >> >>> > mobile
>>> >> > > >> >>> > SCA core/runtime." Please let me know your thoughts on
>>> these
>>> >> > > efforts.
>>> >> > > >> >>> >
>>> >> > > >> >>> > You haven't tried this yet, right? You may try it, but I
>>> do
>>> >> > > >> >>> > not
>>> >> > > like
>>> >> > > >> >>> this
>>> >> > > >> >>> > approach, because it will get difficult to debug sca
>>> classes
>>> >> > > >> >>> > as
>>> >> > > they
>>> >> > > >> are
>>> >> > > >> >>> > not
>>> >> > > >> >>> > imported as eclipse projects.
>>> >> > > >> >>> >
>>> >> > > >> >>> > If there is an option on retrotranslator to
>>> retrotranslate
>>> >> > > >> >>> > all
>>> >> > the
>>> >> > > >> >>> classes
>>> >> > > >> >>> > in a folder, it should work as well as it works on
>>> classes
>>> >> > inside
>>> >> > > >> .jar
>>> >> > > >> >>> > files. So, I think you should try to understand why your
>>> >> > > >> >>> > first
>>> >> > > >> approach
>>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>>> working
>>> >> > > trying
>>> >> > > >> a
>>> >> > > >> >>> > simpler scenario. Have you already tried it?
>>> >> > > >> >>> >
>>> >> > > >> >>> > Also, if the restrotranslator gets to complicated, you
>>> may
>>> >> > > >> >>> > try
>>> >> > the
>>> >> > > >> >>> > Luciano's
>>> >> > > >> >>> > suggestion ; )
>>> >> > > >> >>> >
>>> >> > > >> >>> >
>>> >> > > >> >>> > Kind Regards,
>>> >> > > >> >>> > Adriano Crestani
>>> >> > > >> >>> >
>>> >> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>>> >> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>> >> > > >> >>> >
>>> >> > > >> >>> > > Hi Adriano,
>>> >> > > >> >>> > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
>>> >> > folders,
>>> >> > > >> there
>>> >> > > >> >>> > are
>>> >> > > >> >>> > > > the
>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>> by
>>> >> > > >> >>> > > > the
>>> >> > > >> eclipse
>>> >> > > >> >>> > import
>>> >> > > >> >>> > > > tool as an eclipse project.
>>> >> > > >> >>> > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > Yup, you're right - there are indeed Eclipse files
>>> inside
>>> >> > > >> >>> > > the
>>> >> > > >> folders.
>>> >> > > >> >>> I
>>> >> > > >> >>> > > guess I was confused by the different names in [1] than
>>> >> > > >> >>> > > those
>>> >> > > that
>>> >> > > >> >>> result
>>> >> > > >> >>> > > [2] from importing to an Eclipse workspace - after
>>> which I
>>> >> > > >> >>> > > see
>>> >> > > 13
>>> >> > > >> >>> > projects
>>> >> > > >> >>> > > in both cases. So please ignore my previous remark.
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > I don't think introspection is a good solution, hence
>>> you
>>> >> > > >> >>> > > will
>>> >> > > need
>>> >> > > >> to
>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>> and
>>> >> > also
>>> >> > > >> >>> services
>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>> on
>>> >> > > Android.
>>> >> > > >> >>> Let's
>>> >> > > >> >>> > > avoid
>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>> >> > > >> retrotranslator
>>> >> > > >> >>> in
>>> >> > > >> >>> > > > mind
>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>> SDK
>>> >> > > release
>>> >> > > >> :S
>>> >> > > >> >>> > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > >  Also, if you get the retrotranslator working, forget
>>> the
>>> >> > > >> Luciano's
>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>> same
>>> >> > > >> >>> > > > time
>>> >> > ;
>>> >> > > )
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in
>>> the
>>> >> > right
>>> >> > > >> >>> > direction
>>> >> > > >> >>> > > :-)
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > Now, a summary of what I've done up to now:
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > Per the reply I received on the Android Developers list
>>> [3]
>>> >> > > >> >>> > > I
>>> >> > > >> started
>>> >> > > >> >>> > using
>>> >> > > >> >>> > > retrotranslator on JAR's instead of class files. For
>>> this I
>>> >> > > created
>>> >> > > >> a
>>> >> > > >> >>> big
>>> >> > > >> >>> > > JAR file with all the Tuscany modules (including those
>>> you
>>> >> > > modified
>>> >> > > >> >>> for
>>> >> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
>>> >> > > >> retrotranslator
>>> >> > > >> >>> > [4].
>>> >> > > >> >>> > > Then I created a new workspace with only
>>> calculator-android
>>> >> > and
>>> >> > > >> >>> > > android-jdk-classes as projects and added the
>>> translated
>>> >> > > >> >>> > > JAR
>>> >> > as
>>> >> > > an
>>> >> > > >> >>> > external
>>> >> > > >> >>> > > library for both projects. This resulted in errors [4]
>>> from
>>> >> > the
>>> >> > > >> >>> Android
>>> >> > > >> >>> > > build process.
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > To work around these errors I decided to take a
>>> different
>>> >> > > approach
>>> >> > > >> and
>>> >> > > >> >>> > copy
>>> >> > > >> >>> > > all the jar files contained in the individual modules
>>> to a
>>> >> > > separate
>>> >> > > >> >>> > folder
>>> >> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
>>> >> > > >> >>> > > found
>>> >> > > inside
>>> >> > > >> >>> the
>>> >> > > >> >>> > > target folder of each module and are named as shown
>>> below:
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > From this I found that only the SCA modules have these
>>> JAR
>>> >> > files
>>> >> > > >> >>> inside
>>> >> > > >> >>> > > their respective target folders, whereas the Android
>>> >> > > >> >>> > > modules I
>>> >> > > >> >>> downloaded
>>> >> > > >> >>> > > from [1] don't have these files at all. So I decided to
>>> >> > > >> >>> > > keep
>>> >> > the
>>> >> > > >> >>> Android
>>> >> > > >> >>> > > modules [2] and add the translated JARs as libraries
>>> where
>>> >> > > needed
>>> >> > > >> to
>>> >> > > >> >>> have
>>> >> > > >> >>> > > the workspace build with no problems. If I get this
>>> running
>>> >> > > >> >>> > > I
>>> >> > > would
>>> >> > > >> >>> look
>>> >> > > >> >>> > > into creating JAR files from the Android modules and
>>> then
>>> >> > return
>>> >> > > to
>>> >> > > >> >>> only
>>> >> > > >> >>> > > having calculator-android and android-jdk-classes as
>>> >> > > >> >>> > > projects
>>> >> > > and
>>> >> > > >> the
>>> >> > > >> >>> > rest
>>> >> > > >> >>> > > as JAR's added as external libraries. If this works out
>>> I
>>> >> > could
>>> >> > > >> then
>>> >> > > >> >>> look
>>> >> > > >> >>> > > into seeing which JAR's are important and which are
>>> not, in
>>> >> > this
>>> >> > > >> way
>>> >> > > >> >>> > > reducing the total memory footprint and coming up with
>>> a
>>> >> > > >> "lightweight
>>> >> > > >> >>> > > mobile
>>> >> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
>>> >> > > >> >>> > > these
>>> >> > > >> efforts.
>>> >> > > >> >>> > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > [1]
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>>> >> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>>> >> > > >> >>> > > [3]
>>> >> > > >>
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>> >> > > >> >>> > > [4]
>>> >> > > >>
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>>> >> > > >> >>> > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>>> >> > > >> >>> > > adrianocrestani@apache.org>
>>> >> > > >> >>> > > wrote:
>>> >> > > >> >>> > >
>>> >> > > >> >>> > > > Hi Oscar,
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > When I imported the projects from [3] the following
>>> >> > > >> >>> > > > projects
>>> >> > > were
>>> >> > > >> >>> not
>>> >> > > >> >>> > > > imported:
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > core-android
>>> >> > > >> >>> > > > host-android
>>> >> > > >> >>> > > > extensibility
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Is this normal? Should they be imported?
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
>>> >> > folders,
>>> >> > > >> there
>>> >> > > >> >>> > are
>>> >> > > >> >>> > > > the
>>> >> > > >> >>> > > > eclipse project files, so they should be identified
>>> by
>>> >> > > >> >>> > > > the
>>> >> > > >> eclipse
>>> >> > > >> >>> > import
>>> >> > > >> >>> > > > tool as an eclipse project.
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Thanks for the detailed explanation. I'm going to
>>> give
>>> >> > > >> >>> > > > this
>>> >> > a
>>> >> > > try
>>> >> > > >> as
>>> >> > > >> >>> I
>>> >> > > >> >>> > > > found
>>> >> > > >> >>> > > > an introspection related comment [2] as a workaround
>>> to
>>> >> > > another
>>> >> > > >> >>> > > annotations
>>> >> > > >> >>> > > > problem with the current SDK.
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > I don't think introspection is a good solution, hence
>>> you
>>> >> > will
>>> >> > > >> need
>>> >> > > >> >>> to
>>> >> > > >> >>> > > > change how the sca reads the info about each service
>>> and
>>> >> > also
>>> >> > > >> >>> services
>>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run
>>> on
>>> >> > > Android.
>>> >> > > >> >>> Let's
>>> >> > > >> >>> > > avoid
>>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>>> >> > > >> retrotranslator
>>> >> > > >> >>> in
>>> >> > > >> >>> > > > mind
>>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>>> SDK
>>> >> > > release
>>> >> > > >> :S
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Also, if you get the retrotranslator working, forget
>>> the
>>> >> > > >> Luciano's
>>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>>> same
>>> >> > > >> >>> > > > time
>>> >> > ;
>>> >> > > )
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Any progress testing retrotranslator on a simpler
>>> >> > > >> >>> > > > scenario,
>>> >> > > just
>>> >> > > >> let
>>> >> > > >> >>> us
>>> >> > > >> >>> > > > know
>>> >> > > >> >>> > > > ; )
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > Kind Regards,
>>> >> > > >> >>> > > > Adriano Crestani
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>>> >> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > > > > Hi Adriano,
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > At first, build a simple, but equivalent scenario,
>>> and
>>> >> > test
>>> >> > > it.
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > I think this is a great idea, especially because I
>>> >> > > >> >>> > > > > found
>>> >> > > that
>>> >> > > >> the
>>> >> > > >> >>> > > "native
>>> >> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
>>> >> > > >> >>> > > > > still
>>> >> > > >> related
>>> >> > > >> >>> to
>>> >> > > >> >>> > the
>>> >> > > >> >>> > > > > annotations problem. I'm getting the same errors
>>> when
>>> >> > > >> converting
>>> >> > > >> >>> the
>>> >> > > >> >>> > > code
>>> >> > > >> >>> > > > > to
>>> >> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator
>>> is
>>> >> > > actually
>>> >> > > >> not
>>> >> > > >> >>> > > > working.
>>> >> > > >> >>> > > > > Hopefully, testing with a simpler scenario will
>>> help me
>>> >> > > >> >>> > > > > to
>>> >> > > >> >>> understand
>>> >> > > >> >>> > > the
>>> >> > > >> >>> > > > > problem better.
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant
>>> you
>>> >> > > >> >>> > > > > to
>>> >> > > do:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>> >> > > >> >>> Class.isAnnotationPresent
>>> >> > > >> >>> > > or
>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>> checks
>>> >> > for
>>> >> > > a
>>> >> > > >> the
>>> >> > > >> >>> > > > > @Remotable
>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>> class.isAnnotationPresent
>>> >> > > >> >>> > > > > >>
>>> >> > > >> >>> > > > > >> (Remotable.class); =>
>>> >> > > >> >>> > > > > >> Annotation isRemotable = true;
>>> >> > > >> >>> > > > > >>
>>> >> > > >> >>> > > > > >> otherwise, which means, when it's not checking
>>> for
>>> >> > > >> >>> > > > > >> the
>>> >> > > >> >>> @Remotable
>>> >> > > >> >>> > > > > >> annnotation, force to false. For example:
>>> >> > > >> >>> > > > > >>
>>> >> > > >> >>> > > > > >> Annotation isReference =
>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>> >> > > >> >>> > > > =>
>>> >> > > >> >>> > > > > >> Annotation isReference = false;
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to
>>> give
>>> >> > this
>>> >> > > a
>>> >> > > >> try
>>> >> > > >> >>> as
>>> >> > > >> >>> > I
>>> >> > > >> >>> > > > > found
>>> >> > > >> >>> > > > > an introspection related comment [2] as a
>>> workaround to
>>> >> > > another
>>> >> > > >> >>> > > > annotations
>>> >> > > >> >>> > > > > problem with the current SDK.
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > Also, I have another question for you...
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > When I imported the projects from [3] the following
>>> >> > projects
>>> >> > > >> were
>>> >> > > >> >>> not
>>> >> > > >> >>> > > > > imported:
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > core-android
>>> >> > > >> >>> > > > > host-android
>>> >> > > >> >>> > > > > extensibility
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > Is this normal? Should they be imported?
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > [1]
>>> >> > > >> >>>
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> >> > > >> >>> > > > > [2]
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>>> >> > > >> >>> > > > > [3]
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>>> >> > > >> >>> > > > > adrianocrestani@apache.org>
>>> >> > > >> >>> > > > > wrote:
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > > > > Well detailed Oscar ; )
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > It is one thing I learnt after playing hours with
>>> >> > Android,
>>> >> > > >> you
>>> >> > > >> >>> need
>>> >> > > >> >>> > > to
>>> >> > > >> >>> > > > > > rebuild every modified project which is imported
>>> in
>>> >> > > >> >>> > > > > > the
>>> >> > > >> android
>>> >> > > >> >>> > > > project,
>>> >> > > >> >>> > > > > > the
>>> >> > > >> >>> > > > > > android project itself does not check for
>>> >> > > >> >>> > > > > > modifications
>>> >> > on
>>> >> > > >> its
>>> >> > > >> >>> > > > > dependencies
>>> >> > > >> >>> > > > > > :S...so, when you rebuilt the imported project it
>>> >> > > recompiled
>>> >> > > >> the
>>> >> > > >> >>> > > > > > uncommented
>>> >> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
>>> >> > > >> >>> > > > > > started
>>> >> > to
>>> >> > > >> check
>>> >> > > >> >>> for
>>> >> > > >> >>> > > > > > annotations once again, so you got the errors on
>>> [1],
>>> >> > > which
>>> >> > > >> >>> means
>>> >> > > >> >>> > > > > > retrotranslator is still not working. Have you
>>> tested
>>> >> > > >> >>> > > > > > it
>>> >> > > on a
>>> >> > > >> >>> > simpler
>>> >> > > >> >>> > > > > > application as I previously suggested? Did it
>>> work?
>>> >> > > >> >>> > > > > > What
>>> >> > > was
>>> >> > > >> the
>>> >> > > >> >>> > most
>>> >> > > >> >>> > > > > > critical scenario you tested it and it worked?
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>>> >> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>>> >> > > >> /../workspace
>>> >> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot
>>> -classpath
>>> >> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > You should also check if it's is working as
>>> expected,
>>> >> > > >> >>> > > > > > as
>>> >> > I
>>> >> > > >> >>> already
>>> >> > > >> >>> > > > said,
>>> >> > > >> >>> > > > > > does not go directly testing complex solutions on
>>> >> > complex
>>> >> > > >> things
>>> >> > > >> >>> > like
>>> >> > > >> >>> > > > > SCA.
>>> >> > > >> >>> > > > > > At first, build a simple, but equivalent
>>> scenario,
>>> >> > > >> >>> > > > > > and
>>> >> > > test
>>> >> > > >> it.
>>> >> > > >> >>> For
>>> >> > > >> >>> > > > > > example,
>>> >> > > >> >>> > > > > > a simple android app project that uses an java
>>> >> > > >> >>> > > > > > library
>>> >> > > >> project
>>> >> > > >> >>> > which
>>> >> > > >> >>> > > > > access
>>> >> > > >> >>> > > > > > annotations on classes placed on the android
>>> project.
>>> >> > Like
>>> >> > > >> our
>>> >> > > >> >>> > > android
>>> >> > > >> >>> > > > > > calculator, it's an android app project
>>> >> > > (calculator-android)
>>> >> > > >> >>> which
>>> >> > > >> >>> > > uses
>>> >> > > >> >>> > > > > > java
>>> >> > > >> >>> > > > > > library projects (sca modules), and these
>>> libraries
>>> >> > checks
>>> >> > > >> for
>>> >> > > >> >>> > > > > annotations
>>> >> > > >> >>> > > > > > on classes located at the android app project
>>> >> > > >> >>> > > (CalculatorService.java,
>>> >> > > >> >>> > > > > > AddService.java, etc). When you get it working on
>>> the
>>> >> > > simpler
>>> >> > > >> >>> > > scenario,
>>> >> > > >> >>> > > > > > then
>>> >> > > >> >>> > > > > > you are ready to test it on the complexer
>>> sceneario
>>> >> > > >> >>> > > > (calculator-android).
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Please, if you get the retrotranslator working in
>>> the
>>> >> > > simpler
>>> >> > > >> >>> > > scenario,
>>> >> > > >> >>> > > > > > send
>>> >> > > >> >>> > > > > > us a patch with it. You can create a JIRA and
>>> attach
>>> >> > > >> >>> > > > > > it.
>>> >> > > If
>>> >> > > >> you
>>> >> > > >> >>> > need
>>> >> > > >> >>> > > > any
>>> >> > > >> >>> > > > > > help, just ask ; )
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > "code that checks for @Remotable you force to
>>> true,
>>> >> > > otherwise
>>> >> > > >> >>> force
>>> >> > > >> >>> > > to
>>> >> > > >> >>> > > > > > false."
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I
>>> meant
>>> >> > > >> >>> > > > > > you
>>> >> > to
>>> >> > > do:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>>> >> > > >> >>> Class.isAnnotationPresent
>>> >> > > >> >>> > > or
>>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>>> checks
>>> >> > for
>>> >> > > a
>>> >> > > >> the
>>> >> > > >> >>> > > > > @Remotable
>>> >> > > >> >>> > > > > > annotations force it to true, for example:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Annotation isRemotable =
>>> >> > > >> >>> > class.isAnnotationPresent(Remotable.class);
>>> >> > > >> >>> > > =>
>>> >> > > >> >>> > > > > > Annotation isRemotable = true;
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > otherwise, which means, when it's not checking
>>> for
>>> >> > > >> >>> > > > > > the
>>> >> > > >> >>> @Remotable
>>> >> > > >> >>> > > > > > annnotation, force to false. For example:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Annotation isReference =
>>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>>> >> > > >> >>> > > =>
>>> >> > > >> >>> > > > > > Annotation isReference = false;
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > [1] -
>>> >> > > >> >>> > >
>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > Kind Regards,
>>> >> > > >> >>> > > > > > Adriano Crestani
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>>> >> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > > > > Hi Adriano,
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > I continued testing retrotranslator. Here's
>>> what
>>> >> > > >> >>> > > > > > > I've
>>> >> > > done
>>> >> > > >> up
>>> >> > > >> >>> to
>>> >> > > >> >>> > > now.
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and
>>> installed as
>>> >> > > shown
>>> >> > > >> >>> below:
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > svn checkout --revision 643746
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > >
>>> >> > > >>
>>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > cd modules
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > mvn clean install -Dtest=no
>>> >> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
>>> >> > M2_REPO
>>> >> > > >> >>> variable
>>> >> > > >> >>> > as
>>> >> > > >> >>> > > > > shown
>>> >> > > >> >>> > > > > > > below:
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>>> >> > > >> >>> > eclipse:add-maven-repo
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build
>>> errors,
>>> >> > added
>>> >> > > >> >>> Android
>>> >> > > >> >>> > > > library
>>> >> > > >> >>> > > > > > to
>>> >> > > >> >>> > > > > > > required modules, fixed references to jar files
>>> and
>>> >> > > other
>>> >> > > >> >>> > > libraries.
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > 5. Uncommented lines in
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the
>>> project
>>> >> > site
>>> >> > > >> [3]
>>> >> > > >> >>> and
>>> >> > > >> >>> > > > shown
>>> >> > > >> >>> > > > > > > below:
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>>> >> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar
>>> -srcdir
>>> >> > > >> >>> /../workspace
>>> >> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot
>>> -classpath
>>> >> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >  The output can be found in [4].
>>> >> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > and then re-ran retrotranslator.
>>> >> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in
>>> [5]
>>> >> > > >> >>> > > > > > > and
>>> >> > > >> Android
>>> >> > > >> >>> > > errors
>>> >> > > >> >>> > > > in
>>> >> > > >> >>> > > > > > > [6].
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > As always, I'm documenting my progress on the
>>> >> > > >> >>> > > > > > > project
>>> >> > > log.
>>> >> > > >> I
>>> >> > > >> >>> > > haven't
>>> >> > > >> >>> > > > > > fully
>>> >> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
>>> >> > > >> >>> > > > > > > puzzled
>>> >> > by
>>> >> > > >> what
>>> >> > > >> >>> you
>>> >> > > >> >>> > > > mean
>>> >> > > >> >>> > > > > by
>>> >> > > >> >>> > > > > > > this:
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > "code that checks for @Remotable you force to
>>> true,
>>> >> > > >> otherwise
>>> >> > > >> >>> > force
>>> >> > > >> >>> > > > to
>>> >> > > >> >>> > > > > > > false."
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > I'll continue looking into it and hopefully get
>>> >> > > >> >>> retrotranslator
>>> >> > > >> >>> > to
>>> >> > > >> >>> > > > > work.
>>> >> > > >> >>> > > > > > I
>>> >> > > >> >>> > > > > > > also think it's a simpler option.
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > [1]
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > >
>>> >> > > >> >>> > > > >
>>> >> > > >> >>> > > >
>>> >> > > >> >>> > >
>>> >> > > >> >>> >
>>> >> > > >> >>>
>>> >> > > >>
>>> >> > >
>>> >> >
>>> >> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > [2]
>>> >> > > >> >>> > > > >
>>> >> > > >> >>>
>>> >> > >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > [3]
>>> http://retrotranslator.sourceforge.net/#android
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > [4]
>>> >> > > >> >>> >
>>> http://androidindelft.googlepages.com/rt_output_30may2008.txt
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > [5]
>>> >> > > >> >>> > >
>>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> >> > > >> >>> > > > > > > [6]
>>> http://androidindelft.googlepages.com/2Jun1.jpg
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano
>>> Crestani <
>>> >> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
>>> >> > > >> >>> > > > > > >
>>> >> > > >> >>> > > > > > > > Hi,
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > I tried what Luciano suggested. It really
>>> works.
>>> >> > > >> >>> > > > > > > > To
>>> >> > > get
>>> >> > > >> it
>>> >> > > >> >>> > > working
>>> >> > > >> >>> > > > > you
>>> >> > > >> >>> > > > > > > > simply need to search on all modules where
>>> the
>>> >> > > >> >>> > > > > > > > code
>>> >> > > >> checks
>>> >> > > >> >>> for
>>> >> > > >> >>> > > > > > @Remotable
>>> >> > > >> >>> > > > > > > > annotation and force it to true:
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) !=
>>> null"
>>> >> > > >> >>> > > > > > > > =>
>>> >> > > true
>>> >> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)"
>>> =>
>>> >> > > >> >>> > > > > > > > true
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > It works fine on the sca revision we are
>>> testing
>>> >> > > >> >>> > > > > > > > on
>>> >> > > >> Android
>>> >> > > >> >>> and
>>> >> > > >> >>> > > the
>>> >> > > >> >>> > > > > > most
>>> >> > > >> >>> > > > > > > > recent revision. I only tested it as a java
>>> >> > > application,
>>> >> > > >> not
>>> >> > > >> >>> as
>>> >> > > >> >>> > > an
>>> >> > > >> >>> > > > > > > android
>>> >> > > >> >>> > > > > > > > application.
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator
>>> is
>>> >> > > >> >>> > > > > > > > a
>>> >> > > faster
>>> >> > > >> >>> and
>>> >> > > >> >>> > > > simpler
>>> >> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion
>>> only
>>> >> > forces
>>> >> > > >> the
>>> >> > > >> >>> SCA
>>> >> > > >> >>> > to
>>> >> > > >> >>> > > > > > > recognize
>>> >> > > >> >>> > > > > > > > the services with no annotations declared on
>>> >> > > >> >>> > > > > > > > their
>>> >> > > >> >>> interfaces,
>>> >> > > >> >>> > > but
>>> >> > > >> >>> > > > it
>>> >> > > >> >>> > > > > > > does
>>> >> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when
>>> the
>>> >> > > >> >>> > > > > > > > SCA
>>> >> > > >> invokes
>>> >> > > >> >>> > > > methods
>>> >> > > >> >>> > > > > > that
>>> >> > > >> >>> > > > > > > > read annotations. So, our current problem is
>>> that
>>> >> > > >> >>> > > > > > > > we
>>> >> > > are
>>> >> > > >> not
>>> >> > > >> >>> > > being
>>> >> > > >> >>> > > > > able
>>> >> > > >> >>> > > > > > > to
>>> >> > > >> >>> > > > > > > > use these methods and not only because we are
>>> not
>>> >> > > being
>>> >> > > >> able
>>> >> > > >> >>> to
>>> >> > > >> >>> > > > read
>>> >> > > >> >>> > > > > > the
>>> >> > > >> >>> > > > > > > > annotations.
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
>>> >> > > >> >>> > > > > > > > suggestion,
>>> >> > > you
>>> >> > > >> will
>>> >> > > >> >>> > need
>>> >> > > >> >>> > > > to
>>> >> > > >> >>> > > > > > > > comment/adapt every sca code that tries to
>>> read
>>> >> > > >> >>> > > > > > > > the
>>> >> > > class
>>> >> > > >> >>> > > > > annotations.
>>> >> > > >> >>> > > > > > It
>>> >> > > >> >>> > > > > > > > is
>>> >> > > >> >>> > > > > > > > not necessary to comment/adapt the methods
>>> that
>>> >> > > >> >>> > > > > > > > read
>>> >> > > >> Method
>>> >> > > >> >>> > > > > > annotations,
>>> >> > > >> >>> > > > > > > > they are not throwning any exception. So,
>>> every
>>> >> > > >> >>> > > > > > > > code
>>> >> > > that
>>> >> > > >> >>> > checks
>>> >> > > >> >>> > > > for
>>> >> > > >> >>> > > > > > > > @Remotable you force to true, otherwise force
>>> to
>>> >> > > false.
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > Any doubt about what I have said, just let me
>>> >> > > >> >>> > > > > > > > know ;
>>> >> > )
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > Suggestions are welcome : )
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > Adriano Crestani
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano
>>> Resende
>>> >> > > >> >>> > > > > > > > <
>>> >> > > >> >>> > > > > > luckbr1975@gmail.com>
>>> >> > > >> >>> > > > > > > > wrote:
>>> >> > > >> >>> > > > > > > >
>>> >> > > >> >>> > > > > > > > > FYI, if you comment out the code that
>>> checks if
>>> >> > > >> >>> > > > > > > > > a
>>> >> > > >> >>> interface
>>> >> > > >> >>> > is
>>> >> > > >> >>> > > > > > > > > remoteble, you could have a version of the
>>> >> > > calculator
>>> >> > > >> >>> without
>>> >> > > >> >>> > > any
>>> >> > > >> >>> > > > > > > > > annotations, and the runtime would
>>> introspect
>>> >> > > >> >>> > > > > > > > > the
>>> >> > > >> >>> references
>>> >> > > >> >>> > > for
>>> >> > > >> >>> > > > > the
>>> >> > > >> >>> > > > > > > > > multiple services. But note that, the
>>> >> > introspection
>>> >> > > >> code
>>> >> > > >> >>> will
>>> >> > > >> >>> > > > only
>>> >> > > >> >>> > > > > be
>>> >> > > >> >>> > > > > > > > > activated if there is no SCA annotations on
>>> the
>>> >> > > class.
>>> >> > > >> >>> > > > > > > > >
>>> >> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
>>> >> > > >> >>> > > > > > > > > Crestani
>>> >> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
>>> >> > > >> >>> > > > > > > > > > Ah, the expected exception should look
>>> like
>>> >> > > >> >>> > > > > > > > > > this
>>> >> > > on
>>> >> > > >> >>> android
>>> >> > > >> >>> > > > > > emulator:
>>> >> > > >> >>> > > > > > > > > >
>>> >> > > >> >>> > >
>>> >> >
>>> >> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>> >
>>> >> > > >> <
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>>
>>> >> > > >> >>> <
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>> >> > >
>>> >> > > >> >>> > <
>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>> >> > > >
>>> >> > > >> >>> > > <
>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>> > > > <
>>> >> > > >>
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>> > > > > <
>>> >> > > >>
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>> >> > > >> >>> >
>>> >> > > >> >>> > > > > > <
>>> >> > > >> >>>
>>> >> > > >> >>>
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>> > > > > > > <
>>> >> > > >> >>> >
>>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>> > > > > > > > <
>>> >> > > >> >>> > >
>>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> >> > > >> >>> > > > > > > > > >
>>> >> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
>>> >> > Crestani
>>> >> > > <
>>> >> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>>> >> > > >> >>> > > > > > > > > >
>>> >> > > >> >>> > > > > > > > > >> Hi Oscar,
>>> >> > > >> >>> > > > > > > > > >>
>>> >> > > >> >>> > > > > > > > > >> I was indeed using the sca modules not
>>> from
>>> >> > > >> >>> > > > > > > > > >> the
>>> >> > > >> >>> sandbox.
>>> >> > > >> >>> > As
>>> >> > > >> >>> > > > you
>>> >> > > >> >>> > > > > > > > > suggested,
>>> >> > > >> >>> > > > > > > > > >> I
>>> >> > > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl
>>> from
>>> >> > > >> >>> > > > > > > > > >> my
>>> >> > > >> workspace
>>> >> > > >> >>> > and
>>> >> > > >> >>> > > > > added
>>> >> > > >> >>> > > > >
>>>
>> ...
>
> [Message clipped]

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

I have been trying to reproduce the Exception you are getting. I found out
that the Corba errors were related to [1] so I tried with the latest
revision. I'm able to build it with maven with no problems. However, when I
import the projects into Eclipse I get all sorts of errors when doing a
build.

I guess I'm confused by your reference to revision 674723 in the the URL you
provided for the Exception. So I tried with revision 643746, which is the
one you referenced originally on this thread on May 6th. Same story here, I
can build with maven but when I import the projects into Eclipse I get all
sorts of errors.

Looking closer at the errors I found that they are related to
tuscany-interface-java-jaxws. More specifically, some imports (like those
shown below for example) cannot be resolved. The result is that all the
modules that reference tuscany-interface-java-jaxws end up in error.

import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
import org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil;
import org.apache.tuscany.sca.interfacedef.java.JavaInterfaceFactory;

Am I missing anything to reproduce your workspace?

[1] http://www.mail-archive.com/dev@tuscany.apache.org/msg00587.html

On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <ad...@apache.org>
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 <lu...@gmail.com>
> 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.
>>
>> On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
>> <os...@gmail.com> wrote:
>> > Thanks Adriano. I have been testing the workarounds for RMI and Beans
>> API. I
>> > am also working to integrate retrotranslator into maven.
>> >
>> > Today, I tested the newest version of retrotranslator (thanks for the
>> tip).
>> > With this new version RMI related issues are not appearing (not
>> initially,
>> > at least) but instead Beans issues are. I've commented
>> > java.beans.Introspector import and related code from
>> > JavaIntrospectionHelper.java and now get other errors [1] related to
>> > javax.jws.WebService. Suggestions are welcome and appreciated.
>> >
>> > I've noted down these issues on the porting limitations page [2], which
>> I
>> > have updated with the current progress.
>> >
>> > [1]
>> >
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
>> > [2]
>> >
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>> >
>> > On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
>> > <ad...@apache.org> wrote:
>> >>
>> >> I added to the wiki a page [1] about all the issues we have found so
>> far
>> >> when trying to port the SCA Java to the Android platform.
>> >>
>> >> [1] -
>> >>
>> >>
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>> >>
>> >> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
>> >> oscar.castaneda.gsoc@gmail.com> wrote:
>> >>
>> >> > Hi Luciano,
>> >> >
>> >> > Thanks for the tip. Before testing it I generated a JIRA ticket [1]
>> for
>> >> > the
>> >> > Retrotranslator progress, and when I got around to testing I noticed
>> a
>> >> > different ClassNotFoundException. This time its for
>> >> > java.beans.Introspector.  I made sure to include this in the JIRA
>> ticket
>> >> > and
>> >> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
>> >> >
>> >> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
>> >> > [2]
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>> >> >
>> >> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <
>> luckbr1975@gmail.com>
>> >> > wrote:
>> >> >
>> >> > > Removing RMI should be as simple as removing the
>> tuscany-binding-rmi
>> >> > > dependency from host-android.
>> >> > >
>> >> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
>> >> > > <os...@gmail.com> wrote:
>> >> > > > Hi Luciano,
>> >> > > >
>> >> > > > It's going better after the progress last week with
>> retrotranslator.
>> >> > I'm
>> >> > > now
>> >> > > > able to translate the SCA classes and run calculator-android
>> without
>> >> > > getting
>> >> > > > Annotation related issues. The problems now are related to RMI.
>> In
>> >> > > relation
>> >> > > > to this, and from your comment about blocking issues, I created a
>> >> > > > child
>> >> > > page
>> >> > > > [1] in the project wiki for Blocking issues. Currently, the page
>> >> > > > lists
>> >> > > the
>> >> > > > RMI issue and suggested workarounds.
>> >> > > >
>> >> > > > I think your suggestion about integration with maven is really
>> good.
>> >> > > > Especially because there is a retrotranslator plugin for maven.
>> I'll
>> >> > > start
>> >> > > > looking into using this plugin. I also agree about reviewing the
>> >> > > > scope
>> >> > of
>> >> > > > support. Right now, I see a need to reduce the dependency on RMI,
>> >> > either
>> >> > > by
>> >> > > > commenting all the code that uses the RMI API, or by following
>> the
>> >> > > > suggestions from Taras [3] to either replace java.rmi.Remote with
>> >> > > > java.lang.Cloneable (as the result of using a retrotranslator
>> >> > > > option)
>> >> > or
>> >> > > > taking the RMI source from Apache Harmony and putting it in a
>> >> > > > retrotranslated JAR. What would you recommend? Hopefully after
>> the
>> >> > > > dependency reduction Android will be able to run
>> calculator-android.
>> >> > > Based
>> >> > > > on the results of this experiment we can better consider the
>> >> > > > reduction
>> >> > of
>> >> > > > component types and bindings. Please let me know your thoughts on
>> >> > > > this
>> >> > > idea.
>> >> > > >
>> >> > > > [1]
>> >> > >
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
>> >> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
>> >> > > > [3]
>> >> > > >
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>> >> > > >
>> >> > > >
>> >> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
>> >> > luckbr1975@gmail.com>
>> >> > > > wrote:
>> >> > > >
>> >> > > >> How is it going here ? I just want to check if there is any
>> >> > > >> blocking
>> >> > > >> issues with Android at the moment, if so, is there a list of
>> these
>> >> > > >> issues somewhere ?
>> >> > > >>
>> >> > > >> Also, some general suggestions/recommendations.: It would be
>> great
>> >> > > >> if
>> >> > > >> we could spend sometime to get the modules well integrated using
>> >> > > >> maven, this way it would be easier for anyone on the community
>> to
>> >> > > >> checkout the trunk + android sandbox and jump on the code to
>> help.
>> >> > > >> Also, we should review the scope of the support we are trying to
>> >> > > >> acomplish, I'd suggest to minimize the number of component types
>> >> > > >> supported (java) and bindings (default sca binding) and then try
>> to
>> >> > > >> run the calculator sample application. Once we have acomplished
>> >> > > >> this
>> >> > > >> first milestone, we could then discuss our next steps.
>> >> > > >>
>> >> > > >> Thoughts ?
>> >> > > >>
>> >> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>> >> > > >> <ad...@apache.org> wrote:
>> >> > > >> > Ah, here is a tip to assure the classes are not recompiled
>> again.
>> >> > > Build
>> >> > > >> the
>> >> > > >> > project, then go in each project builder (in the properties
>> >> > > >> > window)
>> >> > > and
>> >> > > >> > disable all the builders, then not even a clean/build will
>> modify
>> >> > your
>> >> > > >> > project ; )
>> >> > > >> >
>> >> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>> >> > > >> adrianocrestani@apache.org>
>> >> > > >> > wrote:
>> >> > > >> >
>> >> > > >> >> Hi Oscar,
>> >> > > >> >>
>> >> > > >> >> I say that it is more difficult to debug because you need
>> attach
>> >> > > >> >> a
>> >> > > >> source
>> >> > > >> >> code to each jar and etc, and when you are using projects,
>> >> > > >> >> eclipse
>> >> > > >> already
>> >> > > >> >> knows where to find the source code : )
>> >> > > >> >>
>> >> > > >> >> The reply made sense to me, especially with regards to the
>> fact
>> >> > that
>> >> > > >> with
>> >> > > >> >> the Android plugin Eclipse compiles sources into classes and
>> >> > > >> >> then
>> >> > > into
>> >> > > >> dex
>> >> > > >> >> files, so retrotranslator has no chance to translate classes
>> in
>> >> > > between
>> >> > > >> >> these steps - even if I do that outside of Eclipse. This
>> shows
>> >> > > >> >> from
>> >> > > the
>> >> > > >> use
>> >> > > >> >> of non-translated binaries (as indicated by the
>> >> > > >> >> java.lang.Class.isAnnotationPr
>> >> > > >> >> esent(Class.java:1131) error in the stack
>> >> > > >> >> trace) that might have been related to the use of
>> pre-existing
>> >> > > >> >> dex
>> >> > > files
>> >> > > >> or
>> >> > > >> >> over-writing of files by Eclipse. So unless I modify the ADT
>> >> > > >> >> plugin
>> >> > > the
>> >> > > >> >> result would still be the same, even if I use a simpler
>> >> > > >> >> scenario.
>> >> > > >> >>
>> >> > > >> >> Sorry, I really did not comment this email yet. It does not
>> make
>> >> > > >> >> so
>> >> > > much
>> >> > > >> >> sense for me. First, as you already know, eclipse android
>> >> > > >> >> projects
>> >> > > does
>> >> > > >> not
>> >> > > >> >> recognize any modifications in the imported projects, so it
>> does
>> >> > not
>> >> > > >> call
>> >> > > >> >> the build or incremental build even if the imported projects
>> >> > > >> >> have
>> >> > > their
>> >> > > >> >> source code modified. Just to make sure I tested it again:
>> >> > > >> >>
>> >> > > >> >> 1-  imported in my workspace all the projects included in the
>> >> > > >> >> calculator-android, cleaned and built them...it takes a
>> loooong
>> >> > time,
>> >> > > as
>> >> > > >> you
>> >> > > >> >> already know.
>> >> > > >> >>
>> >> > > >> >> 2- imported the calculator-android project, cleaned and built
>> it
>> >> > > (only
>> >> > > >> the
>> >> > > >> >> calculator-android project), and this process was too much
>> >> > > >> >> faster
>> >> > > than
>> >> > > >> when
>> >> > > >> >> all the modules are built, so the imported projects were not
>> >> > > recompiled,
>> >> > > >> >> otherwise it would take too much more time. I suppose here
>> that
>> >> > > >> >> the
>> >> > > >> android
>> >> > > >> >> project compiles the .java contained in the android project
>> and
>> >> > > convert
>> >> > > >> all
>> >> > > >> >> the .class files (generated by imported projects and android
>> >> > project)
>> >> > > to
>> >> > > >> dex
>> >> > > >> >> format.
>> >> > > >> >>
>> >> > > >> >> So, it does not recompile the external class files (the ones
>> >> > > contained
>> >> > > >> in
>> >> > > >> >> the imported projects) cause it seems not to check if it was
>> >> > modified
>> >> > > or
>> >> > > >> >> not. Of course, I never tested it modifing the .class files,
>> I'm
>> >> > just
>> >> > > >> >> assuming that, because when you modify .java files it does
>> not
>> >> > > >> >> get
>> >> > > >> >> recompiled.
>> >> > > >> >>
>> >> > > >> >> What do you think?
>> >> > > >> >>
>> >> > > >> >> As I mentioned before, your comments are really helpful as
>> they
>> >> > give
>> >> > > me
>> >> > > >> a
>> >> > > >> >> sense of direction. Please let me know if you still think we
>> >> > > >> >> should
>> >> > > >> pursue
>> >> > > >> >> retrotranslator for files inside a folder.
>> >> > > >> >>
>> >> > > >> >> I really think you should try at first the simpler scenario
>> and
>> >> > > >> >> try
>> >> > > to
>> >> > > >> >> understand how it works and IF it works. Also, you can try
>> what
>> >> > > >> >> you
>> >> > > were
>> >> > > >> >> planning: to retrotranslate the each modules' jar, but I
>> suppose
>> >> > it's
>> >> > > a
>> >> > > >> lot
>> >> > > >> >> of work, because there are so many modules :S. So, as I've
>> >> > > >> >> already
>> >> > > said,
>> >> > > >> if
>> >> > > >> >> you think it's getting to complicated, forget it and go on
>> with
>> >> > > >> Luciano's
>> >> > > >> >> suggestion.
>> >> > > >> >>
>> >> > > >> >> Feel free to choose the direction you want to take, and if
>> there
>> >> > > >> >> is
>> >> > > >> another
>> >> > > >> >> approach you think is better, just let us know ; )...you are
>> the
>> >> > best
>> >> > > >> person
>> >> > > >> >> to choose the directions, cause you are working directly on
>> it,
>> >> > > >> >> we
>> >> > > are
>> >> > > >> just
>> >> > > >> >> guinding/helping you ; )
>> >> > > >> >>
>> >> > > >> >> Thanks,
>> >> > > >> >> Adriano Crestani
>> >> > > >> >>
>> >> > > >> >>
>> >> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>> >> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
>> >> > > >> >>
>> >> > > >> >>> Hi Adriano,
>> >> > > >> >>>
>> >> > > >> >>> If there is an option on retrotranslator to retrotranslate
>> all
>> >> > > >> >>> the
>> >> > > >> classes
>> >> > > >> >>> > in a folder, it should work as well as it works on classes
>> >> > inside
>> >> > > >> .jar
>> >> > > >> >>> > files. So, I think you should try to understand why your
>> >> > > >> >>> > first
>> >> > > >> approach
>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>> working
>> >> > > trying
>> >> > > >> a
>> >> > > >> >>> > simpler scenario. Have you already tried it?
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >> >>> I agree that it's good to try out a simpler scenario to
>> better
>> >> > > >> understand
>> >> > > >> >>> the problem. I haven't tried it yet because using
>> >> > > >> >>> retrotranslator
>> >> > > for
>> >> > > >> >>> classes inside a folder doesn't seem to be a solution to the
>> >> > > problem.
>> >> > > >> >>> Here's
>> >> > > >> >>> my reasoning:
>> >> > > >> >>>
>> >> > > >> >>> Yes, there is an option to translate classes in a folder. I
>> >> > > >> >>> tried
>> >> > it
>> >> > > >> and
>> >> > > >> >>> it
>> >> > > >> >>> successfully translated the classes inside my Eclipse
>> >> > > >> >>> workspace.
>> >> > > When I
>> >> > > >> >>> ran
>> >> > > >> >>> the calculator-android application using the newly
>> translated
>> >> > > classes I
>> >> > > >> >>> was
>> >> > > >> >>> getting the errors in [1]. I posted a question in Android
>> >> > Developers
>> >> > > >> about
>> >> > > >> >>> this error and received a reply [2].
>> >> > > >> >>>
>> >> > > >> >>> The reply made sense to me, especially with regards to the
>> fact
>> >> > that
>> >> > > >> with
>> >> > > >> >>> the Android plugin Eclipse compiles sources into classes and
>> >> > > >> >>> then
>> >> > > into
>> >> > > >> dex
>> >> > > >> >>> files, so retrotranslator has no chance to translate classes
>> in
>> >> > > between
>> >> > > >> >>> these steps - even if I do that outside of Eclipse. This
>> shows
>> >> > from
>> >> > > the
>> >> > > >> >>> use
>> >> > > >> >>> of non-translated binaries (as indicated by the
>> >> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error
>> in
>> >> > > >> >>> the
>> >> > > stack
>> >> > > >> >>> trace) that might have been related to the use of
>> pre-existing
>> >> > > >> >>> dex
>> >> > > >> files
>> >> > > >> >>> or
>> >> > > >> >>> over-writing of files by Eclipse. So unless I modify the ADT
>> >> > plugin
>> >> > > the
>> >> > > >> >>> result would still be the same, even if I use a simpler
>> >> > > >> >>> scenario.
>> >> > > >> >>>
>> >> > > >> >>> The reply suggested to use JAR's instead. This also made
>> sense
>> >> > > >> >>> to
>> >> > me
>> >> > > >> and
>> >> > > >> >>> seemed like a simpler way of solving the problem. I didn't
>> see
>> >> > > >> >>> the
>> >> > > >> >>> disadvantage of debugging, which as you point out is more
>> >> > difficult
>> >> > > >> with
>> >> > > >> >>> JAR's instead of Eclipse projects.
>> >> > > >> >>>
>> >> > > >> >>> As I mentioned before, your comments are really helpful as
>> they
>> >> > give
>> >> > > me
>> >> > > >> a
>> >> > > >> >>> sense of direction. Please let me know if you still think we
>> >> > should
>> >> > > >> pursue
>> >> > > >> >>> retrotranslator for files inside a folder.
>> >> > > >> >>>
>> >> > > >> >>>
>> >> > > >> >>> [1]
>> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>> >> > > >> >>> [2]
>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> >> > > >> >>>
>> >> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>> >> > > >> >>> adrianocrestani@apache.org>
>> >> > > >> >>> wrote:
>> >> > > >> >>>
>> >> > > >> >>> > Hi Oscar,
>> >> > > >> >>> >
>> >> > > >> >>> > Yup, you're right - there are indeed Eclipse files inside
>> the
>> >> > > >> folders. I
>> >> > > >> >>> > guess I was confused by the different names in [1] than
>> those
>> >> > that
>> >> > > >> >>> result
>> >> > > >> >>> > [2] from importing to an Eclipse workspace - after which I
>> >> > > >> >>> > see
>> >> > 13
>> >> > > >> >>> projects
>> >> > > >> >>> > in both cases. So please ignore my previous remark.
>> >> > > >> >>> >
>> >> > > >> >>> > I have added the projects, but still haven't changed their
>> >> > names.
>> >> > > I
>> >> > > >> was
>> >> > > >> >>> > planning to modify their project names when we get it
>> >> > > >> >>> > integrated
>> >> > > to
>> >> > > >> SCA,
>> >> > > >> >>> > mainly because we will need to change the poms. Anyway,
>> feel
>> >> > free
>> >> > > to
>> >> > > >> >>> modify
>> >> > > >> >>> > the names whenever you want ; )
>> >> > > >> >>> >
>> >> > > >> >>> >
>> >> > > >> >>> > Per the reply I received on the Android Developers list
>> [3] I
>> >> > > started
>> >> > > >> >>> using
>> >> > > >> >>> > retrotranslator on JAR's instead of class files. For this
>> I
>> >> > > created a
>> >> > > >> >>> big
>> >> > > >> >>> > JAR file with all the Tuscany modules (including those you
>> >> > > modified
>> >> > > >> for
>> >> > > >> >>> > Android). I translated this big JAR (around 15MB) with
>> >> > > >> retrotranslator
>> >> > > >> >>> [4].
>> >> > > >> >>> > Then I created a new workspace with only
>> calculator-android
>> >> > > >> >>> > and
>> >> > > >> >>> > android-jdk-classes as projects and added the translated
>> JAR
>> >> > > >> >>> > as
>> >> > an
>> >> > > >> >>> external
>> >> > > >> >>> > library for both projects. This resulted in errors [4]
>> from
>> >> > > >> >>> > the
>> >> > > >> Android
>> >> > > >> >>> > build process.
>> >> > > >> >>> >
>> >> > > >> >>> > I really do not understand this errors, but as this errors
>> >> > > >> >>> > are
>> >> > > only
>> >> > > >> >>> related
>> >> > > >> >>> > to testcase classes they can be ignored (removed from the
>> >> > > >> >>> > jars).
>> >> > I
>> >> > > >> also
>> >> > > >> >>> did
>> >> > > >> >>> > not understand why it's not find the .apk file:
>> >> > > >> >>> >
>> >> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
>> >> > > >> >>> > /bin/calculator-android.apk!"
>> >> > > >> >>> >
>> >> > > >> >>> > To work around these errors I decided to take a different
>> >> > approach
>> >> > > >> and
>> >> > > >> >>> copy
>> >> > > >> >>> > all the jar files contained in the individual modules to a
>> >> > > separate
>> >> > > >> >>> folder
>> >> > > >> >>> > and then run retrotranslator on each JAR. The jars are
>> found
>> >> > > inside
>> >> > > >> the
>> >> > > >> >>> > target folder of each module and are named as shown below:
>> >> > > >> >>> >
>> >> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> >> > > >> >>> >
>> >> > > >> >>> > From this I found that only the SCA modules have these JAR
>> >> > > >> >>> > files
>> >> > > >> inside
>> >> > > >> >>> > their respective target folders, whereas the Android
>> modules
>> >> > > >> >>> > I
>> >> > > >> >>> downloaded
>> >> > > >> >>> > from [1] don't have these files at all
>> >> > > >> >>> >
>> >> > > >> >>> > Yep, this .jars are generated when the maven is executed.
>> I'm
>> >> > not
>> >> > > >> sure
>> >> > > >> >>> if
>> >> > > >> >>> > you should use this .jars, because they were compiled with
>> no
>> >> > > >> reference
>> >> > > >> >>> to
>> >> > > >> >>> > Android library. That's also why there are no .jar files
>> for
>> >> > > android
>> >> > > >> >>> > modules, because you did not execute the maven on them
>>  (and
>> >> > > >> >>> > you
>> >> > > >> >>> > shouldn't).
>> >> > > >> >>> >
>> >> > > >> >>> > So I decided to keep the Android
>> >> > > >> >>> > modules [2] and add the translated JARs as libraries where
>> >> > needed
>> >> > > to
>> >> > > >> >>> have
>> >> > > >> >>> > the workspace build with no problems. If I get this
>> running I
>> >> > > would
>> >> > > >> look
>> >> > > >> >>> > into creating JAR files from the Android modules and then
>> >> > > >> >>> > return
>> >> > > to
>> >> > > >> only
>> >> > > >> >>> > having calculator-android and android-jdk-classes as
>> projects
>> >> > and
>> >> > > the
>> >> > > >> >>> rest
>> >> > > >> >>> > as JAR's added as external libraries. If this works out I
>> >> > > >> >>> > could
>> >> > > then
>> >> > > >> >>> look
>> >> > > >> >>> > into seeing which JAR's are important and which are not,
>> in
>> >> > > >> >>> > this
>> >> > > way
>> >> > > >> >>> > reducing the total memory footprint and coming up with a
>> >> > > "lightweight
>> >> > > >> >>> > mobile
>> >> > > >> >>> > SCA core/runtime." Please let me know your thoughts on
>> these
>> >> > > efforts.
>> >> > > >> >>> >
>> >> > > >> >>> > You haven't tried this yet, right? You may try it, but I
>> do
>> >> > > >> >>> > not
>> >> > > like
>> >> > > >> >>> this
>> >> > > >> >>> > approach, because it will get difficult to debug sca
>> classes
>> >> > > >> >>> > as
>> >> > > they
>> >> > > >> are
>> >> > > >> >>> > not
>> >> > > >> >>> > imported as eclipse projects.
>> >> > > >> >>> >
>> >> > > >> >>> > If there is an option on retrotranslator to retrotranslate
>> >> > > >> >>> > all
>> >> > the
>> >> > > >> >>> classes
>> >> > > >> >>> > in a folder, it should work as well as it works on classes
>> >> > inside
>> >> > > >> .jar
>> >> > > >> >>> > files. So, I think you should try to understand why your
>> >> > > >> >>> > first
>> >> > > >> approach
>> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
>> working
>> >> > > trying
>> >> > > >> a
>> >> > > >> >>> > simpler scenario. Have you already tried it?
>> >> > > >> >>> >
>> >> > > >> >>> > Also, if the restrotranslator gets to complicated, you may
>> >> > > >> >>> > try
>> >> > the
>> >> > > >> >>> > Luciano's
>> >> > > >> >>> > suggestion ; )
>> >> > > >> >>> >
>> >> > > >> >>> >
>> >> > > >> >>> > Kind Regards,
>> >> > > >> >>> > Adriano Crestani
>> >> > > >> >>> >
>> >> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>> >> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> >> > > >> >>> >
>> >> > > >> >>> > > Hi Adriano,
>> >> > > >> >>> > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
>> >> > folders,
>> >> > > >> there
>> >> > > >> >>> > are
>> >> > > >> >>> > > > the
>> >> > > >> >>> > > > eclipse project files, so they should be identified by
>> >> > > >> >>> > > > the
>> >> > > >> eclipse
>> >> > > >> >>> > import
>> >> > > >> >>> > > > tool as an eclipse project.
>> >> > > >> >>> > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > Yup, you're right - there are indeed Eclipse files
>> inside
>> >> > > >> >>> > > the
>> >> > > >> folders.
>> >> > > >> >>> I
>> >> > > >> >>> > > guess I was confused by the different names in [1] than
>> >> > > >> >>> > > those
>> >> > > that
>> >> > > >> >>> result
>> >> > > >> >>> > > [2] from importing to an Eclipse workspace - after which
>> I
>> >> > > >> >>> > > see
>> >> > > 13
>> >> > > >> >>> > projects
>> >> > > >> >>> > > in both cases. So please ignore my previous remark.
>> >> > > >> >>> > >
>> >> > > >> >>> > > I don't think introspection is a good solution, hence
>> you
>> >> > > >> >>> > > will
>> >> > > need
>> >> > > >> to
>> >> > > >> >>> > > > change how the sca reads the info about each service
>> and
>> >> > also
>> >> > > >> >>> services
>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run on
>> >> > > Android.
>> >> > > >> >>> Let's
>> >> > > >> >>> > > avoid
>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>> >> > > >> retrotranslator
>> >> > > >> >>> in
>> >> > > >> >>> > > > mind
>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>> SDK
>> >> > > release
>> >> > > >> :S
>> >> > > >> >>> > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > >  Also, if you get the retrotranslator working, forget
>> the
>> >> > > >> Luciano's
>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>> same
>> >> > > >> >>> > > > time
>> >> > ;
>> >> > > )
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in
>> the
>> >> > right
>> >> > > >> >>> > direction
>> >> > > >> >>> > > :-)
>> >> > > >> >>> > >
>> >> > > >> >>> > > Now, a summary of what I've done up to now:
>> >> > > >> >>> > >
>> >> > > >> >>> > > Per the reply I received on the Android Developers list
>> [3]
>> >> > > >> >>> > > I
>> >> > > >> started
>> >> > > >> >>> > using
>> >> > > >> >>> > > retrotranslator on JAR's instead of class files. For
>> this I
>> >> > > created
>> >> > > >> a
>> >> > > >> >>> big
>> >> > > >> >>> > > JAR file with all the Tuscany modules (including those
>> you
>> >> > > modified
>> >> > > >> >>> for
>> >> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
>> >> > > >> retrotranslator
>> >> > > >> >>> > [4].
>> >> > > >> >>> > > Then I created a new workspace with only
>> calculator-android
>> >> > and
>> >> > > >> >>> > > android-jdk-classes as projects and added the translated
>> >> > > >> >>> > > JAR
>> >> > as
>> >> > > an
>> >> > > >> >>> > external
>> >> > > >> >>> > > library for both projects. This resulted in errors [4]
>> from
>> >> > the
>> >> > > >> >>> Android
>> >> > > >> >>> > > build process.
>> >> > > >> >>> > >
>> >> > > >> >>> > > To work around these errors I decided to take a
>> different
>> >> > > approach
>> >> > > >> and
>> >> > > >> >>> > copy
>> >> > > >> >>> > > all the jar files contained in the individual modules to
>> a
>> >> > > separate
>> >> > > >> >>> > folder
>> >> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
>> >> > > >> >>> > > found
>> >> > > inside
>> >> > > >> >>> the
>> >> > > >> >>> > > target folder of each module and are named as shown
>> below:
>> >> > > >> >>> > >
>> >> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> >> > > >> >>> > >
>> >> > > >> >>> > > From this I found that only the SCA modules have these
>> JAR
>> >> > files
>> >> > > >> >>> inside
>> >> > > >> >>> > > their respective target folders, whereas the Android
>> >> > > >> >>> > > modules I
>> >> > > >> >>> downloaded
>> >> > > >> >>> > > from [1] don't have these files at all. So I decided to
>> >> > > >> >>> > > keep
>> >> > the
>> >> > > >> >>> Android
>> >> > > >> >>> > > modules [2] and add the translated JARs as libraries
>> where
>> >> > > needed
>> >> > > >> to
>> >> > > >> >>> have
>> >> > > >> >>> > > the workspace build with no problems. If I get this
>> running
>> >> > > >> >>> > > I
>> >> > > would
>> >> > > >> >>> look
>> >> > > >> >>> > > into creating JAR files from the Android modules and
>> then
>> >> > return
>> >> > > to
>> >> > > >> >>> only
>> >> > > >> >>> > > having calculator-android and android-jdk-classes as
>> >> > > >> >>> > > projects
>> >> > > and
>> >> > > >> the
>> >> > > >> >>> > rest
>> >> > > >> >>> > > as JAR's added as external libraries. If this works out
>> I
>> >> > could
>> >> > > >> then
>> >> > > >> >>> look
>> >> > > >> >>> > > into seeing which JAR's are important and which are not,
>> in
>> >> > this
>> >> > > >> way
>> >> > > >> >>> > > reducing the total memory footprint and coming up with a
>> >> > > >> "lightweight
>> >> > > >> >>> > > mobile
>> >> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
>> >> > > >> >>> > > these
>> >> > > >> efforts.
>> >> > > >> >>> > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > [1]
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>> >> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>> >> > > >> >>> > > [3]
>> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> >> > > >> >>> > > [4]
>> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>> >> > > >> >>> > >
>> >> > > >> >>> > >
>> >> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>> >> > > >> >>> > > adrianocrestani@apache.org>
>> >> > > >> >>> > > wrote:
>> >> > > >> >>> > >
>> >> > > >> >>> > > > Hi Oscar,
>> >> > > >> >>> > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > When I imported the projects from [3] the following
>> >> > > >> >>> > > > projects
>> >> > > were
>> >> > > >> >>> not
>> >> > > >> >>> > > > imported:
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > core-android
>> >> > > >> >>> > > > host-android
>> >> > > >> >>> > > > extensibility
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Is this normal? Should they be imported?
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
>> >> > folders,
>> >> > > >> there
>> >> > > >> >>> > are
>> >> > > >> >>> > > > the
>> >> > > >> >>> > > > eclipse project files, so they should be identified by
>> >> > > >> >>> > > > the
>> >> > > >> eclipse
>> >> > > >> >>> > import
>> >> > > >> >>> > > > tool as an eclipse project.
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Thanks for the detailed explanation. I'm going to give
>> >> > > >> >>> > > > this
>> >> > a
>> >> > > try
>> >> > > >> as
>> >> > > >> >>> I
>> >> > > >> >>> > > > found
>> >> > > >> >>> > > > an introspection related comment [2] as a workaround
>> to
>> >> > > another
>> >> > > >> >>> > > annotations
>> >> > > >> >>> > > > problem with the current SDK.
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > I don't think introspection is a good solution, hence
>> you
>> >> > will
>> >> > > >> need
>> >> > > >> >>> to
>> >> > > >> >>> > > > change how the sca reads the info about each service
>> and
>> >> > also
>> >> > > >> >>> services
>> >> > > >> >>> > > > implemented for JVM would need to be adapted to run on
>> >> > > Android.
>> >> > > >> >>> Let's
>> >> > > >> >>> > > avoid
>> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>> >> > > >> retrotranslator
>> >> > > >> >>> in
>> >> > > >> >>> > > > mind
>> >> > > >> >>> > > > as a temporary workaround for annotations till next
>> SDK
>> >> > > release
>> >> > > >> :S
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Also, if you get the retrotranslator working, forget
>> the
>> >> > > >> Luciano's
>> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the
>> same
>> >> > > >> >>> > > > time
>> >> > ;
>> >> > > )
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Any progress testing retrotranslator on a simpler
>> >> > > >> >>> > > > scenario,
>> >> > > just
>> >> > > >> let
>> >> > > >> >>> us
>> >> > > >> >>> > > > know
>> >> > > >> >>> > > > ; )
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > Kind Regards,
>> >> > > >> >>> > > > Adriano Crestani
>> >> > > >> >>> > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>> >> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> >> > > >> >>> > > >
>> >> > > >> >>> > > > > Hi Adriano,
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > At first, build a simple, but equivalent scenario,
>> and
>> >> > test
>> >> > > it.
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > I think this is a great idea, especially because I
>> >> > > >> >>> > > > > found
>> >> > > that
>> >> > > >> the
>> >> > > >> >>> > > "native
>> >> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
>> >> > > >> >>> > > > > still
>> >> > > >> related
>> >> > > >> >>> to
>> >> > > >> >>> > the
>> >> > > >> >>> > > > > annotations problem. I'm getting the same errors
>> when
>> >> > > >> converting
>> >> > > >> >>> the
>> >> > > >> >>> > > code
>> >> > > >> >>> > > > > to
>> >> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator
>> is
>> >> > > actually
>> >> > > >> not
>> >> > > >> >>> > > > working.
>> >> > > >> >>> > > > > Hopefully, testing with a simpler scenario will help
>> me
>> >> > > >> >>> > > > > to
>> >> > > >> >>> understand
>> >> > > >> >>> > > the
>> >> > > >> >>> > > > > problem better.
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant
>> you
>> >> > > >> >>> > > > > to
>> >> > > do:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>> >> > > >> >>> Class.isAnnotationPresent
>> >> > > >> >>> > > or
>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>> checks
>> >> > for
>> >> > > a
>> >> > > >> the
>> >> > > >> >>> > > > > @Remotable
>> >> > > >> >>> > > > > > annotations force it to true, for example:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
>> >> > > >> >>> > > > > >>
>> >> > > >> >>> > > > > >> (Remotable.class); =>
>> >> > > >> >>> > > > > >> Annotation isRemotable = true;
>> >> > > >> >>> > > > > >>
>> >> > > >> >>> > > > > >> otherwise, which means, when it's not checking
>> for
>> >> > > >> >>> > > > > >> the
>> >> > > >> >>> @Remotable
>> >> > > >> >>> > > > > >> annnotation, force to false. For example:
>> >> > > >> >>> > > > > >>
>> >> > > >> >>> > > > > >> Annotation isReference =
>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>> >> > > >> >>> > > > =>
>> >> > > >> >>> > > > > >> Annotation isReference = false;
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to
>> give
>> >> > this
>> >> > > a
>> >> > > >> try
>> >> > > >> >>> as
>> >> > > >> >>> > I
>> >> > > >> >>> > > > > found
>> >> > > >> >>> > > > > an introspection related comment [2] as a workaround
>> to
>> >> > > another
>> >> > > >> >>> > > > annotations
>> >> > > >> >>> > > > > problem with the current SDK.
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > Also, I have another question for you...
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > When I imported the projects from [3] the following
>> >> > projects
>> >> > > >> were
>> >> > > >> >>> not
>> >> > > >> >>> > > > > imported:
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > core-android
>> >> > > >> >>> > > > > host-android
>> >> > > >> >>> > > > > extensibility
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > Is this normal? Should they be imported?
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > [1]
>> >> > > >> >>>
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >> > > >> >>> > > > > [2]
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>> >> > > >> >>> > > > > [3]
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>> >> > > >> >>> > > > > adrianocrestani@apache.org>
>> >> > > >> >>> > > > > wrote:
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > > > > Well detailed Oscar ; )
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > It is one thing I learnt after playing hours with
>> >> > Android,
>> >> > > >> you
>> >> > > >> >>> need
>> >> > > >> >>> > > to
>> >> > > >> >>> > > > > > rebuild every modified project which is imported
>> in
>> >> > > >> >>> > > > > > the
>> >> > > >> android
>> >> > > >> >>> > > > project,
>> >> > > >> >>> > > > > > the
>> >> > > >> >>> > > > > > android project itself does not check for
>> >> > > >> >>> > > > > > modifications
>> >> > on
>> >> > > >> its
>> >> > > >> >>> > > > > dependencies
>> >> > > >> >>> > > > > > :S...so, when you rebuilt the imported project it
>> >> > > recompiled
>> >> > > >> the
>> >> > > >> >>> > > > > > uncommented
>> >> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
>> >> > > >> >>> > > > > > started
>> >> > to
>> >> > > >> check
>> >> > > >> >>> for
>> >> > > >> >>> > > > > > annotations once again, so you got the errors on
>> [1],
>> >> > > which
>> >> > > >> >>> means
>> >> > > >> >>> > > > > > retrotranslator is still not working. Have you
>> tested
>> >> > > >> >>> > > > > > it
>> >> > > on a
>> >> > > >> >>> > simpler
>> >> > > >> >>> > > > > > application as I previously suggested? Did it
>> work?
>> >> > > >> >>> > > > > > What
>> >> > > was
>> >> > > >> the
>> >> > > >> >>> > most
>> >> > > >> >>> > > > > > critical scenario you tested it and it worked?
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>> >> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> >> > > >> /../workspace
>> >> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot
>> -classpath
>> >> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > You should also check if it's is working as
>> expected,
>> >> > > >> >>> > > > > > as
>> >> > I
>> >> > > >> >>> already
>> >> > > >> >>> > > > said,
>> >> > > >> >>> > > > > > does not go directly testing complex solutions on
>> >> > complex
>> >> > > >> things
>> >> > > >> >>> > like
>> >> > > >> >>> > > > > SCA.
>> >> > > >> >>> > > > > > At first, build a simple, but equivalent scenario,
>> >> > > >> >>> > > > > > and
>> >> > > test
>> >> > > >> it.
>> >> > > >> >>> For
>> >> > > >> >>> > > > > > example,
>> >> > > >> >>> > > > > > a simple android app project that uses an java
>> >> > > >> >>> > > > > > library
>> >> > > >> project
>> >> > > >> >>> > which
>> >> > > >> >>> > > > > access
>> >> > > >> >>> > > > > > annotations on classes placed on the android
>> project.
>> >> > Like
>> >> > > >> our
>> >> > > >> >>> > > android
>> >> > > >> >>> > > > > > calculator, it's an android app project
>> >> > > (calculator-android)
>> >> > > >> >>> which
>> >> > > >> >>> > > uses
>> >> > > >> >>> > > > > > java
>> >> > > >> >>> > > > > > library projects (sca modules), and these
>> libraries
>> >> > checks
>> >> > > >> for
>> >> > > >> >>> > > > > annotations
>> >> > > >> >>> > > > > > on classes located at the android app project
>> >> > > >> >>> > > (CalculatorService.java,
>> >> > > >> >>> > > > > > AddService.java, etc). When you get it working on
>> the
>> >> > > simpler
>> >> > > >> >>> > > scenario,
>> >> > > >> >>> > > > > > then
>> >> > > >> >>> > > > > > you are ready to test it on the complexer
>> sceneario
>> >> > > >> >>> > > > (calculator-android).
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Please, if you get the retrotranslator working in
>> the
>> >> > > simpler
>> >> > > >> >>> > > scenario,
>> >> > > >> >>> > > > > > send
>> >> > > >> >>> > > > > > us a patch with it. You can create a JIRA and
>> attach
>> >> > > >> >>> > > > > > it.
>> >> > > If
>> >> > > >> you
>> >> > > >> >>> > need
>> >> > > >> >>> > > > any
>> >> > > >> >>> > > > > > help, just ask ; )
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > "code that checks for @Remotable you force to
>> true,
>> >> > > otherwise
>> >> > > >> >>> force
>> >> > > >> >>> > > to
>> >> > > >> >>> > > > > > false."
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I meant
>> >> > > >> >>> > > > > > you
>> >> > to
>> >> > > do:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Search in every sca code for the usage of
>> >> > > >> >>> Class.isAnnotationPresent
>> >> > > >> >>> > > or
>> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
>> checks
>> >> > for
>> >> > > a
>> >> > > >> the
>> >> > > >> >>> > > > > @Remotable
>> >> > > >> >>> > > > > > annotations force it to true, for example:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Annotation isRemotable =
>> >> > > >> >>> > class.isAnnotationPresent(Remotable.class);
>> >> > > >> >>> > > =>
>> >> > > >> >>> > > > > > Annotation isRemotable = true;
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > otherwise, which means, when it's not checking for
>> >> > > >> >>> > > > > > the
>> >> > > >> >>> @Remotable
>> >> > > >> >>> > > > > > annnotation, force to false. For example:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Annotation isReference =
>> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
>> >> > > >> >>> > > =>
>> >> > > >> >>> > > > > > Annotation isReference = false;
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > [1] -
>> >> > > >> >>> > >
>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > Kind Regards,
>> >> > > >> >>> > > > > > Adriano Crestani
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>> >> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > > > > Hi Adriano,
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > I continued testing retrotranslator. Here's what
>> >> > > >> >>> > > > > > > I've
>> >> > > done
>> >> > > >> up
>> >> > > >> >>> to
>> >> > > >> >>> > > now.
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed
>> as
>> >> > > shown
>> >> > > >> >>> below:
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > svn checkout --revision 643746
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > >
>> >> > > >>
>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > cd modules
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > mvn clean install -Dtest=no
>> >> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
>> >> > M2_REPO
>> >> > > >> >>> variable
>> >> > > >> >>> > as
>> >> > > >> >>> > > > > shown
>> >> > > >> >>> > > > > > > below:
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>> >> > > >> >>> > eclipse:add-maven-repo
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build
>> errors,
>> >> > added
>> >> > > >> >>> Android
>> >> > > >> >>> > > > library
>> >> > > >> >>> > > > > > to
>> >> > > >> >>> > > > > > > required modules, fixed references to jar files
>> and
>> >> > > other
>> >> > > >> >>> > > libraries.
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > 5. Uncommented lines in
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the
>> project
>> >> > site
>> >> > > >> [3]
>> >> > > >> >>> and
>> >> > > >> >>> > > > shown
>> >> > > >> >>> > > > > > > below:
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>> >> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar
>> -srcdir
>> >> > > >> >>> /../workspace
>> >> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot
>> -classpath
>> >> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >  The output can be found in [4].
>> >> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > and then re-ran retrotranslator.
>> >> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in
>> [5]
>> >> > > >> >>> > > > > > > and
>> >> > > >> Android
>> >> > > >> >>> > > errors
>> >> > > >> >>> > > > in
>> >> > > >> >>> > > > > > > [6].
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > As always, I'm documenting my progress on the
>> >> > > >> >>> > > > > > > project
>> >> > > log.
>> >> > > >> I
>> >> > > >> >>> > > haven't
>> >> > > >> >>> > > > > > fully
>> >> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
>> >> > > >> >>> > > > > > > puzzled
>> >> > by
>> >> > > >> what
>> >> > > >> >>> you
>> >> > > >> >>> > > > mean
>> >> > > >> >>> > > > > by
>> >> > > >> >>> > > > > > > this:
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > "code that checks for @Remotable you force to
>> true,
>> >> > > >> otherwise
>> >> > > >> >>> > force
>> >> > > >> >>> > > > to
>> >> > > >> >>> > > > > > > false."
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > I'll continue looking into it and hopefully get
>> >> > > >> >>> retrotranslator
>> >> > > >> >>> > to
>> >> > > >> >>> > > > > work.
>> >> > > >> >>> > > > > > I
>> >> > > >> >>> > > > > > > also think it's a simpler option.
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > [1]
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > >
>> >> > > >> >>> > > > >
>> >> > > >> >>> > > >
>> >> > > >> >>> > >
>> >> > > >> >>> >
>> >> > > >> >>>
>> >> > > >>
>> >> > >
>> >> >
>> >> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > [2]
>> >> > > >> >>> > > > >
>> >> > > >> >>>
>> >> > >
>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > [3]
>> http://retrotranslator.sourceforge.net/#android
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > [4]
>> >> > > >> >>> >
>> http://androidindelft.googlepages.com/rt_output_30may2008.txt
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > [5]
>> >> > > >> >>> > >
>> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >> > > >> >>> > > > > > > [6]
>> http://androidindelft.googlepages.com/2Jun1.jpg
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano
>> Crestani <
>> >> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
>> >> > > >> >>> > > > > > >
>> >> > > >> >>> > > > > > > > Hi,
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > I tried what Luciano suggested. It really
>> works.
>> >> > > >> >>> > > > > > > > To
>> >> > > get
>> >> > > >> it
>> >> > > >> >>> > > working
>> >> > > >> >>> > > > > you
>> >> > > >> >>> > > > > > > > simply need to search on all modules where the
>> >> > > >> >>> > > > > > > > code
>> >> > > >> checks
>> >> > > >> >>> for
>> >> > > >> >>> > > > > > @Remotable
>> >> > > >> >>> > > > > > > > annotation and force it to true:
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"
>> >> > > >> >>> > > > > > > > =>
>> >> > > true
>> >> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)"
>> =>
>> >> > > >> >>> > > > > > > > true
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > It works fine on the sca revision we are
>> testing
>> >> > > >> >>> > > > > > > > on
>> >> > > >> Android
>> >> > > >> >>> and
>> >> > > >> >>> > > the
>> >> > > >> >>> > > > > > most
>> >> > > >> >>> > > > > > > > recent revision. I only tested it as a java
>> >> > > application,
>> >> > > >> not
>> >> > > >> >>> as
>> >> > > >> >>> > > an
>> >> > > >> >>> > > > > > > android
>> >> > > >> >>> > > > > > > > application.
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator
>> is
>> >> > > >> >>> > > > > > > > a
>> >> > > faster
>> >> > > >> >>> and
>> >> > > >> >>> > > > simpler
>> >> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion
>> only
>> >> > forces
>> >> > > >> the
>> >> > > >> >>> SCA
>> >> > > >> >>> > to
>> >> > > >> >>> > > > > > > recognize
>> >> > > >> >>> > > > > > > > the services with no annotations declared on
>> >> > > >> >>> > > > > > > > their
>> >> > > >> >>> interfaces,
>> >> > > >> >>> > > but
>> >> > > >> >>> > > > it
>> >> > > >> >>> > > > > > > does
>> >> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when
>> the
>> >> > > >> >>> > > > > > > > SCA
>> >> > > >> invokes
>> >> > > >> >>> > > > methods
>> >> > > >> >>> > > > > > that
>> >> > > >> >>> > > > > > > > read annotations. So, our current problem is
>> that
>> >> > > >> >>> > > > > > > > we
>> >> > > are
>> >> > > >> not
>> >> > > >> >>> > > being
>> >> > > >> >>> > > > > able
>> >> > > >> >>> > > > > > > to
>> >> > > >> >>> > > > > > > > use these methods and not only because we are
>> not
>> >> > > being
>> >> > > >> able
>> >> > > >> >>> to
>> >> > > >> >>> > > > read
>> >> > > >> >>> > > > > > the
>> >> > > >> >>> > > > > > > > annotations.
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
>> >> > > >> >>> > > > > > > > suggestion,
>> >> > > you
>> >> > > >> will
>> >> > > >> >>> > need
>> >> > > >> >>> > > > to
>> >> > > >> >>> > > > > > > > comment/adapt every sca code that tries to
>> read
>> >> > > >> >>> > > > > > > > the
>> >> > > class
>> >> > > >> >>> > > > > annotations.
>> >> > > >> >>> > > > > > It
>> >> > > >> >>> > > > > > > > is
>> >> > > >> >>> > > > > > > > not necessary to comment/adapt the methods
>> that
>> >> > > >> >>> > > > > > > > read
>> >> > > >> Method
>> >> > > >> >>> > > > > > annotations,
>> >> > > >> >>> > > > > > > > they are not throwning any exception. So,
>> every
>> >> > > >> >>> > > > > > > > code
>> >> > > that
>> >> > > >> >>> > checks
>> >> > > >> >>> > > > for
>> >> > > >> >>> > > > > > > > @Remotable you force to true, otherwise force
>> to
>> >> > > false.
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > Any doubt about what I have said, just let me
>> >> > > >> >>> > > > > > > > know ;
>> >> > )
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > Suggestions are welcome : )
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > Adriano Crestani
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano
>> Resende
>> >> > > >> >>> > > > > > > > <
>> >> > > >> >>> > > > > > luckbr1975@gmail.com>
>> >> > > >> >>> > > > > > > > wrote:
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > > > > FYI, if you comment out the code that checks
>> if
>> >> > > >> >>> > > > > > > > > a
>> >> > > >> >>> interface
>> >> > > >> >>> > is
>> >> > > >> >>> > > > > > > > > remoteble, you could have a version of the
>> >> > > calculator
>> >> > > >> >>> without
>> >> > > >> >>> > > any
>> >> > > >> >>> > > > > > > > > annotations, and the runtime would
>> introspect
>> >> > > >> >>> > > > > > > > > the
>> >> > > >> >>> references
>> >> > > >> >>> > > for
>> >> > > >> >>> > > > > the
>> >> > > >> >>> > > > > > > > > multiple services. But note that, the
>> >> > introspection
>> >> > > >> code
>> >> > > >> >>> will
>> >> > > >> >>> > > > only
>> >> > > >> >>> > > > > be
>> >> > > >> >>> > > > > > > > > activated if there is no SCA annotations on
>> the
>> >> > > class.
>> >> > > >> >>> > > > > > > > >
>> >> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
>> >> > > >> >>> > > > > > > > > Crestani
>> >> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
>> >> > > >> >>> > > > > > > > > > Ah, the expected exception should look
>> like
>> >> > > >> >>> > > > > > > > > > this
>> >> > > on
>> >> > > >> >>> android
>> >> > > >> >>> > > > > > emulator:
>> >> > > >> >>> > > > > > > > > >
>> >> > > >> >>> > >
>> >> >
>> >> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> <
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>>
>> >> > > >> >>> <
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> >> > >
>> >> > > >> >>> > <
>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> >> > > >
>> >> > > >> >>> > > <
>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>> > > > <
>> >> > > >>
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>> > > > > <
>> >> > > >>
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> >> > > >> >>> >
>> >> > > >> >>> > > > > > <
>> >> > > >> >>>
>> >> > > >> >>>
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>> > > > > > > <
>> >> > > >> >>> >
>> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>> > > > > > > > <
>> >> > > >> >>> > >
>> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >> > > >> >>> > > > > > > > > >
>> >> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
>> >> > Crestani
>> >> > > <
>> >> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>> >> > > >> >>> > > > > > > > > >
>> >> > > >> >>> > > > > > > > > >> Hi Oscar,
>> >> > > >> >>> > > > > > > > > >>
>> >> > > >> >>> > > > > > > > > >> I was indeed using the sca modules not
>> from
>> >> > > >> >>> > > > > > > > > >> the
>> >> > > >> >>> sandbox.
>> >> > > >> >>> > As
>> >> > > >> >>> > > > you
>> >> > > >> >>> > > > > > > > > suggested,
>> >> > > >> >>> > > > > > > > > >> I
>> >> > > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl
>> from
>> >> > > >> >>> > > > > > > > > >> my
>> >> > > >> workspace
>> >> > > >> >>> > and
>> >> > > >> >>> > > > > added
>> >> > > >> >>> > > > > > > the
>> >> > > >> >>> > > > > > > > > >> version you uploaded to the sandbox.
>> Then, I
>> >> > > >> >>> uncommented
>> >> > > >> >>> > the
>> >> > > >> >>> > > > > lines
>> >> > > >> >>> > > > > > > in
>> >> > > >> >>> > > > > > > > > >>
>> >> > > >> >>> > > > > > > > > >>
>> >> > > >> >>> > > > > > > > > >>
>> >> > > >> >>> > > > > > > > >
>> >> > > >> >>> > > > > > > >
>> >> > > >> >>> > > > > > >
>> >> > > >>
>>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
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 <
oscar.castaneda.gsoc@gmail.com> 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/dev@tuscany.apache.org/msg00390.html
>
> On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <
> adrianocrestani@apache.org> 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 <lu...@gmail.com>
>> 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
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
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/dev@tuscany.apache.org/msg00390.html

On Tue, Jul 8, 2008 at 8:33 AM, Adriano Crestani <ad...@apache.org>
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 <lu...@gmail.com>
> 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

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
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 <lu...@gmail.com>
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.
>
> On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
> <os...@gmail.com> wrote:
> > Thanks Adriano. I have been testing the workarounds for RMI and Beans
> API. I
> > am also working to integrate retrotranslator into maven.
> >
> > Today, I tested the newest version of retrotranslator (thanks for the
> tip).
> > With this new version RMI related issues are not appearing (not
> initially,
> > at least) but instead Beans issues are. I've commented
> > java.beans.Introspector import and related code from
> > JavaIntrospectionHelper.java and now get other errors [1] related to
> > javax.jws.WebService. Suggestions are welcome and appreciated.
> >
> > I've noted down these issues on the porting limitations page [2], which I
> > have updated with the current progress.
> >
> > [1]
> >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
> > [2]
> >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
> >
> > On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
> > <ad...@apache.org> wrote:
> >>
> >> I added to the wiki a page [1] about all the issues we have found so far
> >> when trying to port the SCA Java to the Android platform.
> >>
> >> [1] -
> >>
> >>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
> >>
> >> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>
> >> > Hi Luciano,
> >> >
> >> > Thanks for the tip. Before testing it I generated a JIRA ticket [1]
> for
> >> > the
> >> > Retrotranslator progress, and when I got around to testing I noticed a
> >> > different ClassNotFoundException. This time its for
> >> > java.beans.Introspector.  I made sure to include this in the JIRA
> ticket
> >> > and
> >> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
> >> >
> >> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
> >> > [2]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
> >> >
> >> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <
> luckbr1975@gmail.com>
> >> > wrote:
> >> >
> >> > > Removing RMI should be as simple as removing the tuscany-binding-rmi
> >> > > dependency from host-android.
> >> > >
> >> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
> >> > > <os...@gmail.com> wrote:
> >> > > > Hi Luciano,
> >> > > >
> >> > > > It's going better after the progress last week with
> retrotranslator.
> >> > I'm
> >> > > now
> >> > > > able to translate the SCA classes and run calculator-android
> without
> >> > > getting
> >> > > > Annotation related issues. The problems now are related to RMI. In
> >> > > relation
> >> > > > to this, and from your comment about blocking issues, I created a
> >> > > > child
> >> > > page
> >> > > > [1] in the project wiki for Blocking issues. Currently, the page
> >> > > > lists
> >> > > the
> >> > > > RMI issue and suggested workarounds.
> >> > > >
> >> > > > I think your suggestion about integration with maven is really
> good.
> >> > > > Especially because there is a retrotranslator plugin for maven.
> I'll
> >> > > start
> >> > > > looking into using this plugin. I also agree about reviewing the
> >> > > > scope
> >> > of
> >> > > > support. Right now, I see a need to reduce the dependency on RMI,
> >> > either
> >> > > by
> >> > > > commenting all the code that uses the RMI API, or by following the
> >> > > > suggestions from Taras [3] to either replace java.rmi.Remote with
> >> > > > java.lang.Cloneable (as the result of using a retrotranslator
> >> > > > option)
> >> > or
> >> > > > taking the RMI source from Apache Harmony and putting it in a
> >> > > > retrotranslated JAR. What would you recommend? Hopefully after the
> >> > > > dependency reduction Android will be able to run
> calculator-android.
> >> > > Based
> >> > > > on the results of this experiment we can better consider the
> >> > > > reduction
> >> > of
> >> > > > component types and bindings. Please let me know your thoughts on
> >> > > > this
> >> > > idea.
> >> > > >
> >> > > > [1]
> >> > >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
> >> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
> >> > > > [3]
> >> > > >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
> >> > > >
> >> > > >
> >> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
> >> > luckbr1975@gmail.com>
> >> > > > wrote:
> >> > > >
> >> > > >> How is it going here ? I just want to check if there is any
> >> > > >> blocking
> >> > > >> issues with Android at the moment, if so, is there a list of
> these
> >> > > >> issues somewhere ?
> >> > > >>
> >> > > >> Also, some general suggestions/recommendations.: It would be
> great
> >> > > >> if
> >> > > >> we could spend sometime to get the modules well integrated using
> >> > > >> maven, this way it would be easier for anyone on the community to
> >> > > >> checkout the trunk + android sandbox and jump on the code to
> help.
> >> > > >> Also, we should review the scope of the support we are trying to
> >> > > >> acomplish, I'd suggest to minimize the number of component types
> >> > > >> supported (java) and bindings (default sca binding) and then try
> to
> >> > > >> run the calculator sample application. Once we have acomplished
> >> > > >> this
> >> > > >> first milestone, we could then discuss our next steps.
> >> > > >>
> >> > > >> Thoughts ?
> >> > > >>
> >> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> >> > > >> <ad...@apache.org> wrote:
> >> > > >> > Ah, here is a tip to assure the classes are not recompiled
> again.
> >> > > Build
> >> > > >> the
> >> > > >> > project, then go in each project builder (in the properties
> >> > > >> > window)
> >> > > and
> >> > > >> > disable all the builders, then not even a clean/build will
> modify
> >> > your
> >> > > >> > project ; )
> >> > > >> >
> >> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> >> > > >> adrianocrestani@apache.org>
> >> > > >> > wrote:
> >> > > >> >
> >> > > >> >> Hi Oscar,
> >> > > >> >>
> >> > > >> >> I say that it is more difficult to debug because you need
> attach
> >> > > >> >> a
> >> > > >> source
> >> > > >> >> code to each jar and etc, and when you are using projects,
> >> > > >> >> eclipse
> >> > > >> already
> >> > > >> >> knows where to find the source code : )
> >> > > >> >>
> >> > > >> >> The reply made sense to me, especially with regards to the
> fact
> >> > that
> >> > > >> with
> >> > > >> >> the Android plugin Eclipse compiles sources into classes and
> >> > > >> >> then
> >> > > into
> >> > > >> dex
> >> > > >> >> files, so retrotranslator has no chance to translate classes
> in
> >> > > between
> >> > > >> >> these steps - even if I do that outside of Eclipse. This shows
> >> > > >> >> from
> >> > > the
> >> > > >> use
> >> > > >> >> of non-translated binaries (as indicated by the
> >> > > >> >> java.lang.Class.isAnnotationPr
> >> > > >> >> esent(Class.java:1131) error in the stack
> >> > > >> >> trace) that might have been related to the use of pre-existing
> >> > > >> >> dex
> >> > > files
> >> > > >> or
> >> > > >> >> over-writing of files by Eclipse. So unless I modify the ADT
> >> > > >> >> plugin
> >> > > the
> >> > > >> >> result would still be the same, even if I use a simpler
> >> > > >> >> scenario.
> >> > > >> >>
> >> > > >> >> Sorry, I really did not comment this email yet. It does not
> make
> >> > > >> >> so
> >> > > much
> >> > > >> >> sense for me. First, as you already know, eclipse android
> >> > > >> >> projects
> >> > > does
> >> > > >> not
> >> > > >> >> recognize any modifications in the imported projects, so it
> does
> >> > not
> >> > > >> call
> >> > > >> >> the build or incremental build even if the imported projects
> >> > > >> >> have
> >> > > their
> >> > > >> >> source code modified. Just to make sure I tested it again:
> >> > > >> >>
> >> > > >> >> 1-  imported in my workspace all the projects included in the
> >> > > >> >> calculator-android, cleaned and built them...it takes a
> loooong
> >> > time,
> >> > > as
> >> > > >> you
> >> > > >> >> already know.
> >> > > >> >>
> >> > > >> >> 2- imported the calculator-android project, cleaned and built
> it
> >> > > (only
> >> > > >> the
> >> > > >> >> calculator-android project), and this process was too much
> >> > > >> >> faster
> >> > > than
> >> > > >> when
> >> > > >> >> all the modules are built, so the imported projects were not
> >> > > recompiled,
> >> > > >> >> otherwise it would take too much more time. I suppose here
> that
> >> > > >> >> the
> >> > > >> android
> >> > > >> >> project compiles the .java contained in the android project
> and
> >> > > convert
> >> > > >> all
> >> > > >> >> the .class files (generated by imported projects and android
> >> > project)
> >> > > to
> >> > > >> dex
> >> > > >> >> format.
> >> > > >> >>
> >> > > >> >> So, it does not recompile the external class files (the ones
> >> > > contained
> >> > > >> in
> >> > > >> >> the imported projects) cause it seems not to check if it was
> >> > modified
> >> > > or
> >> > > >> >> not. Of course, I never tested it modifing the .class files,
> I'm
> >> > just
> >> > > >> >> assuming that, because when you modify .java files it does not
> >> > > >> >> get
> >> > > >> >> recompiled.
> >> > > >> >>
> >> > > >> >> What do you think?
> >> > > >> >>
> >> > > >> >> As I mentioned before, your comments are really helpful as
> they
> >> > give
> >> > > me
> >> > > >> a
> >> > > >> >> sense of direction. Please let me know if you still think we
> >> > > >> >> should
> >> > > >> pursue
> >> > > >> >> retrotranslator for files inside a folder.
> >> > > >> >>
> >> > > >> >> I really think you should try at first the simpler scenario
> and
> >> > > >> >> try
> >> > > to
> >> > > >> >> understand how it works and IF it works. Also, you can try
> what
> >> > > >> >> you
> >> > > were
> >> > > >> >> planning: to retrotranslate the each modules' jar, but I
> suppose
> >> > it's
> >> > > a
> >> > > >> lot
> >> > > >> >> of work, because there are so many modules :S. So, as I've
> >> > > >> >> already
> >> > > said,
> >> > > >> if
> >> > > >> >> you think it's getting to complicated, forget it and go on
> with
> >> > > >> Luciano's
> >> > > >> >> suggestion.
> >> > > >> >>
> >> > > >> >> Feel free to choose the direction you want to take, and if
> there
> >> > > >> >> is
> >> > > >> another
> >> > > >> >> approach you think is better, just let us know ; )...you are
> the
> >> > best
> >> > > >> person
> >> > > >> >> to choose the directions, cause you are working directly on
> it,
> >> > > >> >> we
> >> > > are
> >> > > >> just
> >> > > >> >> guinding/helping you ; )
> >> > > >> >>
> >> > > >> >> Thanks,
> >> > > >> >> Adriano Crestani
> >> > > >> >>
> >> > > >> >>
> >> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> >> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >> > > >> >>
> >> > > >> >>> Hi Adriano,
> >> > > >> >>>
> >> > > >> >>> If there is an option on retrotranslator to retrotranslate
> all
> >> > > >> >>> the
> >> > > >> classes
> >> > > >> >>> > in a folder, it should work as well as it works on classes
> >> > inside
> >> > > >> .jar
> >> > > >> >>> > files. So, I think you should try to understand why your
> >> > > >> >>> > first
> >> > > >> approach
> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
> working
> >> > > trying
> >> > > >> a
> >> > > >> >>> > simpler scenario. Have you already tried it?
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >> >>> I agree that it's good to try out a simpler scenario to
> better
> >> > > >> understand
> >> > > >> >>> the problem. I haven't tried it yet because using
> >> > > >> >>> retrotranslator
> >> > > for
> >> > > >> >>> classes inside a folder doesn't seem to be a solution to the
> >> > > problem.
> >> > > >> >>> Here's
> >> > > >> >>> my reasoning:
> >> > > >> >>>
> >> > > >> >>> Yes, there is an option to translate classes in a folder. I
> >> > > >> >>> tried
> >> > it
> >> > > >> and
> >> > > >> >>> it
> >> > > >> >>> successfully translated the classes inside my Eclipse
> >> > > >> >>> workspace.
> >> > > When I
> >> > > >> >>> ran
> >> > > >> >>> the calculator-android application using the newly translated
> >> > > classes I
> >> > > >> >>> was
> >> > > >> >>> getting the errors in [1]. I posted a question in Android
> >> > Developers
> >> > > >> about
> >> > > >> >>> this error and received a reply [2].
> >> > > >> >>>
> >> > > >> >>> The reply made sense to me, especially with regards to the
> fact
> >> > that
> >> > > >> with
> >> > > >> >>> the Android plugin Eclipse compiles sources into classes and
> >> > > >> >>> then
> >> > > into
> >> > > >> dex
> >> > > >> >>> files, so retrotranslator has no chance to translate classes
> in
> >> > > between
> >> > > >> >>> these steps - even if I do that outside of Eclipse. This
> shows
> >> > from
> >> > > the
> >> > > >> >>> use
> >> > > >> >>> of non-translated binaries (as indicated by the
> >> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in
> >> > > >> >>> the
> >> > > stack
> >> > > >> >>> trace) that might have been related to the use of
> pre-existing
> >> > > >> >>> dex
> >> > > >> files
> >> > > >> >>> or
> >> > > >> >>> over-writing of files by Eclipse. So unless I modify the ADT
> >> > plugin
> >> > > the
> >> > > >> >>> result would still be the same, even if I use a simpler
> >> > > >> >>> scenario.
> >> > > >> >>>
> >> > > >> >>> The reply suggested to use JAR's instead. This also made
> sense
> >> > > >> >>> to
> >> > me
> >> > > >> and
> >> > > >> >>> seemed like a simpler way of solving the problem. I didn't
> see
> >> > > >> >>> the
> >> > > >> >>> disadvantage of debugging, which as you point out is more
> >> > difficult
> >> > > >> with
> >> > > >> >>> JAR's instead of Eclipse projects.
> >> > > >> >>>
> >> > > >> >>> As I mentioned before, your comments are really helpful as
> they
> >> > give
> >> > > me
> >> > > >> a
> >> > > >> >>> sense of direction. Please let me know if you still think we
> >> > should
> >> > > >> pursue
> >> > > >> >>> retrotranslator for files inside a folder.
> >> > > >> >>>
> >> > > >> >>>
> >> > > >> >>> [1]
> >> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> >> > > >> >>> [2]
> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >> > > >> >>>
> >> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> >> > > >> >>> adrianocrestani@apache.org>
> >> > > >> >>> wrote:
> >> > > >> >>>
> >> > > >> >>> > Hi Oscar,
> >> > > >> >>> >
> >> > > >> >>> > Yup, you're right - there are indeed Eclipse files inside
> the
> >> > > >> folders. I
> >> > > >> >>> > guess I was confused by the different names in [1] than
> those
> >> > that
> >> > > >> >>> result
> >> > > >> >>> > [2] from importing to an Eclipse workspace - after which I
> >> > > >> >>> > see
> >> > 13
> >> > > >> >>> projects
> >> > > >> >>> > in both cases. So please ignore my previous remark.
> >> > > >> >>> >
> >> > > >> >>> > I have added the projects, but still haven't changed their
> >> > names.
> >> > > I
> >> > > >> was
> >> > > >> >>> > planning to modify their project names when we get it
> >> > > >> >>> > integrated
> >> > > to
> >> > > >> SCA,
> >> > > >> >>> > mainly because we will need to change the poms. Anyway,
> feel
> >> > free
> >> > > to
> >> > > >> >>> modify
> >> > > >> >>> > the names whenever you want ; )
> >> > > >> >>> >
> >> > > >> >>> >
> >> > > >> >>> > Per the reply I received on the Android Developers list [3]
> I
> >> > > started
> >> > > >> >>> using
> >> > > >> >>> > retrotranslator on JAR's instead of class files. For this I
> >> > > created a
> >> > > >> >>> big
> >> > > >> >>> > JAR file with all the Tuscany modules (including those you
> >> > > modified
> >> > > >> for
> >> > > >> >>> > Android). I translated this big JAR (around 15MB) with
> >> > > >> retrotranslator
> >> > > >> >>> [4].
> >> > > >> >>> > Then I created a new workspace with only calculator-android
> >> > > >> >>> > and
> >> > > >> >>> > android-jdk-classes as projects and added the translated
> JAR
> >> > > >> >>> > as
> >> > an
> >> > > >> >>> external
> >> > > >> >>> > library for both projects. This resulted in errors [4] from
> >> > > >> >>> > the
> >> > > >> Android
> >> > > >> >>> > build process.
> >> > > >> >>> >
> >> > > >> >>> > I really do not understand this errors, but as this errors
> >> > > >> >>> > are
> >> > > only
> >> > > >> >>> related
> >> > > >> >>> > to testcase classes they can be ignored (removed from the
> >> > > >> >>> > jars).
> >> > I
> >> > > >> also
> >> > > >> >>> did
> >> > > >> >>> > not understand why it's not find the .apk file:
> >> > > >> >>> >
> >> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> >> > > >> >>> > /bin/calculator-android.apk!"
> >> > > >> >>> >
> >> > > >> >>> > To work around these errors I decided to take a different
> >> > approach
> >> > > >> and
> >> > > >> >>> copy
> >> > > >> >>> > all the jar files contained in the individual modules to a
> >> > > separate
> >> > > >> >>> folder
> >> > > >> >>> > and then run retrotranslator on each JAR. The jars are
> found
> >> > > inside
> >> > > >> the
> >> > > >> >>> > target folder of each module and are named as shown below:
> >> > > >> >>> >
> >> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >> > > >> >>> >
> >> > > >> >>> > From this I found that only the SCA modules have these JAR
> >> > > >> >>> > files
> >> > > >> inside
> >> > > >> >>> > their respective target folders, whereas the Android
> modules
> >> > > >> >>> > I
> >> > > >> >>> downloaded
> >> > > >> >>> > from [1] don't have these files at all
> >> > > >> >>> >
> >> > > >> >>> > Yep, this .jars are generated when the maven is executed.
> I'm
> >> > not
> >> > > >> sure
> >> > > >> >>> if
> >> > > >> >>> > you should use this .jars, because they were compiled with
> no
> >> > > >> reference
> >> > > >> >>> to
> >> > > >> >>> > Android library. That's also why there are no .jar files
> for
> >> > > android
> >> > > >> >>> > modules, because you did not execute the maven on them
>  (and
> >> > > >> >>> > you
> >> > > >> >>> > shouldn't).
> >> > > >> >>> >
> >> > > >> >>> > So I decided to keep the Android
> >> > > >> >>> > modules [2] and add the translated JARs as libraries where
> >> > needed
> >> > > to
> >> > > >> >>> have
> >> > > >> >>> > the workspace build with no problems. If I get this running
> I
> >> > > would
> >> > > >> look
> >> > > >> >>> > into creating JAR files from the Android modules and then
> >> > > >> >>> > return
> >> > > to
> >> > > >> only
> >> > > >> >>> > having calculator-android and android-jdk-classes as
> projects
> >> > and
> >> > > the
> >> > > >> >>> rest
> >> > > >> >>> > as JAR's added as external libraries. If this works out I
> >> > > >> >>> > could
> >> > > then
> >> > > >> >>> look
> >> > > >> >>> > into seeing which JAR's are important and which are not, in
> >> > > >> >>> > this
> >> > > way
> >> > > >> >>> > reducing the total memory footprint and coming up with a
> >> > > "lightweight
> >> > > >> >>> > mobile
> >> > > >> >>> > SCA core/runtime." Please let me know your thoughts on
> these
> >> > > efforts.
> >> > > >> >>> >
> >> > > >> >>> > You haven't tried this yet, right? You may try it, but I do
> >> > > >> >>> > not
> >> > > like
> >> > > >> >>> this
> >> > > >> >>> > approach, because it will get difficult to debug sca
> classes
> >> > > >> >>> > as
> >> > > they
> >> > > >> are
> >> > > >> >>> > not
> >> > > >> >>> > imported as eclipse projects.
> >> > > >> >>> >
> >> > > >> >>> > If there is an option on retrotranslator to retrotranslate
> >> > > >> >>> > all
> >> > the
> >> > > >> >>> classes
> >> > > >> >>> > in a folder, it should work as well as it works on classes
> >> > inside
> >> > > >> .jar
> >> > > >> >>> > files. So, I think you should try to understand why your
> >> > > >> >>> > first
> >> > > >> approach
> >> > > >> >>> > (retrotranslating the eclipse project classes) is not
> working
> >> > > trying
> >> > > >> a
> >> > > >> >>> > simpler scenario. Have you already tried it?
> >> > > >> >>> >
> >> > > >> >>> > Also, if the restrotranslator gets to complicated, you may
> >> > > >> >>> > try
> >> > the
> >> > > >> >>> > Luciano's
> >> > > >> >>> > suggestion ; )
> >> > > >> >>> >
> >> > > >> >>> >
> >> > > >> >>> > Kind Regards,
> >> > > >> >>> > Adriano Crestani
> >> > > >> >>> >
> >> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> >> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >> > > >> >>> >
> >> > > >> >>> > > Hi Adriano,
> >> > > >> >>> > >
> >> > > >> >>> > >
> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
> >> > folders,
> >> > > >> there
> >> > > >> >>> > are
> >> > > >> >>> > > > the
> >> > > >> >>> > > > eclipse project files, so they should be identified by
> >> > > >> >>> > > > the
> >> > > >> eclipse
> >> > > >> >>> > import
> >> > > >> >>> > > > tool as an eclipse project.
> >> > > >> >>> > >
> >> > > >> >>> > >
> >> > > >> >>> > > Yup, you're right - there are indeed Eclipse files inside
> >> > > >> >>> > > the
> >> > > >> folders.
> >> > > >> >>> I
> >> > > >> >>> > > guess I was confused by the different names in [1] than
> >> > > >> >>> > > those
> >> > > that
> >> > > >> >>> result
> >> > > >> >>> > > [2] from importing to an Eclipse workspace - after which
> I
> >> > > >> >>> > > see
> >> > > 13
> >> > > >> >>> > projects
> >> > > >> >>> > > in both cases. So please ignore my previous remark.
> >> > > >> >>> > >
> >> > > >> >>> > > I don't think introspection is a good solution, hence you
> >> > > >> >>> > > will
> >> > > need
> >> > > >> to
> >> > > >> >>> > > > change how the sca reads the info about each service
> and
> >> > also
> >> > > >> >>> services
> >> > > >> >>> > > > implemented for JVM would need to be adapted to run on
> >> > > Android.
> >> > > >> >>> Let's
> >> > > >> >>> > > avoid
> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
> >> > > >> retrotranslator
> >> > > >> >>> in
> >> > > >> >>> > > > mind
> >> > > >> >>> > > > as a temporary workaround for annotations till next SDK
> >> > > release
> >> > > >> :S
> >> > > >> >>> > >
> >> > > >> >>> > >
> >> > > >> >>> > > >  Also, if you get the retrotranslator working, forget
> the
> >> > > >> Luciano's
> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
> >> > > >> >>> > > > time
> >> > ;
> >> > > )
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in
> the
> >> > right
> >> > > >> >>> > direction
> >> > > >> >>> > > :-)
> >> > > >> >>> > >
> >> > > >> >>> > > Now, a summary of what I've done up to now:
> >> > > >> >>> > >
> >> > > >> >>> > > Per the reply I received on the Android Developers list
> [3]
> >> > > >> >>> > > I
> >> > > >> started
> >> > > >> >>> > using
> >> > > >> >>> > > retrotranslator on JAR's instead of class files. For this
> I
> >> > > created
> >> > > >> a
> >> > > >> >>> big
> >> > > >> >>> > > JAR file with all the Tuscany modules (including those
> you
> >> > > modified
> >> > > >> >>> for
> >> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
> >> > > >> retrotranslator
> >> > > >> >>> > [4].
> >> > > >> >>> > > Then I created a new workspace with only
> calculator-android
> >> > and
> >> > > >> >>> > > android-jdk-classes as projects and added the translated
> >> > > >> >>> > > JAR
> >> > as
> >> > > an
> >> > > >> >>> > external
> >> > > >> >>> > > library for both projects. This resulted in errors [4]
> from
> >> > the
> >> > > >> >>> Android
> >> > > >> >>> > > build process.
> >> > > >> >>> > >
> >> > > >> >>> > > To work around these errors I decided to take a different
> >> > > approach
> >> > > >> and
> >> > > >> >>> > copy
> >> > > >> >>> > > all the jar files contained in the individual modules to
> a
> >> > > separate
> >> > > >> >>> > folder
> >> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
> >> > > >> >>> > > found
> >> > > inside
> >> > > >> >>> the
> >> > > >> >>> > > target folder of each module and are named as shown
> below:
> >> > > >> >>> > >
> >> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >> > > >> >>> > >
> >> > > >> >>> > > From this I found that only the SCA modules have these
> JAR
> >> > files
> >> > > >> >>> inside
> >> > > >> >>> > > their respective target folders, whereas the Android
> >> > > >> >>> > > modules I
> >> > > >> >>> downloaded
> >> > > >> >>> > > from [1] don't have these files at all. So I decided to
> >> > > >> >>> > > keep
> >> > the
> >> > > >> >>> Android
> >> > > >> >>> > > modules [2] and add the translated JARs as libraries
> where
> >> > > needed
> >> > > >> to
> >> > > >> >>> have
> >> > > >> >>> > > the workspace build with no problems. If I get this
> running
> >> > > >> >>> > > I
> >> > > would
> >> > > >> >>> look
> >> > > >> >>> > > into creating JAR files from the Android modules and then
> >> > return
> >> > > to
> >> > > >> >>> only
> >> > > >> >>> > > having calculator-android and android-jdk-classes as
> >> > > >> >>> > > projects
> >> > > and
> >> > > >> the
> >> > > >> >>> > rest
> >> > > >> >>> > > as JAR's added as external libraries. If this works out I
> >> > could
> >> > > >> then
> >> > > >> >>> look
> >> > > >> >>> > > into seeing which JAR's are important and which are not,
> in
> >> > this
> >> > > >> way
> >> > > >> >>> > > reducing the total memory footprint and coming up with a
> >> > > >> "lightweight
> >> > > >> >>> > > mobile
> >> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
> >> > > >> >>> > > these
> >> > > >> efforts.
> >> > > >> >>> > >
> >> > > >> >>> > >
> >> > > >> >>> > > [1]
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> >> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> >> > > >> >>> > > [3]
> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >> > > >> >>> > > [4]
> >> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> >> > > >> >>> > >
> >> > > >> >>> > >
> >> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> >> > > >> >>> > > adrianocrestani@apache.org>
> >> > > >> >>> > > wrote:
> >> > > >> >>> > >
> >> > > >> >>> > > > Hi Oscar,
> >> > > >> >>> > > >
> >> > > >> >>> > > >
> >> > > >> >>> > > > When I imported the projects from [3] the following
> >> > > >> >>> > > > projects
> >> > > were
> >> > > >> >>> not
> >> > > >> >>> > > > imported:
> >> > > >> >>> > > >
> >> > > >> >>> > > > core-android
> >> > > >> >>> > > > host-android
> >> > > >> >>> > > > extensibility
> >> > > >> >>> > > >
> >> > > >> >>> > > > Is this normal? Should they be imported?
> >> > > >> >>> > > >
> >> > > >> >>> > > > Yep, they should be imported, if you check inside its
> >> > folders,
> >> > > >> there
> >> > > >> >>> > are
> >> > > >> >>> > > > the
> >> > > >> >>> > > > eclipse project files, so they should be identified by
> >> > > >> >>> > > > the
> >> > > >> eclipse
> >> > > >> >>> > import
> >> > > >> >>> > > > tool as an eclipse project.
> >> > > >> >>> > > >
> >> > > >> >>> > > > Thanks for the detailed explanation. I'm going to give
> >> > > >> >>> > > > this
> >> > a
> >> > > try
> >> > > >> as
> >> > > >> >>> I
> >> > > >> >>> > > > found
> >> > > >> >>> > > > an introspection related comment [2] as a workaround to
> >> > > another
> >> > > >> >>> > > annotations
> >> > > >> >>> > > > problem with the current SDK.
> >> > > >> >>> > > >
> >> > > >> >>> > > > I don't think introspection is a good solution, hence
> you
> >> > will
> >> > > >> need
> >> > > >> >>> to
> >> > > >> >>> > > > change how the sca reads the info about each service
> and
> >> > also
> >> > > >> >>> services
> >> > > >> >>> > > > implemented for JVM would need to be adapted to run on
> >> > > Android.
> >> > > >> >>> Let's
> >> > > >> >>> > > avoid
> >> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
> >> > > >> retrotranslator
> >> > > >> >>> in
> >> > > >> >>> > > > mind
> >> > > >> >>> > > > as a temporary workaround for annotations till next SDK
> >> > > release
> >> > > >> :S
> >> > > >> >>> > > >
> >> > > >> >>> > > > Also, if you get the retrotranslator working, forget
> the
> >> > > >> Luciano's
> >> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
> >> > > >> >>> > > > time
> >> > ;
> >> > > )
> >> > > >> >>> > > >
> >> > > >> >>> > > > Any progress testing retrotranslator on a simpler
> >> > > >> >>> > > > scenario,
> >> > > just
> >> > > >> let
> >> > > >> >>> us
> >> > > >> >>> > > > know
> >> > > >> >>> > > > ; )
> >> > > >> >>> > > >
> >> > > >> >>> > > > Kind Regards,
> >> > > >> >>> > > > Adriano Crestani
> >> > > >> >>> > > >
> >> > > >> >>> > > >
> >> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> >> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >> > > >> >>> > > >
> >> > > >> >>> > > > > Hi Adriano,
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > At first, build a simple, but equivalent scenario,
> and
> >> > test
> >> > > it.
> >> > > >> >>> > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > I think this is a great idea, especially because I
> >> > > >> >>> > > > > found
> >> > > that
> >> > > >> the
> >> > > >> >>> > > "native
> >> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
> >> > > >> >>> > > > > still
> >> > > >> related
> >> > > >> >>> to
> >> > > >> >>> > the
> >> > > >> >>> > > > > annotations problem. I'm getting the same errors when
> >> > > >> converting
> >> > > >> >>> the
> >> > > >> >>> > > code
> >> > > >> >>> > > > > to
> >> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator is
> >> > > actually
> >> > > >> not
> >> > > >> >>> > > > working.
> >> > > >> >>> > > > > Hopefully, testing with a simpler scenario will help
> me
> >> > > >> >>> > > > > to
> >> > > >> >>> understand
> >> > > >> >>> > > the
> >> > > >> >>> > > > > problem better.
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant
> you
> >> > > >> >>> > > > > to
> >> > > do:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Search in every sca code for the usage of
> >> > > >> >>> Class.isAnnotationPresent
> >> > > >> >>> > > or
> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
> checks
> >> > for
> >> > > a
> >> > > >> the
> >> > > >> >>> > > > > @Remotable
> >> > > >> >>> > > > > > annotations force it to true, for example:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> >> > > >> >>> > > > > >>
> >> > > >> >>> > > > > >> (Remotable.class); =>
> >> > > >> >>> > > > > >> Annotation isRemotable = true;
> >> > > >> >>> > > > > >>
> >> > > >> >>> > > > > >> otherwise, which means, when it's not checking for
> >> > > >> >>> > > > > >> the
> >> > > >> >>> @Remotable
> >> > > >> >>> > > > > >> annnotation, force to false. For example:
> >> > > >> >>> > > > > >>
> >> > > >> >>> > > > > >> Annotation isReference =
> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
> >> > > >> >>> > > > =>
> >> > > >> >>> > > > > >> Annotation isReference = false;
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to
> give
> >> > this
> >> > > a
> >> > > >> try
> >> > > >> >>> as
> >> > > >> >>> > I
> >> > > >> >>> > > > > found
> >> > > >> >>> > > > > an introspection related comment [2] as a workaround
> to
> >> > > another
> >> > > >> >>> > > > annotations
> >> > > >> >>> > > > > problem with the current SDK.
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > Also, I have another question for you...
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > When I imported the projects from [3] the following
> >> > projects
> >> > > >> were
> >> > > >> >>> not
> >> > > >> >>> > > > > imported:
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > core-android
> >> > > >> >>> > > > > host-android
> >> > > >> >>> > > > > extensibility
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > Is this normal? Should they be imported?
> >> > > >> >>> > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > [1]
> >> > > >> >>>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> > > >> >>> > > > > [2]
> >> > > >> >>> > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> >> > > >> >>> > > > > [3]
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >> > > >> >>> > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> >> > > >> >>> > > > > adrianocrestani@apache.org>
> >> > > >> >>> > > > > wrote:
> >> > > >> >>> > > > >
> >> > > >> >>> > > > > > Well detailed Oscar ; )
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > It is one thing I learnt after playing hours with
> >> > Android,
> >> > > >> you
> >> > > >> >>> need
> >> > > >> >>> > > to
> >> > > >> >>> > > > > > rebuild every modified project which is imported in
> >> > > >> >>> > > > > > the
> >> > > >> android
> >> > > >> >>> > > > project,
> >> > > >> >>> > > > > > the
> >> > > >> >>> > > > > > android project itself does not check for
> >> > > >> >>> > > > > > modifications
> >> > on
> >> > > >> its
> >> > > >> >>> > > > > dependencies
> >> > > >> >>> > > > > > :S...so, when you rebuilt the imported project it
> >> > > recompiled
> >> > > >> the
> >> > > >> >>> > > > > > uncommented
> >> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
> >> > > >> >>> > > > > > started
> >> > to
> >> > > >> check
> >> > > >> >>> for
> >> > > >> >>> > > > > > annotations once again, so you got the errors on
> [1],
> >> > > which
> >> > > >> >>> means
> >> > > >> >>> > > > > > retrotranslator is still not working. Have you
> tested
> >> > > >> >>> > > > > > it
> >> > > on a
> >> > > >> >>> > simpler
> >> > > >> >>> > > > > > application as I previously suggested? Did it work?
> >> > > >> >>> > > > > > What
> >> > > was
> >> > > >> the
> >> > > >> >>> > most
> >> > > >> >>> > > > > > critical scenario you tested it and it worked?
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> >> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >> > > >> /../workspace
> >> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > You should also check if it's is working as
> expected,
> >> > > >> >>> > > > > > as
> >> > I
> >> > > >> >>> already
> >> > > >> >>> > > > said,
> >> > > >> >>> > > > > > does not go directly testing complex solutions on
> >> > complex
> >> > > >> things
> >> > > >> >>> > like
> >> > > >> >>> > > > > SCA.
> >> > > >> >>> > > > > > At first, build a simple, but equivalent scenario,
> >> > > >> >>> > > > > > and
> >> > > test
> >> > > >> it.
> >> > > >> >>> For
> >> > > >> >>> > > > > > example,
> >> > > >> >>> > > > > > a simple android app project that uses an java
> >> > > >> >>> > > > > > library
> >> > > >> project
> >> > > >> >>> > which
> >> > > >> >>> > > > > access
> >> > > >> >>> > > > > > annotations on classes placed on the android
> project.
> >> > Like
> >> > > >> our
> >> > > >> >>> > > android
> >> > > >> >>> > > > > > calculator, it's an android app project
> >> > > (calculator-android)
> >> > > >> >>> which
> >> > > >> >>> > > uses
> >> > > >> >>> > > > > > java
> >> > > >> >>> > > > > > library projects (sca modules), and these libraries
> >> > checks
> >> > > >> for
> >> > > >> >>> > > > > annotations
> >> > > >> >>> > > > > > on classes located at the android app project
> >> > > >> >>> > > (CalculatorService.java,
> >> > > >> >>> > > > > > AddService.java, etc). When you get it working on
> the
> >> > > simpler
> >> > > >> >>> > > scenario,
> >> > > >> >>> > > > > > then
> >> > > >> >>> > > > > > you are ready to test it on the complexer sceneario
> >> > > >> >>> > > > (calculator-android).
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Please, if you get the retrotranslator working in
> the
> >> > > simpler
> >> > > >> >>> > > scenario,
> >> > > >> >>> > > > > > send
> >> > > >> >>> > > > > > us a patch with it. You can create a JIRA and
> attach
> >> > > >> >>> > > > > > it.
> >> > > If
> >> > > >> you
> >> > > >> >>> > need
> >> > > >> >>> > > > any
> >> > > >> >>> > > > > > help, just ask ; )
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > "code that checks for @Remotable you force to true,
> >> > > otherwise
> >> > > >> >>> force
> >> > > >> >>> > > to
> >> > > >> >>> > > > > > false."
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I meant
> >> > > >> >>> > > > > > you
> >> > to
> >> > > do:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Search in every sca code for the usage of
> >> > > >> >>> Class.isAnnotationPresent
> >> > > >> >>> > > or
> >> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it
> checks
> >> > for
> >> > > a
> >> > > >> the
> >> > > >> >>> > > > > @Remotable
> >> > > >> >>> > > > > > annotations force it to true, for example:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Annotation isRemotable =
> >> > > >> >>> > class.isAnnotationPresent(Remotable.class);
> >> > > >> >>> > > =>
> >> > > >> >>> > > > > > Annotation isRemotable = true;
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > otherwise, which means, when it's not checking for
> >> > > >> >>> > > > > > the
> >> > > >> >>> @Remotable
> >> > > >> >>> > > > > > annnotation, force to false. For example:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Annotation isReference =
> >> > > >> >>> > class.isAnnotationPresent(Reference.class);
> >> > > >> >>> > > =>
> >> > > >> >>> > > > > > Annotation isReference = false;
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > [1] -
> >> > > >> >>> > >
> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > Kind Regards,
> >> > > >> >>> > > > > > Adriano Crestani
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> >> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > > > > Hi Adriano,
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > I continued testing retrotranslator. Here's what
> >> > > >> >>> > > > > > > I've
> >> > > done
> >> > > >> up
> >> > > >> >>> to
> >> > > >> >>> > > now.
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed
> as
> >> > > shown
> >> > > >> >>> below:
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > svn checkout --revision 643746
> >> > > >> >>> > > > > > >
> >> > > >> >>> > >
> >> > > >>
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > cd modules
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > mvn clean install -Dtest=no
> >> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
> >> > M2_REPO
> >> > > >> >>> variable
> >> > > >> >>> > as
> >> > > >> >>> > > > > shown
> >> > > >> >>> > > > > > > below:
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> >> > > >> >>> > eclipse:add-maven-repo
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors,
> >> > added
> >> > > >> >>> Android
> >> > > >> >>> > > > library
> >> > > >> >>> > > > > > to
> >> > > >> >>> > > > > > > required modules, fixed references to jar files
> and
> >> > > other
> >> > > >> >>> > > libraries.
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > 5. Uncommented lines in
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the
> project
> >> > site
> >> > > >> [3]
> >> > > >> >>> and
> >> > > >> >>> > > > shown
> >> > > >> >>> > > > > > > below:
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> >> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >> > > >> >>> /../workspace
> >> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot
> -classpath
> >> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >  The output can be found in [4].
> >> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > and then re-ran retrotranslator.
> >> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5]
> >> > > >> >>> > > > > > > and
> >> > > >> Android
> >> > > >> >>> > > errors
> >> > > >> >>> > > > in
> >> > > >> >>> > > > > > > [6].
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > As always, I'm documenting my progress on the
> >> > > >> >>> > > > > > > project
> >> > > log.
> >> > > >> I
> >> > > >> >>> > > haven't
> >> > > >> >>> > > > > > fully
> >> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
> >> > > >> >>> > > > > > > puzzled
> >> > by
> >> > > >> what
> >> > > >> >>> you
> >> > > >> >>> > > > mean
> >> > > >> >>> > > > > by
> >> > > >> >>> > > > > > > this:
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > "code that checks for @Remotable you force to
> true,
> >> > > >> otherwise
> >> > > >> >>> > force
> >> > > >> >>> > > > to
> >> > > >> >>> > > > > > > false."
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > I'll continue looking into it and hopefully get
> >> > > >> >>> retrotranslator
> >> > > >> >>> > to
> >> > > >> >>> > > > > work.
> >> > > >> >>> > > > > > I
> >> > > >> >>> > > > > > > also think it's a simpler option.
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > [1]
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > [2]
> >> > > >> >>> > > > >
> >> > > >> >>>
> >> > >
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > [3]
> http://retrotranslator.sourceforge.net/#android
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > [4]
> >> > > >> >>> >
> http://androidindelft.googlepages.com/rt_output_30may2008.txt
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > [5]
> >> > > >> >>> > >
> >> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> > > >> >>> > > > > > > [6]
> http://androidindelft.googlepages.com/2Jun1.jpg
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani
> <
> >> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > > > > Hi,
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > I tried what Luciano suggested. It really
> works.
> >> > > >> >>> > > > > > > > To
> >> > > get
> >> > > >> it
> >> > > >> >>> > > working
> >> > > >> >>> > > > > you
> >> > > >> >>> > > > > > > > simply need to search on all modules where the
> >> > > >> >>> > > > > > > > code
> >> > > >> checks
> >> > > >> >>> for
> >> > > >> >>> > > > > > @Remotable
> >> > > >> >>> > > > > > > > annotation and force it to true:
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"
> >> > > >> >>> > > > > > > > =>
> >> > > true
> >> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" =>
> >> > > >> >>> > > > > > > > true
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > It works fine on the sca revision we are
> testing
> >> > > >> >>> > > > > > > > on
> >> > > >> Android
> >> > > >> >>> and
> >> > > >> >>> > > the
> >> > > >> >>> > > > > > most
> >> > > >> >>> > > > > > > > recent revision. I only tested it as a java
> >> > > application,
> >> > > >> not
> >> > > >> >>> as
> >> > > >> >>> > > an
> >> > > >> >>> > > > > > > android
> >> > > >> >>> > > > > > > > application.
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator
> is
> >> > > >> >>> > > > > > > > a
> >> > > faster
> >> > > >> >>> and
> >> > > >> >>> > > > simpler
> >> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion only
> >> > forces
> >> > > >> the
> >> > > >> >>> SCA
> >> > > >> >>> > to
> >> > > >> >>> > > > > > > recognize
> >> > > >> >>> > > > > > > > the services with no annotations declared on
> >> > > >> >>> > > > > > > > their
> >> > > >> >>> interfaces,
> >> > > >> >>> > > but
> >> > > >> >>> > > > it
> >> > > >> >>> > > > > > > does
> >> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when
> the
> >> > > >> >>> > > > > > > > SCA
> >> > > >> invokes
> >> > > >> >>> > > > methods
> >> > > >> >>> > > > > > that
> >> > > >> >>> > > > > > > > read annotations. So, our current problem is
> that
> >> > > >> >>> > > > > > > > we
> >> > > are
> >> > > >> not
> >> > > >> >>> > > being
> >> > > >> >>> > > > > able
> >> > > >> >>> > > > > > > to
> >> > > >> >>> > > > > > > > use these methods and not only because we are
> not
> >> > > being
> >> > > >> able
> >> > > >> >>> to
> >> > > >> >>> > > > read
> >> > > >> >>> > > > > > the
> >> > > >> >>> > > > > > > > annotations.
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
> >> > > >> >>> > > > > > > > suggestion,
> >> > > you
> >> > > >> will
> >> > > >> >>> > need
> >> > > >> >>> > > > to
> >> > > >> >>> > > > > > > > comment/adapt every sca code that tries to read
> >> > > >> >>> > > > > > > > the
> >> > > class
> >> > > >> >>> > > > > annotations.
> >> > > >> >>> > > > > > It
> >> > > >> >>> > > > > > > > is
> >> > > >> >>> > > > > > > > not necessary to comment/adapt the methods that
> >> > > >> >>> > > > > > > > read
> >> > > >> Method
> >> > > >> >>> > > > > > annotations,
> >> > > >> >>> > > > > > > > they are not throwning any exception. So, every
> >> > > >> >>> > > > > > > > code
> >> > > that
> >> > > >> >>> > checks
> >> > > >> >>> > > > for
> >> > > >> >>> > > > > > > > @Remotable you force to true, otherwise force
> to
> >> > > false.
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > Any doubt about what I have said, just let me
> >> > > >> >>> > > > > > > > know ;
> >> > )
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > Suggestions are welcome : )
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > Adriano Crestani
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano
> Resende
> >> > > >> >>> > > > > > > > <
> >> > > >> >>> > > > > > luckbr1975@gmail.com>
> >> > > >> >>> > > > > > > > wrote:
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > > > > FYI, if you comment out the code that checks
> if
> >> > > >> >>> > > > > > > > > a
> >> > > >> >>> interface
> >> > > >> >>> > is
> >> > > >> >>> > > > > > > > > remoteble, you could have a version of the
> >> > > calculator
> >> > > >> >>> without
> >> > > >> >>> > > any
> >> > > >> >>> > > > > > > > > annotations, and the runtime would introspect
> >> > > >> >>> > > > > > > > > the
> >> > > >> >>> references
> >> > > >> >>> > > for
> >> > > >> >>> > > > > the
> >> > > >> >>> > > > > > > > > multiple services. But note that, the
> >> > introspection
> >> > > >> code
> >> > > >> >>> will
> >> > > >> >>> > > > only
> >> > > >> >>> > > > > be
> >> > > >> >>> > > > > > > > > activated if there is no SCA annotations on
> the
> >> > > class.
> >> > > >> >>> > > > > > > > >
> >> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
> >> > > >> >>> > > > > > > > > Crestani
> >> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
> >> > > >> >>> > > > > > > > > > Ah, the expected exception should look like
> >> > > >> >>> > > > > > > > > > this
> >> > > on
> >> > > >> >>> android
> >> > > >> >>> > > > > > emulator:
> >> > > >> >>> > > > > > > > > >
> >> > > >> >>> > >
> >> >
> >> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> >>>
> >> > > >> >>> <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >> > >
> >> > > >> >>> > <
> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >> > > >
> >> > > >> >>> > > <
> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> >>> > > > <
> >> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >
> >> > > >> >>> > > > > <
> >> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >> > > >> >>> >
> >> > > >> >>> > > > > > <
> >> > > >> >>>
> >> > > >> >>>
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> >>> > > > > > > <
> >> > > >> >>> >
> >> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> >>> > > > > > > > <
> >> > > >> >>> > >
> >> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> > > >> >>> > > > > > > > > >
> >> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
> >> > Crestani
> >> > > <
> >> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> >> > > >> >>> > > > > > > > > >
> >> > > >> >>> > > > > > > > > >> Hi Oscar,
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> I was indeed using the sca modules not
> from
> >> > > >> >>> > > > > > > > > >> the
> >> > > >> >>> sandbox.
> >> > > >> >>> > As
> >> > > >> >>> > > > you
> >> > > >> >>> > > > > > > > > suggested,
> >> > > >> >>> > > > > > > > > >> I
> >> > > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl from
> >> > > >> >>> > > > > > > > > >> my
> >> > > >> workspace
> >> > > >> >>> > and
> >> > > >> >>> > > > > added
> >> > > >> >>> > > > > > > the
> >> > > >> >>> > > > > > > > > >> version you uploaded to the sandbox. Then,
> I
> >> > > >> >>> uncommented
> >> > > >> >>> > the
> >> > > >> >>> > > > > lines
> >> > > >> >>> > > > > > > in
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > >
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> following the comments pointing out why
> >> > > >> >>> > > > > > > > > >> those
> >> > > lines
> >> > > >> had
> >> > > >> >>> > been
> >> > > >> >>> > > > > > > > commented.
> >> > > >> >>> > > > > > > > > I'm
> >> > > >> >>> > > > > > > > > >> no longer getting the
> >> > > >> >>> > > > > > > > > >> ClassNotFoundException.
> >> > > >> However,
> >> > > >> >>> > it's
> >> > > >> >>> > > > > > getting
> >> > > >> >>> > > > > > > > > stuck
> >> > > >> >>> > > > > > > > > >> somewhere else (before getting there I
> >> > guess)...I
> >> > > >> think
> >> > > >> >>> > this
> >> > > >> >>> > > > is
> >> > > >> >>> > > > > > the
> >> > > >> >>> > > > > > > > case
> >> > > >> >>> > > > > > > > > >> because before and after commenting the
> code
> >> > > >> >>> > > > > > > > > >> I
> >> > > get
> >> > > >> the
> >> > > >> >>> > same
> >> > > >> >>> > > > > error
> >> > > >> >>> > > > > > in
> >> > > >> >>> > > > > > > > the
> >> > > >> >>> > > > > > > > > >> Android emulator, an
> InstantiationException
> >> > [1].
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> Have you debugged to check exactly where
> >> > > >> >>> > > > > > > > > >> this
> >> > > >> exception
> >> > > >> >>> is
> >> > > >> >>> > > > being
> >> > > >> >>> > > > > > > > thrown?
> >> > > >> >>> > > > > > > > > I
> >> > > >> >>> > > > > > > > > >> have done the procedure I previously
> >> > > >> >>> > > > > > > > > >> described
> >> > > >>  again
> >> > > >> >>> and
> >> > > >> >>> > I
> >> > > >> >>> > > > got
> >> > > >> >>> > > > > it
> >> > > >> >>> > > > > > > > > "running"
> >> > > >> >>> > > > > > > > > >> as expected, which means, running till the
> >> > > expected
> >> > > >> >>> > > exception
> >> > > >> >>> > > > is
> >> > > >> >>> > > > > > > > thrown.
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> I also started tinkering with
> >> > > >> >>> > > > > > > > > >> retrotranslator.
> >> > > First
> >> > > >> I
> >> > > >> >>> > tried
> >> > > >> >>> > > > > doing
> >> > > >> >>> > > > > > > it
> >> > > >> >>> > > > > > > > > with
> >> > > >> >>> > > > > > > > > >> Ant, but it seems that in order to build I
> >> > > >> >>> > > > > > > > > >> have
> >> > > to
> >> > > >> >>> include
> >> > > >> >>> > > the
> >> > > >> >>> > > > > > whole
> >> > > >> >>> > > > > > > > > >> tuscany
> >> > > >> >>> > > > > > > > > >> projects in a way similar to how I now
> have
> >> > > >> >>> > > > > > > > > >> in
> >> > > >> Eclipse.
> >> > > >> >>> I
> >> > > >> >>> > > also
> >> > > >> >>> > > > > > tried
> >> > > >> >>> > > > > > > > > making
> >> > > >> >>> > > > > > > > > >> a jar out of
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > >
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> >> > > >> >>> unfortunately
> >> > > >> >>> > > it's
> >> > > >> >>> > > > > not
> >> > > >> >>> > > > > > > > > >> translating anything, as shown below.
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> >> > > >> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> >> > > >> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar
> >> > > >> >>> > > > > > > > > >> -srcjar
> >> > > >> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> >> > > >> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot
> >> > > -classpath
> >> > > >> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> >> > > >> >>> > > > > > > > > >> Processing 136 file(s) in
> >> > > >> >>> JavaRuntimeModuleActivator.jar.
> >> > > >> >>> > > > > > > > > >> Transformed 0 file(s).
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> There's also a maven plugin, so I might
> try
> >> > > >> that...but
> >> > > >> >>> > first
> >> > > >> >>> > > > > I'll
> >> > > >> >>> > > > > > > give
> >> > > >> >>> > > > > > > > > Ant
> >> > > >> >>> > > > > > > > > >> another go. Hopefully Google will release
> a
> >> > > >> >>> > > > > > > > > >> new
> >> > > SDK
> >> > > >> >>> soon,
> >> > > >> >>> > > > > > otherwise
> >> > > >> >>> > > > > > > as
> >> > > >> >>> > > > > > > > > you
> >> > > >> >>> > > > > > > > > >> say...retrotranslator will have to be the
> >> > > workaround
> >> > > >> to
> >> > > >> >>> > > > proceed
> >> > > >> >>> > > > > > with
> >> > > >> >>> > > > > > > > our
> >> > > >> >>> > > > > > > > > >> project ;-)
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK
> >> > version
> >> > > >> will
> >> > > >> >>> not
> >> > > >> >>> > be
> >> > > >> >>> > > > > > > released
> >> > > >> >>> > > > > > > > > until
> >> > > >> >>> > > > > > > > > >> july 28th :S. So, it's really good you
> have
> >> > > already
> >> > > >> >>> > started
> >> > > >> >>> > > > > > working
> >> > > >> >>> > > > > > > on
> >> > > >> >>> > > > > > > > > the
> >> > > >> >>> > > > > > > > > >> retrotranslator, it will probably be the
> >> > > >> >>> > > > > > > > > >> best
> >> > > >> >>> workaround
> >> > > >> >>> > for
> >> > > >> >>> > > > the
> >> > > >> >>> > > > > > > > > annotations
> >> > > >> >>> > > > > > > > > >> problem till the next SDK release.
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> I suggest you to forget about the build
> >> > > >> >>> > > > > > > > > >> process
> >> > > >> right
> >> > > >> >>> now,
> >> > > >> >>> > > > > before,
> >> > > >> >>> > > > > > > > check
> >> > > >> >>> > > > > > > > > if
> >> > > >> >>> > > > > > > > > >> this retrotranslator works and if it
> really
> >> > works
> >> > > on
> >> > > >> >>> > android
> >> > > >> >>> > > > > > > platform.
> >> > > >> >>> > > > > > > > > I´m
> >> > > >> >>> > > > > > > > > >> really getting upset with Android, even
> its
> >> > > >> >>> > > > > > > > > >> API
> >> > > >> methods
> >> > > >> >>> > does
> >> > > >> >>> > > > not
> >> > > >> >>> > > > > > > work
> >> > > >> >>> > > > > > > > as
> >> > > >> >>> > > > > > > > > >> expected :@. Anyway, try initially to
> >> > > >> >>> > > > > > > > > >> compile a
> >> > > >> simple
> >> > > >> >>> > class
> >> > > >> >>> > > > > > (coded
> >> > > >> >>> > > > > > > by
> >> > > >> >>> > > > > > > > > you),
> >> > > >> >>> > > > > > > > > >> which contains annotations, and access
> these
> >> > > >> >>> annotations.
> >> > > >> >>> > If
> >> > > >> >>> > > > it
> >> > > >> >>> > > > > > > works,
> >> > > >> >>> > > > > > > > > make
> >> > > >> >>> > > > > > > > > >> it more complex and test again, do it
> until
> >> > > >> >>> > > > > > > > > >> you
> >> > > >> reach a
> >> > > >> >>> > > > scenario
> >> > > >> >>> > > > > > as
> >> > > >> >>> > > > > > > > > complex
> >> > > >> >>> > > > > > > > > >> as the SCA (a lot of external jars with
> >> > annotated
> >> > > >> >>> classes
> >> > > >> >>> > > > > accessed
> >> > > >> >>> > > > > > > by
> >> > > >> >>> > > > > > > > > the
> >> > > >> >>> > > > > > > > > >> other external jars and the Android app).
> >> > > >> >>> > > > > > > > > >> Got
> >> > it?
> >> > > :
> >> > > >> )
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> Regards,
> >> > > >> >>> > > > > > > > > >> Adriano Crestani
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar
> >> > Castaneda
> >> > > <
> >> > > >> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> >> > > >> >>> > > > > > > > > >>
> >> > > >> >>> > > > > > > > > >>> Hi Adriano,
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>> I was indeed using the sca modules not
> from
> >> > the
> >> > > >> >>> sandbox.
> >> > > >> >>> > As
> >> > > >> >>> > > > you
> >> > > >> >>> > > > > > > > > suggested,
> >> > > >> >>> > > > > > > > > >>> I
> >> > > >> >>> > > > > > > > > >>> removed the tuscany-contribution-impl
> from
> >> > > >> >>> > > > > > > > > >>> my
> >> > > >> >>> workspace
> >> > > >> >>> > and
> >> > > >> >>> > > > > added
> >> > > >> >>> > > > > > > the
> >> > > >> >>> > > > > > > > > >>> version you uploaded to the sandbox.
> Then,
> >> > > >> >>> > > > > > > > > >>> I
> >> > > >> >>> uncommented
> >> > > >> >>> > > the
> >> > > >> >>> > > > > > lines
> >> > > >> >>> > > > > > > in
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > >
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>> following the comments pointing out why
> >> > > >> >>> > > > > > > > > >>> those
> >> > > lines
> >> > > >> >>> had
> >> > > >> >>> > > been
> >> > > >> >>> > > > > > > > commented.
> >> > > >> >>> > > > > > > > > >>> I'm
> >> > > >> >>> > > > > > > > > >>> no longer getting the
> >> > > >> >>> > > > > > > > > >>> ClassNotFoundException.
> >> > > >> However,
> >> > > >> >>> > it's
> >> > > >> >>> > > > > > getting
> >> > > >> >>> > > > > > > > > stuck
> >> > > >> >>> > > > > > > > > >>> somewhere else (before getting there I
> >> > > guess)...I
> >> > > >> >>> think
> >> > > >> >>> > > this
> >> > > >> >>> > > > is
> >> > > >> >>> > > > > > the
> >> > > >> >>> > > > > > > > > case
> >> > > >> >>> > > > > > > > > >>> because before and after commenting the
> >> > > >> >>> > > > > > > > > >>> code I
> >> > > get
> >> > > >> the
> >> > > >> >>> > same
> >> > > >> >>> > > > > error
> >> > > >> >>> > > > > > > in
> >> > > >> >>> > > > > > > > > the
> >> > > >> >>> > > > > > > > > >>> Android emulator, an
> InstantiationException
> >> > [1].
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>> I also started tinkering with
> >> > > >> >>> > > > > > > > > >>> retrotranslator.
> >> > > >> First I
> >> > > >> >>> > > tried
> >> > > >> >>> > > > > > doing
> >> > > >> >>> > > > > > > it
> >> > > >> >>> > > > > > > > > with
> >> > > >> >>> > > > > > > > > >>> Ant, but it seems that in order to build
> I
> >> > have
> >> > > to
> >> > > >> >>> > include
> >> > > >> >>> > > > the
> >> > > >> >>> > > > > > > whole
> >> > > >> >>> > > > > > > > > >>> tuscany
> >> > > >> >>> > > > > > > > > >>> projects in a way similar to how I now
> have
> >> > > >> >>> > > > > > > > > >>> in
> >> > > >> >>> Eclipse. I
> >> > > >> >>> > > > also
> >> > > >> >>> > > > > > > tried
> >> > > >> >>> > > > > > > > > >>> making
> >> > > >> >>> > > > > > > > > >>> a jar out of
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > >
> >> > > >> >>> > > > > > > >
> >> > > >> >>> > > > > > >
> >> > > >> >>> > > > > >
> >> > > >> >>> > > > >
> >> > > >> >>> > > >
> >> > > >> >>> > >
> >> > > >> >>> >
> >> > > >> >>>
> >> > > >>
> >> > >
> >> >
> >> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> > > >> >>> > > > > > > > > >>>
> >> > > >> >>> > > > > > > > > >>> and then feeding it to retrotranslator
> but
> >> > > >> >>> unfortunately
> >> > > >> >>> > > it's
> >> > > >> >>> > > > > not
> >> > > >> >>> > > > > > > > > >>> translating anything, as shown
> >
> > ...
> >
> > [Message clipped]
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
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.

On Mon, Jul 7, 2008 at 1:41 PM, Oscar Castaneda
<os...@gmail.com> wrote:
> Thanks Adriano. I have been testing the workarounds for RMI and Beans API. I
> am also working to integrate retrotranslator into maven.
>
> Today, I tested the newest version of retrotranslator (thanks for the tip).
> With this new version RMI related issues are not appearing (not initially,
> at least) but instead Beans issues are. I've commented
> java.beans.Introspector import and related code from
> JavaIntrospectionHelper.java and now get other errors [1] related to
> javax.jws.WebService. Suggestions are welcome and appreciated.
>
> I've noted down these issues on the porting limitations page [2], which I
> have updated with the current progress.
>
> [1]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
> [2]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>
> On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani
> <ad...@apache.org> wrote:
>>
>> I added to the wiki a page [1] about all the issues we have found so far
>> when trying to port the SCA Java to the Android platform.
>>
>> [1] -
>>
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>>
>> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
>> oscar.castaneda.gsoc@gmail.com> wrote:
>>
>> > Hi Luciano,
>> >
>> > Thanks for the tip. Before testing it I generated a JIRA ticket [1] for
>> > the
>> > Retrotranslator progress, and when I got around to testing I noticed a
>> > different ClassNotFoundException. This time its for
>> > java.beans.Introspector.  I made sure to include this in the JIRA ticket
>> > and
>> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
>> >
>> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
>> > [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>> >
>> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <lu...@gmail.com>
>> > wrote:
>> >
>> > > Removing RMI should be as simple as removing the tuscany-binding-rmi
>> > > dependency from host-android.
>> > >
>> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
>> > > <os...@gmail.com> wrote:
>> > > > Hi Luciano,
>> > > >
>> > > > It's going better after the progress last week with retrotranslator.
>> > I'm
>> > > now
>> > > > able to translate the SCA classes and run calculator-android without
>> > > getting
>> > > > Annotation related issues. The problems now are related to RMI. In
>> > > relation
>> > > > to this, and from your comment about blocking issues, I created a
>> > > > child
>> > > page
>> > > > [1] in the project wiki for Blocking issues. Currently, the page
>> > > > lists
>> > > the
>> > > > RMI issue and suggested workarounds.
>> > > >
>> > > > I think your suggestion about integration with maven is really good.
>> > > > Especially because there is a retrotranslator plugin for maven. I'll
>> > > start
>> > > > looking into using this plugin. I also agree about reviewing the
>> > > > scope
>> > of
>> > > > support. Right now, I see a need to reduce the dependency on RMI,
>> > either
>> > > by
>> > > > commenting all the code that uses the RMI API, or by following the
>> > > > suggestions from Taras [3] to either replace java.rmi.Remote with
>> > > > java.lang.Cloneable (as the result of using a retrotranslator
>> > > > option)
>> > or
>> > > > taking the RMI source from Apache Harmony and putting it in a
>> > > > retrotranslated JAR. What would you recommend? Hopefully after the
>> > > > dependency reduction Android will be able to run calculator-android.
>> > > Based
>> > > > on the results of this experiment we can better consider the
>> > > > reduction
>> > of
>> > > > component types and bindings. Please let me know your thoughts on
>> > > > this
>> > > idea.
>> > > >
>> > > > [1]
>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
>> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
>> > > > [3]
>> > > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>> > > >
>> > > >
>> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
>> > luckbr1975@gmail.com>
>> > > > wrote:
>> > > >
>> > > >> How is it going here ? I just want to check if there is any
>> > > >> blocking
>> > > >> issues with Android at the moment, if so, is there a list of these
>> > > >> issues somewhere ?
>> > > >>
>> > > >> Also, some general suggestions/recommendations.: It would be great
>> > > >> if
>> > > >> we could spend sometime to get the modules well integrated using
>> > > >> maven, this way it would be easier for anyone on the community to
>> > > >> checkout the trunk + android sandbox and jump on the code to help.
>> > > >> Also, we should review the scope of the support we are trying to
>> > > >> acomplish, I'd suggest to minimize the number of component types
>> > > >> supported (java) and bindings (default sca binding) and then try to
>> > > >> run the calculator sample application. Once we have acomplished
>> > > >> this
>> > > >> first milestone, we could then discuss our next steps.
>> > > >>
>> > > >> Thoughts ?
>> > > >>
>> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>> > > >> <ad...@apache.org> wrote:
>> > > >> > Ah, here is a tip to assure the classes are not recompiled again.
>> > > Build
>> > > >> the
>> > > >> > project, then go in each project builder (in the properties
>> > > >> > window)
>> > > and
>> > > >> > disable all the builders, then not even a clean/build will modify
>> > your
>> > > >> > project ; )
>> > > >> >
>> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>> > > >> adrianocrestani@apache.org>
>> > > >> > wrote:
>> > > >> >
>> > > >> >> Hi Oscar,
>> > > >> >>
>> > > >> >> I say that it is more difficult to debug because you need attach
>> > > >> >> a
>> > > >> source
>> > > >> >> code to each jar and etc, and when you are using projects,
>> > > >> >> eclipse
>> > > >> already
>> > > >> >> knows where to find the source code : )
>> > > >> >>
>> > > >> >> The reply made sense to me, especially with regards to the fact
>> > that
>> > > >> with
>> > > >> >> the Android plugin Eclipse compiles sources into classes and
>> > > >> >> then
>> > > into
>> > > >> dex
>> > > >> >> files, so retrotranslator has no chance to translate classes in
>> > > between
>> > > >> >> these steps - even if I do that outside of Eclipse. This shows
>> > > >> >> from
>> > > the
>> > > >> use
>> > > >> >> of non-translated binaries (as indicated by the
>> > > >> >> java.lang.Class.isAnnotationPr
>> > > >> >> esent(Class.java:1131) error in the stack
>> > > >> >> trace) that might have been related to the use of pre-existing
>> > > >> >> dex
>> > > files
>> > > >> or
>> > > >> >> over-writing of files by Eclipse. So unless I modify the ADT
>> > > >> >> plugin
>> > > the
>> > > >> >> result would still be the same, even if I use a simpler
>> > > >> >> scenario.
>> > > >> >>
>> > > >> >> Sorry, I really did not comment this email yet. It does not make
>> > > >> >> so
>> > > much
>> > > >> >> sense for me. First, as you already know, eclipse android
>> > > >> >> projects
>> > > does
>> > > >> not
>> > > >> >> recognize any modifications in the imported projects, so it does
>> > not
>> > > >> call
>> > > >> >> the build or incremental build even if the imported projects
>> > > >> >> have
>> > > their
>> > > >> >> source code modified. Just to make sure I tested it again:
>> > > >> >>
>> > > >> >> 1-  imported in my workspace all the projects included in the
>> > > >> >> calculator-android, cleaned and built them...it takes a loooong
>> > time,
>> > > as
>> > > >> you
>> > > >> >> already know.
>> > > >> >>
>> > > >> >> 2- imported the calculator-android project, cleaned and built it
>> > > (only
>> > > >> the
>> > > >> >> calculator-android project), and this process was too much
>> > > >> >> faster
>> > > than
>> > > >> when
>> > > >> >> all the modules are built, so the imported projects were not
>> > > recompiled,
>> > > >> >> otherwise it would take too much more time. I suppose here that
>> > > >> >> the
>> > > >> android
>> > > >> >> project compiles the .java contained in the android project and
>> > > convert
>> > > >> all
>> > > >> >> the .class files (generated by imported projects and android
>> > project)
>> > > to
>> > > >> dex
>> > > >> >> format.
>> > > >> >>
>> > > >> >> So, it does not recompile the external class files (the ones
>> > > contained
>> > > >> in
>> > > >> >> the imported projects) cause it seems not to check if it was
>> > modified
>> > > or
>> > > >> >> not. Of course, I never tested it modifing the .class files, I'm
>> > just
>> > > >> >> assuming that, because when you modify .java files it does not
>> > > >> >> get
>> > > >> >> recompiled.
>> > > >> >>
>> > > >> >> What do you think?
>> > > >> >>
>> > > >> >> As I mentioned before, your comments are really helpful as they
>> > give
>> > > me
>> > > >> a
>> > > >> >> sense of direction. Please let me know if you still think we
>> > > >> >> should
>> > > >> pursue
>> > > >> >> retrotranslator for files inside a folder.
>> > > >> >>
>> > > >> >> I really think you should try at first the simpler scenario and
>> > > >> >> try
>> > > to
>> > > >> >> understand how it works and IF it works. Also, you can try what
>> > > >> >> you
>> > > were
>> > > >> >> planning: to retrotranslate the each modules' jar, but I suppose
>> > it's
>> > > a
>> > > >> lot
>> > > >> >> of work, because there are so many modules :S. So, as I've
>> > > >> >> already
>> > > said,
>> > > >> if
>> > > >> >> you think it's getting to complicated, forget it and go on with
>> > > >> Luciano's
>> > > >> >> suggestion.
>> > > >> >>
>> > > >> >> Feel free to choose the direction you want to take, and if there
>> > > >> >> is
>> > > >> another
>> > > >> >> approach you think is better, just let us know ; )...you are the
>> > best
>> > > >> person
>> > > >> >> to choose the directions, cause you are working directly on it,
>> > > >> >> we
>> > > are
>> > > >> just
>> > > >> >> guinding/helping you ; )
>> > > >> >>
>> > > >> >> Thanks,
>> > > >> >> Adriano Crestani
>> > > >> >>
>> > > >> >>
>> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >> >>
>> > > >> >>> Hi Adriano,
>> > > >> >>>
>> > > >> >>> If there is an option on retrotranslator to retrotranslate all
>> > > >> >>> the
>> > > >> classes
>> > > >> >>> > in a folder, it should work as well as it works on classes
>> > inside
>> > > >> .jar
>> > > >> >>> > files. So, I think you should try to understand why your
>> > > >> >>> > first
>> > > >> approach
>> > > >> >>> > (retrotranslating the eclipse project classes) is not working
>> > > trying
>> > > >> a
>> > > >> >>> > simpler scenario. Have you already tried it?
>> > > >> >>> >
>> > > >> >>>
>> > > >> >>> I agree that it's good to try out a simpler scenario to better
>> > > >> understand
>> > > >> >>> the problem. I haven't tried it yet because using
>> > > >> >>> retrotranslator
>> > > for
>> > > >> >>> classes inside a folder doesn't seem to be a solution to the
>> > > problem.
>> > > >> >>> Here's
>> > > >> >>> my reasoning:
>> > > >> >>>
>> > > >> >>> Yes, there is an option to translate classes in a folder. I
>> > > >> >>> tried
>> > it
>> > > >> and
>> > > >> >>> it
>> > > >> >>> successfully translated the classes inside my Eclipse
>> > > >> >>> workspace.
>> > > When I
>> > > >> >>> ran
>> > > >> >>> the calculator-android application using the newly translated
>> > > classes I
>> > > >> >>> was
>> > > >> >>> getting the errors in [1]. I posted a question in Android
>> > Developers
>> > > >> about
>> > > >> >>> this error and received a reply [2].
>> > > >> >>>
>> > > >> >>> The reply made sense to me, especially with regards to the fact
>> > that
>> > > >> with
>> > > >> >>> the Android plugin Eclipse compiles sources into classes and
>> > > >> >>> then
>> > > into
>> > > >> dex
>> > > >> >>> files, so retrotranslator has no chance to translate classes in
>> > > between
>> > > >> >>> these steps - even if I do that outside of Eclipse. This shows
>> > from
>> > > the
>> > > >> >>> use
>> > > >> >>> of non-translated binaries (as indicated by the
>> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in
>> > > >> >>> the
>> > > stack
>> > > >> >>> trace) that might have been related to the use of pre-existing
>> > > >> >>> dex
>> > > >> files
>> > > >> >>> or
>> > > >> >>> over-writing of files by Eclipse. So unless I modify the ADT
>> > plugin
>> > > the
>> > > >> >>> result would still be the same, even if I use a simpler
>> > > >> >>> scenario.
>> > > >> >>>
>> > > >> >>> The reply suggested to use JAR's instead. This also made sense
>> > > >> >>> to
>> > me
>> > > >> and
>> > > >> >>> seemed like a simpler way of solving the problem. I didn't see
>> > > >> >>> the
>> > > >> >>> disadvantage of debugging, which as you point out is more
>> > difficult
>> > > >> with
>> > > >> >>> JAR's instead of Eclipse projects.
>> > > >> >>>
>> > > >> >>> As I mentioned before, your comments are really helpful as they
>> > give
>> > > me
>> > > >> a
>> > > >> >>> sense of direction. Please let me know if you still think we
>> > should
>> > > >> pursue
>> > > >> >>> retrotranslator for files inside a folder.
>> > > >> >>>
>> > > >> >>>
>> > > >> >>> [1]
>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>> > > >> >>> [2]
>> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> > > >> >>>
>> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>> > > >> >>> adrianocrestani@apache.org>
>> > > >> >>> wrote:
>> > > >> >>>
>> > > >> >>> > Hi Oscar,
>> > > >> >>> >
>> > > >> >>> > Yup, you're right - there are indeed Eclipse files inside the
>> > > >> folders. I
>> > > >> >>> > guess I was confused by the different names in [1] than those
>> > that
>> > > >> >>> result
>> > > >> >>> > [2] from importing to an Eclipse workspace - after which I
>> > > >> >>> > see
>> > 13
>> > > >> >>> projects
>> > > >> >>> > in both cases. So please ignore my previous remark.
>> > > >> >>> >
>> > > >> >>> > I have added the projects, but still haven't changed their
>> > names.
>> > > I
>> > > >> was
>> > > >> >>> > planning to modify their project names when we get it
>> > > >> >>> > integrated
>> > > to
>> > > >> SCA,
>> > > >> >>> > mainly because we will need to change the poms. Anyway, feel
>> > free
>> > > to
>> > > >> >>> modify
>> > > >> >>> > the names whenever you want ; )
>> > > >> >>> >
>> > > >> >>> >
>> > > >> >>> > Per the reply I received on the Android Developers list [3] I
>> > > started
>> > > >> >>> using
>> > > >> >>> > retrotranslator on JAR's instead of class files. For this I
>> > > created a
>> > > >> >>> big
>> > > >> >>> > JAR file with all the Tuscany modules (including those you
>> > > modified
>> > > >> for
>> > > >> >>> > Android). I translated this big JAR (around 15MB) with
>> > > >> retrotranslator
>> > > >> >>> [4].
>> > > >> >>> > Then I created a new workspace with only calculator-android
>> > > >> >>> > and
>> > > >> >>> > android-jdk-classes as projects and added the translated JAR
>> > > >> >>> > as
>> > an
>> > > >> >>> external
>> > > >> >>> > library for both projects. This resulted in errors [4] from
>> > > >> >>> > the
>> > > >> Android
>> > > >> >>> > build process.
>> > > >> >>> >
>> > > >> >>> > I really do not understand this errors, but as this errors
>> > > >> >>> > are
>> > > only
>> > > >> >>> related
>> > > >> >>> > to testcase classes they can be ignored (removed from the
>> > > >> >>> > jars).
>> > I
>> > > >> also
>> > > >> >>> did
>> > > >> >>> > not understand why it's not find the .apk file:
>> > > >> >>> >
>> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
>> > > >> >>> > /bin/calculator-android.apk!"
>> > > >> >>> >
>> > > >> >>> > To work around these errors I decided to take a different
>> > approach
>> > > >> and
>> > > >> >>> copy
>> > > >> >>> > all the jar files contained in the individual modules to a
>> > > separate
>> > > >> >>> folder
>> > > >> >>> > and then run retrotranslator on each JAR. The jars are found
>> > > inside
>> > > >> the
>> > > >> >>> > target folder of each module and are named as shown below:
>> > > >> >>> >
>> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> > > >> >>> >
>> > > >> >>> > From this I found that only the SCA modules have these JAR
>> > > >> >>> > files
>> > > >> inside
>> > > >> >>> > their respective target folders, whereas the Android modules
>> > > >> >>> > I
>> > > >> >>> downloaded
>> > > >> >>> > from [1] don't have these files at all
>> > > >> >>> >
>> > > >> >>> > Yep, this .jars are generated when the maven is executed. I'm
>> > not
>> > > >> sure
>> > > >> >>> if
>> > > >> >>> > you should use this .jars, because they were compiled with no
>> > > >> reference
>> > > >> >>> to
>> > > >> >>> > Android library. That's also why there are no .jar files for
>> > > android
>> > > >> >>> > modules, because you did not execute the maven on them  (and
>> > > >> >>> > you
>> > > >> >>> > shouldn't).
>> > > >> >>> >
>> > > >> >>> > So I decided to keep the Android
>> > > >> >>> > modules [2] and add the translated JARs as libraries where
>> > needed
>> > > to
>> > > >> >>> have
>> > > >> >>> > the workspace build with no problems. If I get this running I
>> > > would
>> > > >> look
>> > > >> >>> > into creating JAR files from the Android modules and then
>> > > >> >>> > return
>> > > to
>> > > >> only
>> > > >> >>> > having calculator-android and android-jdk-classes as projects
>> > and
>> > > the
>> > > >> >>> rest
>> > > >> >>> > as JAR's added as external libraries. If this works out I
>> > > >> >>> > could
>> > > then
>> > > >> >>> look
>> > > >> >>> > into seeing which JAR's are important and which are not, in
>> > > >> >>> > this
>> > > way
>> > > >> >>> > reducing the total memory footprint and coming up with a
>> > > "lightweight
>> > > >> >>> > mobile
>> > > >> >>> > SCA core/runtime." Please let me know your thoughts on these
>> > > efforts.
>> > > >> >>> >
>> > > >> >>> > You haven't tried this yet, right? You may try it, but I do
>> > > >> >>> > not
>> > > like
>> > > >> >>> this
>> > > >> >>> > approach, because it will get difficult to debug sca classes
>> > > >> >>> > as
>> > > they
>> > > >> are
>> > > >> >>> > not
>> > > >> >>> > imported as eclipse projects.
>> > > >> >>> >
>> > > >> >>> > If there is an option on retrotranslator to retrotranslate
>> > > >> >>> > all
>> > the
>> > > >> >>> classes
>> > > >> >>> > in a folder, it should work as well as it works on classes
>> > inside
>> > > >> .jar
>> > > >> >>> > files. So, I think you should try to understand why your
>> > > >> >>> > first
>> > > >> approach
>> > > >> >>> > (retrotranslating the eclipse project classes) is not working
>> > > trying
>> > > >> a
>> > > >> >>> > simpler scenario. Have you already tried it?
>> > > >> >>> >
>> > > >> >>> > Also, if the restrotranslator gets to complicated, you may
>> > > >> >>> > try
>> > the
>> > > >> >>> > Luciano's
>> > > >> >>> > suggestion ; )
>> > > >> >>> >
>> > > >> >>> >
>> > > >> >>> > Kind Regards,
>> > > >> >>> > Adriano Crestani
>> > > >> >>> >
>> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >> >>> >
>> > > >> >>> > > Hi Adriano,
>> > > >> >>> > >
>> > > >> >>> > >
>> > > >> >>> > > > Yep, they should be imported, if you check inside its
>> > folders,
>> > > >> there
>> > > >> >>> > are
>> > > >> >>> > > > the
>> > > >> >>> > > > eclipse project files, so they should be identified by
>> > > >> >>> > > > the
>> > > >> eclipse
>> > > >> >>> > import
>> > > >> >>> > > > tool as an eclipse project.
>> > > >> >>> > >
>> > > >> >>> > >
>> > > >> >>> > > Yup, you're right - there are indeed Eclipse files inside
>> > > >> >>> > > the
>> > > >> folders.
>> > > >> >>> I
>> > > >> >>> > > guess I was confused by the different names in [1] than
>> > > >> >>> > > those
>> > > that
>> > > >> >>> result
>> > > >> >>> > > [2] from importing to an Eclipse workspace - after which I
>> > > >> >>> > > see
>> > > 13
>> > > >> >>> > projects
>> > > >> >>> > > in both cases. So please ignore my previous remark.
>> > > >> >>> > >
>> > > >> >>> > > I don't think introspection is a good solution, hence you
>> > > >> >>> > > will
>> > > need
>> > > >> to
>> > > >> >>> > > > change how the sca reads the info about each service and
>> > also
>> > > >> >>> services
>> > > >> >>> > > > implemented for JVM would need to be adapted to run on
>> > > Android.
>> > > >> >>> Let's
>> > > >> >>> > > avoid
>> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>> > > >> retrotranslator
>> > > >> >>> in
>> > > >> >>> > > > mind
>> > > >> >>> > > > as a temporary workaround for annotations till next SDK
>> > > release
>> > > >> :S
>> > > >> >>> > >
>> > > >> >>> > >
>> > > >> >>> > > >  Also, if you get the retrotranslator working, forget the
>> > > >> Luciano's
>> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
>> > > >> >>> > > > time
>> > ;
>> > > )
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in the
>> > right
>> > > >> >>> > direction
>> > > >> >>> > > :-)
>> > > >> >>> > >
>> > > >> >>> > > Now, a summary of what I've done up to now:
>> > > >> >>> > >
>> > > >> >>> > > Per the reply I received on the Android Developers list [3]
>> > > >> >>> > > I
>> > > >> started
>> > > >> >>> > using
>> > > >> >>> > > retrotranslator on JAR's instead of class files. For this I
>> > > created
>> > > >> a
>> > > >> >>> big
>> > > >> >>> > > JAR file with all the Tuscany modules (including those you
>> > > modified
>> > > >> >>> for
>> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
>> > > >> retrotranslator
>> > > >> >>> > [4].
>> > > >> >>> > > Then I created a new workspace with only calculator-android
>> > and
>> > > >> >>> > > android-jdk-classes as projects and added the translated
>> > > >> >>> > > JAR
>> > as
>> > > an
>> > > >> >>> > external
>> > > >> >>> > > library for both projects. This resulted in errors [4] from
>> > the
>> > > >> >>> Android
>> > > >> >>> > > build process.
>> > > >> >>> > >
>> > > >> >>> > > To work around these errors I decided to take a different
>> > > approach
>> > > >> and
>> > > >> >>> > copy
>> > > >> >>> > > all the jar files contained in the individual modules to a
>> > > separate
>> > > >> >>> > folder
>> > > >> >>> > > and then run retrotranslator on each JAR. The jars are
>> > > >> >>> > > found
>> > > inside
>> > > >> >>> the
>> > > >> >>> > > target folder of each module and are named as shown below:
>> > > >> >>> > >
>> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> > > >> >>> > >
>> > > >> >>> > > From this I found that only the SCA modules have these JAR
>> > files
>> > > >> >>> inside
>> > > >> >>> > > their respective target folders, whereas the Android
>> > > >> >>> > > modules I
>> > > >> >>> downloaded
>> > > >> >>> > > from [1] don't have these files at all. So I decided to
>> > > >> >>> > > keep
>> > the
>> > > >> >>> Android
>> > > >> >>> > > modules [2] and add the translated JARs as libraries where
>> > > needed
>> > > >> to
>> > > >> >>> have
>> > > >> >>> > > the workspace build with no problems. If I get this running
>> > > >> >>> > > I
>> > > would
>> > > >> >>> look
>> > > >> >>> > > into creating JAR files from the Android modules and then
>> > return
>> > > to
>> > > >> >>> only
>> > > >> >>> > > having calculator-android and android-jdk-classes as
>> > > >> >>> > > projects
>> > > and
>> > > >> the
>> > > >> >>> > rest
>> > > >> >>> > > as JAR's added as external libraries. If this works out I
>> > could
>> > > >> then
>> > > >> >>> look
>> > > >> >>> > > into seeing which JAR's are important and which are not, in
>> > this
>> > > >> way
>> > > >> >>> > > reducing the total memory footprint and coming up with a
>> > > >> "lightweight
>> > > >> >>> > > mobile
>> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on
>> > > >> >>> > > these
>> > > >> efforts.
>> > > >> >>> > >
>> > > >> >>> > >
>> > > >> >>> > > [1]
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>> > > >> >>> > > [3]
>> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> > > >> >>> > > [4]
>> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>> > > >> >>> > >
>> > > >> >>> > >
>> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>> > > >> >>> > > adrianocrestani@apache.org>
>> > > >> >>> > > wrote:
>> > > >> >>> > >
>> > > >> >>> > > > Hi Oscar,
>> > > >> >>> > > >
>> > > >> >>> > > >
>> > > >> >>> > > > When I imported the projects from [3] the following
>> > > >> >>> > > > projects
>> > > were
>> > > >> >>> not
>> > > >> >>> > > > imported:
>> > > >> >>> > > >
>> > > >> >>> > > > core-android
>> > > >> >>> > > > host-android
>> > > >> >>> > > > extensibility
>> > > >> >>> > > >
>> > > >> >>> > > > Is this normal? Should they be imported?
>> > > >> >>> > > >
>> > > >> >>> > > > Yep, they should be imported, if you check inside its
>> > folders,
>> > > >> there
>> > > >> >>> > are
>> > > >> >>> > > > the
>> > > >> >>> > > > eclipse project files, so they should be identified by
>> > > >> >>> > > > the
>> > > >> eclipse
>> > > >> >>> > import
>> > > >> >>> > > > tool as an eclipse project.
>> > > >> >>> > > >
>> > > >> >>> > > > Thanks for the detailed explanation. I'm going to give
>> > > >> >>> > > > this
>> > a
>> > > try
>> > > >> as
>> > > >> >>> I
>> > > >> >>> > > > found
>> > > >> >>> > > > an introspection related comment [2] as a workaround to
>> > > another
>> > > >> >>> > > annotations
>> > > >> >>> > > > problem with the current SDK.
>> > > >> >>> > > >
>> > > >> >>> > > > I don't think introspection is a good solution, hence you
>> > will
>> > > >> need
>> > > >> >>> to
>> > > >> >>> > > > change how the sca reads the info about each service and
>> > also
>> > > >> >>> services
>> > > >> >>> > > > implemented for JVM would need to be adapted to run on
>> > > Android.
>> > > >> >>> Let's
>> > > >> >>> > > avoid
>> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
>> > > >> retrotranslator
>> > > >> >>> in
>> > > >> >>> > > > mind
>> > > >> >>> > > > as a temporary workaround for annotations till next SDK
>> > > release
>> > > >> :S
>> > > >> >>> > > >
>> > > >> >>> > > > Also, if you get the retrotranslator working, forget the
>> > > >> Luciano's
>> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
>> > > >> >>> > > > time
>> > ;
>> > > )
>> > > >> >>> > > >
>> > > >> >>> > > > Any progress testing retrotranslator on a simpler
>> > > >> >>> > > > scenario,
>> > > just
>> > > >> let
>> > > >> >>> us
>> > > >> >>> > > > know
>> > > >> >>> > > > ; )
>> > > >> >>> > > >
>> > > >> >>> > > > Kind Regards,
>> > > >> >>> > > > Adriano Crestani
>> > > >> >>> > > >
>> > > >> >>> > > >
>> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >> >>> > > >
>> > > >> >>> > > > > Hi Adriano,
>> > > >> >>> > > > >
>> > > >> >>> > > > > At first, build a simple, but equivalent scenario, and
>> > test
>> > > it.
>> > > >> >>> > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > > > I think this is a great idea, especially because I
>> > > >> >>> > > > > found
>> > > that
>> > > >> the
>> > > >> >>> > > "native
>> > > >> >>> > > > > method not implemented" errors I'm getting [1] are
>> > > >> >>> > > > > still
>> > > >> related
>> > > >> >>> to
>> > > >> >>> > the
>> > > >> >>> > > > > annotations problem. I'm getting the same errors when
>> > > >> converting
>> > > >> >>> the
>> > > >> >>> > > code
>> > > >> >>> > > > > to
>> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator is
>> > > actually
>> > > >> not
>> > > >> >>> > > > working.
>> > > >> >>> > > > > Hopefully, testing with a simpler scenario will help me
>> > > >> >>> > > > > to
>> > > >> >>> understand
>> > > >> >>> > > the
>> > > >> >>> > > > > problem better.
>> > > >> >>> > > > >
>> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant you
>> > > >> >>> > > > > to
>> > > do:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Search in every sca code for the usage of
>> > > >> >>> Class.isAnnotationPresent
>> > > >> >>> > > or
>> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
>> > for
>> > > a
>> > > >> the
>> > > >> >>> > > > > @Remotable
>> > > >> >>> > > > > > annotations force it to true, for example:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
>> > > >> >>> > > > > >>
>> > > >> >>> > > > > >> (Remotable.class); =>
>> > > >> >>> > > > > >> Annotation isRemotable = true;
>> > > >> >>> > > > > >>
>> > > >> >>> > > > > >> otherwise, which means, when it's not checking for
>> > > >> >>> > > > > >> the
>> > > >> >>> @Remotable
>> > > >> >>> > > > > >> annnotation, force to false. For example:
>> > > >> >>> > > > > >>
>> > > >> >>> > > > > >> Annotation isReference =
>> > > >> >>> > class.isAnnotationPresent(Reference.class);
>> > > >> >>> > > > =>
>> > > >> >>> > > > > >> Annotation isReference = false;
>> > > >> >>> > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to give
>> > this
>> > > a
>> > > >> try
>> > > >> >>> as
>> > > >> >>> > I
>> > > >> >>> > > > > found
>> > > >> >>> > > > > an introspection related comment [2] as a workaround to
>> > > another
>> > > >> >>> > > > annotations
>> > > >> >>> > > > > problem with the current SDK.
>> > > >> >>> > > > >
>> > > >> >>> > > > > Also, I have another question for you...
>> > > >> >>> > > > >
>> > > >> >>> > > > > When I imported the projects from [3] the following
>> > projects
>> > > >> were
>> > > >> >>> not
>> > > >> >>> > > > > imported:
>> > > >> >>> > > > >
>> > > >> >>> > > > > core-android
>> > > >> >>> > > > > host-android
>> > > >> >>> > > > > extensibility
>> > > >> >>> > > > >
>> > > >> >>> > > > > Is this normal? Should they be imported?
>> > > >> >>> > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > > > [1]
>> > > >> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > >> >>> > > > > [2]
>> > > >> >>> > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>> > > >> >>> > > > > [3]
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > >> >>> > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>> > > >> >>> > > > > adrianocrestani@apache.org>
>> > > >> >>> > > > > wrote:
>> > > >> >>> > > > >
>> > > >> >>> > > > > > Well detailed Oscar ; )
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > It is one thing I learnt after playing hours with
>> > Android,
>> > > >> you
>> > > >> >>> need
>> > > >> >>> > > to
>> > > >> >>> > > > > > rebuild every modified project which is imported in
>> > > >> >>> > > > > > the
>> > > >> android
>> > > >> >>> > > > project,
>> > > >> >>> > > > > > the
>> > > >> >>> > > > > > android project itself does not check for
>> > > >> >>> > > > > > modifications
>> > on
>> > > >> its
>> > > >> >>> > > > > dependencies
>> > > >> >>> > > > > > :S...so, when you rebuilt the imported project it
>> > > recompiled
>> > > >> the
>> > > >> >>> > > > > > uncommented
>> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA
>> > > >> >>> > > > > > started
>> > to
>> > > >> check
>> > > >> >>> for
>> > > >> >>> > > > > > annotations once again, so you got the errors on [1],
>> > > which
>> > > >> >>> means
>> > > >> >>> > > > > > retrotranslator is still not working. Have you tested
>> > > >> >>> > > > > > it
>> > > on a
>> > > >> >>> > simpler
>> > > >> >>> > > > > > application as I previously suggested? Did it work?
>> > > >> >>> > > > > > What
>> > > was
>> > > >> the
>> > > >> >>> > most
>> > > >> >>> > > > > > critical scenario you tested it and it worked?
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> > > >> /../workspace
>> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > You should also check if it's is working as expected,
>> > > >> >>> > > > > > as
>> > I
>> > > >> >>> already
>> > > >> >>> > > > said,
>> > > >> >>> > > > > > does not go directly testing complex solutions on
>> > complex
>> > > >> things
>> > > >> >>> > like
>> > > >> >>> > > > > SCA.
>> > > >> >>> > > > > > At first, build a simple, but equivalent scenario,
>> > > >> >>> > > > > > and
>> > > test
>> > > >> it.
>> > > >> >>> For
>> > > >> >>> > > > > > example,
>> > > >> >>> > > > > > a simple android app project that uses an java
>> > > >> >>> > > > > > library
>> > > >> project
>> > > >> >>> > which
>> > > >> >>> > > > > access
>> > > >> >>> > > > > > annotations on classes placed on the android project.
>> > Like
>> > > >> our
>> > > >> >>> > > android
>> > > >> >>> > > > > > calculator, it's an android app project
>> > > (calculator-android)
>> > > >> >>> which
>> > > >> >>> > > uses
>> > > >> >>> > > > > > java
>> > > >> >>> > > > > > library projects (sca modules), and these libraries
>> > checks
>> > > >> for
>> > > >> >>> > > > > annotations
>> > > >> >>> > > > > > on classes located at the android app project
>> > > >> >>> > > (CalculatorService.java,
>> > > >> >>> > > > > > AddService.java, etc). When you get it working on the
>> > > simpler
>> > > >> >>> > > scenario,
>> > > >> >>> > > > > > then
>> > > >> >>> > > > > > you are ready to test it on the complexer sceneario
>> > > >> >>> > > > (calculator-android).
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Please, if you get the retrotranslator working in the
>> > > simpler
>> > > >> >>> > > scenario,
>> > > >> >>> > > > > > send
>> > > >> >>> > > > > > us a patch with it. You can create a JIRA and attach
>> > > >> >>> > > > > > it.
>> > > If
>> > > >> you
>> > > >> >>> > need
>> > > >> >>> > > > any
>> > > >> >>> > > > > > help, just ask ; )
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > "code that checks for @Remotable you force to true,
>> > > otherwise
>> > > >> >>> force
>> > > >> >>> > > to
>> > > >> >>> > > > > > false."
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I meant
>> > > >> >>> > > > > > you
>> > to
>> > > do:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Search in every sca code for the usage of
>> > > >> >>> Class.isAnnotationPresent
>> > > >> >>> > > or
>> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
>> > for
>> > > a
>> > > >> the
>> > > >> >>> > > > > @Remotable
>> > > >> >>> > > > > > annotations force it to true, for example:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Annotation isRemotable =
>> > > >> >>> > class.isAnnotationPresent(Remotable.class);
>> > > >> >>> > > =>
>> > > >> >>> > > > > > Annotation isRemotable = true;
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > otherwise, which means, when it's not checking for
>> > > >> >>> > > > > > the
>> > > >> >>> @Remotable
>> > > >> >>> > > > > > annnotation, force to false. For example:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Annotation isReference =
>> > > >> >>> > class.isAnnotationPresent(Reference.class);
>> > > >> >>> > > =>
>> > > >> >>> > > > > > Annotation isReference = false;
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > [1] -
>> > > >> >>> > >
>> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > Kind Regards,
>> > > >> >>> > > > > > Adriano Crestani
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >> >>> > > > > >
>> > > >> >>> > > > > > > Hi Adriano,
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > I continued testing retrotranslator. Here's what
>> > > >> >>> > > > > > > I've
>> > > done
>> > > >> up
>> > > >> >>> to
>> > > >> >>> > > now.
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as
>> > > shown
>> > > >> >>> below:
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > svn checkout --revision 643746
>> > > >> >>> > > > > > >
>> > > >> >>> > >
>> > > >> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > cd modules
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > mvn clean install -Dtest=no
>> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
>> > M2_REPO
>> > > >> >>> variable
>> > > >> >>> > as
>> > > >> >>> > > > > shown
>> > > >> >>> > > > > > > below:
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>> > > >> >>> > eclipse:add-maven-repo
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors,
>> > added
>> > > >> >>> Android
>> > > >> >>> > > > library
>> > > >> >>> > > > > > to
>> > > >> >>> > > > > > > required modules, fixed references to jar files and
>> > > other
>> > > >> >>> > > libraries.
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > 5. Uncommented lines in
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the project
>> > site
>> > > >> [3]
>> > > >> >>> and
>> > > >> >>> > > > shown
>> > > >> >>> > > > > > > below:
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> > > >> >>> /../workspace
>> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >  The output can be found in [4].
>> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > and then re-ran retrotranslator.
>> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5]
>> > > >> >>> > > > > > > and
>> > > >> Android
>> > > >> >>> > > errors
>> > > >> >>> > > > in
>> > > >> >>> > > > > > > [6].
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > As always, I'm documenting my progress on the
>> > > >> >>> > > > > > > project
>> > > log.
>> > > >> I
>> > > >> >>> > > haven't
>> > > >> >>> > > > > > fully
>> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
>> > > >> >>> > > > > > > puzzled
>> > by
>> > > >> what
>> > > >> >>> you
>> > > >> >>> > > > mean
>> > > >> >>> > > > > by
>> > > >> >>> > > > > > > this:
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > "code that checks for @Remotable you force to true,
>> > > >> otherwise
>> > > >> >>> > force
>> > > >> >>> > > > to
>> > > >> >>> > > > > > > false."
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > I'll continue looking into it and hopefully get
>> > > >> >>> retrotranslator
>> > > >> >>> > to
>> > > >> >>> > > > > work.
>> > > >> >>> > > > > > I
>> > > >> >>> > > > > > > also think it's a simpler option.
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > [1]
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > [2]
>> > > >> >>> > > > >
>> > > >> >>>
>> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > [4]
>> > > >> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > [5]
>> > > >> >>> > >
>> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > >> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
>> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > > > > Hi,
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > I tried what Luciano suggested. It really works.
>> > > >> >>> > > > > > > > To
>> > > get
>> > > >> it
>> > > >> >>> > > working
>> > > >> >>> > > > > you
>> > > >> >>> > > > > > > > simply need to search on all modules where the
>> > > >> >>> > > > > > > > code
>> > > >> checks
>> > > >> >>> for
>> > > >> >>> > > > > > @Remotable
>> > > >> >>> > > > > > > > annotation and force it to true:
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"
>> > > >> >>> > > > > > > > =>
>> > > true
>> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" =>
>> > > >> >>> > > > > > > > true
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > It works fine on the sca revision we are testing
>> > > >> >>> > > > > > > > on
>> > > >> Android
>> > > >> >>> and
>> > > >> >>> > > the
>> > > >> >>> > > > > > most
>> > > >> >>> > > > > > > > recent revision. I only tested it as a java
>> > > application,
>> > > >> not
>> > > >> >>> as
>> > > >> >>> > > an
>> > > >> >>> > > > > > > android
>> > > >> >>> > > > > > > > application.
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is
>> > > >> >>> > > > > > > > a
>> > > faster
>> > > >> >>> and
>> > > >> >>> > > > simpler
>> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion only
>> > forces
>> > > >> the
>> > > >> >>> SCA
>> > > >> >>> > to
>> > > >> >>> > > > > > > recognize
>> > > >> >>> > > > > > > > the services with no annotations declared on
>> > > >> >>> > > > > > > > their
>> > > >> >>> interfaces,
>> > > >> >>> > > but
>> > > >> >>> > > > it
>> > > >> >>> > > > > > > does
>> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when the
>> > > >> >>> > > > > > > > SCA
>> > > >> invokes
>> > > >> >>> > > > methods
>> > > >> >>> > > > > > that
>> > > >> >>> > > > > > > > read annotations. So, our current problem is that
>> > > >> >>> > > > > > > > we
>> > > are
>> > > >> not
>> > > >> >>> > > being
>> > > >> >>> > > > > able
>> > > >> >>> > > > > > > to
>> > > >> >>> > > > > > > > use these methods and not only because we are not
>> > > being
>> > > >> able
>> > > >> >>> to
>> > > >> >>> > > > read
>> > > >> >>> > > > > > the
>> > > >> >>> > > > > > > > annotations.
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
>> > > >> >>> > > > > > > > suggestion,
>> > > you
>> > > >> will
>> > > >> >>> > need
>> > > >> >>> > > > to
>> > > >> >>> > > > > > > > comment/adapt every sca code that tries to read
>> > > >> >>> > > > > > > > the
>> > > class
>> > > >> >>> > > > > annotations.
>> > > >> >>> > > > > > It
>> > > >> >>> > > > > > > > is
>> > > >> >>> > > > > > > > not necessary to comment/adapt the methods that
>> > > >> >>> > > > > > > > read
>> > > >> Method
>> > > >> >>> > > > > > annotations,
>> > > >> >>> > > > > > > > they are not throwning any exception. So, every
>> > > >> >>> > > > > > > > code
>> > > that
>> > > >> >>> > checks
>> > > >> >>> > > > for
>> > > >> >>> > > > > > > > @Remotable you force to true, otherwise force to
>> > > false.
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > Any doubt about what I have said, just let me
>> > > >> >>> > > > > > > > know ;
>> > )
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > Suggestions are welcome : )
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > Adriano Crestani
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende
>> > > >> >>> > > > > > > > <
>> > > >> >>> > > > > > luckbr1975@gmail.com>
>> > > >> >>> > > > > > > > wrote:
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > > > > FYI, if you comment out the code that checks if
>> > > >> >>> > > > > > > > > a
>> > > >> >>> interface
>> > > >> >>> > is
>> > > >> >>> > > > > > > > > remoteble, you could have a version of the
>> > > calculator
>> > > >> >>> without
>> > > >> >>> > > any
>> > > >> >>> > > > > > > > > annotations, and the runtime would introspect
>> > > >> >>> > > > > > > > > the
>> > > >> >>> references
>> > > >> >>> > > for
>> > > >> >>> > > > > the
>> > > >> >>> > > > > > > > > multiple services. But note that, the
>> > introspection
>> > > >> code
>> > > >> >>> will
>> > > >> >>> > > > only
>> > > >> >>> > > > > be
>> > > >> >>> > > > > > > > > activated if there is no SCA annotations on the
>> > > class.
>> > > >> >>> > > > > > > > >
>> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
>> > > >> >>> > > > > > > > > Crestani
>> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
>> > > >> >>> > > > > > > > > > Ah, the expected exception should look like
>> > > >> >>> > > > > > > > > > this
>> > > on
>> > > >> >>> android
>> > > >> >>> > > > > > emulator:
>> > > >> >>> > > > > > > > > >
>> > > >> >>> > >
>> >
>> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>>
>> > > >> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> > >
>> > > >> >>> > <
>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> > > >
>> > > >> >>> > > <
>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>> > > > <
>> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>> > > > > <
>> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> > > >> >>> >
>> > > >> >>> > > > > > <
>> > > >> >>>
>> > > >> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>> > > > > > > <
>> > > >> >>> >
>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>> > > > > > > > <
>> > > >> >>> > >
>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > >> >>> > > > > > > > > >
>> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
>> > Crestani
>> > > <
>> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>> > > >> >>> > > > > > > > > >
>> > > >> >>> > > > > > > > > >> Hi Oscar,
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> I was indeed using the sca modules not from
>> > > >> >>> > > > > > > > > >> the
>> > > >> >>> sandbox.
>> > > >> >>> > As
>> > > >> >>> > > > you
>> > > >> >>> > > > > > > > > suggested,
>> > > >> >>> > > > > > > > > >> I
>> > > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl from
>> > > >> >>> > > > > > > > > >> my
>> > > >> workspace
>> > > >> >>> > and
>> > > >> >>> > > > > added
>> > > >> >>> > > > > > > the
>> > > >> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
>> > > >> >>> uncommented
>> > > >> >>> > the
>> > > >> >>> > > > > lines
>> > > >> >>> > > > > > > in
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > >
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> following the comments pointing out why
>> > > >> >>> > > > > > > > > >> those
>> > > lines
>> > > >> had
>> > > >> >>> > been
>> > > >> >>> > > > > > > > commented.
>> > > >> >>> > > > > > > > > I'm
>> > > >> >>> > > > > > > > > >> no longer getting the
>> > > >> >>> > > > > > > > > >> ClassNotFoundException.
>> > > >> However,
>> > > >> >>> > it's
>> > > >> >>> > > > > > getting
>> > > >> >>> > > > > > > > > stuck
>> > > >> >>> > > > > > > > > >> somewhere else (before getting there I
>> > guess)...I
>> > > >> think
>> > > >> >>> > this
>> > > >> >>> > > > is
>> > > >> >>> > > > > > the
>> > > >> >>> > > > > > > > case
>> > > >> >>> > > > > > > > > >> because before and after commenting the code
>> > > >> >>> > > > > > > > > >> I
>> > > get
>> > > >> the
>> > > >> >>> > same
>> > > >> >>> > > > > error
>> > > >> >>> > > > > > in
>> > > >> >>> > > > > > > > the
>> > > >> >>> > > > > > > > > >> Android emulator, an InstantiationException
>> > [1].
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> Have you debugged to check exactly where
>> > > >> >>> > > > > > > > > >> this
>> > > >> exception
>> > > >> >>> is
>> > > >> >>> > > > being
>> > > >> >>> > > > > > > > thrown?
>> > > >> >>> > > > > > > > > I
>> > > >> >>> > > > > > > > > >> have done the procedure I previously
>> > > >> >>> > > > > > > > > >> described
>> > > >>  again
>> > > >> >>> and
>> > > >> >>> > I
>> > > >> >>> > > > got
>> > > >> >>> > > > > it
>> > > >> >>> > > > > > > > > "running"
>> > > >> >>> > > > > > > > > >> as expected, which means, running till the
>> > > expected
>> > > >> >>> > > exception
>> > > >> >>> > > > is
>> > > >> >>> > > > > > > > thrown.
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> I also started tinkering with
>> > > >> >>> > > > > > > > > >> retrotranslator.
>> > > First
>> > > >> I
>> > > >> >>> > tried
>> > > >> >>> > > > > doing
>> > > >> >>> > > > > > > it
>> > > >> >>> > > > > > > > > with
>> > > >> >>> > > > > > > > > >> Ant, but it seems that in order to build I
>> > > >> >>> > > > > > > > > >> have
>> > > to
>> > > >> >>> include
>> > > >> >>> > > the
>> > > >> >>> > > > > > whole
>> > > >> >>> > > > > > > > > >> tuscany
>> > > >> >>> > > > > > > > > >> projects in a way similar to how I now have
>> > > >> >>> > > > > > > > > >> in
>> > > >> Eclipse.
>> > > >> >>> I
>> > > >> >>> > > also
>> > > >> >>> > > > > > tried
>> > > >> >>> > > > > > > > > making
>> > > >> >>> > > > > > > > > >> a jar out of
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > >
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> and then feeding it to retrotranslator but
>> > > >> >>> unfortunately
>> > > >> >>> > > it's
>> > > >> >>> > > > > not
>> > > >> >>> > > > > > > > > >> translating anything, as shown below.
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
>> > > >> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
>> > > >> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar
>> > > >> >>> > > > > > > > > >> -srcjar
>> > > >> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
>> > > >> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot
>> > > -classpath
>> > > >> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
>> > > >> >>> > > > > > > > > >> Processing 136 file(s) in
>> > > >> >>> JavaRuntimeModuleActivator.jar.
>> > > >> >>> > > > > > > > > >> Transformed 0 file(s).
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> There's also a maven plugin, so I might try
>> > > >> that...but
>> > > >> >>> > first
>> > > >> >>> > > > > I'll
>> > > >> >>> > > > > > > give
>> > > >> >>> > > > > > > > > Ant
>> > > >> >>> > > > > > > > > >> another go. Hopefully Google will release a
>> > > >> >>> > > > > > > > > >> new
>> > > SDK
>> > > >> >>> soon,
>> > > >> >>> > > > > > otherwise
>> > > >> >>> > > > > > > as
>> > > >> >>> > > > > > > > > you
>> > > >> >>> > > > > > > > > >> say...retrotranslator will have to be the
>> > > workaround
>> > > >> to
>> > > >> >>> > > > proceed
>> > > >> >>> > > > > > with
>> > > >> >>> > > > > > > > our
>> > > >> >>> > > > > > > > > >> project ;-)
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK
>> > version
>> > > >> will
>> > > >> >>> not
>> > > >> >>> > be
>> > > >> >>> > > > > > > released
>> > > >> >>> > > > > > > > > until
>> > > >> >>> > > > > > > > > >> july 28th :S. So, it's really good you have
>> > > already
>> > > >> >>> > started
>> > > >> >>> > > > > > working
>> > > >> >>> > > > > > > on
>> > > >> >>> > > > > > > > > the
>> > > >> >>> > > > > > > > > >> retrotranslator, it will probably be the
>> > > >> >>> > > > > > > > > >> best
>> > > >> >>> workaround
>> > > >> >>> > for
>> > > >> >>> > > > the
>> > > >> >>> > > > > > > > > annotations
>> > > >> >>> > > > > > > > > >> problem till the next SDK release.
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> I suggest you to forget about the build
>> > > >> >>> > > > > > > > > >> process
>> > > >> right
>> > > >> >>> now,
>> > > >> >>> > > > > before,
>> > > >> >>> > > > > > > > check
>> > > >> >>> > > > > > > > > if
>> > > >> >>> > > > > > > > > >> this retrotranslator works and if it really
>> > works
>> > > on
>> > > >> >>> > android
>> > > >> >>> > > > > > > platform.
>> > > >> >>> > > > > > > > > I´m
>> > > >> >>> > > > > > > > > >> really getting upset with Android, even its
>> > > >> >>> > > > > > > > > >> API
>> > > >> methods
>> > > >> >>> > does
>> > > >> >>> > > > not
>> > > >> >>> > > > > > > work
>> > > >> >>> > > > > > > > as
>> > > >> >>> > > > > > > > > >> expected :@. Anyway, try initially to
>> > > >> >>> > > > > > > > > >> compile a
>> > > >> simple
>> > > >> >>> > class
>> > > >> >>> > > > > > (coded
>> > > >> >>> > > > > > > by
>> > > >> >>> > > > > > > > > you),
>> > > >> >>> > > > > > > > > >> which contains annotations, and access these
>> > > >> >>> annotations.
>> > > >> >>> > If
>> > > >> >>> > > > it
>> > > >> >>> > > > > > > works,
>> > > >> >>> > > > > > > > > make
>> > > >> >>> > > > > > > > > >> it more complex and test again, do it until
>> > > >> >>> > > > > > > > > >> you
>> > > >> reach a
>> > > >> >>> > > > scenario
>> > > >> >>> > > > > > as
>> > > >> >>> > > > > > > > > complex
>> > > >> >>> > > > > > > > > >> as the SCA (a lot of external jars with
>> > annotated
>> > > >> >>> classes
>> > > >> >>> > > > > accessed
>> > > >> >>> > > > > > > by
>> > > >> >>> > > > > > > > > the
>> > > >> >>> > > > > > > > > >> other external jars and the Android app).
>> > > >> >>> > > > > > > > > >> Got
>> > it?
>> > > :
>> > > >> )
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> Regards,
>> > > >> >>> > > > > > > > > >> Adriano Crestani
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar
>> > Castaneda
>> > > <
>> > > >> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >> >>> > > > > > > > > >>
>> > > >> >>> > > > > > > > > >>> Hi Adriano,
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>> I was indeed using the sca modules not from
>> > the
>> > > >> >>> sandbox.
>> > > >> >>> > As
>> > > >> >>> > > > you
>> > > >> >>> > > > > > > > > suggested,
>> > > >> >>> > > > > > > > > >>> I
>> > > >> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from
>> > > >> >>> > > > > > > > > >>> my
>> > > >> >>> workspace
>> > > >> >>> > and
>> > > >> >>> > > > > added
>> > > >> >>> > > > > > > the
>> > > >> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then,
>> > > >> >>> > > > > > > > > >>> I
>> > > >> >>> uncommented
>> > > >> >>> > > the
>> > > >> >>> > > > > > lines
>> > > >> >>> > > > > > > in
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > >
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>> following the comments pointing out why
>> > > >> >>> > > > > > > > > >>> those
>> > > lines
>> > > >> >>> had
>> > > >> >>> > > been
>> > > >> >>> > > > > > > > commented.
>> > > >> >>> > > > > > > > > >>> I'm
>> > > >> >>> > > > > > > > > >>> no longer getting the
>> > > >> >>> > > > > > > > > >>> ClassNotFoundException.
>> > > >> However,
>> > > >> >>> > it's
>> > > >> >>> > > > > > getting
>> > > >> >>> > > > > > > > > stuck
>> > > >> >>> > > > > > > > > >>> somewhere else (before getting there I
>> > > guess)...I
>> > > >> >>> think
>> > > >> >>> > > this
>> > > >> >>> > > > is
>> > > >> >>> > > > > > the
>> > > >> >>> > > > > > > > > case
>> > > >> >>> > > > > > > > > >>> because before and after commenting the
>> > > >> >>> > > > > > > > > >>> code I
>> > > get
>> > > >> the
>> > > >> >>> > same
>> > > >> >>> > > > > error
>> > > >> >>> > > > > > > in
>> > > >> >>> > > > > > > > > the
>> > > >> >>> > > > > > > > > >>> Android emulator, an InstantiationException
>> > [1].
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>> I also started tinkering with
>> > > >> >>> > > > > > > > > >>> retrotranslator.
>> > > >> First I
>> > > >> >>> > > tried
>> > > >> >>> > > > > > doing
>> > > >> >>> > > > > > > it
>> > > >> >>> > > > > > > > > with
>> > > >> >>> > > > > > > > > >>> Ant, but it seems that in order to build I
>> > have
>> > > to
>> > > >> >>> > include
>> > > >> >>> > > > the
>> > > >> >>> > > > > > > whole
>> > > >> >>> > > > > > > > > >>> tuscany
>> > > >> >>> > > > > > > > > >>> projects in a way similar to how I now have
>> > > >> >>> > > > > > > > > >>> in
>> > > >> >>> Eclipse. I
>> > > >> >>> > > > also
>> > > >> >>> > > > > > > tried
>> > > >> >>> > > > > > > > > >>> making
>> > > >> >>> > > > > > > > > >>> a jar out of
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > >
>> > > >> >>> > > > > > > >
>> > > >> >>> > > > > > >
>> > > >> >>> > > > > >
>> > > >> >>> > > > >
>> > > >> >>> > > >
>> > > >> >>> > >
>> > > >> >>> >
>> > > >> >>>
>> > > >>
>> > >
>> >
>> > org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > >> >>> > > > > > > > > >>>
>> > > >> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
>> > > >> >>> unfortunately
>> > > >> >>> > > it's
>> > > >> >>> > > > > not
>> > > >> >>> > > > > > > > > >>> translating anything, as shown
>
> ...
>
> [Message clipped]



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Thanks Adriano. I have been testing the workarounds for RMI and Beans API. I
am also working to integrate retrotranslator into maven.

Today, I tested the newest version of retrotranslator (thanks for the tip).
With this new version RMI related issues are not appearing (not initially,
at least) but instead Beans issues are. I've commented
java.beans.Introspector import and related code from
JavaIntrospectionHelper.java and now get other errors [1] related to
javax.jws.WebService. Suggestions are welcome and appreciated.

I've noted down these issues on the porting limitations page [2], which I
have updated with the current progress.

[1]
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/7Jul2008+-+Error+Stack+trace
[2]
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform

On Fri, Jun 27, 2008 at 2:12 AM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> I added to the wiki a page [1] about all the issues we have found so far
> when trying to port the SCA Java to the Android platform.
>
> [1] -
>
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform
>
> On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
> > Hi Luciano,
> >
> > Thanks for the tip. Before testing it I generated a JIRA ticket [1] for
> the
> > Retrotranslator progress, and when I got around to testing I noticed a
> > different ClassNotFoundException. This time its for
> > java.beans.Introspector.  I made sure to include this in the JIRA ticket
> > and
> > posted the stack trace from Eclipse [2]. Suggestions are welcome.
> >
> > [1] https://issues.apache.org/jira/browse/TUSCANY-2440
> > [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
> >
> > On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> > > Removing RMI should be as simple as removing the tuscany-binding-rmi
> > > dependency from host-android.
> > >
> > > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
> > > <os...@gmail.com> wrote:
> > > > Hi Luciano,
> > > >
> > > > It's going better after the progress last week with retrotranslator.
> > I'm
> > > now
> > > > able to translate the SCA classes and run calculator-android without
> > > getting
> > > > Annotation related issues. The problems now are related to RMI. In
> > > relation
> > > > to this, and from your comment about blocking issues, I created a
> child
> > > page
> > > > [1] in the project wiki for Blocking issues. Currently, the page
> lists
> > > the
> > > > RMI issue and suggested workarounds.
> > > >
> > > > I think your suggestion about integration with maven is really good.
> > > > Especially because there is a retrotranslator plugin for maven. I'll
> > > start
> > > > looking into using this plugin. I also agree about reviewing the
> scope
> > of
> > > > support. Right now, I see a need to reduce the dependency on RMI,
> > either
> > > by
> > > > commenting all the code that uses the RMI API, or by following the
> > > > suggestions from Taras [3] to either replace java.rmi.Remote with
> > > > java.lang.Cloneable (as the result of using a retrotranslator option)
> > or
> > > > taking the RMI source from Apache Harmony and putting it in a
> > > > retrotranslated JAR. What would you recommend? Hopefully after the
> > > > dependency reduction Android will be able to run calculator-android.
> > > Based
> > > > on the results of this experiment we can better consider the
> reduction
> > of
> > > > component types and bindings. Please let me know your thoughts on
> this
> > > idea.
> > > >
> > > > [1]
> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
> > > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
> > > > [3]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
> > > >
> > > >
> > > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
> > luckbr1975@gmail.com>
> > > > wrote:
> > > >
> > > >> How is it going here ? I just want to check if there is any blocking
> > > >> issues with Android at the moment, if so, is there a list of these
> > > >> issues somewhere ?
> > > >>
> > > >> Also, some general suggestions/recommendations.: It would be great
> if
> > > >> we could spend sometime to get the modules well integrated using
> > > >> maven, this way it would be easier for anyone on the community to
> > > >> checkout the trunk + android sandbox and jump on the code to help.
> > > >> Also, we should review the scope of the support we are trying to
> > > >> acomplish, I'd suggest to minimize the number of component types
> > > >> supported (java) and bindings (default sca binding) and then try to
> > > >> run the calculator sample application. Once we have acomplished this
> > > >> first milestone, we could then discuss our next steps.
> > > >>
> > > >> Thoughts ?
> > > >>
> > > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> > > >> <ad...@apache.org> wrote:
> > > >> > Ah, here is a tip to assure the classes are not recompiled again.
> > > Build
> > > >> the
> > > >> > project, then go in each project builder (in the properties
> window)
> > > and
> > > >> > disable all the builders, then not even a clean/build will modify
> > your
> > > >> > project ; )
> > > >> >
> > > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> > > >> adrianocrestani@apache.org>
> > > >> > wrote:
> > > >> >
> > > >> >> Hi Oscar,
> > > >> >>
> > > >> >> I say that it is more difficult to debug because you need attach
> a
> > > >> source
> > > >> >> code to each jar and etc, and when you are using projects,
> eclipse
> > > >> already
> > > >> >> knows where to find the source code : )
> > > >> >>
> > > >> >> The reply made sense to me, especially with regards to the fact
> > that
> > > >> with
> > > >> >> the Android plugin Eclipse compiles sources into classes and then
> > > into
> > > >> dex
> > > >> >> files, so retrotranslator has no chance to translate classes in
> > > between
> > > >> >> these steps - even if I do that outside of Eclipse. This shows
> from
> > > the
> > > >> use
> > > >> >> of non-translated binaries (as indicated by the
> > > >> >> java.lang.Class.isAnnotationPr
> > > >> >> esent(Class.java:1131) error in the stack
> > > >> >> trace) that might have been related to the use of pre-existing
> dex
> > > files
> > > >> or
> > > >> >> over-writing of files by Eclipse. So unless I modify the ADT
> plugin
> > > the
> > > >> >> result would still be the same, even if I use a simpler scenario.
> > > >> >>
> > > >> >> Sorry, I really did not comment this email yet. It does not make
> so
> > > much
> > > >> >> sense for me. First, as you already know, eclipse android
> projects
> > > does
> > > >> not
> > > >> >> recognize any modifications in the imported projects, so it does
> > not
> > > >> call
> > > >> >> the build or incremental build even if the imported projects have
> > > their
> > > >> >> source code modified. Just to make sure I tested it again:
> > > >> >>
> > > >> >> 1-  imported in my workspace all the projects included in the
> > > >> >> calculator-android, cleaned and built them...it takes a loooong
> > time,
> > > as
> > > >> you
> > > >> >> already know.
> > > >> >>
> > > >> >> 2- imported the calculator-android project, cleaned and built it
> > > (only
> > > >> the
> > > >> >> calculator-android project), and this process was too much faster
> > > than
> > > >> when
> > > >> >> all the modules are built, so the imported projects were not
> > > recompiled,
> > > >> >> otherwise it would take too much more time. I suppose here that
> the
> > > >> android
> > > >> >> project compiles the .java contained in the android project and
> > > convert
> > > >> all
> > > >> >> the .class files (generated by imported projects and android
> > project)
> > > to
> > > >> dex
> > > >> >> format.
> > > >> >>
> > > >> >> So, it does not recompile the external class files (the ones
> > > contained
> > > >> in
> > > >> >> the imported projects) cause it seems not to check if it was
> > modified
> > > or
> > > >> >> not. Of course, I never tested it modifing the .class files, I'm
> > just
> > > >> >> assuming that, because when you modify .java files it does not
> get
> > > >> >> recompiled.
> > > >> >>
> > > >> >> What do you think?
> > > >> >>
> > > >> >> As I mentioned before, your comments are really helpful as they
> > give
> > > me
> > > >> a
> > > >> >> sense of direction. Please let me know if you still think we
> should
> > > >> pursue
> > > >> >> retrotranslator for files inside a folder.
> > > >> >>
> > > >> >> I really think you should try at first the simpler scenario and
> try
> > > to
> > > >> >> understand how it works and IF it works. Also, you can try what
> you
> > > were
> > > >> >> planning: to retrotranslate the each modules' jar, but I suppose
> > it's
> > > a
> > > >> lot
> > > >> >> of work, because there are so many modules :S. So, as I've
> already
> > > said,
> > > >> if
> > > >> >> you think it's getting to complicated, forget it and go on with
> > > >> Luciano's
> > > >> >> suggestion.
> > > >> >>
> > > >> >> Feel free to choose the direction you want to take, and if there
> is
> > > >> another
> > > >> >> approach you think is better, just let us know ; )...you are the
> > best
> > > >> person
> > > >> >> to choose the directions, cause you are working directly on it,
> we
> > > are
> > > >> just
> > > >> >> guinding/helping you ; )
> > > >> >>
> > > >> >> Thanks,
> > > >> >> Adriano Crestani
> > > >> >>
> > > >> >>
> > > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> > > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>
> > > >> >>> Hi Adriano,
> > > >> >>>
> > > >> >>> If there is an option on retrotranslator to retrotranslate all
> the
> > > >> classes
> > > >> >>> > in a folder, it should work as well as it works on classes
> > inside
> > > >> .jar
> > > >> >>> > files. So, I think you should try to understand why your first
> > > >> approach
> > > >> >>> > (retrotranslating the eclipse project classes) is not working
> > > trying
> > > >> a
> > > >> >>> > simpler scenario. Have you already tried it?
> > > >> >>> >
> > > >> >>>
> > > >> >>> I agree that it's good to try out a simpler scenario to better
> > > >> understand
> > > >> >>> the problem. I haven't tried it yet because using
> retrotranslator
> > > for
> > > >> >>> classes inside a folder doesn't seem to be a solution to the
> > > problem.
> > > >> >>> Here's
> > > >> >>> my reasoning:
> > > >> >>>
> > > >> >>> Yes, there is an option to translate classes in a folder. I
> tried
> > it
> > > >> and
> > > >> >>> it
> > > >> >>> successfully translated the classes inside my Eclipse workspace.
> > > When I
> > > >> >>> ran
> > > >> >>> the calculator-android application using the newly translated
> > > classes I
> > > >> >>> was
> > > >> >>> getting the errors in [1]. I posted a question in Android
> > Developers
> > > >> about
> > > >> >>> this error and received a reply [2].
> > > >> >>>
> > > >> >>> The reply made sense to me, especially with regards to the fact
> > that
> > > >> with
> > > >> >>> the Android plugin Eclipse compiles sources into classes and
> then
> > > into
> > > >> dex
> > > >> >>> files, so retrotranslator has no chance to translate classes in
> > > between
> > > >> >>> these steps - even if I do that outside of Eclipse. This shows
> > from
> > > the
> > > >> >>> use
> > > >> >>> of non-translated binaries (as indicated by the
> > > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in
> the
> > > stack
> > > >> >>> trace) that might have been related to the use of pre-existing
> dex
> > > >> files
> > > >> >>> or
> > > >> >>> over-writing of files by Eclipse. So unless I modify the ADT
> > plugin
> > > the
> > > >> >>> result would still be the same, even if I use a simpler
> scenario.
> > > >> >>>
> > > >> >>> The reply suggested to use JAR's instead. This also made sense
> to
> > me
> > > >> and
> > > >> >>> seemed like a simpler way of solving the problem. I didn't see
> the
> > > >> >>> disadvantage of debugging, which as you point out is more
> > difficult
> > > >> with
> > > >> >>> JAR's instead of Eclipse projects.
> > > >> >>>
> > > >> >>> As I mentioned before, your comments are really helpful as they
> > give
> > > me
> > > >> a
> > > >> >>> sense of direction. Please let me know if you still think we
> > should
> > > >> pursue
> > > >> >>> retrotranslator for files inside a folder.
> > > >> >>>
> > > >> >>>
> > > >> >>> [1]
> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> > > >> >>> [2]
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > > >> >>>
> > > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> > > >> >>> adrianocrestani@apache.org>
> > > >> >>> wrote:
> > > >> >>>
> > > >> >>> > Hi Oscar,
> > > >> >>> >
> > > >> >>> > Yup, you're right - there are indeed Eclipse files inside the
> > > >> folders. I
> > > >> >>> > guess I was confused by the different names in [1] than those
> > that
> > > >> >>> result
> > > >> >>> > [2] from importing to an Eclipse workspace - after which I see
> > 13
> > > >> >>> projects
> > > >> >>> > in both cases. So please ignore my previous remark.
> > > >> >>> >
> > > >> >>> > I have added the projects, but still haven't changed their
> > names.
> > > I
> > > >> was
> > > >> >>> > planning to modify their project names when we get it
> integrated
> > > to
> > > >> SCA,
> > > >> >>> > mainly because we will need to change the poms. Anyway, feel
> > free
> > > to
> > > >> >>> modify
> > > >> >>> > the names whenever you want ; )
> > > >> >>> >
> > > >> >>> >
> > > >> >>> > Per the reply I received on the Android Developers list [3] I
> > > started
> > > >> >>> using
> > > >> >>> > retrotranslator on JAR's instead of class files. For this I
> > > created a
> > > >> >>> big
> > > >> >>> > JAR file with all the Tuscany modules (including those you
> > > modified
> > > >> for
> > > >> >>> > Android). I translated this big JAR (around 15MB) with
> > > >> retrotranslator
> > > >> >>> [4].
> > > >> >>> > Then I created a new workspace with only calculator-android
> and
> > > >> >>> > android-jdk-classes as projects and added the translated JAR
> as
> > an
> > > >> >>> external
> > > >> >>> > library for both projects. This resulted in errors [4] from
> the
> > > >> Android
> > > >> >>> > build process.
> > > >> >>> >
> > > >> >>> > I really do not understand this errors, but as this errors are
> > > only
> > > >> >>> related
> > > >> >>> > to testcase classes they can be ignored (removed from the
> jars).
> > I
> > > >> also
> > > >> >>> did
> > > >> >>> > not understand why it's not find the .apk file:
> > > >> >>> >
> > > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> > > >> >>> > /bin/calculator-android.apk!"
> > > >> >>> >
> > > >> >>> > To work around these errors I decided to take a different
> > approach
> > > >> and
> > > >> >>> copy
> > > >> >>> > all the jar files contained in the individual modules to a
> > > separate
> > > >> >>> folder
> > > >> >>> > and then run retrotranslator on each JAR. The jars are found
> > > inside
> > > >> the
> > > >> >>> > target folder of each module and are named as shown below:
> > > >> >>> >
> > > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> > > >> >>> >
> > > >> >>> > From this I found that only the SCA modules have these JAR
> files
> > > >> inside
> > > >> >>> > their respective target folders, whereas the Android modules I
> > > >> >>> downloaded
> > > >> >>> > from [1] don't have these files at all
> > > >> >>> >
> > > >> >>> > Yep, this .jars are generated when the maven is executed. I'm
> > not
> > > >> sure
> > > >> >>> if
> > > >> >>> > you should use this .jars, because they were compiled with no
> > > >> reference
> > > >> >>> to
> > > >> >>> > Android library. That's also why there are no .jar files for
> > > android
> > > >> >>> > modules, because you did not execute the maven on them  (and
> you
> > > >> >>> > shouldn't).
> > > >> >>> >
> > > >> >>> > So I decided to keep the Android
> > > >> >>> > modules [2] and add the translated JARs as libraries where
> > needed
> > > to
> > > >> >>> have
> > > >> >>> > the workspace build with no problems. If I get this running I
> > > would
> > > >> look
> > > >> >>> > into creating JAR files from the Android modules and then
> return
> > > to
> > > >> only
> > > >> >>> > having calculator-android and android-jdk-classes as projects
> > and
> > > the
> > > >> >>> rest
> > > >> >>> > as JAR's added as external libraries. If this works out I
> could
> > > then
> > > >> >>> look
> > > >> >>> > into seeing which JAR's are important and which are not, in
> this
> > > way
> > > >> >>> > reducing the total memory footprint and coming up with a
> > > "lightweight
> > > >> >>> > mobile
> > > >> >>> > SCA core/runtime." Please let me know your thoughts on these
> > > efforts.
> > > >> >>> >
> > > >> >>> > You haven't tried this yet, right? You may try it, but I do
> not
> > > like
> > > >> >>> this
> > > >> >>> > approach, because it will get difficult to debug sca classes
> as
> > > they
> > > >> are
> > > >> >>> > not
> > > >> >>> > imported as eclipse projects.
> > > >> >>> >
> > > >> >>> > If there is an option on retrotranslator to retrotranslate all
> > the
> > > >> >>> classes
> > > >> >>> > in a folder, it should work as well as it works on classes
> > inside
> > > >> .jar
> > > >> >>> > files. So, I think you should try to understand why your first
> > > >> approach
> > > >> >>> > (retrotranslating the eclipse project classes) is not working
> > > trying
> > > >> a
> > > >> >>> > simpler scenario. Have you already tried it?
> > > >> >>> >
> > > >> >>> > Also, if the restrotranslator gets to complicated, you may try
> > the
> > > >> >>> > Luciano's
> > > >> >>> > suggestion ; )
> > > >> >>> >
> > > >> >>> >
> > > >> >>> > Kind Regards,
> > > >> >>> > Adriano Crestani
> > > >> >>> >
> > > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> > > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>> >
> > > >> >>> > > Hi Adriano,
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > > Yep, they should be imported, if you check inside its
> > folders,
> > > >> there
> > > >> >>> > are
> > > >> >>> > > > the
> > > >> >>> > > > eclipse project files, so they should be identified by the
> > > >> eclipse
> > > >> >>> > import
> > > >> >>> > > > tool as an eclipse project.
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > Yup, you're right - there are indeed Eclipse files inside
> the
> > > >> folders.
> > > >> >>> I
> > > >> >>> > > guess I was confused by the different names in [1] than
> those
> > > that
> > > >> >>> result
> > > >> >>> > > [2] from importing to an Eclipse workspace - after which I
> see
> > > 13
> > > >> >>> > projects
> > > >> >>> > > in both cases. So please ignore my previous remark.
> > > >> >>> > >
> > > >> >>> > > I don't think introspection is a good solution, hence you
> will
> > > need
> > > >> to
> > > >> >>> > > > change how the sca reads the info about each service and
> > also
> > > >> >>> services
> > > >> >>> > > > implemented for JVM would need to be adapted to run on
> > > Android.
> > > >> >>> Let's
> > > >> >>> > > avoid
> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
> > > >> retrotranslator
> > > >> >>> in
> > > >> >>> > > > mind
> > > >> >>> > > > as a temporary workaround for annotations till next SDK
> > > release
> > > >> :S
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > >  Also, if you get the retrotranslator working, forget the
> > > >> Luciano's
> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
> time
> > ;
> > > )
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> > > Will do. Thanks for the advice it helps me to focus in the
> > right
> > > >> >>> > direction
> > > >> >>> > > :-)
> > > >> >>> > >
> > > >> >>> > > Now, a summary of what I've done up to now:
> > > >> >>> > >
> > > >> >>> > > Per the reply I received on the Android Developers list [3]
> I
> > > >> started
> > > >> >>> > using
> > > >> >>> > > retrotranslator on JAR's instead of class files. For this I
> > > created
> > > >> a
> > > >> >>> big
> > > >> >>> > > JAR file with all the Tuscany modules (including those you
> > > modified
> > > >> >>> for
> > > >> >>> > > Android). I translated this big JAR (around 15MB) with
> > > >> retrotranslator
> > > >> >>> > [4].
> > > >> >>> > > Then I created a new workspace with only calculator-android
> > and
> > > >> >>> > > android-jdk-classes as projects and added the translated JAR
> > as
> > > an
> > > >> >>> > external
> > > >> >>> > > library for both projects. This resulted in errors [4] from
> > the
> > > >> >>> Android
> > > >> >>> > > build process.
> > > >> >>> > >
> > > >> >>> > > To work around these errors I decided to take a different
> > > approach
> > > >> and
> > > >> >>> > copy
> > > >> >>> > > all the jar files contained in the individual modules to a
> > > separate
> > > >> >>> > folder
> > > >> >>> > > and then run retrotranslator on each JAR. The jars are found
> > > inside
> > > >> >>> the
> > > >> >>> > > target folder of each module and are named as shown below:
> > > >> >>> > >
> > > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> > > >> >>> > >
> > > >> >>> > > From this I found that only the SCA modules have these JAR
> > files
> > > >> >>> inside
> > > >> >>> > > their respective target folders, whereas the Android modules
> I
> > > >> >>> downloaded
> > > >> >>> > > from [1] don't have these files at all. So I decided to keep
> > the
> > > >> >>> Android
> > > >> >>> > > modules [2] and add the translated JARs as libraries where
> > > needed
> > > >> to
> > > >> >>> have
> > > >> >>> > > the workspace build with no problems. If I get this running
> I
> > > would
> > > >> >>> look
> > > >> >>> > > into creating JAR files from the Android modules and then
> > return
> > > to
> > > >> >>> only
> > > >> >>> > > having calculator-android and android-jdk-classes as
> projects
> > > and
> > > >> the
> > > >> >>> > rest
> > > >> >>> > > as JAR's added as external libraries. If this works out I
> > could
> > > >> then
> > > >> >>> look
> > > >> >>> > > into seeing which JAR's are important and which are not, in
> > this
> > > >> way
> > > >> >>> > > reducing the total memory footprint and coming up with a
> > > >> "lightweight
> > > >> >>> > > mobile
> > > >> >>> > > SCA core/runtime." Please let me know your thoughts on these
> > > >> efforts.
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > [1]
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> > > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> > > >> >>> > > [3]
> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > > >> >>> > > [4]
> > > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> > > >> >>> > > adrianocrestani@apache.org>
> > > >> >>> > > wrote:
> > > >> >>> > >
> > > >> >>> > > > Hi Oscar,
> > > >> >>> > > >
> > > >> >>> > > >
> > > >> >>> > > > When I imported the projects from [3] the following
> projects
> > > were
> > > >> >>> not
> > > >> >>> > > > imported:
> > > >> >>> > > >
> > > >> >>> > > > core-android
> > > >> >>> > > > host-android
> > > >> >>> > > > extensibility
> > > >> >>> > > >
> > > >> >>> > > > Is this normal? Should they be imported?
> > > >> >>> > > >
> > > >> >>> > > > Yep, they should be imported, if you check inside its
> > folders,
> > > >> there
> > > >> >>> > are
> > > >> >>> > > > the
> > > >> >>> > > > eclipse project files, so they should be identified by the
> > > >> eclipse
> > > >> >>> > import
> > > >> >>> > > > tool as an eclipse project.
> > > >> >>> > > >
> > > >> >>> > > > Thanks for the detailed explanation. I'm going to give
> this
> > a
> > > try
> > > >> as
> > > >> >>> I
> > > >> >>> > > > found
> > > >> >>> > > > an introspection related comment [2] as a workaround to
> > > another
> > > >> >>> > > annotations
> > > >> >>> > > > problem with the current SDK.
> > > >> >>> > > >
> > > >> >>> > > > I don't think introspection is a good solution, hence you
> > will
> > > >> need
> > > >> >>> to
> > > >> >>> > > > change how the sca reads the info about each service and
> > also
> > > >> >>> services
> > > >> >>> > > > implemented for JVM would need to be adapted to run on
> > > Android.
> > > >> >>> Let's
> > > >> >>> > > avoid
> > > >> >>> > > > to modify so much the SCA code, and lets try to keep
> > > >> retrotranslator
> > > >> >>> in
> > > >> >>> > > > mind
> > > >> >>> > > > as a temporary workaround for annotations till next SDK
> > > release
> > > >> :S
> > > >> >>> > > >
> > > >> >>> > > > Also, if you get the retrotranslator working, forget the
> > > >> Luciano's
> > > >> >>> > > > suggestion and vice-versa...do not try both at the same
> time
> > ;
> > > )
> > > >> >>> > > >
> > > >> >>> > > > Any progress testing retrotranslator on a simpler
> scenario,
> > > just
> > > >> let
> > > >> >>> us
> > > >> >>> > > > know
> > > >> >>> > > > ; )
> > > >> >>> > > >
> > > >> >>> > > > Kind Regards,
> > > >> >>> > > > Adriano Crestani
> > > >> >>> > > >
> > > >> >>> > > >
> > > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> > > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>> > > >
> > > >> >>> > > > > Hi Adriano,
> > > >> >>> > > > >
> > > >> >>> > > > > At first, build a simple, but equivalent scenario, and
> > test
> > > it.
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > > I think this is a great idea, especially because I found
> > > that
> > > >> the
> > > >> >>> > > "native
> > > >> >>> > > > > method not implemented" errors I'm getting [1] are still
> > > >> related
> > > >> >>> to
> > > >> >>> > the
> > > >> >>> > > > > annotations problem. I'm getting the same errors when
> > > >> converting
> > > >> >>> the
> > > >> >>> > > code
> > > >> >>> > > > > to
> > > >> >>> > > > > java 1.4. This makes me think that retrotranslator is
> > > actually
> > > >> not
> > > >> >>> > > > working.
> > > >> >>> > > > > Hopefully, testing with a simpler scenario will help me
> to
> > > >> >>> understand
> > > >> >>> > > the
> > > >> >>> > > > > problem better.
> > > >> >>> > > > >
> > > >> >>> > > > > Sorry for the not-well-detailed info here. I meant you
> to
> > > do:
> > > >> >>> > > > > >
> > > >> >>> > > > > > Search in every sca code for the usage of
> > > >> >>> Class.isAnnotationPresent
> > > >> >>> > > or
> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
> > for
> > > a
> > > >> the
> > > >> >>> > > > > @Remotable
> > > >> >>> > > > > > annotations force it to true, for example:
> > > >> >>> > > > > >
> > > >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> > > >> >>> > > > > >>
> > > >> >>> > > > > >> (Remotable.class); =>
> > > >> >>> > > > > >> Annotation isRemotable = true;
> > > >> >>> > > > > >>
> > > >> >>> > > > > >> otherwise, which means, when it's not checking for
> the
> > > >> >>> @Remotable
> > > >> >>> > > > > >> annnotation, force to false. For example:
> > > >> >>> > > > > >>
> > > >> >>> > > > > >> Annotation isReference =
> > > >> >>> > class.isAnnotationPresent(Reference.class);
> > > >> >>> > > > =>
> > > >> >>> > > > > >> Annotation isReference = false;
> > > >> >>> > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > > > Thanks for the detailed explanation. I'm going to give
> > this
> > > a
> > > >> try
> > > >> >>> as
> > > >> >>> > I
> > > >> >>> > > > > found
> > > >> >>> > > > > an introspection related comment [2] as a workaround to
> > > another
> > > >> >>> > > > annotations
> > > >> >>> > > > > problem with the current SDK.
> > > >> >>> > > > >
> > > >> >>> > > > > Also, I have another question for you...
> > > >> >>> > > > >
> > > >> >>> > > > > When I imported the projects from [3] the following
> > projects
> > > >> were
> > > >> >>> not
> > > >> >>> > > > > imported:
> > > >> >>> > > > >
> > > >> >>> > > > > core-android
> > > >> >>> > > > > host-android
> > > >> >>> > > > > extensibility
> > > >> >>> > > > >
> > > >> >>> > > > > Is this normal? Should they be imported?
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > > [1]
> > > >> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > >> >>> > > > > [2]
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > > >> >>> > > > > [3]
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > > >> >>> > > > > adrianocrestani@apache.org>
> > > >> >>> > > > > wrote:
> > > >> >>> > > > >
> > > >> >>> > > > > > Well detailed Oscar ; )
> > > >> >>> > > > > >
> > > >> >>> > > > > > It is one thing I learnt after playing hours with
> > Android,
> > > >> you
> > > >> >>> need
> > > >> >>> > > to
> > > >> >>> > > > > > rebuild every modified project which is imported in
> the
> > > >> android
> > > >> >>> > > > project,
> > > >> >>> > > > > > the
> > > >> >>> > > > > > android project itself does not check for
> modifications
> > on
> > > >> its
> > > >> >>> > > > > dependencies
> > > >> >>> > > > > > :S...so, when you rebuilt the imported project it
> > > recompiled
> > > >> the
> > > >> >>> > > > > > uncommented
> > > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started
> > to
> > > >> check
> > > >> >>> for
> > > >> >>> > > > > > annotations once again, so you got the errors on [1],
> > > which
> > > >> >>> means
> > > >> >>> > > > > > retrotranslator is still not working. Have you tested
> it
> > > on a
> > > >> >>> > simpler
> > > >> >>> > > > > > application as I previously suggested? Did it work?
> What
> > > was
> > > >> the
> > > >> >>> > most
> > > >> >>> > > > > > critical scenario you tested it and it worked?
> > > >> >>> > > > > >
> > > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> > > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> > > >> /../workspace
> > > >> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> > > >> >>> > > > > >
> > > >> >>> > > > > > You should also check if it's is working as expected,
> as
> > I
> > > >> >>> already
> > > >> >>> > > > said,
> > > >> >>> > > > > > does not go directly testing complex solutions on
> > complex
> > > >> things
> > > >> >>> > like
> > > >> >>> > > > > SCA.
> > > >> >>> > > > > > At first, build a simple, but equivalent scenario, and
> > > test
> > > >> it.
> > > >> >>> For
> > > >> >>> > > > > > example,
> > > >> >>> > > > > > a simple android app project that uses an java library
> > > >> project
> > > >> >>> > which
> > > >> >>> > > > > access
> > > >> >>> > > > > > annotations on classes placed on the android project.
> > Like
> > > >> our
> > > >> >>> > > android
> > > >> >>> > > > > > calculator, it's an android app project
> > > (calculator-android)
> > > >> >>> which
> > > >> >>> > > uses
> > > >> >>> > > > > > java
> > > >> >>> > > > > > library projects (sca modules), and these libraries
> > checks
> > > >> for
> > > >> >>> > > > > annotations
> > > >> >>> > > > > > on classes located at the android app project
> > > >> >>> > > (CalculatorService.java,
> > > >> >>> > > > > > AddService.java, etc). When you get it working on the
> > > simpler
> > > >> >>> > > scenario,
> > > >> >>> > > > > > then
> > > >> >>> > > > > > you are ready to test it on the complexer sceneario
> > > >> >>> > > > (calculator-android).
> > > >> >>> > > > > >
> > > >> >>> > > > > > Please, if you get the retrotranslator working in the
> > > simpler
> > > >> >>> > > scenario,
> > > >> >>> > > > > > send
> > > >> >>> > > > > > us a patch with it. You can create a JIRA and attach
> it.
> > > If
> > > >> you
> > > >> >>> > need
> > > >> >>> > > > any
> > > >> >>> > > > > > help, just ask ; )
> > > >> >>> > > > > >
> > > >> >>> > > > > > "code that checks for @Remotable you force to true,
> > > otherwise
> > > >> >>> force
> > > >> >>> > > to
> > > >> >>> > > > > > false."
> > > >> >>> > > > > >
> > > >> >>> > > > > > Sorry for the not-well-detailed info here. I meant you
> > to
> > > do:
> > > >> >>> > > > > >
> > > >> >>> > > > > > Search in every sca code for the usage of
> > > >> >>> Class.isAnnotationPresent
> > > >> >>> > > or
> > > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
> > for
> > > a
> > > >> the
> > > >> >>> > > > > @Remotable
> > > >> >>> > > > > > annotations force it to true, for example:
> > > >> >>> > > > > >
> > > >> >>> > > > > > Annotation isRemotable =
> > > >> >>> > class.isAnnotationPresent(Remotable.class);
> > > >> >>> > > =>
> > > >> >>> > > > > > Annotation isRemotable = true;
> > > >> >>> > > > > >
> > > >> >>> > > > > > otherwise, which means, when it's not checking for the
> > > >> >>> @Remotable
> > > >> >>> > > > > > annnotation, force to false. For example:
> > > >> >>> > > > > >
> > > >> >>> > > > > > Annotation isReference =
> > > >> >>> > class.isAnnotationPresent(Reference.class);
> > > >> >>> > > =>
> > > >> >>> > > > > > Annotation isReference = false;
> > > >> >>> > > > > >
> > > >> >>> > > > > > [1] -
> > > >> >>> > >
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > >> >>> > > > > >
> > > >> >>> > > > > > Kind Regards,
> > > >> >>> > > > > > Adriano Crestani
> > > >> >>> > > > > >
> > > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>> > > > > >
> > > >> >>> > > > > > > Hi Adriano,
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > I continued testing retrotranslator. Here's what
> I've
> > > done
> > > >> up
> > > >> >>> to
> > > >> >>> > > now.
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > 1. Downloaded the modified code from [1].
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as
> > > shown
> > > >> >>> below:
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > svn checkout --revision 643746
> > > >> >>> > > > > > >
> > > >> >>> > >
> > > >> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > cd modules
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > mvn clean install -Dtest=no
> > > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
> > M2_REPO
> > > >> >>> variable
> > > >> >>> > as
> > > >> >>> > > > > shown
> > > >> >>> > > > > > > below:
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> > > >> >>> > eclipse:add-maven-repo
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors,
> > added
> > > >> >>> Android
> > > >> >>> > > > library
> > > >> >>> > > > > > to
> > > >> >>> > > > > > > required modules, fixed references to jar files and
> > > other
> > > >> >>> > > libraries.
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > 5. Uncommented lines in
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the project
> > site
> > > >> [3]
> > > >> >>> and
> > > >> >>> > > > shown
> > > >> >>> > > > > > > below:
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> > > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> > > >> >>> /../workspace
> > > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >  The output can be found in [4].
> > > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > and then re-ran retrotranslator.
> > > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5]
> and
> > > >> Android
> > > >> >>> > > errors
> > > >> >>> > > > in
> > > >> >>> > > > > > > [6].
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > As always, I'm documenting my progress on the
> project
> > > log.
> > > >> I
> > > >> >>> > > haven't
> > > >> >>> > > > > > fully
> > > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm
> puzzled
> > by
> > > >> what
> > > >> >>> you
> > > >> >>> > > > mean
> > > >> >>> > > > > by
> > > >> >>> > > > > > > this:
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > "code that checks for @Remotable you force to true,
> > > >> otherwise
> > > >> >>> > force
> > > >> >>> > > > to
> > > >> >>> > > > > > > false."
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > I'll continue looking into it and hopefully get
> > > >> >>> retrotranslator
> > > >> >>> > to
> > > >> >>> > > > > work.
> > > >> >>> > > > > > I
> > > >> >>> > > > > > > also think it's a simpler option.
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > Luciano: Thanks for your suggestions.
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > [1]
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > [2]
> > > >> >>> > > > >
> > > >> >>>
> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > [4]
> > > >> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > [5]
> > > >> >>> > >
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > >> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > > Hi,
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > I tried what Luciano suggested. It really works.
> To
> > > get
> > > >> it
> > > >> >>> > > working
> > > >> >>> > > > > you
> > > >> >>> > > > > > > > simply need to search on all modules where the
> code
> > > >> checks
> > > >> >>> for
> > > >> >>> > > > > > @Remotable
> > > >> >>> > > > > > > > annotation and force it to true:
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"
> =>
> > > true
> > > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" =>
> true
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > It works fine on the sca revision we are testing
> on
> > > >> Android
> > > >> >>> and
> > > >> >>> > > the
> > > >> >>> > > > > > most
> > > >> >>> > > > > > > > recent revision. I only tested it as a java
> > > application,
> > > >> not
> > > >> >>> as
> > > >> >>> > > an
> > > >> >>> > > > > > > android
> > > >> >>> > > > > > > > application.
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a
> > > faster
> > > >> >>> and
> > > >> >>> > > > simpler
> > > >> >>> > > > > > > > solution. Because the Luciano's suggestion only
> > forces
> > > >> the
> > > >> >>> SCA
> > > >> >>> > to
> > > >> >>> > > > > > > recognize
> > > >> >>> > > > > > > > the services with no annotations declared on their
> > > >> >>> interfaces,
> > > >> >>> > > but
> > > >> >>> > > > it
> > > >> >>> > > > > > > does
> > > >> >>> > > > > > > > not avoid the Exceptions we are getting when the
> SCA
> > > >> invokes
> > > >> >>> > > > methods
> > > >> >>> > > > > > that
> > > >> >>> > > > > > > > read annotations. So, our current problem is that
> we
> > > are
> > > >> not
> > > >> >>> > > being
> > > >> >>> > > > > able
> > > >> >>> > > > > > > to
> > > >> >>> > > > > > > > use these methods and not only because we are not
> > > being
> > > >> able
> > > >> >>> to
> > > >> >>> > > > read
> > > >> >>> > > > > > the
> > > >> >>> > > > > > > > annotations.
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > Oscar, if you want to try the Luciano's
> suggestion,
> > > you
> > > >> will
> > > >> >>> > need
> > > >> >>> > > > to
> > > >> >>> > > > > > > > comment/adapt every sca code that tries to read
> the
> > > class
> > > >> >>> > > > > annotations.
> > > >> >>> > > > > > It
> > > >> >>> > > > > > > > is
> > > >> >>> > > > > > > > not necessary to comment/adapt the methods that
> read
> > > >> Method
> > > >> >>> > > > > > annotations,
> > > >> >>> > > > > > > > they are not throwning any exception. So, every
> code
> > > that
> > > >> >>> > checks
> > > >> >>> > > > for
> > > >> >>> > > > > > > > @Remotable you force to true, otherwise force to
> > > false.
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > Any doubt about what I have said, just let me know
> ;
> > )
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > Suggestions are welcome : )
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > Adriano Crestani
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende
> <
> > > >> >>> > > > > > luckbr1975@gmail.com>
> > > >> >>> > > > > > > > wrote:
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > > > > FYI, if you comment out the code that checks if
> a
> > > >> >>> interface
> > > >> >>> > is
> > > >> >>> > > > > > > > > remoteble, you could have a version of the
> > > calculator
> > > >> >>> without
> > > >> >>> > > any
> > > >> >>> > > > > > > > > annotations, and the runtime would introspect
> the
> > > >> >>> references
> > > >> >>> > > for
> > > >> >>> > > > > the
> > > >> >>> > > > > > > > > multiple services. But note that, the
> > introspection
> > > >> code
> > > >> >>> will
> > > >> >>> > > > only
> > > >> >>> > > > > be
> > > >> >>> > > > > > > > > activated if there is no SCA annotations on the
> > > class.
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano
> Crestani
> > > >> >>> > > > > > > > > <ad...@apache.org> wrote:
> > > >> >>> > > > > > > > > > Ah, the expected exception should look like
> this
> > > on
> > > >> >>> android
> > > >> >>> > > > > > emulator:
> > > >> >>> > > > > > > > > >
> > > >> >>> > >
> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> > >
> > > >> >>> > <
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> > > >
> > > >> >>> > > <
> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> > > > <
> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> > > > > <
> > > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> > > >> >>> >
> > > >> >>> > > > > > <
> > > >> >>>
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> > > > > > > <
> > > >> >>> >
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> > > > > > > > <
> > > >> >>> > >
> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >> >>> > > > > > > > > >
> > > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
> > Crestani
> > > <
> > > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> > > >> >>> > > > > > > > > >
> > > >> >>> > > > > > > > > >> Hi Oscar,
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> I was indeed using the sca modules not from
> the
> > > >> >>> sandbox.
> > > >> >>> > As
> > > >> >>> > > > you
> > > >> >>> > > > > > > > > suggested,
> > > >> >>> > > > > > > > > >> I
> > > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
> > > >> workspace
> > > >> >>> > and
> > > >> >>> > > > > added
> > > >> >>> > > > > > > the
> > > >> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
> > > >> >>> uncommented
> > > >> >>> > the
> > > >> >>> > > > > lines
> > > >> >>> > > > > > > in
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> following the comments pointing out why those
> > > lines
> > > >> had
> > > >> >>> > been
> > > >> >>> > > > > > > > commented.
> > > >> >>> > > > > > > > > I'm
> > > >> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
> > > >> However,
> > > >> >>> > it's
> > > >> >>> > > > > > getting
> > > >> >>> > > > > > > > > stuck
> > > >> >>> > > > > > > > > >> somewhere else (before getting there I
> > guess)...I
> > > >> think
> > > >> >>> > this
> > > >> >>> > > > is
> > > >> >>> > > > > > the
> > > >> >>> > > > > > > > case
> > > >> >>> > > > > > > > > >> because before and after commenting the code
> I
> > > get
> > > >> the
> > > >> >>> > same
> > > >> >>> > > > > error
> > > >> >>> > > > > > in
> > > >> >>> > > > > > > > the
> > > >> >>> > > > > > > > > >> Android emulator, an InstantiationException
> > [1].
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> Have you debugged to check exactly where this
> > > >> exception
> > > >> >>> is
> > > >> >>> > > > being
> > > >> >>> > > > > > > > thrown?
> > > >> >>> > > > > > > > > I
> > > >> >>> > > > > > > > > >> have done the procedure I previously
> described
> > > >>  again
> > > >> >>> and
> > > >> >>> > I
> > > >> >>> > > > got
> > > >> >>> > > > > it
> > > >> >>> > > > > > > > > "running"
> > > >> >>> > > > > > > > > >> as expected, which means, running till the
> > > expected
> > > >> >>> > > exception
> > > >> >>> > > > is
> > > >> >>> > > > > > > > thrown.
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> I also started tinkering with
> retrotranslator.
> > > First
> > > >> I
> > > >> >>> > tried
> > > >> >>> > > > > doing
> > > >> >>> > > > > > > it
> > > >> >>> > > > > > > > > with
> > > >> >>> > > > > > > > > >> Ant, but it seems that in order to build I
> have
> > > to
> > > >> >>> include
> > > >> >>> > > the
> > > >> >>> > > > > > whole
> > > >> >>> > > > > > > > > >> tuscany
> > > >> >>> > > > > > > > > >> projects in a way similar to how I now have
> in
> > > >> Eclipse.
> > > >> >>> I
> > > >> >>> > > also
> > > >> >>> > > > > > tried
> > > >> >>> > > > > > > > > making
> > > >> >>> > > > > > > > > >> a jar out of
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> > > >> >>> unfortunately
> > > >> >>> > > it's
> > > >> >>> > > > > not
> > > >> >>> > > > > > > > > >> translating anything, as shown below.
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> > > >> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> > > >> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > >> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> > > >> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot
> > > -classpath
> > > >> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> > > >> >>> > > > > > > > > >> Processing 136 file(s) in
> > > >> >>> JavaRuntimeModuleActivator.jar.
> > > >> >>> > > > > > > > > >> Transformed 0 file(s).
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> There's also a maven plugin, so I might try
> > > >> that...but
> > > >> >>> > first
> > > >> >>> > > > > I'll
> > > >> >>> > > > > > > give
> > > >> >>> > > > > > > > > Ant
> > > >> >>> > > > > > > > > >> another go. Hopefully Google will release a
> new
> > > SDK
> > > >> >>> soon,
> > > >> >>> > > > > > otherwise
> > > >> >>> > > > > > > as
> > > >> >>> > > > > > > > > you
> > > >> >>> > > > > > > > > >> say...retrotranslator will have to be the
> > > workaround
> > > >> to
> > > >> >>> > > > proceed
> > > >> >>> > > > > > with
> > > >> >>> > > > > > > > our
> > > >> >>> > > > > > > > > >> project ;-)
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK
> > version
> > > >> will
> > > >> >>> not
> > > >> >>> > be
> > > >> >>> > > > > > > released
> > > >> >>> > > > > > > > > until
> > > >> >>> > > > > > > > > >> july 28th :S. So, it's really good you have
> > > already
> > > >> >>> > started
> > > >> >>> > > > > > working
> > > >> >>> > > > > > > on
> > > >> >>> > > > > > > > > the
> > > >> >>> > > > > > > > > >> retrotranslator, it will probably be the best
> > > >> >>> workaround
> > > >> >>> > for
> > > >> >>> > > > the
> > > >> >>> > > > > > > > > annotations
> > > >> >>> > > > > > > > > >> problem till the next SDK release.
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> I suggest you to forget about the build
> process
> > > >> right
> > > >> >>> now,
> > > >> >>> > > > > before,
> > > >> >>> > > > > > > > check
> > > >> >>> > > > > > > > > if
> > > >> >>> > > > > > > > > >> this retrotranslator works and if it really
> > works
> > > on
> > > >> >>> > android
> > > >> >>> > > > > > > platform.
> > > >> >>> > > > > > > > > I´m
> > > >> >>> > > > > > > > > >> really getting upset with Android, even its
> API
> > > >> methods
> > > >> >>> > does
> > > >> >>> > > > not
> > > >> >>> > > > > > > work
> > > >> >>> > > > > > > > as
> > > >> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile
> a
> > > >> simple
> > > >> >>> > class
> > > >> >>> > > > > > (coded
> > > >> >>> > > > > > > by
> > > >> >>> > > > > > > > > you),
> > > >> >>> > > > > > > > > >> which contains annotations, and access these
> > > >> >>> annotations.
> > > >> >>> > If
> > > >> >>> > > > it
> > > >> >>> > > > > > > works,
> > > >> >>> > > > > > > > > make
> > > >> >>> > > > > > > > > >> it more complex and test again, do it until
> you
> > > >> reach a
> > > >> >>> > > > scenario
> > > >> >>> > > > > > as
> > > >> >>> > > > > > > > > complex
> > > >> >>> > > > > > > > > >> as the SCA (a lot of external jars with
> > annotated
> > > >> >>> classes
> > > >> >>> > > > > accessed
> > > >> >>> > > > > > > by
> > > >> >>> > > > > > > > > the
> > > >> >>> > > > > > > > > >> other external jars and the Android app). Got
> > it?
> > > :
> > > >> )
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> Regards,
> > > >> >>> > > > > > > > > >> Adriano Crestani
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar
> > Castaneda
> > > <
> > > >> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>> Hi Adriano,
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> I was indeed using the sca modules not from
> > the
> > > >> >>> sandbox.
> > > >> >>> > As
> > > >> >>> > > > you
> > > >> >>> > > > > > > > > suggested,
> > > >> >>> > > > > > > > > >>> I
> > > >> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from
> my
> > > >> >>> workspace
> > > >> >>> > and
> > > >> >>> > > > > added
> > > >> >>> > > > > > > the
> > > >> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> > > >> >>> uncommented
> > > >> >>> > > the
> > > >> >>> > > > > > lines
> > > >> >>> > > > > > > in
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> following the comments pointing out why
> those
> > > lines
> > > >> >>> had
> > > >> >>> > > been
> > > >> >>> > > > > > > > commented.
> > > >> >>> > > > > > > > > >>> I'm
> > > >> >>> > > > > > > > > >>> no longer getting the
> ClassNotFoundException.
> > > >> However,
> > > >> >>> > it's
> > > >> >>> > > > > > getting
> > > >> >>> > > > > > > > > stuck
> > > >> >>> > > > > > > > > >>> somewhere else (before getting there I
> > > guess)...I
> > > >> >>> think
> > > >> >>> > > this
> > > >> >>> > > > is
> > > >> >>> > > > > > the
> > > >> >>> > > > > > > > > case
> > > >> >>> > > > > > > > > >>> because before and after commenting the code
> I
> > > get
> > > >> the
> > > >> >>> > same
> > > >> >>> > > > > error
> > > >> >>> > > > > > > in
> > > >> >>> > > > > > > > > the
> > > >> >>> > > > > > > > > >>> Android emulator, an InstantiationException
> > [1].
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> I also started tinkering with
> retrotranslator.
> > > >> First I
> > > >> >>> > > tried
> > > >> >>> > > > > > doing
> > > >> >>> > > > > > > it
> > > >> >>> > > > > > > > > with
> > > >> >>> > > > > > > > > >>> Ant, but it seems that in order to build I
> > have
> > > to
> > > >> >>> > include
> > > >> >>> > > > the
> > > >> >>> > > > > > > whole
> > > >> >>> > > > > > > > > >>> tuscany
> > > >> >>> > > > > > > > > >>> projects in a way similar to how I now have
> in
> > > >> >>> Eclipse. I
> > > >> >>> > > > also
> > > >> >>> > > > > > > tried
> > > >> >>> > > > > > > > > >>> making
> > > >> >>> > > > > > > > > >>> a jar out of
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
> > > >> >>> unfortunately
> > > >> >>> > > it's
> > > >> >>> > > > > not
> > > >> >>> > > > > > > > > >>> translating anything, as shown below.
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin
> > ocastaneda$
> > > >> java
> > > >> >>> -jar
> > > >> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar
> -srcjar
> > > >> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> > > >> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot
> > > -classpath
> > > >> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> > > >> >>> > > > > > > > > >>> Processing 136 file(s) in
> > > >> >>> JavaRuntimeModuleActivator.jar.
> > > >> >>> > > > > > > > > >>> Transformed 0 file(s).
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
> > > >> that...but
> > > >> >>> > > first
> > > >> >>> > > > > I'll
> > > >> >>> > > > > > > > give
> > > >> >>> > > > > > > > > Ant
> > > >> >>> > > > > > > > > >>> another go. Hopefully Google will release a
> > new
> > > SDK
> > > >> >>> soon,
> > > >> >>> > > > > > otherwise
> > > >> >>> > > > > > > > as
> > > >> >>> > > > > > > > > you
> > > >> >>> > > > > > > > > >>> say...retrotranslator will have to be the
> > > >> workaround
> > > >> >>> to
> > > >> >>> > > > proceed
> > > >> >>> > > > > > > with
> > > >> >>> > > > > > > > > our
> > > >> >>> > > > > > > > > >>> project ;-)
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting
> > > ready
> > > >> for
> > > >> >>> > the
> > > >> >>> > > > > > official
> > > >> >>> > > > > > > > > start
> > > >> >>> > > > > > > > > >>> :-)
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> [1]
> > > >> >>> http://androidindelft.googlepages.com/20may2008.html
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano
> > > Crestani
> > > >> <
> > > >> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> > Hi Oscar,
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > My mistake again, the eclipse project
> files
> > of
> > > >> >>> > > > > > contribution-impl
> > > >> >>> > > > > > > > > module
> > > >> >>> > > > > > > > > >>> > were
> > > >> >>> > > > > > > > > >>> > not uploaded, so you are probably using
> the
> > > >> modules
> > > >> >>> you
> > > >> >>> > > > have
> > > >> >>> > > > > > > > > downloaded
> > > >> >>> > > > > > > > > >>> > from
> > > >> >>> > > > > > > > > >>> > the sca modules. If you remove the
> > > >> >>> > > > tuscany-contribution-impl
> > > >> >>> > > > > > from
> > > >> >>> > > > > > > > > your
> > > >> >>> > > > > > > > > >>> > workspace and add this module from the
> > sandbox
> > > it
> > > >> >>> will
> > > >> >>> > > > > probably
> > > >> >>> > > > > > > > work.
> > > >> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk
> > > again
> > > >> to
> > > >> >>> get
> > > >> >>> > > the
> > > >> >>> > > > > > > project
> > > >> >>> > > > > > > > > >>> files
> > > >> >>> > > > > > > > > >>> > I'm uploading right now ; )
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator
> as
> > a
> > > >> >>> solution
> > > >> >>> > > here
> > > >> >>> > > > > is
> > > >> >>> > > > > > a
> > > >> >>> > > > > > > > tip:
> > > >> >>> > > > > > > > > >>> most
> > > >> >>> > > > > > > > > >>> > of the code that were using the Reflection
> > API
> > > >> was
> > > >> >>> > > > commented
> > > >> >>> > > > > on
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >> >>> > > > > > > > > >>> > class, you just need to edit this class
> and
> > > >> remove
> > > >> >>> the
> > > >> >>> > > > > > commented
> > > >> >>> > > > > > > > code
> > > >> >>> > > > > > > > > >>> (it's
> > > >> >>> > > > > > > > > >>> > described there).
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > So, if you uncomment the code and the
> > > >> >>> retrotranslador
> > > >> >>> > > > > > successfuly
> > > >> >>> > > > > > > > > work,
> > > >> >>> > > > > > > > > >>> and
> > > >> >>> > > > > > > > > >>> > I hope it will, you will reach the
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > >
> > > >> >>> > >
> > > >> >>>
> > > >>
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > >> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly
> on
> > > this
> > > >> >>> > > > constructor
> > > >> >>> > > > > > I'm
> > > >> >>> > > > > > > > > >>> getting a
> > > >> >>> > > > > > > > > >>> > NPE when the code described above is
> > > commented.
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > About the ant, go on and use it. Further
> we
> > > can
> > > >> >>> > evaluate
> > > >> >>> > > > > better
> > > >> >>> > > > > > > > where
> > > >> >>> > > > > > > > > we
> > > >> >>> > > > > > > > > >>> > place it in the entire SCA build process.
> > BTW,
> > > we
> > > >> >>> even
> > > >> >>> > > dont
> > > >> >>> > > > > > know
> > > >> >>> > > > > > > if
> > > >> >>> > > > > > > > > we
> > > >> >>> > > > > > > > > >>> will
> > > >> >>> > > > > > > > > >>> > still be using the retrotranslator in
> > future,
> > > >> >>> right?! :
> > > >> >>> > )
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot
> to
> > > >> >>> workaround
> > > >> >>> > > > this
> > > >> >>> > > > > > > > problem
> > > >> >>> > > > > > > > > for
> > > >> >>> > > > > > > > > >>> > now
> > > >> >>> > > > > > > > > >>> > and go on with our project ; )
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > Kind Regards,
> > > >> >>> > > > > > > > > >>> > Adriano Crestani
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar
> > > Castaneda
> > > >> <
> > > >> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>> > > Hi Adriano,
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able
> > to
> > > >> build
> > > >> >>> the
> > > >> >>> > > > > entire
> > > >> >>> > > > > > > > > workspace
> > > >> >>> > > > > > > > > >>> > from
> > > >> >>> > > > > > > > > >>> > > your instructions. When running
> > > >> calculator-android
> > > >> >>> as
> > > >> >>> > > an
> > > >> >>> > > > > > > "Android
> > > >> >>> > > > > > > > > >>> > > application" I'm getting a
> > > >> ClassNotFoundException
> > > >> >>> [1]
> > > >> >>> > > for
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > >> >>> > > > > > > > > >>> > > Is the exception you referred to in your
> > > >> original
> > > >> >>> > > email?
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > ...when
> > > >> >>> > > > > > > > > >>> > > > you run the calculator-android project
> > as
> > > an
> > > >> >>> > "Android
> > > >> >>> > > > > > > > > application"
> > > >> >>> > > > > > > > > >>> you
> > > >> >>> > > > > > > > > >>> > > > should get an exception, that was
> > > generated
> > > >> >>> > initially
> > > >> >>> > > > by
> > > >> >>> > > > > a
> > > >> >>> > > > > > > NPE
> > > >> >>> > > > > > > > > >>> thrown
> > > >> >>> > > > > > > > > >>> > by
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > >
> > > >> >>> > >
> > > >> >>>
> > > >>
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > >> >>> > > > > > > > > >>> > > > constructor. This is caused because
> the
> > > >> latest
> > > >> >>> > > Android
> > > >> >>> > > > > SDK
> > > >> >>> > > > > > > does
> > > >> >>> > > > > > > > > not
> > > >> >>> > > > > > > > > >>> > > support
> > > >> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA
> > cannot
> > > >> check
> > > >> >>> > the
> > > >> >>> > > > > > > @Reference
> > > >> >>> > > > > > > > > >>> > > annotations
> > > >> >>> > > > > > > > > >>> > > > (I commented the code which tries to
> > read
> > > the
> > > >> >>> > > > > annotations,
> > > >> >>> > > > > > so
> > > >> >>> > > > > > > > > when
> > > >> >>> > > > > > > > > >>> the
> > > >> >>> > > > > > > > > >>> > > > execution reach this constructor it
> > throws
> > > >> the
> > > >> >>> > NPE).
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > Searching for the class in the exception
> > I'm
> > > >> >>> getting
> > > >> >>> > I
> > > >> >>> > > > > found
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> > > >> >>> > > In
> > > >> >>> > > > > > > > > >>> > getServiceClasses
> > > >> >>> > > > > > > > > >>> > > it loads the service class I'm getting
> > > problems
> > > >> >>> with
> > > >> >>> > > when
> > > >> >>> > > > > > > running
> > > >> >>> > > > > > > > > >>> > > calculator-android as an "Android
> > > application":
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > I couldn't find the corresponding java
> > file
> > > in
> > > >> my
> > > >> >>> > > > imported
> > > >> >>> > > > > > > > > workspace
> > > >> >>> > > > > > > > > >>> and
> > > >> >>> > > > > > > > > >>> > > found that there is no package like
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> org.apache.tuscany.sca.contribution.processor.impl.
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > Am I missing something? Or are these the
> > > errors
> > > >> >>> you
> > > >> >>> > > would
> > > >> >>> > > > > > > expect?
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > I would like to get to the point where I
> > get
> > > >> the
> > > >> >>> > > > exception
> > > >> >>> > > > > > you
> > > >> >>> > > > > > > > > >>> described
> > > >> >>> > > > > > > > > >>> > > and
> > > >> >>> > > > > > > > > >>> > > try to run retrotranslator from there.
> > > However,
> > > >> as
> > > >> >>> > I'm
> > > >> >>> > > > > using
> > > >> >>> > > > > > > the
> > > >> >>> > > > > > > > > ADT
> > > >> >>> > > > > > > > > >>> > plugin
> > > >> >>> > > > > > > > > >>> > > in eclipse I would need to extract code
> > that
> > > >> >>> > "declares
> > > >> >>> > > or
> > > >> >>> > > > > > > > analyzes
> > > >> >>> > > > > > > > > >>> > > annotations you may extract it into a
> > > separate
> > > >> >>> > library
> > > >> >>> > > > that
> > > >> >>> > > > > > can
> > > >> >>> > > > > > > > be
> > > >> >>> > > > > > > > > >>> > > processed
> > > >> >>> > > > > > > > > >>> > > with Retrotranslator and added to the
> main
> > > >> >>> project."
> > > >> >>> > > That
> > > >> >>> > > > > is,
> > > >> >>> > > > > > > > > unless I
> > > >> >>> > > > > > > > > >>> > use
> > > >> >>> > > > > > > > > >>> > > Ant, in which case I would only need to
> > add
> > > a
> > > >> few
> > > >> >>> > lines
> > > >> >>> > > > to
> > > >> >>> > > > > > > > > build.xml.
> > > >> >>> > > > > > > > > >>> I'm
> > > >> >>> > > > > > > > > >>> > > continuing to look into this, any
> thoughts
> > > are
> > > >> >>> more
> > > >> >>> > > than
> > > >> >>> > > > > > > welcome
> > > >> >>> > > > > > > > > :-)
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > [1]
> > > >> >>> > http://delftandroid.googlepages.com/14may2008.html
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
> > > >> Crestani
> > > >> >>> <
> > > >> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > > Hi,
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > At first, I want to correct one
> mistake,
> > > on
> > > >> the
> > > >> >>> > first
> > > >> >>> > > > > step
> > > >> >>> > > > > > I
> > > >> >>> > > > > > > > > >>> described
> > > >> >>> > > > > > > > > >>> > on
> > > >> >>> > > > > > > > > >>> > > > my
> > > >> >>> > > > > > > > > >>> > > > previous email, I should not have
> added
> > > the
> > > >> word
> > > >> >>> > > > > "install",
> > > >> >>> > > > > > > it
> > > >> >>> > > > > > > > > >>> probably
> > > >> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn
> > > clean
> > > >> >>> > install"
> > > >> >>> > > in
> > > >> >>> > > > > the
> > > >> >>> > > > > > > > > >>> downloaded
> > > >> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this
> same
> > > step,
> > > >> >>> the
> > > >> >>> > > code
> > > >> >>> > > > > > should
> > > >> >>> > > > > > > > not
> > > >> >>> > > > > > > > > be
> > > >> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Simon:
> > > >> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun
> Java
> > > >> source
> > > >> >>> > codes
> > > >> >>> > > > are
> > > >> >>> > > > > > > under
> > > >> >>> > > > > > > > > CDDL
> > > >> >>> > > > > > > > > >>> > 1.0
> > > >> >>> > > > > > > > > >>> > > > license, it's only needed to include
> the
> > > CDDL
> > > >> >>> > license
> > > >> >>> > > > > > header
> > > >> >>> > > > > > > on
> > > >> >>> > > > > > > > > each
> > > >> >>> > > > > > > > > >>> > > file,
> > > >> >>> > > > > > > > > >>> > > > and it's already done : )
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Jean:
> > > >> >>> > > > > > > > > >>> > > > I think it is better to keep the code
> in
> > > the
> > > >> >>> > sandbox
> > > >> >>> > > > for
> > > >> >>> > > > > > now.
> > > >> >>> > > > > > > > At
> > > >> >>> > > > > > > > > >>> first,
> > > >> >>> > > > > > > > > >>> > > > it's
> > > >> >>> > > > > > > > > >>> > > > not working on the current SCA modules
> > > >> revision
> > > >> >>> > yet.
> > > >> >>> > > > And
> > > >> >>> > > > > > > also,
> > > >> >>> > > > > > > > > I'm
> > > >> >>> > > > > > > > > >>> > > > commenting many lines at some modules
> > just
> > > to
> > > >> >>> get a
> > > >> >>> > > > > "first
> > > >> >>> > > > > > > run"
> > > >> >>> > > > > > > > > of
> > > >> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate
> > why
> > > and
> > > >> >>> how
> > > >> >>> > > this
> > > >> >>> > > > > > > > commented
> > > >> >>> > > > > > > > > >>> lines
> > > >> >>> > > > > > > > > >>> > > will
> > > >> >>> > > > > > > > > >>> > > > be adapted to be compatible with both:
> > SCA
> > > >> Java
> > > >> >>> and
> > > >> >>> > > SCA
> > > >> >>> > > > > > > > Android.
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Oscar:
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > - Are host-android and core-android a
> > part
> > > of
> > > >> >>> > > > > > > > calculator-android?
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > What do you mean when you say "part"?
> > They
> > > >> are
> > > >> >>> used
> > > >> >>> > > by
> > > >> >>> > > > > > > > > >>> > > calculator-android,
> > > >> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany
> > sca
> > > >> >>> modules
> > > >> >>> > in
> > > >> >>> > > > > future
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > - Should the calculator-android
> included
> > > in
> > > >> [1]
> > > >> >>> > have
> > > >> >>> > > > > > included
> > > >> >>> > > > > > > > an
> > > >> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to
> > svn
> > > the
> > > >> >>> > eclipse
> > > >> >>> > > > > > project
> > > >> >>> > > > > > > > > files
> > > >> >>> > > > > > > > > >>> of
> > > >> >>> > > > > > > > > >>> > > > these
> > > >> >>> > > > > > > > > >>> > > > projects. I have already commited
> these
> > > files
> > > >> >>> and
> > > >> >>> > if
> > > >> >>> > > > you
> > > >> >>> > > > > > > update
> > > >> >>> > > > > > > > > your
> > > >> >>> > > > > > > > > >>> > > trunk
> > > >> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the
> > ones
> > > >> you
> > > >> >>> have
> > > >> >>> > > > > > created.
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is
> > there
> > > >> >>> > something
> > > >> >>> > > > else
> > > >> >>> > > > > > > > needed
> > > >> >>> > > > > > > > > in
> > > >> >>> > > > > > > > > >>> > > > addition
> > > >> >>> > > > > > > > > >>> > > > to including the Android Library?
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > No, the Android library is really
> > simples,
> > > it
> > > >> >>> only
> > > >> >>> > > > > contains
> > > >> >>> > > > > > > the
> > > >> >>> > > > > > > > > >>> > > android.jar
> > > >> >>> > > > > > > > > >>> > > > file located in your Android SDK.
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean
> build"
> > > and
> > > >> >>> "mvn
> > > >> >>> > > > > -Peclipse
> > > >> >>> > > > > > > > > >>> > > > eclipse:eclipse"
> > > >> >>> > > > > > > > > >>> > > > commands on the sandbox files, the
> > eclipse
> > > >> >>> project
> > > >> >>> > > > files
> > > >> >>> > > > > > are
> > > >> >>> > > > > > > > > already
> > > >> >>> > > > > > > > > >>> in
> > > >> >>> > > > > > > > > >>> > > > modules and you should build the
> modules
> > > >> using
> > > >> >>> the
> > > >> >>> > > > > eclipse
> > > >> >>> > > > > > > for
> > > >> >>> > > > > > > > > now.
> > > >> >>> > > > > > > > > >>> The
> > > >> >>> > > > > > > > > >>> > > > maven config files are not updated yet
> > > with
> > > >> the
> > > >> >>> > > > > > modifications
> > > >> >>> > > > > > > I
> > > >> >>> > > > > > > > > have
> > > >> >>> > > > > > > > > >>> > done
> > > >> >>> > > > > > > > > >>> > > > on
> > > >> >>> > > > > > > > > >>> > > > these modules, so they will not
> generate
> > > the
> > > >> >>> > correct
> > > >> >>> > > > > > project
> > > >> >>> > > > > > > > > files,
> > > >> >>> > > > > > > > > >>> > > worse,
> > > >> >>> > > > > > > > > >>> > > > they will override the ones I have
> > > created.
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Then, clean and build your entire
> > > workspace,
> > > >> if
> > > >> >>> you
> > > >> >>> > > > still
> > > >> >>> > > > > > get
> > > >> >>> > > > > > > > any
> > > >> >>> > > > > > > > > >>> > errors,
> > > >> >>> > > > > > > > > >>> > > > let me know ; )
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > - Should I import
> > > >> 'tuscany-databinding-saxon'?
> > > >> >>> Or,
> > > >> >>> > > why
> > > >> >>> > > > > > should
> > > >> >>> > > > > > > > > this
> > > >> >>> > > > > > > > > >>> not
> > > >> >>> > > > > > > > > >>> > be
> > > >> >>> > > > > > > > > >>> > > > imported?
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > It seems the revision I suggested
> > already
> > > had
> > > >> >>> the
> > > >> >>> > > saxon
> > > >> >>> > > > > > > module
> > > >> >>> > > > > > > > > >>> removed
> > > >> >>> > > > > > > > > >>> > > from
> > > >> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed
> another
> > > one
> > > >> >>> that
> > > >> >>> > > > > > shouldn´t.
> > > >> >>> > > > > > > > > Please,
> > > >> >>> > > > > > > > > >>> > > import
> > > >> >>> > > > > > > > > >>> > > > the databinding-saxon module again
> into
> > > your
> > > >> >>> > > workspace.
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > Regards,
> > > >> >>> > > > > > > > > >>> > > > Adriano Crestani
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > [1] -
> > > >> >>> > > > > > > > >
> > > >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > >> >>> > > > > > > > > >>> > > > >
> > > >> >>> > > > > > > > > >>> > > > [2] -
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
> > > >> Jean-Sebastien
> > > >> >>> > > > Delfino
> > > >> >>> > > > > <
> > > >> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
> > > >> >>> > > > > > > > > >>> > > > >
> > > >> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > >> >>> > > > > > > > > >>> > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code
> > > from
> > > >> [1]
> > > >> >>> and
> > > >> >>> > > > > > installed
> > > >> >>> > > > > > > > as
> > > >> >>> > > > > > > > > >>> shown
> > > >> >>> > > > > > > > > >>> > > > > > > > below:
> > > >> >>> > > > > > > > > >>> > > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > > svn checkout
> > > >> >>> > > > > > > > > >>> > > > > > > >
> > > >> >>> > > > > > > > >
> > > >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > >> >>> > > > > > > > > >>> > > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
> > > >> >>> > > > > > > > > >>> > > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > If there's no objection from
> > others,
> > > >> I'd
> > > >> >>> be
> > > >> >>> > > happy
> > > >> >>> > > > > to
> > > >> >>> > > > > > > see
> > > >> >>> > > > > > > > > this
> > > >> >>> > > > > > > > > >>> > code
> > > >> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we
> > now
> > > >> have
> > > >> >>> > > several
> > > >> >>> > > > > > > people
> > > >> >>> > > > > > > > > doing
> > > >> >>> > > > > > > > > >>> > > > development
> > > >> >>> > > > > > > > > >>> > > > > > > on this android integration.
> > > >> >>> > > > > > > > > >>> > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with
> > > something
> > > >> >>> like
> > > >> >>> > > > > > > > > >>> > trunk/java/sca/android
> > > >> >>> > > > > > > > > >>> > > > > > > and later progressively try to
> > > converge
> > > >> >>> the
> > > >> >>> > > code
> > > >> >>> > > > > with
> > > >> >>> > > > > > > the
> > > >> >>> > > > > > > > > code
> > > >> >>> > > > > > > > > >>> in
> > > >> >>> > > > > > > > > >>> > > > trunk,
> > > >> >>> > > > > > > > > >>> > > > > > > with architected plug points for
> > the
> > > >> >>> android
> > > >> >>> > > > > specific
> > > >> >>> > > > > > > > code
> > > >> >>> > > > > > > > > >>> etc.
> > > >> >>> > > > > > > > > >>> > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > > Thoughts?
> > > >> >>> > > > > > > > > >>> > > > > > >
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does
> > not
> > > >> also
> > > >> >>> > imply
> > > >> >>> > > > > > "making
> > > >> >>> > > > > > > > > part
> > > >> >>> > > > > > > > > >>> of
> > > >> >>> > > > > > > > > >>> > the
> > > >> >>> > > > > > > > > >>> > > > > > main build"?
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at
> > experimental
> > > >> code
> > > >> >>> > > > entering
> > > >> >>> > > > > > the
> > > >> >>> > > > > > > > > build
> > > >> >>> > > > > > > > > >>> at
> > > >> >>> > > > > > > > > >>> > > this
> > > >> >>> > > > > > > > > >>> > > > > > stage.
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
> > > >> >>> > > > > > > > > >>> > > > > >
> > > >> >>> > > > > > > > > >>> > > > >
> > > >> >>> > > > > > > > > >>> > > > > I think it's business as usual, code
> > > that
> > > >> >>> doesn't
> > > >> >>> > > > work
> > > >> >>> > > > > > does
> > > >> >>> > > > > > > > not
> > > >> >>> > > > > > > > > go
> > > >> >>> > > > > > > > > >>> in
> > > >> >>> > > > > > > > > >>> > > the
> > > >> >>> > > > > > > > > >>> > > > > main build, code that's getting
> stable
> > > can
> > > >> go
> > > >> >>> in
> > > >> >>> > > the
> > > >> >>> > > > > main
> > > >> >>> > > > > > > > build
> > > >> >>> > > > > > > > > at
> > > >> >>> > > > > > > > > >>> > some
> > > >> >>> > > > > > > > > >>> > > > > point when people have no specific
> > > >> objections,
> > > >> >>> > and
> > > >> >>> > > > > > > different
> > > >> >>> > > > > > > > > >>> profiles
> > > >> >>> > > > > > > > > >>> > > can
> > > >> >>> > > > > > > > > >>> > > > be
> > > >> >>> > > > > > > > > >>> > > > > used to subset particular builds.
> > > >> >>> > > > > > > > > >>> > > > >
> > > >> >>> > > > > > > > > >>> > > > > --
> > > >> >>> > > > > > > > > >>> > > > > Jean-Sebastien
> > > >> >>> > > > > > > > > >>> > > > >
> > > >> >>> > > > > > > > > >>> > > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > --
> > > >> >>> > > > > > > > > >>> > > best,
> > > >> >>> > > > > > > > > >>> > > -oscar
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> > > Oscar Castañeda
> > > >> >>> > > > > > > > > >>> > >
> > > >> >>> > > > > > > > > >>> >
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> --
> > > >> >>> > > > > > > > > >>> best,
> > > >> >>> > > > > > > > > >>> -oscar
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>> Oscar Castañeda
> > > >> >>> > > > > > > > > >>>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >>
> > > >> >>> > > > > > > > > >
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > > > --
> > > >> >>> > > > > > > > > Luciano Resende
> > > >> >>> > > > > > > > > Apache Tuscany Committer
> > > >> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende>
> > > >> <http://people.apache.org/%7Elresende>
> > > >> >>> <http://people.apache.org/%7Elresende>
> > > >> >>> > <http://people.apache.org/%7Elresende>
> > > >> >>> > > <http://people.apache.org/%7Elresende>
> > > >> >>> > > > <http://people.apache.org/%7Elresende>
> > > >> >>> > > > > <http://people.apache.org/%7Elresende>
> > > >> >>> > > > > > <http://people.apache.org/%7Elresende>
> > > >> >>> > > > > > > <http://people.apache.org/%7Elresende><
> > > >> >>> > > > > > > > http://people.apache.org/%7Elresende>
> > > >> >>> > > > > > > > > http://lresende.blogspot.com/
> > > >> >>> > > > > > > > >
> > > >> >>> > > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > --
> > > >> >>> > > > > > > best,
> > > >> >>> > > > > > > -oscar
> > > >> >>> > > > > > >
> > > >> >>> > > > > > > Oscar Castañeda
> > > >> >>> > > > > > >
> > > >> >>> > > > > >
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > >
> > > >> >>> > > > > --
> > > >> >>> > > > > best,
> > > >> >>> > > > > -oscar
> > > >> >>> > > > >
> > > >> >>> > > > > Oscar Castañeda
> > > >> >>> > > > >
> > > >> >>> > > >
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > >
> > > >> >>> > > --
> > > >> >>> > > best,
> > > >> >>> > > -oscar
> > > >> >>> > >
> > > >> >>> > > Oscar Castañeda
> > > >> >>> > >
> > > >> >>> >
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>> --
> > > >> >>> best,
> > > >> >>> -oscar
> > > >> >>>
> > > >> >>> Oscar Castañeda
> > > >> >>>
> > > >> >>
> > > >> >>
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> Luciano Resende
> > > >> Apache Tuscany Committer
> > > >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende><
> > > http://people.apache.org/%7Elresende>
> > > >> http://lresende.blogspot.com/
> > > >>
> > > >
> > > >
> > > >
> > > > --
> > > > best,
> > > > -oscar
> > > >
> > > > Oscar Castañeda
> > > >
> > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende><
> > http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
I added to the wiki a page [1] about all the issues we have found so far
when trying to port the SCA Java to the Android platform.

[1] -
http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Limitation+on+porting+SCA+to+Android+platform

On Wed, Jun 25, 2008 at 2:50 PM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Luciano,
>
> Thanks for the tip. Before testing it I generated a JIRA ticket [1] for the
> Retrotranslator progress, and when I got around to testing I noticed a
> different ClassNotFoundException. This time its for
> java.beans.Introspector.  I made sure to include this in the JIRA ticket
> and
> posted the stack trace from Eclipse [2]. Suggestions are welcome.
>
> [1] https://issues.apache.org/jira/browse/TUSCANY-2440
> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2
>
> On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>
> > Removing RMI should be as simple as removing the tuscany-binding-rmi
> > dependency from host-android.
> >
> > On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
> > <os...@gmail.com> wrote:
> > > Hi Luciano,
> > >
> > > It's going better after the progress last week with retrotranslator.
> I'm
> > now
> > > able to translate the SCA classes and run calculator-android without
> > getting
> > > Annotation related issues. The problems now are related to RMI. In
> > relation
> > > to this, and from your comment about blocking issues, I created a child
> > page
> > > [1] in the project wiki for Blocking issues. Currently, the page lists
> > the
> > > RMI issue and suggested workarounds.
> > >
> > > I think your suggestion about integration with maven is really good.
> > > Especially because there is a retrotranslator plugin for maven. I'll
> > start
> > > looking into using this plugin. I also agree about reviewing the scope
> of
> > > support. Right now, I see a need to reduce the dependency on RMI,
> either
> > by
> > > commenting all the code that uses the RMI API, or by following the
> > > suggestions from Taras [3] to either replace java.rmi.Remote with
> > > java.lang.Cloneable (as the result of using a retrotranslator option)
> or
> > > taking the RMI source from Apache Harmony and putting it in a
> > > retrotranslated JAR. What would you recommend? Hopefully after the
> > > dependency reduction Android will be able to run calculator-android.
> > Based
> > > on the results of this experiment we can better consider the reduction
> of
> > > component types and bindings. Please let me know your thoughts on this
> > idea.
> > >
> > > [1]
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
> > > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
> > > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
> > >
> > >
> > > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <
> luckbr1975@gmail.com>
> > > wrote:
> > >
> > >> How is it going here ? I just want to check if there is any blocking
> > >> issues with Android at the moment, if so, is there a list of these
> > >> issues somewhere ?
> > >>
> > >> Also, some general suggestions/recommendations.: It would be great if
> > >> we could spend sometime to get the modules well integrated using
> > >> maven, this way it would be easier for anyone on the community to
> > >> checkout the trunk + android sandbox and jump on the code to help.
> > >> Also, we should review the scope of the support we are trying to
> > >> acomplish, I'd suggest to minimize the number of component types
> > >> supported (java) and bindings (default sca binding) and then try to
> > >> run the calculator sample application. Once we have acomplished this
> > >> first milestone, we could then discuss our next steps.
> > >>
> > >> Thoughts ?
> > >>
> > >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> > >> <ad...@apache.org> wrote:
> > >> > Ah, here is a tip to assure the classes are not recompiled again.
> > Build
> > >> the
> > >> > project, then go in each project builder (in the properties window)
> > and
> > >> > disable all the builders, then not even a clean/build will modify
> your
> > >> > project ; )
> > >> >
> > >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> > >> adrianocrestani@apache.org>
> > >> > wrote:
> > >> >
> > >> >> Hi Oscar,
> > >> >>
> > >> >> I say that it is more difficult to debug because you need attach a
> > >> source
> > >> >> code to each jar and etc, and when you are using projects, eclipse
> > >> already
> > >> >> knows where to find the source code : )
> > >> >>
> > >> >> The reply made sense to me, especially with regards to the fact
> that
> > >> with
> > >> >> the Android plugin Eclipse compiles sources into classes and then
> > into
> > >> dex
> > >> >> files, so retrotranslator has no chance to translate classes in
> > between
> > >> >> these steps - even if I do that outside of Eclipse. This shows from
> > the
> > >> use
> > >> >> of non-translated binaries (as indicated by the
> > >> >> java.lang.Class.isAnnotationPr
> > >> >> esent(Class.java:1131) error in the stack
> > >> >> trace) that might have been related to the use of pre-existing dex
> > files
> > >> or
> > >> >> over-writing of files by Eclipse. So unless I modify the ADT plugin
> > the
> > >> >> result would still be the same, even if I use a simpler scenario.
> > >> >>
> > >> >> Sorry, I really did not comment this email yet. It does not make so
> > much
> > >> >> sense for me. First, as you already know, eclipse android projects
> > does
> > >> not
> > >> >> recognize any modifications in the imported projects, so it does
> not
> > >> call
> > >> >> the build or incremental build even if the imported projects have
> > their
> > >> >> source code modified. Just to make sure I tested it again:
> > >> >>
> > >> >> 1-  imported in my workspace all the projects included in the
> > >> >> calculator-android, cleaned and built them...it takes a loooong
> time,
> > as
> > >> you
> > >> >> already know.
> > >> >>
> > >> >> 2- imported the calculator-android project, cleaned and built it
> > (only
> > >> the
> > >> >> calculator-android project), and this process was too much faster
> > than
> > >> when
> > >> >> all the modules are built, so the imported projects were not
> > recompiled,
> > >> >> otherwise it would take too much more time. I suppose here that the
> > >> android
> > >> >> project compiles the .java contained in the android project and
> > convert
> > >> all
> > >> >> the .class files (generated by imported projects and android
> project)
> > to
> > >> dex
> > >> >> format.
> > >> >>
> > >> >> So, it does not recompile the external class files (the ones
> > contained
> > >> in
> > >> >> the imported projects) cause it seems not to check if it was
> modified
> > or
> > >> >> not. Of course, I never tested it modifing the .class files, I'm
> just
> > >> >> assuming that, because when you modify .java files it does not get
> > >> >> recompiled.
> > >> >>
> > >> >> What do you think?
> > >> >>
> > >> >> As I mentioned before, your comments are really helpful as they
> give
> > me
> > >> a
> > >> >> sense of direction. Please let me know if you still think we should
> > >> pursue
> > >> >> retrotranslator for files inside a folder.
> > >> >>
> > >> >> I really think you should try at first the simpler scenario and try
> > to
> > >> >> understand how it works and IF it works. Also, you can try what you
> > were
> > >> >> planning: to retrotranslate the each modules' jar, but I suppose
> it's
> > a
> > >> lot
> > >> >> of work, because there are so many modules :S. So, as I've already
> > said,
> > >> if
> > >> >> you think it's getting to complicated, forget it and go on with
> > >> Luciano's
> > >> >> suggestion.
> > >> >>
> > >> >> Feel free to choose the direction you want to take, and if there is
> > >> another
> > >> >> approach you think is better, just let us know ; )...you are the
> best
> > >> person
> > >> >> to choose the directions, cause you are working directly on it, we
> > are
> > >> just
> > >> >> guinding/helping you ; )
> > >> >>
> > >> >> Thanks,
> > >> >> Adriano Crestani
> > >> >>
> > >> >>
> > >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> > >> >> oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>
> > >> >>> Hi Adriano,
> > >> >>>
> > >> >>> If there is an option on retrotranslator to retrotranslate all the
> > >> classes
> > >> >>> > in a folder, it should work as well as it works on classes
> inside
> > >> .jar
> > >> >>> > files. So, I think you should try to understand why your first
> > >> approach
> > >> >>> > (retrotranslating the eclipse project classes) is not working
> > trying
> > >> a
> > >> >>> > simpler scenario. Have you already tried it?
> > >> >>> >
> > >> >>>
> > >> >>> I agree that it's good to try out a simpler scenario to better
> > >> understand
> > >> >>> the problem. I haven't tried it yet because using retrotranslator
> > for
> > >> >>> classes inside a folder doesn't seem to be a solution to the
> > problem.
> > >> >>> Here's
> > >> >>> my reasoning:
> > >> >>>
> > >> >>> Yes, there is an option to translate classes in a folder. I tried
> it
> > >> and
> > >> >>> it
> > >> >>> successfully translated the classes inside my Eclipse workspace.
> > When I
> > >> >>> ran
> > >> >>> the calculator-android application using the newly translated
> > classes I
> > >> >>> was
> > >> >>> getting the errors in [1]. I posted a question in Android
> Developers
> > >> about
> > >> >>> this error and received a reply [2].
> > >> >>>
> > >> >>> The reply made sense to me, especially with regards to the fact
> that
> > >> with
> > >> >>> the Android plugin Eclipse compiles sources into classes and then
> > into
> > >> dex
> > >> >>> files, so retrotranslator has no chance to translate classes in
> > between
> > >> >>> these steps - even if I do that outside of Eclipse. This shows
> from
> > the
> > >> >>> use
> > >> >>> of non-translated binaries (as indicated by the
> > >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the
> > stack
> > >> >>> trace) that might have been related to the use of pre-existing dex
> > >> files
> > >> >>> or
> > >> >>> over-writing of files by Eclipse. So unless I modify the ADT
> plugin
> > the
> > >> >>> result would still be the same, even if I use a simpler scenario.
> > >> >>>
> > >> >>> The reply suggested to use JAR's instead. This also made sense to
> me
> > >> and
> > >> >>> seemed like a simpler way of solving the problem. I didn't see the
> > >> >>> disadvantage of debugging, which as you point out is more
> difficult
> > >> with
> > >> >>> JAR's instead of Eclipse projects.
> > >> >>>
> > >> >>> As I mentioned before, your comments are really helpful as they
> give
> > me
> > >> a
> > >> >>> sense of direction. Please let me know if you still think we
> should
> > >> pursue
> > >> >>> retrotranslator for files inside a folder.
> > >> >>>
> > >> >>>
> > >> >>> [1]
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> > >> >>> [2]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > >> >>>
> > >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> > >> >>> adrianocrestani@apache.org>
> > >> >>> wrote:
> > >> >>>
> > >> >>> > Hi Oscar,
> > >> >>> >
> > >> >>> > Yup, you're right - there are indeed Eclipse files inside the
> > >> folders. I
> > >> >>> > guess I was confused by the different names in [1] than those
> that
> > >> >>> result
> > >> >>> > [2] from importing to an Eclipse workspace - after which I see
> 13
> > >> >>> projects
> > >> >>> > in both cases. So please ignore my previous remark.
> > >> >>> >
> > >> >>> > I have added the projects, but still haven't changed their
> names.
> > I
> > >> was
> > >> >>> > planning to modify their project names when we get it integrated
> > to
> > >> SCA,
> > >> >>> > mainly because we will need to change the poms. Anyway, feel
> free
> > to
> > >> >>> modify
> > >> >>> > the names whenever you want ; )
> > >> >>> >
> > >> >>> >
> > >> >>> > Per the reply I received on the Android Developers list [3] I
> > started
> > >> >>> using
> > >> >>> > retrotranslator on JAR's instead of class files. For this I
> > created a
> > >> >>> big
> > >> >>> > JAR file with all the Tuscany modules (including those you
> > modified
> > >> for
> > >> >>> > Android). I translated this big JAR (around 15MB) with
> > >> retrotranslator
> > >> >>> [4].
> > >> >>> > Then I created a new workspace with only calculator-android and
> > >> >>> > android-jdk-classes as projects and added the translated JAR as
> an
> > >> >>> external
> > >> >>> > library for both projects. This resulted in errors [4] from the
> > >> Android
> > >> >>> > build process.
> > >> >>> >
> > >> >>> > I really do not understand this errors, but as this errors are
> > only
> > >> >>> related
> > >> >>> > to testcase classes they can be ignored (removed from the jars).
> I
> > >> also
> > >> >>> did
> > >> >>> > not understand why it's not find the .apk file:
> > >> >>> >
> > >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> > >> >>> > /bin/calculator-android.apk!"
> > >> >>> >
> > >> >>> > To work around these errors I decided to take a different
> approach
> > >> and
> > >> >>> copy
> > >> >>> > all the jar files contained in the individual modules to a
> > separate
> > >> >>> folder
> > >> >>> > and then run retrotranslator on each JAR. The jars are found
> > inside
> > >> the
> > >> >>> > target folder of each module and are named as shown below:
> > >> >>> >
> > >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> > >> >>> >
> > >> >>> > From this I found that only the SCA modules have these JAR files
> > >> inside
> > >> >>> > their respective target folders, whereas the Android modules I
> > >> >>> downloaded
> > >> >>> > from [1] don't have these files at all
> > >> >>> >
> > >> >>> > Yep, this .jars are generated when the maven is executed. I'm
> not
> > >> sure
> > >> >>> if
> > >> >>> > you should use this .jars, because they were compiled with no
> > >> reference
> > >> >>> to
> > >> >>> > Android library. That's also why there are no .jar files for
> > android
> > >> >>> > modules, because you did not execute the maven on them  (and you
> > >> >>> > shouldn't).
> > >> >>> >
> > >> >>> > So I decided to keep the Android
> > >> >>> > modules [2] and add the translated JARs as libraries where
> needed
> > to
> > >> >>> have
> > >> >>> > the workspace build with no problems. If I get this running I
> > would
> > >> look
> > >> >>> > into creating JAR files from the Android modules and then return
> > to
> > >> only
> > >> >>> > having calculator-android and android-jdk-classes as projects
> and
> > the
> > >> >>> rest
> > >> >>> > as JAR's added as external libraries. If this works out I could
> > then
> > >> >>> look
> > >> >>> > into seeing which JAR's are important and which are not, in this
> > way
> > >> >>> > reducing the total memory footprint and coming up with a
> > "lightweight
> > >> >>> > mobile
> > >> >>> > SCA core/runtime." Please let me know your thoughts on these
> > efforts.
> > >> >>> >
> > >> >>> > You haven't tried this yet, right? You may try it, but I do not
> > like
> > >> >>> this
> > >> >>> > approach, because it will get difficult to debug sca classes as
> > they
> > >> are
> > >> >>> > not
> > >> >>> > imported as eclipse projects.
> > >> >>> >
> > >> >>> > If there is an option on retrotranslator to retrotranslate all
> the
> > >> >>> classes
> > >> >>> > in a folder, it should work as well as it works on classes
> inside
> > >> .jar
> > >> >>> > files. So, I think you should try to understand why your first
> > >> approach
> > >> >>> > (retrotranslating the eclipse project classes) is not working
> > trying
> > >> a
> > >> >>> > simpler scenario. Have you already tried it?
> > >> >>> >
> > >> >>> > Also, if the restrotranslator gets to complicated, you may try
> the
> > >> >>> > Luciano's
> > >> >>> > suggestion ; )
> > >> >>> >
> > >> >>> >
> > >> >>> > Kind Regards,
> > >> >>> > Adriano Crestani
> > >> >>> >
> > >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> > >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>> >
> > >> >>> > > Hi Adriano,
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > > Yep, they should be imported, if you check inside its
> folders,
> > >> there
> > >> >>> > are
> > >> >>> > > > the
> > >> >>> > > > eclipse project files, so they should be identified by the
> > >> eclipse
> > >> >>> > import
> > >> >>> > > > tool as an eclipse project.
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > Yup, you're right - there are indeed Eclipse files inside the
> > >> folders.
> > >> >>> I
> > >> >>> > > guess I was confused by the different names in [1] than those
> > that
> > >> >>> result
> > >> >>> > > [2] from importing to an Eclipse workspace - after which I see
> > 13
> > >> >>> > projects
> > >> >>> > > in both cases. So please ignore my previous remark.
> > >> >>> > >
> > >> >>> > > I don't think introspection is a good solution, hence you will
> > need
> > >> to
> > >> >>> > > > change how the sca reads the info about each service and
> also
> > >> >>> services
> > >> >>> > > > implemented for JVM would need to be adapted to run on
> > Android.
> > >> >>> Let's
> > >> >>> > > avoid
> > >> >>> > > > to modify so much the SCA code, and lets try to keep
> > >> retrotranslator
> > >> >>> in
> > >> >>> > > > mind
> > >> >>> > > > as a temporary workaround for annotations till next SDK
> > release
> > >> :S
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > >  Also, if you get the retrotranslator working, forget the
> > >> Luciano's
> > >> >>> > > > suggestion and vice-versa...do not try both at the same time
> ;
> > )
> > >> >>> > > >
> > >> >>> > >
> > >> >>> > > Will do. Thanks for the advice it helps me to focus in the
> right
> > >> >>> > direction
> > >> >>> > > :-)
> > >> >>> > >
> > >> >>> > > Now, a summary of what I've done up to now:
> > >> >>> > >
> > >> >>> > > Per the reply I received on the Android Developers list [3] I
> > >> started
> > >> >>> > using
> > >> >>> > > retrotranslator on JAR's instead of class files. For this I
> > created
> > >> a
> > >> >>> big
> > >> >>> > > JAR file with all the Tuscany modules (including those you
> > modified
> > >> >>> for
> > >> >>> > > Android). I translated this big JAR (around 15MB) with
> > >> retrotranslator
> > >> >>> > [4].
> > >> >>> > > Then I created a new workspace with only calculator-android
> and
> > >> >>> > > android-jdk-classes as projects and added the translated JAR
> as
> > an
> > >> >>> > external
> > >> >>> > > library for both projects. This resulted in errors [4] from
> the
> > >> >>> Android
> > >> >>> > > build process.
> > >> >>> > >
> > >> >>> > > To work around these errors I decided to take a different
> > approach
> > >> and
> > >> >>> > copy
> > >> >>> > > all the jar files contained in the individual modules to a
> > separate
> > >> >>> > folder
> > >> >>> > > and then run retrotranslator on each JAR. The jars are found
> > inside
> > >> >>> the
> > >> >>> > > target folder of each module and are named as shown below:
> > >> >>> > >
> > >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> > >> >>> > >
> > >> >>> > > From this I found that only the SCA modules have these JAR
> files
> > >> >>> inside
> > >> >>> > > their respective target folders, whereas the Android modules I
> > >> >>> downloaded
> > >> >>> > > from [1] don't have these files at all. So I decided to keep
> the
> > >> >>> Android
> > >> >>> > > modules [2] and add the translated JARs as libraries where
> > needed
> > >> to
> > >> >>> have
> > >> >>> > > the workspace build with no problems. If I get this running I
> > would
> > >> >>> look
> > >> >>> > > into creating JAR files from the Android modules and then
> return
> > to
> > >> >>> only
> > >> >>> > > having calculator-android and android-jdk-classes as projects
> > and
> > >> the
> > >> >>> > rest
> > >> >>> > > as JAR's added as external libraries. If this works out I
> could
> > >> then
> > >> >>> look
> > >> >>> > > into seeing which JAR's are important and which are not, in
> this
> > >> way
> > >> >>> > > reducing the total memory footprint and coming up with a
> > >> "lightweight
> > >> >>> > > mobile
> > >> >>> > > SCA core/runtime." Please let me know your thoughts on these
> > >> efforts.
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > [1]
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> > >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> > >> >>> > > [3]
> > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > >> >>> > > [4]
> > >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> > >> >>> > > adrianocrestani@apache.org>
> > >> >>> > > wrote:
> > >> >>> > >
> > >> >>> > > > Hi Oscar,
> > >> >>> > > >
> > >> >>> > > >
> > >> >>> > > > When I imported the projects from [3] the following projects
> > were
> > >> >>> not
> > >> >>> > > > imported:
> > >> >>> > > >
> > >> >>> > > > core-android
> > >> >>> > > > host-android
> > >> >>> > > > extensibility
> > >> >>> > > >
> > >> >>> > > > Is this normal? Should they be imported?
> > >> >>> > > >
> > >> >>> > > > Yep, they should be imported, if you check inside its
> folders,
> > >> there
> > >> >>> > are
> > >> >>> > > > the
> > >> >>> > > > eclipse project files, so they should be identified by the
> > >> eclipse
> > >> >>> > import
> > >> >>> > > > tool as an eclipse project.
> > >> >>> > > >
> > >> >>> > > > Thanks for the detailed explanation. I'm going to give this
> a
> > try
> > >> as
> > >> >>> I
> > >> >>> > > > found
> > >> >>> > > > an introspection related comment [2] as a workaround to
> > another
> > >> >>> > > annotations
> > >> >>> > > > problem with the current SDK.
> > >> >>> > > >
> > >> >>> > > > I don't think introspection is a good solution, hence you
> will
> > >> need
> > >> >>> to
> > >> >>> > > > change how the sca reads the info about each service and
> also
> > >> >>> services
> > >> >>> > > > implemented for JVM would need to be adapted to run on
> > Android.
> > >> >>> Let's
> > >> >>> > > avoid
> > >> >>> > > > to modify so much the SCA code, and lets try to keep
> > >> retrotranslator
> > >> >>> in
> > >> >>> > > > mind
> > >> >>> > > > as a temporary workaround for annotations till next SDK
> > release
> > >> :S
> > >> >>> > > >
> > >> >>> > > > Also, if you get the retrotranslator working, forget the
> > >> Luciano's
> > >> >>> > > > suggestion and vice-versa...do not try both at the same time
> ;
> > )
> > >> >>> > > >
> > >> >>> > > > Any progress testing retrotranslator on a simpler scenario,
> > just
> > >> let
> > >> >>> us
> > >> >>> > > > know
> > >> >>> > > > ; )
> > >> >>> > > >
> > >> >>> > > > Kind Regards,
> > >> >>> > > > Adriano Crestani
> > >> >>> > > >
> > >> >>> > > >
> > >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> > >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>> > > >
> > >> >>> > > > > Hi Adriano,
> > >> >>> > > > >
> > >> >>> > > > > At first, build a simple, but equivalent scenario, and
> test
> > it.
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > > I think this is a great idea, especially because I found
> > that
> > >> the
> > >> >>> > > "native
> > >> >>> > > > > method not implemented" errors I'm getting [1] are still
> > >> related
> > >> >>> to
> > >> >>> > the
> > >> >>> > > > > annotations problem. I'm getting the same errors when
> > >> converting
> > >> >>> the
> > >> >>> > > code
> > >> >>> > > > > to
> > >> >>> > > > > java 1.4. This makes me think that retrotranslator is
> > actually
> > >> not
> > >> >>> > > > working.
> > >> >>> > > > > Hopefully, testing with a simpler scenario will help me to
> > >> >>> understand
> > >> >>> > > the
> > >> >>> > > > > problem better.
> > >> >>> > > > >
> > >> >>> > > > > Sorry for the not-well-detailed info here. I meant you to
> > do:
> > >> >>> > > > > >
> > >> >>> > > > > > Search in every sca code for the usage of
> > >> >>> Class.isAnnotationPresent
> > >> >>> > > or
> > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
> for
> > a
> > >> the
> > >> >>> > > > > @Remotable
> > >> >>> > > > > > annotations force it to true, for example:
> > >> >>> > > > > >
> > >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> > >> >>> > > > > >>
> > >> >>> > > > > >> (Remotable.class); =>
> > >> >>> > > > > >> Annotation isRemotable = true;
> > >> >>> > > > > >>
> > >> >>> > > > > >> otherwise, which means, when it's not checking for the
> > >> >>> @Remotable
> > >> >>> > > > > >> annnotation, force to false. For example:
> > >> >>> > > > > >>
> > >> >>> > > > > >> Annotation isReference =
> > >> >>> > class.isAnnotationPresent(Reference.class);
> > >> >>> > > > =>
> > >> >>> > > > > >> Annotation isReference = false;
> > >> >>> > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > > > Thanks for the detailed explanation. I'm going to give
> this
> > a
> > >> try
> > >> >>> as
> > >> >>> > I
> > >> >>> > > > > found
> > >> >>> > > > > an introspection related comment [2] as a workaround to
> > another
> > >> >>> > > > annotations
> > >> >>> > > > > problem with the current SDK.
> > >> >>> > > > >
> > >> >>> > > > > Also, I have another question for you...
> > >> >>> > > > >
> > >> >>> > > > > When I imported the projects from [3] the following
> projects
> > >> were
> > >> >>> not
> > >> >>> > > > > imported:
> > >> >>> > > > >
> > >> >>> > > > > core-android
> > >> >>> > > > > host-android
> > >> >>> > > > > extensibility
> > >> >>> > > > >
> > >> >>> > > > > Is this normal? Should they be imported?
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > > [1]
> > >> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > >> >>> > > > > [2]
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > >> >>> > > > > [3]
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > >> >>> > > > > adrianocrestani@apache.org>
> > >> >>> > > > > wrote:
> > >> >>> > > > >
> > >> >>> > > > > > Well detailed Oscar ; )
> > >> >>> > > > > >
> > >> >>> > > > > > It is one thing I learnt after playing hours with
> Android,
> > >> you
> > >> >>> need
> > >> >>> > > to
> > >> >>> > > > > > rebuild every modified project which is imported in the
> > >> android
> > >> >>> > > > project,
> > >> >>> > > > > > the
> > >> >>> > > > > > android project itself does not check for modifications
> on
> > >> its
> > >> >>> > > > > dependencies
> > >> >>> > > > > > :S...so, when you rebuilt the imported project it
> > recompiled
> > >> the
> > >> >>> > > > > > uncommented
> > >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started
> to
> > >> check
> > >> >>> for
> > >> >>> > > > > > annotations once again, so you got the errors on [1],
> > which
> > >> >>> means
> > >> >>> > > > > > retrotranslator is still not working. Have you tested it
> > on a
> > >> >>> > simpler
> > >> >>> > > > > > application as I previously suggested? Did it work? What
> > was
> > >> the
> > >> >>> > most
> > >> >>> > > > > > critical scenario you tested it and it worked?
> > >> >>> > > > > >
> > >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> > >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> > >> /../workspace
> > >> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> > >> >>> > > > > >
> > >> >>> > > > > > You should also check if it's is working as expected, as
> I
> > >> >>> already
> > >> >>> > > > said,
> > >> >>> > > > > > does not go directly testing complex solutions on
> complex
> > >> things
> > >> >>> > like
> > >> >>> > > > > SCA.
> > >> >>> > > > > > At first, build a simple, but equivalent scenario, and
> > test
> > >> it.
> > >> >>> For
> > >> >>> > > > > > example,
> > >> >>> > > > > > a simple android app project that uses an java library
> > >> project
> > >> >>> > which
> > >> >>> > > > > access
> > >> >>> > > > > > annotations on classes placed on the android project.
> Like
> > >> our
> > >> >>> > > android
> > >> >>> > > > > > calculator, it's an android app project
> > (calculator-android)
> > >> >>> which
> > >> >>> > > uses
> > >> >>> > > > > > java
> > >> >>> > > > > > library projects (sca modules), and these libraries
> checks
> > >> for
> > >> >>> > > > > annotations
> > >> >>> > > > > > on classes located at the android app project
> > >> >>> > > (CalculatorService.java,
> > >> >>> > > > > > AddService.java, etc). When you get it working on the
> > simpler
> > >> >>> > > scenario,
> > >> >>> > > > > > then
> > >> >>> > > > > > you are ready to test it on the complexer sceneario
> > >> >>> > > > (calculator-android).
> > >> >>> > > > > >
> > >> >>> > > > > > Please, if you get the retrotranslator working in the
> > simpler
> > >> >>> > > scenario,
> > >> >>> > > > > > send
> > >> >>> > > > > > us a patch with it. You can create a JIRA and attach it.
> > If
> > >> you
> > >> >>> > need
> > >> >>> > > > any
> > >> >>> > > > > > help, just ask ; )
> > >> >>> > > > > >
> > >> >>> > > > > > "code that checks for @Remotable you force to true,
> > otherwise
> > >> >>> force
> > >> >>> > > to
> > >> >>> > > > > > false."
> > >> >>> > > > > >
> > >> >>> > > > > > Sorry for the not-well-detailed info here. I meant you
> to
> > do:
> > >> >>> > > > > >
> > >> >>> > > > > > Search in every sca code for the usage of
> > >> >>> Class.isAnnotationPresent
> > >> >>> > > or
> > >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks
> for
> > a
> > >> the
> > >> >>> > > > > @Remotable
> > >> >>> > > > > > annotations force it to true, for example:
> > >> >>> > > > > >
> > >> >>> > > > > > Annotation isRemotable =
> > >> >>> > class.isAnnotationPresent(Remotable.class);
> > >> >>> > > =>
> > >> >>> > > > > > Annotation isRemotable = true;
> > >> >>> > > > > >
> > >> >>> > > > > > otherwise, which means, when it's not checking for the
> > >> >>> @Remotable
> > >> >>> > > > > > annnotation, force to false. For example:
> > >> >>> > > > > >
> > >> >>> > > > > > Annotation isReference =
> > >> >>> > class.isAnnotationPresent(Reference.class);
> > >> >>> > > =>
> > >> >>> > > > > > Annotation isReference = false;
> > >> >>> > > > > >
> > >> >>> > > > > > [1] -
> > >> >>> > >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > >> >>> > > > > >
> > >> >>> > > > > > Kind Regards,
> > >> >>> > > > > > Adriano Crestani
> > >> >>> > > > > >
> > >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>> > > > > >
> > >> >>> > > > > > > Hi Adriano,
> > >> >>> > > > > > >
> > >> >>> > > > > > > I continued testing retrotranslator. Here's what I've
> > done
> > >> up
> > >> >>> to
> > >> >>> > > now.
> > >> >>> > > > > > >
> > >> >>> > > > > > > 1. Downloaded the modified code from [1].
> > >> >>> > > > > > >
> > >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as
> > shown
> > >> >>> below:
> > >> >>> > > > > > >
> > >> >>> > > > > > > svn checkout --revision 643746
> > >> >>> > > > > > >
> > >> >>> > >
> > >> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > >> >>> > > > > > >
> > >> >>> > > > > > > cd modules
> > >> >>> > > > > > >
> > >> >>> > > > > > > mvn clean install -Dtest=no
> > >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > >> >>> > > > > > >
> > >> >>> > > > > > >  3. Created a new eclipse workspace and set the
> M2_REPO
> > >> >>> variable
> > >> >>> > as
> > >> >>> > > > > shown
> > >> >>> > > > > > > below:
> > >> >>> > > > > > >
> > >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> > >> >>> > eclipse:add-maven-repo
> > >> >>> > > > > > >
> > >> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors,
> added
> > >> >>> Android
> > >> >>> > > > library
> > >> >>> > > > > > to
> > >> >>> > > > > > > required modules, fixed references to jar files and
> > other
> > >> >>> > > libraries.
> > >> >>> > > > > > >
> > >> >>> > > > > > > 5. Uncommented lines in
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > >
> > >> >>> > > > > > > 6. Ran retrotranslator as instructed on the project
> site
> > >> [3]
> > >> >>> and
> > >> >>> > > > shown
> > >> >>> > > > > > > below:
> > >> >>> > > > > > >
> > >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> > >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> > >> >>> /../workspace
> > >> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> > >> >>> > > > > > >
> > >> >>> > > > > > >  The output can be found in [4].
> > >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > >
> > >> >>> > > > > > > and then re-ran retrotranslator.
> > >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and
> > >> Android
> > >> >>> > > errors
> > >> >>> > > > in
> > >> >>> > > > > > > [6].
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > > As always, I'm documenting my progress on the project
> > log.
> > >> I
> > >> >>> > > haven't
> > >> >>> > > > > > fully
> > >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled
> by
> > >> what
> > >> >>> you
> > >> >>> > > > mean
> > >> >>> > > > > by
> > >> >>> > > > > > > this:
> > >> >>> > > > > > >
> > >> >>> > > > > > > "code that checks for @Remotable you force to true,
> > >> otherwise
> > >> >>> > force
> > >> >>> > > > to
> > >> >>> > > > > > > false."
> > >> >>> > > > > > >
> > >> >>> > > > > > > I'll continue looking into it and hopefully get
> > >> >>> retrotranslator
> > >> >>> > to
> > >> >>> > > > > work.
> > >> >>> > > > > > I
> > >> >>> > > > > > > also think it's a simpler option.
> > >> >>> > > > > > >
> > >> >>> > > > > > > Luciano: Thanks for your suggestions.
> > >> >>> > > > > > >
> > >> >>> > > > > > > [1]
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >> >>> > > > > > >
> > >> >>> > > > > > > [2]
> > >> >>> > > > >
> > >> >>>
> > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > >> >>> > > > > > >
> > >> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> > >> >>> > > > > > >
> > >> >>> > > > > > > [4]
> > >> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > >> >>> > > > > > >
> > >> >>> > > > > > > [5]
> > >> >>> > >
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > >> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > >> >>> > > > > > > adrianocrestani@apache.org> wrote:
> > >> >>> > > > > > >
> > >> >>> > > > > > > > Hi,
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > I tried what Luciano suggested. It really works. To
> > get
> > >> it
> > >> >>> > > working
> > >> >>> > > > > you
> > >> >>> > > > > > > > simply need to search on all modules where the code
> > >> checks
> > >> >>> for
> > >> >>> > > > > > @Remotable
> > >> >>> > > > > > > > annotation and force it to true:
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   =>
> > true
> > >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > It works fine on the sca revision we are testing on
> > >> Android
> > >> >>> and
> > >> >>> > > the
> > >> >>> > > > > > most
> > >> >>> > > > > > > > recent revision. I only tested it as a java
> > application,
> > >> not
> > >> >>> as
> > >> >>> > > an
> > >> >>> > > > > > > android
> > >> >>> > > > > > > > application.
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a
> > faster
> > >> >>> and
> > >> >>> > > > simpler
> > >> >>> > > > > > > > solution. Because the Luciano's suggestion only
> forces
> > >> the
> > >> >>> SCA
> > >> >>> > to
> > >> >>> > > > > > > recognize
> > >> >>> > > > > > > > the services with no annotations declared on their
> > >> >>> interfaces,
> > >> >>> > > but
> > >> >>> > > > it
> > >> >>> > > > > > > does
> > >> >>> > > > > > > > not avoid the Exceptions we are getting when the SCA
> > >> invokes
> > >> >>> > > > methods
> > >> >>> > > > > > that
> > >> >>> > > > > > > > read annotations. So, our current problem is that we
> > are
> > >> not
> > >> >>> > > being
> > >> >>> > > > > able
> > >> >>> > > > > > > to
> > >> >>> > > > > > > > use these methods and not only because we are not
> > being
> > >> able
> > >> >>> to
> > >> >>> > > > read
> > >> >>> > > > > > the
> > >> >>> > > > > > > > annotations.
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > Oscar, if you want to try the Luciano's suggestion,
> > you
> > >> will
> > >> >>> > need
> > >> >>> > > > to
> > >> >>> > > > > > > > comment/adapt every sca code that tries to read the
> > class
> > >> >>> > > > > annotations.
> > >> >>> > > > > > It
> > >> >>> > > > > > > > is
> > >> >>> > > > > > > > not necessary to comment/adapt the methods that read
> > >> Method
> > >> >>> > > > > > annotations,
> > >> >>> > > > > > > > they are not throwning any exception. So, every code
> > that
> > >> >>> > checks
> > >> >>> > > > for
> > >> >>> > > > > > > > @Remotable you force to true, otherwise force to
> > false.
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > Any doubt about what I have said, just let me know ;
> )
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > Suggestions are welcome : )
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > Adriano Crestani
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > >> >>> > > > > > luckbr1975@gmail.com>
> > >> >>> > > > > > > > wrote:
> > >> >>> > > > > > > >
> > >> >>> > > > > > > > > FYI, if you comment out the code that checks if a
> > >> >>> interface
> > >> >>> > is
> > >> >>> > > > > > > > > remoteble, you could have a version of the
> > calculator
> > >> >>> without
> > >> >>> > > any
> > >> >>> > > > > > > > > annotations, and the runtime would introspect the
> > >> >>> references
> > >> >>> > > for
> > >> >>> > > > > the
> > >> >>> > > > > > > > > multiple services. But note that, the
> introspection
> > >> code
> > >> >>> will
> > >> >>> > > > only
> > >> >>> > > > > be
> > >> >>> > > > > > > > > activated if there is no SCA annotations on the
> > class.
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > >> >>> > > > > > > > > <ad...@apache.org> wrote:
> > >> >>> > > > > > > > > > Ah, the expected exception should look like this
> > on
> > >> >>> android
> > >> >>> > > > > > emulator:
> > >> >>> > > > > > > > > >
> > >> >>> > >
> http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >
> > >> >>> > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> > >
> > >> >>> > > <
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> > > > <
> > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> > > > > <
> > >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> > >> >>> >
> > >> >>> > > > > > <
> > >> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> > > > > > > <
> > >> >>> >
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> > > > > > > > <
> > >> >>> > >
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >> >>> > > > > > > > > >
> > >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano
> Crestani
> > <
> > >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> > >> >>> > > > > > > > > >
> > >> >>> > > > > > > > > >> Hi Oscar,
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> I was indeed using the sca modules not from the
> > >> >>> sandbox.
> > >> >>> > As
> > >> >>> > > > you
> > >> >>> > > > > > > > > suggested,
> > >> >>> > > > > > > > > >> I
> > >> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
> > >> workspace
> > >> >>> > and
> > >> >>> > > > > added
> > >> >>> > > > > > > the
> > >> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
> > >> >>> uncommented
> > >> >>> > the
> > >> >>> > > > > lines
> > >> >>> > > > > > > in
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> following the comments pointing out why those
> > lines
> > >> had
> > >> >>> > been
> > >> >>> > > > > > > > commented.
> > >> >>> > > > > > > > > I'm
> > >> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
> > >> However,
> > >> >>> > it's
> > >> >>> > > > > > getting
> > >> >>> > > > > > > > > stuck
> > >> >>> > > > > > > > > >> somewhere else (before getting there I
> guess)...I
> > >> think
> > >> >>> > this
> > >> >>> > > > is
> > >> >>> > > > > > the
> > >> >>> > > > > > > > case
> > >> >>> > > > > > > > > >> because before and after commenting the code I
> > get
> > >> the
> > >> >>> > same
> > >> >>> > > > > error
> > >> >>> > > > > > in
> > >> >>> > > > > > > > the
> > >> >>> > > > > > > > > >> Android emulator, an InstantiationException
> [1].
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> Have you debugged to check exactly where this
> > >> exception
> > >> >>> is
> > >> >>> > > > being
> > >> >>> > > > > > > > thrown?
> > >> >>> > > > > > > > > I
> > >> >>> > > > > > > > > >> have done the procedure I previously described
> > >>  again
> > >> >>> and
> > >> >>> > I
> > >> >>> > > > got
> > >> >>> > > > > it
> > >> >>> > > > > > > > > "running"
> > >> >>> > > > > > > > > >> as expected, which means, running till the
> > expected
> > >> >>> > > exception
> > >> >>> > > > is
> > >> >>> > > > > > > > thrown.
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> I also started tinkering with retrotranslator.
> > First
> > >> I
> > >> >>> > tried
> > >> >>> > > > > doing
> > >> >>> > > > > > > it
> > >> >>> > > > > > > > > with
> > >> >>> > > > > > > > > >> Ant, but it seems that in order to build I have
> > to
> > >> >>> include
> > >> >>> > > the
> > >> >>> > > > > > whole
> > >> >>> > > > > > > > > >> tuscany
> > >> >>> > > > > > > > > >> projects in a way similar to how I now have in
> > >> Eclipse.
> > >> >>> I
> > >> >>> > > also
> > >> >>> > > > > > tried
> > >> >>> > > > > > > > > making
> > >> >>> > > > > > > > > >> a jar out of
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> > >> >>> unfortunately
> > >> >>> > > it's
> > >> >>> > > > > not
> > >> >>> > > > > > > > > >> translating anything, as shown below.
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> > >> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> > >> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > >> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> > >> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot
> > -classpath
> > >> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> > >> >>> > > > > > > > > >> Processing 136 file(s) in
> > >> >>> JavaRuntimeModuleActivator.jar.
> > >> >>> > > > > > > > > >> Transformed 0 file(s).
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> There's also a maven plugin, so I might try
> > >> that...but
> > >> >>> > first
> > >> >>> > > > > I'll
> > >> >>> > > > > > > give
> > >> >>> > > > > > > > > Ant
> > >> >>> > > > > > > > > >> another go. Hopefully Google will release a new
> > SDK
> > >> >>> soon,
> > >> >>> > > > > > otherwise
> > >> >>> > > > > > > as
> > >> >>> > > > > > > > > you
> > >> >>> > > > > > > > > >> say...retrotranslator will have to be the
> > workaround
> > >> to
> > >> >>> > > > proceed
> > >> >>> > > > > > with
> > >> >>> > > > > > > > our
> > >> >>> > > > > > > > > >> project ;-)
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK
> version
> > >> will
> > >> >>> not
> > >> >>> > be
> > >> >>> > > > > > > released
> > >> >>> > > > > > > > > until
> > >> >>> > > > > > > > > >> july 28th :S. So, it's really good you have
> > already
> > >> >>> > started
> > >> >>> > > > > > working
> > >> >>> > > > > > > on
> > >> >>> > > > > > > > > the
> > >> >>> > > > > > > > > >> retrotranslator, it will probably be the best
> > >> >>> workaround
> > >> >>> > for
> > >> >>> > > > the
> > >> >>> > > > > > > > > annotations
> > >> >>> > > > > > > > > >> problem till the next SDK release.
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> I suggest you to forget about the build process
> > >> right
> > >> >>> now,
> > >> >>> > > > > before,
> > >> >>> > > > > > > > check
> > >> >>> > > > > > > > > if
> > >> >>> > > > > > > > > >> this retrotranslator works and if it really
> works
> > on
> > >> >>> > android
> > >> >>> > > > > > > platform.
> > >> >>> > > > > > > > > I´m
> > >> >>> > > > > > > > > >> really getting upset with Android, even its API
> > >> methods
> > >> >>> > does
> > >> >>> > > > not
> > >> >>> > > > > > > work
> > >> >>> > > > > > > > as
> > >> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile a
> > >> simple
> > >> >>> > class
> > >> >>> > > > > > (coded
> > >> >>> > > > > > > by
> > >> >>> > > > > > > > > you),
> > >> >>> > > > > > > > > >> which contains annotations, and access these
> > >> >>> annotations.
> > >> >>> > If
> > >> >>> > > > it
> > >> >>> > > > > > > works,
> > >> >>> > > > > > > > > make
> > >> >>> > > > > > > > > >> it more complex and test again, do it until you
> > >> reach a
> > >> >>> > > > scenario
> > >> >>> > > > > > as
> > >> >>> > > > > > > > > complex
> > >> >>> > > > > > > > > >> as the SCA (a lot of external jars with
> annotated
> > >> >>> classes
> > >> >>> > > > > accessed
> > >> >>> > > > > > > by
> > >> >>> > > > > > > > > the
> > >> >>> > > > > > > > > >> other external jars and the Android app). Got
> it?
> > :
> > >> )
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> Regards,
> > >> >>> > > > > > > > > >> Adriano Crestani
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar
> Castaneda
> > <
> > >> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>> Hi Adriano,
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> I was indeed using the sca modules not from
> the
> > >> >>> sandbox.
> > >> >>> > As
> > >> >>> > > > you
> > >> >>> > > > > > > > > suggested,
> > >> >>> > > > > > > > > >>> I
> > >> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
> > >> >>> workspace
> > >> >>> > and
> > >> >>> > > > > added
> > >> >>> > > > > > > the
> > >> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> > >> >>> uncommented
> > >> >>> > > the
> > >> >>> > > > > > lines
> > >> >>> > > > > > > in
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> following the comments pointing out why those
> > lines
> > >> >>> had
> > >> >>> > > been
> > >> >>> > > > > > > > commented.
> > >> >>> > > > > > > > > >>> I'm
> > >> >>> > > > > > > > > >>> no longer getting the ClassNotFoundException.
> > >> However,
> > >> >>> > it's
> > >> >>> > > > > > getting
> > >> >>> > > > > > > > > stuck
> > >> >>> > > > > > > > > >>> somewhere else (before getting there I
> > guess)...I
> > >> >>> think
> > >> >>> > > this
> > >> >>> > > > is
> > >> >>> > > > > > the
> > >> >>> > > > > > > > > case
> > >> >>> > > > > > > > > >>> because before and after commenting the code I
> > get
> > >> the
> > >> >>> > same
> > >> >>> > > > > error
> > >> >>> > > > > > > in
> > >> >>> > > > > > > > > the
> > >> >>> > > > > > > > > >>> Android emulator, an InstantiationException
> [1].
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> I also started tinkering with retrotranslator.
> > >> First I
> > >> >>> > > tried
> > >> >>> > > > > > doing
> > >> >>> > > > > > > it
> > >> >>> > > > > > > > > with
> > >> >>> > > > > > > > > >>> Ant, but it seems that in order to build I
> have
> > to
> > >> >>> > include
> > >> >>> > > > the
> > >> >>> > > > > > > whole
> > >> >>> > > > > > > > > >>> tuscany
> > >> >>> > > > > > > > > >>> projects in a way similar to how I now have in
> > >> >>> Eclipse. I
> > >> >>> > > > also
> > >> >>> > > > > > > tried
> > >> >>> > > > > > > > > >>> making
> > >> >>> > > > > > > > > >>> a jar out of
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
> > >> >>> unfortunately
> > >> >>> > > it's
> > >> >>> > > > > not
> > >> >>> > > > > > > > > >>> translating anything, as shown below.
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin
> ocastaneda$
> > >> java
> > >> >>> -jar
> > >> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > >> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> > >> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot
> > -classpath
> > >> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> > >> >>> > > > > > > > > >>> Processing 136 file(s) in
> > >> >>> JavaRuntimeModuleActivator.jar.
> > >> >>> > > > > > > > > >>> Transformed 0 file(s).
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
> > >> that...but
> > >> >>> > > first
> > >> >>> > > > > I'll
> > >> >>> > > > > > > > give
> > >> >>> > > > > > > > > Ant
> > >> >>> > > > > > > > > >>> another go. Hopefully Google will release a
> new
> > SDK
> > >> >>> soon,
> > >> >>> > > > > > otherwise
> > >> >>> > > > > > > > as
> > >> >>> > > > > > > > > you
> > >> >>> > > > > > > > > >>> say...retrotranslator will have to be the
> > >> workaround
> > >> >>> to
> > >> >>> > > > proceed
> > >> >>> > > > > > > with
> > >> >>> > > > > > > > > our
> > >> >>> > > > > > > > > >>> project ;-)
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting
> > ready
> > >> for
> > >> >>> > the
> > >> >>> > > > > > official
> > >> >>> > > > > > > > > start
> > >> >>> > > > > > > > > >>> :-)
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> [1]
> > >> >>> http://androidindelft.googlepages.com/20may2008.html
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano
> > Crestani
> > >> <
> > >> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> > Hi Oscar,
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > My mistake again, the eclipse project files
> of
> > >> >>> > > > > > contribution-impl
> > >> >>> > > > > > > > > module
> > >> >>> > > > > > > > > >>> > were
> > >> >>> > > > > > > > > >>> > not uploaded, so you are probably using the
> > >> modules
> > >> >>> you
> > >> >>> > > > have
> > >> >>> > > > > > > > > downloaded
> > >> >>> > > > > > > > > >>> > from
> > >> >>> > > > > > > > > >>> > the sca modules. If you remove the
> > >> >>> > > > tuscany-contribution-impl
> > >> >>> > > > > > from
> > >> >>> > > > > > > > > your
> > >> >>> > > > > > > > > >>> > workspace and add this module from the
> sandbox
> > it
> > >> >>> will
> > >> >>> > > > > probably
> > >> >>> > > > > > > > work.
> > >> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk
> > again
> > >> to
> > >> >>> get
> > >> >>> > > the
> > >> >>> > > > > > > project
> > >> >>> > > > > > > > > >>> files
> > >> >>> > > > > > > > > >>> > I'm uploading right now ; )
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as
> a
> > >> >>> solution
> > >> >>> > > here
> > >> >>> > > > > is
> > >> >>> > > > > > a
> > >> >>> > > > > > > > tip:
> > >> >>> > > > > > > > > >>> most
> > >> >>> > > > > > > > > >>> > of the code that were using the Reflection
> API
> > >> was
> > >> >>> > > > commented
> > >> >>> > > > > on
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >> >>> > > > > > > > > >>> > class, you just need to edit this class and
> > >> remove
> > >> >>> the
> > >> >>> > > > > > commented
> > >> >>> > > > > > > > code
> > >> >>> > > > > > > > > >>> (it's
> > >> >>> > > > > > > > > >>> > described there).
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > So, if you uncomment the code and the
> > >> >>> retrotranslador
> > >> >>> > > > > > successfuly
> > >> >>> > > > > > > > > work,
> > >> >>> > > > > > > > > >>> and
> > >> >>> > > > > > > > > >>> > I hope it will, you will reach the
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > >
> > >> >>> > >
> > >> >>>
> > >>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > >> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly on
> > this
> > >> >>> > > > constructor
> > >> >>> > > > > > I'm
> > >> >>> > > > > > > > > >>> getting a
> > >> >>> > > > > > > > > >>> > NPE when the code described above is
> > commented.
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > About the ant, go on and use it. Further we
> > can
> > >> >>> > evaluate
> > >> >>> > > > > better
> > >> >>> > > > > > > > where
> > >> >>> > > > > > > > > we
> > >> >>> > > > > > > > > >>> > place it in the entire SCA build process.
> BTW,
> > we
> > >> >>> even
> > >> >>> > > dont
> > >> >>> > > > > > know
> > >> >>> > > > > > > if
> > >> >>> > > > > > > > > we
> > >> >>> > > > > > > > > >>> will
> > >> >>> > > > > > > > > >>> > still be using the retrotranslator in
> future,
> > >> >>> right?! :
> > >> >>> > )
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
> > >> >>> workaround
> > >> >>> > > > this
> > >> >>> > > > > > > > problem
> > >> >>> > > > > > > > > for
> > >> >>> > > > > > > > > >>> > now
> > >> >>> > > > > > > > > >>> > and go on with our project ; )
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > Kind Regards,
> > >> >>> > > > > > > > > >>> > Adriano Crestani
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar
> > Castaneda
> > >> <
> > >> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>> > > Hi Adriano,
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able
> to
> > >> build
> > >> >>> the
> > >> >>> > > > > entire
> > >> >>> > > > > > > > > workspace
> > >> >>> > > > > > > > > >>> > from
> > >> >>> > > > > > > > > >>> > > your instructions. When running
> > >> calculator-android
> > >> >>> as
> > >> >>> > > an
> > >> >>> > > > > > > "Android
> > >> >>> > > > > > > > > >>> > > application" I'm getting a
> > >> ClassNotFoundException
> > >> >>> [1]
> > >> >>> > > for
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > >> >>> > > > > > > > > >>> > > Is the exception you referred to in your
> > >> original
> > >> >>> > > email?
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > ...when
> > >> >>> > > > > > > > > >>> > > > you run the calculator-android project
> as
> > an
> > >> >>> > "Android
> > >> >>> > > > > > > > > application"
> > >> >>> > > > > > > > > >>> you
> > >> >>> > > > > > > > > >>> > > > should get an exception, that was
> > generated
> > >> >>> > initially
> > >> >>> > > > by
> > >> >>> > > > > a
> > >> >>> > > > > > > NPE
> > >> >>> > > > > > > > > >>> thrown
> > >> >>> > > > > > > > > >>> > by
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > >
> > >> >>> > >
> > >> >>>
> > >>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > >> >>> > > > > > > > > >>> > > > constructor. This is caused because the
> > >> latest
> > >> >>> > > Android
> > >> >>> > > > > SDK
> > >> >>> > > > > > > does
> > >> >>> > > > > > > > > not
> > >> >>> > > > > > > > > >>> > > support
> > >> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA
> cannot
> > >> check
> > >> >>> > the
> > >> >>> > > > > > > @Reference
> > >> >>> > > > > > > > > >>> > > annotations
> > >> >>> > > > > > > > > >>> > > > (I commented the code which tries to
> read
> > the
> > >> >>> > > > > annotations,
> > >> >>> > > > > > so
> > >> >>> > > > > > > > > when
> > >> >>> > > > > > > > > >>> the
> > >> >>> > > > > > > > > >>> > > > execution reach this constructor it
> throws
> > >> the
> > >> >>> > NPE).
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > Searching for the class in the exception
> I'm
> > >> >>> getting
> > >> >>> > I
> > >> >>> > > > > found
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> > >> >>> > > In
> > >> >>> > > > > > > > > >>> > getServiceClasses
> > >> >>> > > > > > > > > >>> > > it loads the service class I'm getting
> > problems
> > >> >>> with
> > >> >>> > > when
> > >> >>> > > > > > > running
> > >> >>> > > > > > > > > >>> > > calculator-android as an "Android
> > application":
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > I couldn't find the corresponding java
> file
> > in
> > >> my
> > >> >>> > > > imported
> > >> >>> > > > > > > > > workspace
> > >> >>> > > > > > > > > >>> and
> > >> >>> > > > > > > > > >>> > > found that there is no package like
> > >> >>> > > > > > > > > >>> > >
> > >> >>> org.apache.tuscany.sca.contribution.processor.impl.
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > Am I missing something? Or are these the
> > errors
> > >> >>> you
> > >> >>> > > would
> > >> >>> > > > > > > expect?
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > I would like to get to the point where I
> get
> > >> the
> > >> >>> > > > exception
> > >> >>> > > > > > you
> > >> >>> > > > > > > > > >>> described
> > >> >>> > > > > > > > > >>> > > and
> > >> >>> > > > > > > > > >>> > > try to run retrotranslator from there.
> > However,
> > >> as
> > >> >>> > I'm
> > >> >>> > > > > using
> > >> >>> > > > > > > the
> > >> >>> > > > > > > > > ADT
> > >> >>> > > > > > > > > >>> > plugin
> > >> >>> > > > > > > > > >>> > > in eclipse I would need to extract code
> that
> > >> >>> > "declares
> > >> >>> > > or
> > >> >>> > > > > > > > analyzes
> > >> >>> > > > > > > > > >>> > > annotations you may extract it into a
> > separate
> > >> >>> > library
> > >> >>> > > > that
> > >> >>> > > > > > can
> > >> >>> > > > > > > > be
> > >> >>> > > > > > > > > >>> > > processed
> > >> >>> > > > > > > > > >>> > > with Retrotranslator and added to the main
> > >> >>> project."
> > >> >>> > > That
> > >> >>> > > > > is,
> > >> >>> > > > > > > > > unless I
> > >> >>> > > > > > > > > >>> > use
> > >> >>> > > > > > > > > >>> > > Ant, in which case I would only need to
> add
> > a
> > >> few
> > >> >>> > lines
> > >> >>> > > > to
> > >> >>> > > > > > > > > build.xml.
> > >> >>> > > > > > > > > >>> I'm
> > >> >>> > > > > > > > > >>> > > continuing to look into this, any thoughts
> > are
> > >> >>> more
> > >> >>> > > than
> > >> >>> > > > > > > welcome
> > >> >>> > > > > > > > > :-)
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > [1]
> > >> >>> > http://delftandroid.googlepages.com/14may2008.html
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
> > >> Crestani
> > >> >>> <
> > >> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > > Hi,
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > At first, I want to correct one mistake,
> > on
> > >> the
> > >> >>> > first
> > >> >>> > > > > step
> > >> >>> > > > > > I
> > >> >>> > > > > > > > > >>> described
> > >> >>> > > > > > > > > >>> > on
> > >> >>> > > > > > > > > >>> > > > my
> > >> >>> > > > > > > > > >>> > > > previous email, I should not have added
> > the
> > >> word
> > >> >>> > > > > "install",
> > >> >>> > > > > > > it
> > >> >>> > > > > > > > > >>> probably
> > >> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn
> > clean
> > >> >>> > install"
> > >> >>> > > in
> > >> >>> > > > > the
> > >> >>> > > > > > > > > >>> downloaded
> > >> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same
> > step,
> > >> >>> the
> > >> >>> > > code
> > >> >>> > > > > > should
> > >> >>> > > > > > > > not
> > >> >>> > > > > > > > > be
> > >> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Simon:
> > >> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java
> > >> source
> > >> >>> > codes
> > >> >>> > > > are
> > >> >>> > > > > > > under
> > >> >>> > > > > > > > > CDDL
> > >> >>> > > > > > > > > >>> > 1.0
> > >> >>> > > > > > > > > >>> > > > license, it's only needed to include the
> > CDDL
> > >> >>> > license
> > >> >>> > > > > > header
> > >> >>> > > > > > > on
> > >> >>> > > > > > > > > each
> > >> >>> > > > > > > > > >>> > > file,
> > >> >>> > > > > > > > > >>> > > > and it's already done : )
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Jean:
> > >> >>> > > > > > > > > >>> > > > I think it is better to keep the code in
> > the
> > >> >>> > sandbox
> > >> >>> > > > for
> > >> >>> > > > > > now.
> > >> >>> > > > > > > > At
> > >> >>> > > > > > > > > >>> first,
> > >> >>> > > > > > > > > >>> > > > it's
> > >> >>> > > > > > > > > >>> > > > not working on the current SCA modules
> > >> revision
> > >> >>> > yet.
> > >> >>> > > > And
> > >> >>> > > > > > > also,
> > >> >>> > > > > > > > > I'm
> > >> >>> > > > > > > > > >>> > > > commenting many lines at some modules
> just
> > to
> > >> >>> get a
> > >> >>> > > > > "first
> > >> >>> > > > > > > run"
> > >> >>> > > > > > > > > of
> > >> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate
> why
> > and
> > >> >>> how
> > >> >>> > > this
> > >> >>> > > > > > > > commented
> > >> >>> > > > > > > > > >>> lines
> > >> >>> > > > > > > > > >>> > > will
> > >> >>> > > > > > > > > >>> > > > be adapted to be compatible with both:
> SCA
> > >> Java
> > >> >>> and
> > >> >>> > > SCA
> > >> >>> > > > > > > > Android.
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Oscar:
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > - Are host-android and core-android a
> part
> > of
> > >> >>> > > > > > > > calculator-android?
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > What do you mean when you say "part"?
> They
> > >> are
> > >> >>> used
> > >> >>> > > by
> > >> >>> > > > > > > > > >>> > > calculator-android,
> > >> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany
> sca
> > >> >>> modules
> > >> >>> > in
> > >> >>> > > > > future
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > - Should the calculator-android included
> > in
> > >> [1]
> > >> >>> > have
> > >> >>> > > > > > included
> > >> >>> > > > > > > > an
> > >> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to
> svn
> > the
> > >> >>> > eclipse
> > >> >>> > > > > > project
> > >> >>> > > > > > > > > files
> > >> >>> > > > > > > > > >>> of
> > >> >>> > > > > > > > > >>> > > > these
> > >> >>> > > > > > > > > >>> > > > projects. I have already commited these
> > files
> > >> >>> and
> > >> >>> > if
> > >> >>> > > > you
> > >> >>> > > > > > > update
> > >> >>> > > > > > > > > your
> > >> >>> > > > > > > > > >>> > > trunk
> > >> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the
> ones
> > >> you
> > >> >>> have
> > >> >>> > > > > > created.
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is
> there
> > >> >>> > something
> > >> >>> > > > else
> > >> >>> > > > > > > > needed
> > >> >>> > > > > > > > > in
> > >> >>> > > > > > > > > >>> > > > addition
> > >> >>> > > > > > > > > >>> > > > to including the Android Library?
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > No, the Android library is really
> simples,
> > it
> > >> >>> only
> > >> >>> > > > > contains
> > >> >>> > > > > > > the
> > >> >>> > > > > > > > > >>> > > android.jar
> > >> >>> > > > > > > > > >>> > > > file located in your Android SDK.
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build"
> > and
> > >> >>> "mvn
> > >> >>> > > > > -Peclipse
> > >> >>> > > > > > > > > >>> > > > eclipse:eclipse"
> > >> >>> > > > > > > > > >>> > > > commands on the sandbox files, the
> eclipse
> > >> >>> project
> > >> >>> > > > files
> > >> >>> > > > > > are
> > >> >>> > > > > > > > > already
> > >> >>> > > > > > > > > >>> in
> > >> >>> > > > > > > > > >>> > > > modules and you should build the modules
> > >> using
> > >> >>> the
> > >> >>> > > > > eclipse
> > >> >>> > > > > > > for
> > >> >>> > > > > > > > > now.
> > >> >>> > > > > > > > > >>> The
> > >> >>> > > > > > > > > >>> > > > maven config files are not updated yet
> > with
> > >> the
> > >> >>> > > > > > modifications
> > >> >>> > > > > > > I
> > >> >>> > > > > > > > > have
> > >> >>> > > > > > > > > >>> > done
> > >> >>> > > > > > > > > >>> > > > on
> > >> >>> > > > > > > > > >>> > > > these modules, so they will not generate
> > the
> > >> >>> > correct
> > >> >>> > > > > > project
> > >> >>> > > > > > > > > files,
> > >> >>> > > > > > > > > >>> > > worse,
> > >> >>> > > > > > > > > >>> > > > they will override the ones I have
> > created.
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Then, clean and build your entire
> > workspace,
> > >> if
> > >> >>> you
> > >> >>> > > > still
> > >> >>> > > > > > get
> > >> >>> > > > > > > > any
> > >> >>> > > > > > > > > >>> > errors,
> > >> >>> > > > > > > > > >>> > > > let me know ; )
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > - Should I import
> > >> 'tuscany-databinding-saxon'?
> > >> >>> Or,
> > >> >>> > > why
> > >> >>> > > > > > should
> > >> >>> > > > > > > > > this
> > >> >>> > > > > > > > > >>> not
> > >> >>> > > > > > > > > >>> > be
> > >> >>> > > > > > > > > >>> > > > imported?
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > It seems the revision I suggested
> already
> > had
> > >> >>> the
> > >> >>> > > saxon
> > >> >>> > > > > > > module
> > >> >>> > > > > > > > > >>> removed
> > >> >>> > > > > > > > > >>> > > from
> > >> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another
> > one
> > >> >>> that
> > >> >>> > > > > > shouldn´t.
> > >> >>> > > > > > > > > Please,
> > >> >>> > > > > > > > > >>> > > import
> > >> >>> > > > > > > > > >>> > > > the databinding-saxon module again into
> > your
> > >> >>> > > workspace.
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > Regards,
> > >> >>> > > > > > > > > >>> > > > Adriano Crestani
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > [1] -
> > >> >>> > > > > > > > >
> > >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > >> >>> > > > > > > > > >>> > > > >
> > >> >>> > > > > > > > > >>> > > > [2] -
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
> > >> Jean-Sebastien
> > >> >>> > > > Delfino
> > >> >>> > > > > <
> > >> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
> > >> >>> > > > > > > > > >>> > > > >
> > >> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > >> >>> > > > > > > > > >>> > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code
> > from
> > >> [1]
> > >> >>> and
> > >> >>> > > > > > installed
> > >> >>> > > > > > > > as
> > >> >>> > > > > > > > > >>> shown
> > >> >>> > > > > > > > > >>> > > > > > > > below:
> > >> >>> > > > > > > > > >>> > > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > > svn checkout
> > >> >>> > > > > > > > > >>> > > > > > > >
> > >> >>> > > > > > > > >
> > >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > >> >>> > > > > > > > > >>> > > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
> > >> >>> > > > > > > > > >>> > > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > If there's no objection from
> others,
> > >> I'd
> > >> >>> be
> > >> >>> > > happy
> > >> >>> > > > > to
> > >> >>> > > > > > > see
> > >> >>> > > > > > > > > this
> > >> >>> > > > > > > > > >>> > code
> > >> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we
> now
> > >> have
> > >> >>> > > several
> > >> >>> > > > > > > people
> > >> >>> > > > > > > > > doing
> > >> >>> > > > > > > > > >>> > > > development
> > >> >>> > > > > > > > > >>> > > > > > > on this android integration.
> > >> >>> > > > > > > > > >>> > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with
> > something
> > >> >>> like
> > >> >>> > > > > > > > > >>> > trunk/java/sca/android
> > >> >>> > > > > > > > > >>> > > > > > > and later progressively try to
> > converge
> > >> >>> the
> > >> >>> > > code
> > >> >>> > > > > with
> > >> >>> > > > > > > the
> > >> >>> > > > > > > > > code
> > >> >>> > > > > > > > > >>> in
> > >> >>> > > > > > > > > >>> > > > trunk,
> > >> >>> > > > > > > > > >>> > > > > > > with architected plug points for
> the
> > >> >>> android
> > >> >>> > > > > specific
> > >> >>> > > > > > > > code
> > >> >>> > > > > > > > > >>> etc.
> > >> >>> > > > > > > > > >>> > > > > > >
> > >> >>> > > > > > > > > >>> > > > > > > Thoughts?
> > >> >>> > > > > > > > > >>> > > > > > >
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does
> not
> > >> also
> > >> >>> > imply
> > >> >>> > > > > > "making
> > >> >>> > > > > > > > > part
> > >> >>> > > > > > > > > >>> of
> > >> >>> > > > > > > > > >>> > the
> > >> >>> > > > > > > > > >>> > > > > > main build"?
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at
> experimental
> > >> code
> > >> >>> > > > entering
> > >> >>> > > > > > the
> > >> >>> > > > > > > > > build
> > >> >>> > > > > > > > > >>> at
> > >> >>> > > > > > > > > >>> > > this
> > >> >>> > > > > > > > > >>> > > > > > stage.
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
> > >> >>> > > > > > > > > >>> > > > > >
> > >> >>> > > > > > > > > >>> > > > >
> > >> >>> > > > > > > > > >>> > > > > I think it's business as usual, code
> > that
> > >> >>> doesn't
> > >> >>> > > > work
> > >> >>> > > > > > does
> > >> >>> > > > > > > > not
> > >> >>> > > > > > > > > go
> > >> >>> > > > > > > > > >>> in
> > >> >>> > > > > > > > > >>> > > the
> > >> >>> > > > > > > > > >>> > > > > main build, code that's getting stable
> > can
> > >> go
> > >> >>> in
> > >> >>> > > the
> > >> >>> > > > > main
> > >> >>> > > > > > > > build
> > >> >>> > > > > > > > > at
> > >> >>> > > > > > > > > >>> > some
> > >> >>> > > > > > > > > >>> > > > > point when people have no specific
> > >> objections,
> > >> >>> > and
> > >> >>> > > > > > > different
> > >> >>> > > > > > > > > >>> profiles
> > >> >>> > > > > > > > > >>> > > can
> > >> >>> > > > > > > > > >>> > > > be
> > >> >>> > > > > > > > > >>> > > > > used to subset particular builds.
> > >> >>> > > > > > > > > >>> > > > >
> > >> >>> > > > > > > > > >>> > > > > --
> > >> >>> > > > > > > > > >>> > > > > Jean-Sebastien
> > >> >>> > > > > > > > > >>> > > > >
> > >> >>> > > > > > > > > >>> > > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > --
> > >> >>> > > > > > > > > >>> > > best,
> > >> >>> > > > > > > > > >>> > > -oscar
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> > > Oscar Castañeda
> > >> >>> > > > > > > > > >>> > >
> > >> >>> > > > > > > > > >>> >
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> --
> > >> >>> > > > > > > > > >>> best,
> > >> >>> > > > > > > > > >>> -oscar
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>> Oscar Castañeda
> > >> >>> > > > > > > > > >>>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >>
> > >> >>> > > > > > > > > >
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > > > --
> > >> >>> > > > > > > > > Luciano Resende
> > >> >>> > > > > > > > > Apache Tuscany Committer
> > >> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > >> <http://people.apache.org/%7Elresende>
> > >> >>> <http://people.apache.org/%7Elresende>
> > >> >>> > <http://people.apache.org/%7Elresende>
> > >> >>> > > <http://people.apache.org/%7Elresende>
> > >> >>> > > > <http://people.apache.org/%7Elresende>
> > >> >>> > > > > <http://people.apache.org/%7Elresende>
> > >> >>> > > > > > <http://people.apache.org/%7Elresende>
> > >> >>> > > > > > > <http://people.apache.org/%7Elresende><
> > >> >>> > > > > > > > http://people.apache.org/%7Elresende>
> > >> >>> > > > > > > > > http://lresende.blogspot.com/
> > >> >>> > > > > > > > >
> > >> >>> > > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > >
> > >> >>> > > > > > > --
> > >> >>> > > > > > > best,
> > >> >>> > > > > > > -oscar
> > >> >>> > > > > > >
> > >> >>> > > > > > > Oscar Castañeda
> > >> >>> > > > > > >
> > >> >>> > > > > >
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > >
> > >> >>> > > > > --
> > >> >>> > > > > best,
> > >> >>> > > > > -oscar
> > >> >>> > > > >
> > >> >>> > > > > Oscar Castañeda
> > >> >>> > > > >
> > >> >>> > > >
> > >> >>> > >
> > >> >>> > >
> > >> >>> > >
> > >> >>> > > --
> > >> >>> > > best,
> > >> >>> > > -oscar
> > >> >>> > >
> > >> >>> > > Oscar Castañeda
> > >> >>> > >
> > >> >>> >
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>> --
> > >> >>> best,
> > >> >>> -oscar
> > >> >>>
> > >> >>> Oscar Castañeda
> > >> >>>
> > >> >>
> > >> >>
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Luciano Resende
> > >> Apache Tuscany Committer
> > >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende><
> > http://people.apache.org/%7Elresende>
> > >> http://lresende.blogspot.com/
> > >>
> > >
> > >
> > >
> > > --
> > > best,
> > > -oscar
> > >
> > > Oscar Castañeda
> > >
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> > http://lresende.blogspot.com/
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Luciano,

Thanks for the tip. Before testing it I generated a JIRA ticket [1] for the
Retrotranslator progress, and when I got around to testing I noticed a
different ClassNotFoundException. This time its for
java.beans.Introspector.  I made sure to include this in the JIRA ticket and
posted the stack trace from Eclipse [2]. Suggestions are welcome.

[1] https://issues.apache.org/jira/browse/TUSCANY-2440
[2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/25Jun2008-2

On Wed, Jun 25, 2008 at 2:10 AM, Luciano Resende <lu...@gmail.com>
wrote:

> Removing RMI should be as simple as removing the tuscany-binding-rmi
> dependency from host-android.
>
> On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
> <os...@gmail.com> wrote:
> > Hi Luciano,
> >
> > It's going better after the progress last week with retrotranslator. I'm
> now
> > able to translate the SCA classes and run calculator-android without
> getting
> > Annotation related issues. The problems now are related to RMI. In
> relation
> > to this, and from your comment about blocking issues, I created a child
> page
> > [1] in the project wiki for Blocking issues. Currently, the page lists
> the
> > RMI issue and suggested workarounds.
> >
> > I think your suggestion about integration with maven is really good.
> > Especially because there is a retrotranslator plugin for maven. I'll
> start
> > looking into using this plugin. I also agree about reviewing the scope of
> > support. Right now, I see a need to reduce the dependency on RMI, either
> by
> > commenting all the code that uses the RMI API, or by following the
> > suggestions from Taras [3] to either replace java.rmi.Remote with
> > java.lang.Cloneable (as the result of using a retrotranslator option) or
> > taking the RMI source from Apache Harmony and putting it in a
> > retrotranslated JAR. What would you recommend? Hopefully after the
> > dependency reduction Android will be able to run calculator-android.
> Based
> > on the results of this experiment we can better consider the reduction of
> > component types and bindings. Please let me know your thoughts on this
> idea.
> >
> > [1]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
> > [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
> > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
> >
> >
> > On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> >> How is it going here ? I just want to check if there is any blocking
> >> issues with Android at the moment, if so, is there a list of these
> >> issues somewhere ?
> >>
> >> Also, some general suggestions/recommendations.: It would be great if
> >> we could spend sometime to get the modules well integrated using
> >> maven, this way it would be easier for anyone on the community to
> >> checkout the trunk + android sandbox and jump on the code to help.
> >> Also, we should review the scope of the support we are trying to
> >> acomplish, I'd suggest to minimize the number of component types
> >> supported (java) and bindings (default sca binding) and then try to
> >> run the calculator sample application. Once we have acomplished this
> >> first milestone, we could then discuss our next steps.
> >>
> >> Thoughts ?
> >>
> >> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> >> <ad...@apache.org> wrote:
> >> > Ah, here is a tip to assure the classes are not recompiled again.
> Build
> >> the
> >> > project, then go in each project builder (in the properties window)
> and
> >> > disable all the builders, then not even a clean/build will modify your
> >> > project ; )
> >> >
> >> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> >> adrianocrestani@apache.org>
> >> > wrote:
> >> >
> >> >> Hi Oscar,
> >> >>
> >> >> I say that it is more difficult to debug because you need attach a
> >> source
> >> >> code to each jar and etc, and when you are using projects, eclipse
> >> already
> >> >> knows where to find the source code : )
> >> >>
> >> >> The reply made sense to me, especially with regards to the fact that
> >> with
> >> >> the Android plugin Eclipse compiles sources into classes and then
> into
> >> dex
> >> >> files, so retrotranslator has no chance to translate classes in
> between
> >> >> these steps - even if I do that outside of Eclipse. This shows from
> the
> >> use
> >> >> of non-translated binaries (as indicated by the
> >> >> java.lang.Class.isAnnotationPr
> >> >> esent(Class.java:1131) error in the stack
> >> >> trace) that might have been related to the use of pre-existing dex
> files
> >> or
> >> >> over-writing of files by Eclipse. So unless I modify the ADT plugin
> the
> >> >> result would still be the same, even if I use a simpler scenario.
> >> >>
> >> >> Sorry, I really did not comment this email yet. It does not make so
> much
> >> >> sense for me. First, as you already know, eclipse android projects
> does
> >> not
> >> >> recognize any modifications in the imported projects, so it does not
> >> call
> >> >> the build or incremental build even if the imported projects have
> their
> >> >> source code modified. Just to make sure I tested it again:
> >> >>
> >> >> 1-  imported in my workspace all the projects included in the
> >> >> calculator-android, cleaned and built them...it takes a loooong time,
> as
> >> you
> >> >> already know.
> >> >>
> >> >> 2- imported the calculator-android project, cleaned and built it
> (only
> >> the
> >> >> calculator-android project), and this process was too much faster
> than
> >> when
> >> >> all the modules are built, so the imported projects were not
> recompiled,
> >> >> otherwise it would take too much more time. I suppose here that the
> >> android
> >> >> project compiles the .java contained in the android project and
> convert
> >> all
> >> >> the .class files (generated by imported projects and android project)
> to
> >> dex
> >> >> format.
> >> >>
> >> >> So, it does not recompile the external class files (the ones
> contained
> >> in
> >> >> the imported projects) cause it seems not to check if it was modified
> or
> >> >> not. Of course, I never tested it modifing the .class files, I'm just
> >> >> assuming that, because when you modify .java files it does not get
> >> >> recompiled.
> >> >>
> >> >> What do you think?
> >> >>
> >> >> As I mentioned before, your comments are really helpful as they give
> me
> >> a
> >> >> sense of direction. Please let me know if you still think we should
> >> pursue
> >> >> retrotranslator for files inside a folder.
> >> >>
> >> >> I really think you should try at first the simpler scenario and try
> to
> >> >> understand how it works and IF it works. Also, you can try what you
> were
> >> >> planning: to retrotranslate the each modules' jar, but I suppose it's
> a
> >> lot
> >> >> of work, because there are so many modules :S. So, as I've already
> said,
> >> if
> >> >> you think it's getting to complicated, forget it and go on with
> >> Luciano's
> >> >> suggestion.
> >> >>
> >> >> Feel free to choose the direction you want to take, and if there is
> >> another
> >> >> approach you think is better, just let us know ; )...you are the best
> >> person
> >> >> to choose the directions, cause you are working directly on it, we
> are
> >> just
> >> >> guinding/helping you ; )
> >> >>
> >> >> Thanks,
> >> >> Adriano Crestani
> >> >>
> >> >>
> >> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> >> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>
> >> >>> Hi Adriano,
> >> >>>
> >> >>> If there is an option on retrotranslator to retrotranslate all the
> >> classes
> >> >>> > in a folder, it should work as well as it works on classes inside
> >> .jar
> >> >>> > files. So, I think you should try to understand why your first
> >> approach
> >> >>> > (retrotranslating the eclipse project classes) is not working
> trying
> >> a
> >> >>> > simpler scenario. Have you already tried it?
> >> >>> >
> >> >>>
> >> >>> I agree that it's good to try out a simpler scenario to better
> >> understand
> >> >>> the problem. I haven't tried it yet because using retrotranslator
> for
> >> >>> classes inside a folder doesn't seem to be a solution to the
> problem.
> >> >>> Here's
> >> >>> my reasoning:
> >> >>>
> >> >>> Yes, there is an option to translate classes in a folder. I tried it
> >> and
> >> >>> it
> >> >>> successfully translated the classes inside my Eclipse workspace.
> When I
> >> >>> ran
> >> >>> the calculator-android application using the newly translated
> classes I
> >> >>> was
> >> >>> getting the errors in [1]. I posted a question in Android Developers
> >> about
> >> >>> this error and received a reply [2].
> >> >>>
> >> >>> The reply made sense to me, especially with regards to the fact that
> >> with
> >> >>> the Android plugin Eclipse compiles sources into classes and then
> into
> >> dex
> >> >>> files, so retrotranslator has no chance to translate classes in
> between
> >> >>> these steps - even if I do that outside of Eclipse. This shows from
> the
> >> >>> use
> >> >>> of non-translated binaries (as indicated by the
> >> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the
> stack
> >> >>> trace) that might have been related to the use of pre-existing dex
> >> files
> >> >>> or
> >> >>> over-writing of files by Eclipse. So unless I modify the ADT plugin
> the
> >> >>> result would still be the same, even if I use a simpler scenario.
> >> >>>
> >> >>> The reply suggested to use JAR's instead. This also made sense to me
> >> and
> >> >>> seemed like a simpler way of solving the problem. I didn't see the
> >> >>> disadvantage of debugging, which as you point out is more difficult
> >> with
> >> >>> JAR's instead of Eclipse projects.
> >> >>>
> >> >>> As I mentioned before, your comments are really helpful as they give
> me
> >> a
> >> >>> sense of direction. Please let me know if you still think we should
> >> pursue
> >> >>> retrotranslator for files inside a folder.
> >> >>>
> >> >>>
> >> >>> [1]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> >> >>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >> >>>
> >> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> >> >>> adrianocrestani@apache.org>
> >> >>> wrote:
> >> >>>
> >> >>> > Hi Oscar,
> >> >>> >
> >> >>> > Yup, you're right - there are indeed Eclipse files inside the
> >> folders. I
> >> >>> > guess I was confused by the different names in [1] than those that
> >> >>> result
> >> >>> > [2] from importing to an Eclipse workspace - after which I see 13
> >> >>> projects
> >> >>> > in both cases. So please ignore my previous remark.
> >> >>> >
> >> >>> > I have added the projects, but still haven't changed their names.
> I
> >> was
> >> >>> > planning to modify their project names when we get it integrated
> to
> >> SCA,
> >> >>> > mainly because we will need to change the poms. Anyway, feel free
> to
> >> >>> modify
> >> >>> > the names whenever you want ; )
> >> >>> >
> >> >>> >
> >> >>> > Per the reply I received on the Android Developers list [3] I
> started
> >> >>> using
> >> >>> > retrotranslator on JAR's instead of class files. For this I
> created a
> >> >>> big
> >> >>> > JAR file with all the Tuscany modules (including those you
> modified
> >> for
> >> >>> > Android). I translated this big JAR (around 15MB) with
> >> retrotranslator
> >> >>> [4].
> >> >>> > Then I created a new workspace with only calculator-android and
> >> >>> > android-jdk-classes as projects and added the translated JAR as an
> >> >>> external
> >> >>> > library for both projects. This resulted in errors [4] from the
> >> Android
> >> >>> > build process.
> >> >>> >
> >> >>> > I really do not understand this errors, but as this errors are
> only
> >> >>> related
> >> >>> > to testcase classes they can be ignored (removed from the jars). I
> >> also
> >> >>> did
> >> >>> > not understand why it's not find the .apk file:
> >> >>> >
> >> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> >> >>> > /bin/calculator-android.apk!"
> >> >>> >
> >> >>> > To work around these errors I decided to take a different approach
> >> and
> >> >>> copy
> >> >>> > all the jar files contained in the individual modules to a
> separate
> >> >>> folder
> >> >>> > and then run retrotranslator on each JAR. The jars are found
> inside
> >> the
> >> >>> > target folder of each module and are named as shown below:
> >> >>> >
> >> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >> >>> >
> >> >>> > From this I found that only the SCA modules have these JAR files
> >> inside
> >> >>> > their respective target folders, whereas the Android modules I
> >> >>> downloaded
> >> >>> > from [1] don't have these files at all
> >> >>> >
> >> >>> > Yep, this .jars are generated when the maven is executed. I'm not
> >> sure
> >> >>> if
> >> >>> > you should use this .jars, because they were compiled with no
> >> reference
> >> >>> to
> >> >>> > Android library. That's also why there are no .jar files for
> android
> >> >>> > modules, because you did not execute the maven on them  (and you
> >> >>> > shouldn't).
> >> >>> >
> >> >>> > So I decided to keep the Android
> >> >>> > modules [2] and add the translated JARs as libraries where needed
> to
> >> >>> have
> >> >>> > the workspace build with no problems. If I get this running I
> would
> >> look
> >> >>> > into creating JAR files from the Android modules and then return
> to
> >> only
> >> >>> > having calculator-android and android-jdk-classes as projects and
> the
> >> >>> rest
> >> >>> > as JAR's added as external libraries. If this works out I could
> then
> >> >>> look
> >> >>> > into seeing which JAR's are important and which are not, in this
> way
> >> >>> > reducing the total memory footprint and coming up with a
> "lightweight
> >> >>> > mobile
> >> >>> > SCA core/runtime." Please let me know your thoughts on these
> efforts.
> >> >>> >
> >> >>> > You haven't tried this yet, right? You may try it, but I do not
> like
> >> >>> this
> >> >>> > approach, because it will get difficult to debug sca classes as
> they
> >> are
> >> >>> > not
> >> >>> > imported as eclipse projects.
> >> >>> >
> >> >>> > If there is an option on retrotranslator to retrotranslate all the
> >> >>> classes
> >> >>> > in a folder, it should work as well as it works on classes inside
> >> .jar
> >> >>> > files. So, I think you should try to understand why your first
> >> approach
> >> >>> > (retrotranslating the eclipse project classes) is not working
> trying
> >> a
> >> >>> > simpler scenario. Have you already tried it?
> >> >>> >
> >> >>> > Also, if the restrotranslator gets to complicated, you may try the
> >> >>> > Luciano's
> >> >>> > suggestion ; )
> >> >>> >
> >> >>> >
> >> >>> > Kind Regards,
> >> >>> > Adriano Crestani
> >> >>> >
> >> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> >> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>> >
> >> >>> > > Hi Adriano,
> >> >>> > >
> >> >>> > >
> >> >>> > > > Yep, they should be imported, if you check inside its folders,
> >> there
> >> >>> > are
> >> >>> > > > the
> >> >>> > > > eclipse project files, so they should be identified by the
> >> eclipse
> >> >>> > import
> >> >>> > > > tool as an eclipse project.
> >> >>> > >
> >> >>> > >
> >> >>> > > Yup, you're right - there are indeed Eclipse files inside the
> >> folders.
> >> >>> I
> >> >>> > > guess I was confused by the different names in [1] than those
> that
> >> >>> result
> >> >>> > > [2] from importing to an Eclipse workspace - after which I see
> 13
> >> >>> > projects
> >> >>> > > in both cases. So please ignore my previous remark.
> >> >>> > >
> >> >>> > > I don't think introspection is a good solution, hence you will
> need
> >> to
> >> >>> > > > change how the sca reads the info about each service and also
> >> >>> services
> >> >>> > > > implemented for JVM would need to be adapted to run on
> Android.
> >> >>> Let's
> >> >>> > > avoid
> >> >>> > > > to modify so much the SCA code, and lets try to keep
> >> retrotranslator
> >> >>> in
> >> >>> > > > mind
> >> >>> > > > as a temporary workaround for annotations till next SDK
> release
> >> :S
> >> >>> > >
> >> >>> > >
> >> >>> > > >  Also, if you get the retrotranslator working, forget the
> >> Luciano's
> >> >>> > > > suggestion and vice-versa...do not try both at the same time ;
> )
> >> >>> > > >
> >> >>> > >
> >> >>> > > Will do. Thanks for the advice it helps me to focus in the right
> >> >>> > direction
> >> >>> > > :-)
> >> >>> > >
> >> >>> > > Now, a summary of what I've done up to now:
> >> >>> > >
> >> >>> > > Per the reply I received on the Android Developers list [3] I
> >> started
> >> >>> > using
> >> >>> > > retrotranslator on JAR's instead of class files. For this I
> created
> >> a
> >> >>> big
> >> >>> > > JAR file with all the Tuscany modules (including those you
> modified
> >> >>> for
> >> >>> > > Android). I translated this big JAR (around 15MB) with
> >> retrotranslator
> >> >>> > [4].
> >> >>> > > Then I created a new workspace with only calculator-android and
> >> >>> > > android-jdk-classes as projects and added the translated JAR as
> an
> >> >>> > external
> >> >>> > > library for both projects. This resulted in errors [4] from the
> >> >>> Android
> >> >>> > > build process.
> >> >>> > >
> >> >>> > > To work around these errors I decided to take a different
> approach
> >> and
> >> >>> > copy
> >> >>> > > all the jar files contained in the individual modules to a
> separate
> >> >>> > folder
> >> >>> > > and then run retrotranslator on each JAR. The jars are found
> inside
> >> >>> the
> >> >>> > > target folder of each module and are named as shown below:
> >> >>> > >
> >> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >> >>> > >
> >> >>> > > From this I found that only the SCA modules have these JAR files
> >> >>> inside
> >> >>> > > their respective target folders, whereas the Android modules I
> >> >>> downloaded
> >> >>> > > from [1] don't have these files at all. So I decided to keep the
> >> >>> Android
> >> >>> > > modules [2] and add the translated JARs as libraries where
> needed
> >> to
> >> >>> have
> >> >>> > > the workspace build with no problems. If I get this running I
> would
> >> >>> look
> >> >>> > > into creating JAR files from the Android modules and then return
> to
> >> >>> only
> >> >>> > > having calculator-android and android-jdk-classes as projects
> and
> >> the
> >> >>> > rest
> >> >>> > > as JAR's added as external libraries. If this works out I could
> >> then
> >> >>> look
> >> >>> > > into seeing which JAR's are important and which are not, in this
> >> way
> >> >>> > > reducing the total memory footprint and coming up with a
> >> "lightweight
> >> >>> > > mobile
> >> >>> > > SCA core/runtime." Please let me know your thoughts on these
> >> efforts.
> >> >>> > >
> >> >>> > >
> >> >>> > > [1]
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> >> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> >> >>> > > [3]
> >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >> >>> > > [4]
> >> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> >> >>> > >
> >> >>> > >
> >> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> >> >>> > > adrianocrestani@apache.org>
> >> >>> > > wrote:
> >> >>> > >
> >> >>> > > > Hi Oscar,
> >> >>> > > >
> >> >>> > > >
> >> >>> > > > When I imported the projects from [3] the following projects
> were
> >> >>> not
> >> >>> > > > imported:
> >> >>> > > >
> >> >>> > > > core-android
> >> >>> > > > host-android
> >> >>> > > > extensibility
> >> >>> > > >
> >> >>> > > > Is this normal? Should they be imported?
> >> >>> > > >
> >> >>> > > > Yep, they should be imported, if you check inside its folders,
> >> there
> >> >>> > are
> >> >>> > > > the
> >> >>> > > > eclipse project files, so they should be identified by the
> >> eclipse
> >> >>> > import
> >> >>> > > > tool as an eclipse project.
> >> >>> > > >
> >> >>> > > > Thanks for the detailed explanation. I'm going to give this a
> try
> >> as
> >> >>> I
> >> >>> > > > found
> >> >>> > > > an introspection related comment [2] as a workaround to
> another
> >> >>> > > annotations
> >> >>> > > > problem with the current SDK.
> >> >>> > > >
> >> >>> > > > I don't think introspection is a good solution, hence you will
> >> need
> >> >>> to
> >> >>> > > > change how the sca reads the info about each service and also
> >> >>> services
> >> >>> > > > implemented for JVM would need to be adapted to run on
> Android.
> >> >>> Let's
> >> >>> > > avoid
> >> >>> > > > to modify so much the SCA code, and lets try to keep
> >> retrotranslator
> >> >>> in
> >> >>> > > > mind
> >> >>> > > > as a temporary workaround for annotations till next SDK
> release
> >> :S
> >> >>> > > >
> >> >>> > > > Also, if you get the retrotranslator working, forget the
> >> Luciano's
> >> >>> > > > suggestion and vice-versa...do not try both at the same time ;
> )
> >> >>> > > >
> >> >>> > > > Any progress testing retrotranslator on a simpler scenario,
> just
> >> let
> >> >>> us
> >> >>> > > > know
> >> >>> > > > ; )
> >> >>> > > >
> >> >>> > > > Kind Regards,
> >> >>> > > > Adriano Crestani
> >> >>> > > >
> >> >>> > > >
> >> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> >> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>> > > >
> >> >>> > > > > Hi Adriano,
> >> >>> > > > >
> >> >>> > > > > At first, build a simple, but equivalent scenario, and test
> it.
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > > I think this is a great idea, especially because I found
> that
> >> the
> >> >>> > > "native
> >> >>> > > > > method not implemented" errors I'm getting [1] are still
> >> related
> >> >>> to
> >> >>> > the
> >> >>> > > > > annotations problem. I'm getting the same errors when
> >> converting
> >> >>> the
> >> >>> > > code
> >> >>> > > > > to
> >> >>> > > > > java 1.4. This makes me think that retrotranslator is
> actually
> >> not
> >> >>> > > > working.
> >> >>> > > > > Hopefully, testing with a simpler scenario will help me to
> >> >>> understand
> >> >>> > > the
> >> >>> > > > > problem better.
> >> >>> > > > >
> >> >>> > > > > Sorry for the not-well-detailed info here. I meant you to
> do:
> >> >>> > > > > >
> >> >>> > > > > > Search in every sca code for the usage of
> >> >>> Class.isAnnotationPresent
> >> >>> > > or
> >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for
> a
> >> the
> >> >>> > > > > @Remotable
> >> >>> > > > > > annotations force it to true, for example:
> >> >>> > > > > >
> >> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> >> >>> > > > > >>
> >> >>> > > > > >> (Remotable.class); =>
> >> >>> > > > > >> Annotation isRemotable = true;
> >> >>> > > > > >>
> >> >>> > > > > >> otherwise, which means, when it's not checking for the
> >> >>> @Remotable
> >> >>> > > > > >> annnotation, force to false. For example:
> >> >>> > > > > >>
> >> >>> > > > > >> Annotation isReference =
> >> >>> > class.isAnnotationPresent(Reference.class);
> >> >>> > > > =>
> >> >>> > > > > >> Annotation isReference = false;
> >> >>> > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > > > Thanks for the detailed explanation. I'm going to give this
> a
> >> try
> >> >>> as
> >> >>> > I
> >> >>> > > > > found
> >> >>> > > > > an introspection related comment [2] as a workaround to
> another
> >> >>> > > > annotations
> >> >>> > > > > problem with the current SDK.
> >> >>> > > > >
> >> >>> > > > > Also, I have another question for you...
> >> >>> > > > >
> >> >>> > > > > When I imported the projects from [3] the following projects
> >> were
> >> >>> not
> >> >>> > > > > imported:
> >> >>> > > > >
> >> >>> > > > > core-android
> >> >>> > > > > host-android
> >> >>> > > > > extensibility
> >> >>> > > > >
> >> >>> > > > > Is this normal? Should they be imported?
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > > [1]
> >> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> >>> > > > > [2]
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> >> >>> > > > > [3]
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> >> >>> > > > > adrianocrestani@apache.org>
> >> >>> > > > > wrote:
> >> >>> > > > >
> >> >>> > > > > > Well detailed Oscar ; )
> >> >>> > > > > >
> >> >>> > > > > > It is one thing I learnt after playing hours with Android,
> >> you
> >> >>> need
> >> >>> > > to
> >> >>> > > > > > rebuild every modified project which is imported in the
> >> android
> >> >>> > > > project,
> >> >>> > > > > > the
> >> >>> > > > > > android project itself does not check for modifications on
> >> its
> >> >>> > > > > dependencies
> >> >>> > > > > > :S...so, when you rebuilt the imported project it
> recompiled
> >> the
> >> >>> > > > > > uncommented
> >> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to
> >> check
> >> >>> for
> >> >>> > > > > > annotations once again, so you got the errors on [1],
> which
> >> >>> means
> >> >>> > > > > > retrotranslator is still not working. Have you tested it
> on a
> >> >>> > simpler
> >> >>> > > > > > application as I previously suggested? Did it work? What
> was
> >> the
> >> >>> > most
> >> >>> > > > > > critical scenario you tested it and it worked?
> >> >>> > > > > >
> >> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> >> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >> /../workspace
> >> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> >> >>> > > > > >
> >> >>> > > > > > You should also check if it's is working as expected, as I
> >> >>> already
> >> >>> > > > said,
> >> >>> > > > > > does not go directly testing complex solutions on complex
> >> things
> >> >>> > like
> >> >>> > > > > SCA.
> >> >>> > > > > > At first, build a simple, but equivalent scenario, and
> test
> >> it.
> >> >>> For
> >> >>> > > > > > example,
> >> >>> > > > > > a simple android app project that uses an java library
> >> project
> >> >>> > which
> >> >>> > > > > access
> >> >>> > > > > > annotations on classes placed on the android project. Like
> >> our
> >> >>> > > android
> >> >>> > > > > > calculator, it's an android app project
> (calculator-android)
> >> >>> which
> >> >>> > > uses
> >> >>> > > > > > java
> >> >>> > > > > > library projects (sca modules), and these libraries checks
> >> for
> >> >>> > > > > annotations
> >> >>> > > > > > on classes located at the android app project
> >> >>> > > (CalculatorService.java,
> >> >>> > > > > > AddService.java, etc). When you get it working on the
> simpler
> >> >>> > > scenario,
> >> >>> > > > > > then
> >> >>> > > > > > you are ready to test it on the complexer sceneario
> >> >>> > > > (calculator-android).
> >> >>> > > > > >
> >> >>> > > > > > Please, if you get the retrotranslator working in the
> simpler
> >> >>> > > scenario,
> >> >>> > > > > > send
> >> >>> > > > > > us a patch with it. You can create a JIRA and attach it.
> If
> >> you
> >> >>> > need
> >> >>> > > > any
> >> >>> > > > > > help, just ask ; )
> >> >>> > > > > >
> >> >>> > > > > > "code that checks for @Remotable you force to true,
> otherwise
> >> >>> force
> >> >>> > > to
> >> >>> > > > > > false."
> >> >>> > > > > >
> >> >>> > > > > > Sorry for the not-well-detailed info here. I meant you to
> do:
> >> >>> > > > > >
> >> >>> > > > > > Search in every sca code for the usage of
> >> >>> Class.isAnnotationPresent
> >> >>> > > or
> >> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for
> a
> >> the
> >> >>> > > > > @Remotable
> >> >>> > > > > > annotations force it to true, for example:
> >> >>> > > > > >
> >> >>> > > > > > Annotation isRemotable =
> >> >>> > class.isAnnotationPresent(Remotable.class);
> >> >>> > > =>
> >> >>> > > > > > Annotation isRemotable = true;
> >> >>> > > > > >
> >> >>> > > > > > otherwise, which means, when it's not checking for the
> >> >>> @Remotable
> >> >>> > > > > > annnotation, force to false. For example:
> >> >>> > > > > >
> >> >>> > > > > > Annotation isReference =
> >> >>> > class.isAnnotationPresent(Reference.class);
> >> >>> > > =>
> >> >>> > > > > > Annotation isReference = false;
> >> >>> > > > > >
> >> >>> > > > > > [1] -
> >> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> >>> > > > > >
> >> >>> > > > > > Kind Regards,
> >> >>> > > > > > Adriano Crestani
> >> >>> > > > > >
> >> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> >> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>> > > > > >
> >> >>> > > > > > > Hi Adriano,
> >> >>> > > > > > >
> >> >>> > > > > > > I continued testing retrotranslator. Here's what I've
> done
> >> up
> >> >>> to
> >> >>> > > now.
> >> >>> > > > > > >
> >> >>> > > > > > > 1. Downloaded the modified code from [1].
> >> >>> > > > > > >
> >> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as
> shown
> >> >>> below:
> >> >>> > > > > > >
> >> >>> > > > > > > svn checkout --revision 643746
> >> >>> > > > > > >
> >> >>> > >
> >> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> >> >>> > > > > > >
> >> >>> > > > > > > cd modules
> >> >>> > > > > > >
> >> >>> > > > > > > mvn clean install -Dtest=no
> >> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> >> >>> > > > > > >
> >> >>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
> >> >>> variable
> >> >>> > as
> >> >>> > > > > shown
> >> >>> > > > > > > below:
> >> >>> > > > > > >
> >> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> >> >>> > eclipse:add-maven-repo
> >> >>> > > > > > >
> >> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
> >> >>> Android
> >> >>> > > > library
> >> >>> > > > > > to
> >> >>> > > > > > > required modules, fixed references to jar files and
> other
> >> >>> > > libraries.
> >> >>> > > > > > >
> >> >>> > > > > > > 5. Uncommented lines in
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > >
> >> >>> > > > > > > 6. Ran retrotranslator as instructed on the project site
> >> [3]
> >> >>> and
> >> >>> > > > shown
> >> >>> > > > > > > below:
> >> >>> > > > > > >
> >> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> >> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >> >>> /../workspace
> >> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> >> >>> > > > > > >
> >> >>> > > > > > >  The output can be found in [4].
> >> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > >
> >> >>> > > > > > > and then re-ran retrotranslator.
> >> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and
> >> Android
> >> >>> > > errors
> >> >>> > > > in
> >> >>> > > > > > > [6].
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > > As always, I'm documenting my progress on the project
> log.
> >> I
> >> >>> > > haven't
> >> >>> > > > > > fully
> >> >>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by
> >> what
> >> >>> you
> >> >>> > > > mean
> >> >>> > > > > by
> >> >>> > > > > > > this:
> >> >>> > > > > > >
> >> >>> > > > > > > "code that checks for @Remotable you force to true,
> >> otherwise
> >> >>> > force
> >> >>> > > > to
> >> >>> > > > > > > false."
> >> >>> > > > > > >
> >> >>> > > > > > > I'll continue looking into it and hopefully get
> >> >>> retrotranslator
> >> >>> > to
> >> >>> > > > > work.
> >> >>> > > > > > I
> >> >>> > > > > > > also think it's a simpler option.
> >> >>> > > > > > >
> >> >>> > > > > > > Luciano: Thanks for your suggestions.
> >> >>> > > > > > >
> >> >>> > > > > > > [1]
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >> >>> > > > > > >
> >> >>> > > > > > > [2]
> >> >>> > > > >
> >> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> >> >>> > > > > > >
> >> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> >> >>> > > > > > >
> >> >>> > > > > > > [4]
> >> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> >> >>> > > > > > >
> >> >>> > > > > > > [5]
> >> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> >> >>> > > > > > > adrianocrestani@apache.org> wrote:
> >> >>> > > > > > >
> >> >>> > > > > > > > Hi,
> >> >>> > > > > > > >
> >> >>> > > > > > > > I tried what Luciano suggested. It really works. To
> get
> >> it
> >> >>> > > working
> >> >>> > > > > you
> >> >>> > > > > > > > simply need to search on all modules where the code
> >> checks
> >> >>> for
> >> >>> > > > > > @Remotable
> >> >>> > > > > > > > annotation and force it to true:
> >> >>> > > > > > > >
> >> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   =>
> true
> >> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> >> >>> > > > > > > >
> >> >>> > > > > > > > It works fine on the sca revision we are testing on
> >> Android
> >> >>> and
> >> >>> > > the
> >> >>> > > > > > most
> >> >>> > > > > > > > recent revision. I only tested it as a java
> application,
> >> not
> >> >>> as
> >> >>> > > an
> >> >>> > > > > > > android
> >> >>> > > > > > > > application.
> >> >>> > > > > > > >
> >> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a
> faster
> >> >>> and
> >> >>> > > > simpler
> >> >>> > > > > > > > solution. Because the Luciano's suggestion only forces
> >> the
> >> >>> SCA
> >> >>> > to
> >> >>> > > > > > > recognize
> >> >>> > > > > > > > the services with no annotations declared on their
> >> >>> interfaces,
> >> >>> > > but
> >> >>> > > > it
> >> >>> > > > > > > does
> >> >>> > > > > > > > not avoid the Exceptions we are getting when the SCA
> >> invokes
> >> >>> > > > methods
> >> >>> > > > > > that
> >> >>> > > > > > > > read annotations. So, our current problem is that we
> are
> >> not
> >> >>> > > being
> >> >>> > > > > able
> >> >>> > > > > > > to
> >> >>> > > > > > > > use these methods and not only because we are not
> being
> >> able
> >> >>> to
> >> >>> > > > read
> >> >>> > > > > > the
> >> >>> > > > > > > > annotations.
> >> >>> > > > > > > >
> >> >>> > > > > > > > Oscar, if you want to try the Luciano's suggestion,
> you
> >> will
> >> >>> > need
> >> >>> > > > to
> >> >>> > > > > > > > comment/adapt every sca code that tries to read the
> class
> >> >>> > > > > annotations.
> >> >>> > > > > > It
> >> >>> > > > > > > > is
> >> >>> > > > > > > > not necessary to comment/adapt the methods that read
> >> Method
> >> >>> > > > > > annotations,
> >> >>> > > > > > > > they are not throwning any exception. So, every code
> that
> >> >>> > checks
> >> >>> > > > for
> >> >>> > > > > > > > @Remotable you force to true, otherwise force to
> false.
> >> >>> > > > > > > >
> >> >>> > > > > > > > Any doubt about what I have said, just let me know ; )
> >> >>> > > > > > > >
> >> >>> > > > > > > > Suggestions are welcome : )
> >> >>> > > > > > > >
> >> >>> > > > > > > > Adriano Crestani
> >> >>> > > > > > > >
> >> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> >> >>> > > > > > luckbr1975@gmail.com>
> >> >>> > > > > > > > wrote:
> >> >>> > > > > > > >
> >> >>> > > > > > > > > FYI, if you comment out the code that checks if a
> >> >>> interface
> >> >>> > is
> >> >>> > > > > > > > > remoteble, you could have a version of the
> calculator
> >> >>> without
> >> >>> > > any
> >> >>> > > > > > > > > annotations, and the runtime would introspect the
> >> >>> references
> >> >>> > > for
> >> >>> > > > > the
> >> >>> > > > > > > > > multiple services. But note that, the introspection
> >> code
> >> >>> will
> >> >>> > > > only
> >> >>> > > > > be
> >> >>> > > > > > > > > activated if there is no SCA annotations on the
> class.
> >> >>> > > > > > > > >
> >> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> >> >>> > > > > > > > > <ad...@apache.org> wrote:
> >> >>> > > > > > > > > > Ah, the expected exception should look like this
> on
> >> >>> android
> >> >>> > > > > > emulator:
> >> >>> > > > > > > > > >
> >> >>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >
> >> >>> > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > > > <
> >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > > > > <
> >> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >> >>> >
> >> >>> > > > > > <
> >> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > > > > > > <
> >> >>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > > > > > > > <
> >> >>> > >
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >> >>> > > > > > > > > >
> >> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani
> <
> >> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> >> >>> > > > > > > > > >
> >> >>> > > > > > > > > >> Hi Oscar,
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> I was indeed using the sca modules not from the
> >> >>> sandbox.
> >> >>> > As
> >> >>> > > > you
> >> >>> > > > > > > > > suggested,
> >> >>> > > > > > > > > >> I
> >> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
> >> workspace
> >> >>> > and
> >> >>> > > > > added
> >> >>> > > > > > > the
> >> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
> >> >>> uncommented
> >> >>> > the
> >> >>> > > > > lines
> >> >>> > > > > > > in
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> following the comments pointing out why those
> lines
> >> had
> >> >>> > been
> >> >>> > > > > > > > commented.
> >> >>> > > > > > > > > I'm
> >> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
> >> However,
> >> >>> > it's
> >> >>> > > > > > getting
> >> >>> > > > > > > > > stuck
> >> >>> > > > > > > > > >> somewhere else (before getting there I guess)...I
> >> think
> >> >>> > this
> >> >>> > > > is
> >> >>> > > > > > the
> >> >>> > > > > > > > case
> >> >>> > > > > > > > > >> because before and after commenting the code I
> get
> >> the
> >> >>> > same
> >> >>> > > > > error
> >> >>> > > > > > in
> >> >>> > > > > > > > the
> >> >>> > > > > > > > > >> Android emulator, an InstantiationException [1].
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> Have you debugged to check exactly where this
> >> exception
> >> >>> is
> >> >>> > > > being
> >> >>> > > > > > > > thrown?
> >> >>> > > > > > > > > I
> >> >>> > > > > > > > > >> have done the procedure I previously described
> >>  again
> >> >>> and
> >> >>> > I
> >> >>> > > > got
> >> >>> > > > > it
> >> >>> > > > > > > > > "running"
> >> >>> > > > > > > > > >> as expected, which means, running till the
> expected
> >> >>> > > exception
> >> >>> > > > is
> >> >>> > > > > > > > thrown.
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> I also started tinkering with retrotranslator.
> First
> >> I
> >> >>> > tried
> >> >>> > > > > doing
> >> >>> > > > > > > it
> >> >>> > > > > > > > > with
> >> >>> > > > > > > > > >> Ant, but it seems that in order to build I have
> to
> >> >>> include
> >> >>> > > the
> >> >>> > > > > > whole
> >> >>> > > > > > > > > >> tuscany
> >> >>> > > > > > > > > >> projects in a way similar to how I now have in
> >> Eclipse.
> >> >>> I
> >> >>> > > also
> >> >>> > > > > > tried
> >> >>> > > > > > > > > making
> >> >>> > > > > > > > > >> a jar out of
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> >> >>> unfortunately
> >> >>> > > it's
> >> >>> > > > > not
> >> >>> > > > > > > > > >> translating anything, as shown below.
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> >> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> >> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> >> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> >> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot
> -classpath
> >> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> >> >>> > > > > > > > > >> Processing 136 file(s) in
> >> >>> JavaRuntimeModuleActivator.jar.
> >> >>> > > > > > > > > >> Transformed 0 file(s).
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> There's also a maven plugin, so I might try
> >> that...but
> >> >>> > first
> >> >>> > > > > I'll
> >> >>> > > > > > > give
> >> >>> > > > > > > > > Ant
> >> >>> > > > > > > > > >> another go. Hopefully Google will release a new
> SDK
> >> >>> soon,
> >> >>> > > > > > otherwise
> >> >>> > > > > > > as
> >> >>> > > > > > > > > you
> >> >>> > > > > > > > > >> say...retrotranslator will have to be the
> workaround
> >> to
> >> >>> > > > proceed
> >> >>> > > > > > with
> >> >>> > > > > > > > our
> >> >>> > > > > > > > > >> project ;-)
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK version
> >> will
> >> >>> not
> >> >>> > be
> >> >>> > > > > > > released
> >> >>> > > > > > > > > until
> >> >>> > > > > > > > > >> july 28th :S. So, it's really good you have
> already
> >> >>> > started
> >> >>> > > > > > working
> >> >>> > > > > > > on
> >> >>> > > > > > > > > the
> >> >>> > > > > > > > > >> retrotranslator, it will probably be the best
> >> >>> workaround
> >> >>> > for
> >> >>> > > > the
> >> >>> > > > > > > > > annotations
> >> >>> > > > > > > > > >> problem till the next SDK release.
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> I suggest you to forget about the build process
> >> right
> >> >>> now,
> >> >>> > > > > before,
> >> >>> > > > > > > > check
> >> >>> > > > > > > > > if
> >> >>> > > > > > > > > >> this retrotranslator works and if it really works
> on
> >> >>> > android
> >> >>> > > > > > > platform.
> >> >>> > > > > > > > > I´m
> >> >>> > > > > > > > > >> really getting upset with Android, even its API
> >> methods
> >> >>> > does
> >> >>> > > > not
> >> >>> > > > > > > work
> >> >>> > > > > > > > as
> >> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile a
> >> simple
> >> >>> > class
> >> >>> > > > > > (coded
> >> >>> > > > > > > by
> >> >>> > > > > > > > > you),
> >> >>> > > > > > > > > >> which contains annotations, and access these
> >> >>> annotations.
> >> >>> > If
> >> >>> > > > it
> >> >>> > > > > > > works,
> >> >>> > > > > > > > > make
> >> >>> > > > > > > > > >> it more complex and test again, do it until you
> >> reach a
> >> >>> > > > scenario
> >> >>> > > > > > as
> >> >>> > > > > > > > > complex
> >> >>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
> >> >>> classes
> >> >>> > > > > accessed
> >> >>> > > > > > > by
> >> >>> > > > > > > > > the
> >> >>> > > > > > > > > >> other external jars and the Android app). Got it?
> :
> >> )
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> Regards,
> >> >>> > > > > > > > > >> Adriano Crestani
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda
> <
> >> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>> Hi Adriano,
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> I was indeed using the sca modules not from the
> >> >>> sandbox.
> >> >>> > As
> >> >>> > > > you
> >> >>> > > > > > > > > suggested,
> >> >>> > > > > > > > > >>> I
> >> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
> >> >>> workspace
> >> >>> > and
> >> >>> > > > > added
> >> >>> > > > > > > the
> >> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> >> >>> uncommented
> >> >>> > > the
> >> >>> > > > > > lines
> >> >>> > > > > > > in
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> following the comments pointing out why those
> lines
> >> >>> had
> >> >>> > > been
> >> >>> > > > > > > > commented.
> >> >>> > > > > > > > > >>> I'm
> >> >>> > > > > > > > > >>> no longer getting the ClassNotFoundException.
> >> However,
> >> >>> > it's
> >> >>> > > > > > getting
> >> >>> > > > > > > > > stuck
> >> >>> > > > > > > > > >>> somewhere else (before getting there I
> guess)...I
> >> >>> think
> >> >>> > > this
> >> >>> > > > is
> >> >>> > > > > > the
> >> >>> > > > > > > > > case
> >> >>> > > > > > > > > >>> because before and after commenting the code I
> get
> >> the
> >> >>> > same
> >> >>> > > > > error
> >> >>> > > > > > > in
> >> >>> > > > > > > > > the
> >> >>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> I also started tinkering with retrotranslator.
> >> First I
> >> >>> > > tried
> >> >>> > > > > > doing
> >> >>> > > > > > > it
> >> >>> > > > > > > > > with
> >> >>> > > > > > > > > >>> Ant, but it seems that in order to build I have
> to
> >> >>> > include
> >> >>> > > > the
> >> >>> > > > > > > whole
> >> >>> > > > > > > > > >>> tuscany
> >> >>> > > > > > > > > >>> projects in a way similar to how I now have in
> >> >>> Eclipse. I
> >> >>> > > > also
> >> >>> > > > > > > tried
> >> >>> > > > > > > > > >>> making
> >> >>> > > > > > > > > >>> a jar out of
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
> >> >>> unfortunately
> >> >>> > > it's
> >> >>> > > > > not
> >> >>> > > > > > > > > >>> translating anything, as shown below.
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$
> >> java
> >> >>> -jar
> >> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> >> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> >> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot
> -classpath
> >> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> >> >>> > > > > > > > > >>> Processing 136 file(s) in
> >> >>> JavaRuntimeModuleActivator.jar.
> >> >>> > > > > > > > > >>> Transformed 0 file(s).
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
> >> that...but
> >> >>> > > first
> >> >>> > > > > I'll
> >> >>> > > > > > > > give
> >> >>> > > > > > > > > Ant
> >> >>> > > > > > > > > >>> another go. Hopefully Google will release a new
> SDK
> >> >>> soon,
> >> >>> > > > > > otherwise
> >> >>> > > > > > > > as
> >> >>> > > > > > > > > you
> >> >>> > > > > > > > > >>> say...retrotranslator will have to be the
> >> workaround
> >> >>> to
> >> >>> > > > proceed
> >> >>> > > > > > > with
> >> >>> > > > > > > > > our
> >> >>> > > > > > > > > >>> project ;-)
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting
> ready
> >> for
> >> >>> > the
> >> >>> > > > > > official
> >> >>> > > > > > > > > start
> >> >>> > > > > > > > > >>> :-)
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> [1]
> >> >>> http://androidindelft.googlepages.com/20may2008.html
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano
> Crestani
> >> <
> >> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> > Hi Oscar,
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > My mistake again, the eclipse project files of
> >> >>> > > > > > contribution-impl
> >> >>> > > > > > > > > module
> >> >>> > > > > > > > > >>> > were
> >> >>> > > > > > > > > >>> > not uploaded, so you are probably using the
> >> modules
> >> >>> you
> >> >>> > > > have
> >> >>> > > > > > > > > downloaded
> >> >>> > > > > > > > > >>> > from
> >> >>> > > > > > > > > >>> > the sca modules. If you remove the
> >> >>> > > > tuscany-contribution-impl
> >> >>> > > > > > from
> >> >>> > > > > > > > > your
> >> >>> > > > > > > > > >>> > workspace and add this module from the sandbox
> it
> >> >>> will
> >> >>> > > > > probably
> >> >>> > > > > > > > work.
> >> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk
> again
> >> to
> >> >>> get
> >> >>> > > the
> >> >>> > > > > > > project
> >> >>> > > > > > > > > >>> files
> >> >>> > > > > > > > > >>> > I'm uploading right now ; )
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
> >> >>> solution
> >> >>> > > here
> >> >>> > > > > is
> >> >>> > > > > > a
> >> >>> > > > > > > > tip:
> >> >>> > > > > > > > > >>> most
> >> >>> > > > > > > > > >>> > of the code that were using the Reflection API
> >> was
> >> >>> > > > commented
> >> >>> > > > > on
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >> >>> > > > > > > > > >>> > class, you just need to edit this class and
> >> remove
> >> >>> the
> >> >>> > > > > > commented
> >> >>> > > > > > > > code
> >> >>> > > > > > > > > >>> (it's
> >> >>> > > > > > > > > >>> > described there).
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > So, if you uncomment the code and the
> >> >>> retrotranslador
> >> >>> > > > > > successfuly
> >> >>> > > > > > > > > work,
> >> >>> > > > > > > > > >>> and
> >> >>> > > > > > > > > >>> > I hope it will, you will reach the
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > >
> >> >>> > >
> >> >>>
> >> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly on
> this
> >> >>> > > > constructor
> >> >>> > > > > > I'm
> >> >>> > > > > > > > > >>> getting a
> >> >>> > > > > > > > > >>> > NPE when the code described above is
> commented.
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > About the ant, go on and use it. Further we
> can
> >> >>> > evaluate
> >> >>> > > > > better
> >> >>> > > > > > > > where
> >> >>> > > > > > > > > we
> >> >>> > > > > > > > > >>> > place it in the entire SCA build process. BTW,
> we
> >> >>> even
> >> >>> > > dont
> >> >>> > > > > > know
> >> >>> > > > > > > if
> >> >>> > > > > > > > > we
> >> >>> > > > > > > > > >>> will
> >> >>> > > > > > > > > >>> > still be using the retrotranslator in future,
> >> >>> right?! :
> >> >>> > )
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
> >> >>> workaround
> >> >>> > > > this
> >> >>> > > > > > > > problem
> >> >>> > > > > > > > > for
> >> >>> > > > > > > > > >>> > now
> >> >>> > > > > > > > > >>> > and go on with our project ; )
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > Kind Regards,
> >> >>> > > > > > > > > >>> > Adriano Crestani
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar
> Castaneda
> >> <
> >> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>> > > Hi Adriano,
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to
> >> build
> >> >>> the
> >> >>> > > > > entire
> >> >>> > > > > > > > > workspace
> >> >>> > > > > > > > > >>> > from
> >> >>> > > > > > > > > >>> > > your instructions. When running
> >> calculator-android
> >> >>> as
> >> >>> > > an
> >> >>> > > > > > > "Android
> >> >>> > > > > > > > > >>> > > application" I'm getting a
> >> ClassNotFoundException
> >> >>> [1]
> >> >>> > > for
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> >> >>> > > > > > > > > >>> > > Is the exception you referred to in your
> >> original
> >> >>> > > email?
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > ...when
> >> >>> > > > > > > > > >>> > > > you run the calculator-android project as
> an
> >> >>> > "Android
> >> >>> > > > > > > > > application"
> >> >>> > > > > > > > > >>> you
> >> >>> > > > > > > > > >>> > > > should get an exception, that was
> generated
> >> >>> > initially
> >> >>> > > > by
> >> >>> > > > > a
> >> >>> > > > > > > NPE
> >> >>> > > > > > > > > >>> thrown
> >> >>> > > > > > > > > >>> > by
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > >
> >> >>> > >
> >> >>>
> >> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >> >>> > > > > > > > > >>> > > > constructor. This is caused because the
> >> latest
> >> >>> > > Android
> >> >>> > > > > SDK
> >> >>> > > > > > > does
> >> >>> > > > > > > > > not
> >> >>> > > > > > > > > >>> > > support
> >> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot
> >> check
> >> >>> > the
> >> >>> > > > > > > @Reference
> >> >>> > > > > > > > > >>> > > annotations
> >> >>> > > > > > > > > >>> > > > (I commented the code which tries to read
> the
> >> >>> > > > > annotations,
> >> >>> > > > > > so
> >> >>> > > > > > > > > when
> >> >>> > > > > > > > > >>> the
> >> >>> > > > > > > > > >>> > > > execution reach this constructor it throws
> >> the
> >> >>> > NPE).
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > Searching for the class in the exception I'm
> >> >>> getting
> >> >>> > I
> >> >>> > > > > found
> >> >>> > > > > > > > > >>> > >
> >> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> >> >>> > > In
> >> >>> > > > > > > > > >>> > getServiceClasses
> >> >>> > > > > > > > > >>> > > it loads the service class I'm getting
> problems
> >> >>> with
> >> >>> > > when
> >> >>> > > > > > > running
> >> >>> > > > > > > > > >>> > > calculator-android as an "Android
> application":
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > I couldn't find the corresponding java file
> in
> >> my
> >> >>> > > > imported
> >> >>> > > > > > > > > workspace
> >> >>> > > > > > > > > >>> and
> >> >>> > > > > > > > > >>> > > found that there is no package like
> >> >>> > > > > > > > > >>> > >
> >> >>> org.apache.tuscany.sca.contribution.processor.impl.
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > Am I missing something? Or are these the
> errors
> >> >>> you
> >> >>> > > would
> >> >>> > > > > > > expect?
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > I would like to get to the point where I get
> >> the
> >> >>> > > > exception
> >> >>> > > > > > you
> >> >>> > > > > > > > > >>> described
> >> >>> > > > > > > > > >>> > > and
> >> >>> > > > > > > > > >>> > > try to run retrotranslator from there.
> However,
> >> as
> >> >>> > I'm
> >> >>> > > > > using
> >> >>> > > > > > > the
> >> >>> > > > > > > > > ADT
> >> >>> > > > > > > > > >>> > plugin
> >> >>> > > > > > > > > >>> > > in eclipse I would need to extract code that
> >> >>> > "declares
> >> >>> > > or
> >> >>> > > > > > > > analyzes
> >> >>> > > > > > > > > >>> > > annotations you may extract it into a
> separate
> >> >>> > library
> >> >>> > > > that
> >> >>> > > > > > can
> >> >>> > > > > > > > be
> >> >>> > > > > > > > > >>> > > processed
> >> >>> > > > > > > > > >>> > > with Retrotranslator and added to the main
> >> >>> project."
> >> >>> > > That
> >> >>> > > > > is,
> >> >>> > > > > > > > > unless I
> >> >>> > > > > > > > > >>> > use
> >> >>> > > > > > > > > >>> > > Ant, in which case I would only need to add
> a
> >> few
> >> >>> > lines
> >> >>> > > > to
> >> >>> > > > > > > > > build.xml.
> >> >>> > > > > > > > > >>> I'm
> >> >>> > > > > > > > > >>> > > continuing to look into this, any thoughts
> are
> >> >>> more
> >> >>> > > than
> >> >>> > > > > > > welcome
> >> >>> > > > > > > > > :-)
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > [1]
> >> >>> > http://delftandroid.googlepages.com/14may2008.html
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
> >> Crestani
> >> >>> <
> >> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > > Hi,
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > At first, I want to correct one mistake,
> on
> >> the
> >> >>> > first
> >> >>> > > > > step
> >> >>> > > > > > I
> >> >>> > > > > > > > > >>> described
> >> >>> > > > > > > > > >>> > on
> >> >>> > > > > > > > > >>> > > > my
> >> >>> > > > > > > > > >>> > > > previous email, I should not have added
> the
> >> word
> >> >>> > > > > "install",
> >> >>> > > > > > > it
> >> >>> > > > > > > > > >>> probably
> >> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn
> clean
> >> >>> > install"
> >> >>> > > in
> >> >>> > > > > the
> >> >>> > > > > > > > > >>> downloaded
> >> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same
> step,
> >> >>> the
> >> >>> > > code
> >> >>> > > > > > should
> >> >>> > > > > > > > not
> >> >>> > > > > > > > > be
> >> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Simon:
> >> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java
> >> source
> >> >>> > codes
> >> >>> > > > are
> >> >>> > > > > > > under
> >> >>> > > > > > > > > CDDL
> >> >>> > > > > > > > > >>> > 1.0
> >> >>> > > > > > > > > >>> > > > license, it's only needed to include the
> CDDL
> >> >>> > license
> >> >>> > > > > > header
> >> >>> > > > > > > on
> >> >>> > > > > > > > > each
> >> >>> > > > > > > > > >>> > > file,
> >> >>> > > > > > > > > >>> > > > and it's already done : )
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Jean:
> >> >>> > > > > > > > > >>> > > > I think it is better to keep the code in
> the
> >> >>> > sandbox
> >> >>> > > > for
> >> >>> > > > > > now.
> >> >>> > > > > > > > At
> >> >>> > > > > > > > > >>> first,
> >> >>> > > > > > > > > >>> > > > it's
> >> >>> > > > > > > > > >>> > > > not working on the current SCA modules
> >> revision
> >> >>> > yet.
> >> >>> > > > And
> >> >>> > > > > > > also,
> >> >>> > > > > > > > > I'm
> >> >>> > > > > > > > > >>> > > > commenting many lines at some modules just
> to
> >> >>> get a
> >> >>> > > > > "first
> >> >>> > > > > > > run"
> >> >>> > > > > > > > > of
> >> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate why
> and
> >> >>> how
> >> >>> > > this
> >> >>> > > > > > > > commented
> >> >>> > > > > > > > > >>> lines
> >> >>> > > > > > > > > >>> > > will
> >> >>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA
> >> Java
> >> >>> and
> >> >>> > > SCA
> >> >>> > > > > > > > Android.
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Oscar:
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > - Are host-android and core-android a part
> of
> >> >>> > > > > > > > calculator-android?
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > What do you mean when you say "part"? They
> >> are
> >> >>> used
> >> >>> > > by
> >> >>> > > > > > > > > >>> > > calculator-android,
> >> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
> >> >>> modules
> >> >>> > in
> >> >>> > > > > future
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > - Should the calculator-android included
> in
> >> [1]
> >> >>> > have
> >> >>> > > > > > included
> >> >>> > > > > > > > an
> >> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn
> the
> >> >>> > eclipse
> >> >>> > > > > > project
> >> >>> > > > > > > > > files
> >> >>> > > > > > > > > >>> of
> >> >>> > > > > > > > > >>> > > > these
> >> >>> > > > > > > > > >>> > > > projects. I have already commited these
> files
> >> >>> and
> >> >>> > if
> >> >>> > > > you
> >> >>> > > > > > > update
> >> >>> > > > > > > > > your
> >> >>> > > > > > > > > >>> > > trunk
> >> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones
> >> you
> >> >>> have
> >> >>> > > > > > created.
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
> >> >>> > something
> >> >>> > > > else
> >> >>> > > > > > > > needed
> >> >>> > > > > > > > > in
> >> >>> > > > > > > > > >>> > > > addition
> >> >>> > > > > > > > > >>> > > > to including the Android Library?
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > No, the Android library is really simples,
> it
> >> >>> only
> >> >>> > > > > contains
> >> >>> > > > > > > the
> >> >>> > > > > > > > > >>> > > android.jar
> >> >>> > > > > > > > > >>> > > > file located in your Android SDK.
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build"
> and
> >> >>> "mvn
> >> >>> > > > > -Peclipse
> >> >>> > > > > > > > > >>> > > > eclipse:eclipse"
> >> >>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
> >> >>> project
> >> >>> > > > files
> >> >>> > > > > > are
> >> >>> > > > > > > > > already
> >> >>> > > > > > > > > >>> in
> >> >>> > > > > > > > > >>> > > > modules and you should build the modules
> >> using
> >> >>> the
> >> >>> > > > > eclipse
> >> >>> > > > > > > for
> >> >>> > > > > > > > > now.
> >> >>> > > > > > > > > >>> The
> >> >>> > > > > > > > > >>> > > > maven config files are not updated yet
> with
> >> the
> >> >>> > > > > > modifications
> >> >>> > > > > > > I
> >> >>> > > > > > > > > have
> >> >>> > > > > > > > > >>> > done
> >> >>> > > > > > > > > >>> > > > on
> >> >>> > > > > > > > > >>> > > > these modules, so they will not generate
> the
> >> >>> > correct
> >> >>> > > > > > project
> >> >>> > > > > > > > > files,
> >> >>> > > > > > > > > >>> > > worse,
> >> >>> > > > > > > > > >>> > > > they will override the ones I have
> created.
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Then, clean and build your entire
> workspace,
> >> if
> >> >>> you
> >> >>> > > > still
> >> >>> > > > > > get
> >> >>> > > > > > > > any
> >> >>> > > > > > > > > >>> > errors,
> >> >>> > > > > > > > > >>> > > > let me know ; )
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > - Should I import
> >> 'tuscany-databinding-saxon'?
> >> >>> Or,
> >> >>> > > why
> >> >>> > > > > > should
> >> >>> > > > > > > > > this
> >> >>> > > > > > > > > >>> not
> >> >>> > > > > > > > > >>> > be
> >> >>> > > > > > > > > >>> > > > imported?
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > It seems the revision I suggested already
> had
> >> >>> the
> >> >>> > > saxon
> >> >>> > > > > > > module
> >> >>> > > > > > > > > >>> removed
> >> >>> > > > > > > > > >>> > > from
> >> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another
> one
> >> >>> that
> >> >>> > > > > > shouldn´t.
> >> >>> > > > > > > > > Please,
> >> >>> > > > > > > > > >>> > > import
> >> >>> > > > > > > > > >>> > > > the databinding-saxon module again into
> your
> >> >>> > > workspace.
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > Regards,
> >> >>> > > > > > > > > >>> > > > Adriano Crestani
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > [1] -
> >> >>> > > > > > > > >
> >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >> >>> > > > > > > > > >>> > > > >
> >> >>> > > > > > > > > >>> > > > [2] -
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> >
> >> >>>
> >>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
> >> Jean-Sebastien
> >> >>> > > > Delfino
> >> >>> > > > > <
> >> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
> >> >>> > > > > > > > > >>> > > > >
> >> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> >> >>> > > > > > > > > >>> > > > > > >
> >> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code
> from
> >> [1]
> >> >>> and
> >> >>> > > > > > installed
> >> >>> > > > > > > > as
> >> >>> > > > > > > > > >>> shown
> >> >>> > > > > > > > > >>> > > > > > > > below:
> >> >>> > > > > > > > > >>> > > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > > svn checkout
> >> >>> > > > > > > > > >>> > > > > > > >
> >> >>> > > > > > > > >
> >> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> >> >>> > > > > > > > > >>> > > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
> >> >>> > > > > > > > > >>> > > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > If there's no objection from others,
> >> I'd
> >> >>> be
> >> >>> > > happy
> >> >>> > > > > to
> >> >>> > > > > > > see
> >> >>> > > > > > > > > this
> >> >>> > > > > > > > > >>> > code
> >> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now
> >> have
> >> >>> > > several
> >> >>> > > > > > > people
> >> >>> > > > > > > > > doing
> >> >>> > > > > > > > > >>> > > > development
> >> >>> > > > > > > > > >>> > > > > > > on this android integration.
> >> >>> > > > > > > > > >>> > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with
> something
> >> >>> like
> >> >>> > > > > > > > > >>> > trunk/java/sca/android
> >> >>> > > > > > > > > >>> > > > > > > and later progressively try to
> converge
> >> >>> the
> >> >>> > > code
> >> >>> > > > > with
> >> >>> > > > > > > the
> >> >>> > > > > > > > > code
> >> >>> > > > > > > > > >>> in
> >> >>> > > > > > > > > >>> > > > trunk,
> >> >>> > > > > > > > > >>> > > > > > > with architected plug points for the
> >> >>> android
> >> >>> > > > > specific
> >> >>> > > > > > > > code
> >> >>> > > > > > > > > >>> etc.
> >> >>> > > > > > > > > >>> > > > > > >
> >> >>> > > > > > > > > >>> > > > > > > Thoughts?
> >> >>> > > > > > > > > >>> > > > > > >
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not
> >> also
> >> >>> > imply
> >> >>> > > > > > "making
> >> >>> > > > > > > > > part
> >> >>> > > > > > > > > >>> of
> >> >>> > > > > > > > > >>> > the
> >> >>> > > > > > > > > >>> > > > > > main build"?
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental
> >> code
> >> >>> > > > entering
> >> >>> > > > > > the
> >> >>> > > > > > > > > build
> >> >>> > > > > > > > > >>> at
> >> >>> > > > > > > > > >>> > > this
> >> >>> > > > > > > > > >>> > > > > > stage.
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
> >> >>> > > > > > > > > >>> > > > > >
> >> >>> > > > > > > > > >>> > > > >
> >> >>> > > > > > > > > >>> > > > > I think it's business as usual, code
> that
> >> >>> doesn't
> >> >>> > > > work
> >> >>> > > > > > does
> >> >>> > > > > > > > not
> >> >>> > > > > > > > > go
> >> >>> > > > > > > > > >>> in
> >> >>> > > > > > > > > >>> > > the
> >> >>> > > > > > > > > >>> > > > > main build, code that's getting stable
> can
> >> go
> >> >>> in
> >> >>> > > the
> >> >>> > > > > main
> >> >>> > > > > > > > build
> >> >>> > > > > > > > > at
> >> >>> > > > > > > > > >>> > some
> >> >>> > > > > > > > > >>> > > > > point when people have no specific
> >> objections,
> >> >>> > and
> >> >>> > > > > > > different
> >> >>> > > > > > > > > >>> profiles
> >> >>> > > > > > > > > >>> > > can
> >> >>> > > > > > > > > >>> > > > be
> >> >>> > > > > > > > > >>> > > > > used to subset particular builds.
> >> >>> > > > > > > > > >>> > > > >
> >> >>> > > > > > > > > >>> > > > > --
> >> >>> > > > > > > > > >>> > > > > Jean-Sebastien
> >> >>> > > > > > > > > >>> > > > >
> >> >>> > > > > > > > > >>> > > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > --
> >> >>> > > > > > > > > >>> > > best,
> >> >>> > > > > > > > > >>> > > -oscar
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> > > Oscar Castañeda
> >> >>> > > > > > > > > >>> > >
> >> >>> > > > > > > > > >>> >
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> --
> >> >>> > > > > > > > > >>> best,
> >> >>> > > > > > > > > >>> -oscar
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>> Oscar Castañeda
> >> >>> > > > > > > > > >>>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >>
> >> >>> > > > > > > > > >
> >> >>> > > > > > > > >
> >> >>> > > > > > > > >
> >> >>> > > > > > > > >
> >> >>> > > > > > > > > --
> >> >>> > > > > > > > > Luciano Resende
> >> >>> > > > > > > > > Apache Tuscany Committer
> >> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> >> <http://people.apache.org/%7Elresende>
> >> >>> <http://people.apache.org/%7Elresende>
> >> >>> > <http://people.apache.org/%7Elresende>
> >> >>> > > <http://people.apache.org/%7Elresende>
> >> >>> > > > <http://people.apache.org/%7Elresende>
> >> >>> > > > > <http://people.apache.org/%7Elresende>
> >> >>> > > > > > <http://people.apache.org/%7Elresende>
> >> >>> > > > > > > <http://people.apache.org/%7Elresende><
> >> >>> > > > > > > > http://people.apache.org/%7Elresende>
> >> >>> > > > > > > > > http://lresende.blogspot.com/
> >> >>> > > > > > > > >
> >> >>> > > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > >
> >> >>> > > > > > > --
> >> >>> > > > > > > best,
> >> >>> > > > > > > -oscar
> >> >>> > > > > > >
> >> >>> > > > > > > Oscar Castañeda
> >> >>> > > > > > >
> >> >>> > > > > >
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > >
> >> >>> > > > > --
> >> >>> > > > > best,
> >> >>> > > > > -oscar
> >> >>> > > > >
> >> >>> > > > > Oscar Castañeda
> >> >>> > > > >
> >> >>> > > >
> >> >>> > >
> >> >>> > >
> >> >>> > >
> >> >>> > > --
> >> >>> > > best,
> >> >>> > > -oscar
> >> >>> > >
> >> >>> > > Oscar Castañeda
> >> >>> > >
> >> >>> >
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> best,
> >> >>> -oscar
> >> >>>
> >> >>> Oscar Castañeda
> >> >>>
> >> >>
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Luciano Resende
> >> Apache Tuscany Committer
> >> http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> >> http://lresende.blogspot.com/
> >>
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
Removing RMI should be as simple as removing the tuscany-binding-rmi
dependency from host-android.

On Tue, Jun 24, 2008 at 4:24 PM, Oscar Castaneda
<os...@gmail.com> wrote:
> Hi Luciano,
>
> It's going better after the progress last week with retrotranslator. I'm now
> able to translate the SCA classes and run calculator-android without getting
> Annotation related issues. The problems now are related to RMI. In relation
> to this, and from your comment about blocking issues, I created a child page
> [1] in the project wiki for Blocking issues. Currently, the page lists the
> RMI issue and suggested workarounds.
>
> I think your suggestion about integration with maven is really good.
> Especially because there is a retrotranslator plugin for maven. I'll start
> looking into using this plugin. I also agree about reviewing the scope of
> support. Right now, I see a need to reduce the dependency on RMI, either by
> commenting all the code that uses the RMI API, or by following the
> suggestions from Taras [3] to either replace java.rmi.Remote with
> java.lang.Cloneable (as the result of using a retrotranslator option) or
> taking the RMI source from Apache Harmony and putting it in a
> retrotranslated JAR. What would you recommend? Hopefully after the
> dependency reduction Android will be able to run calculator-android. Based
> on the results of this experiment we can better consider the reduction of
> component types and bindings. Please let me know your thoughts on this idea.
>
> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
> [2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
> [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2
>
>
> On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <lu...@gmail.com>
> wrote:
>
>> How is it going here ? I just want to check if there is any blocking
>> issues with Android at the moment, if so, is there a list of these
>> issues somewhere ?
>>
>> Also, some general suggestions/recommendations.: It would be great if
>> we could spend sometime to get the modules well integrated using
>> maven, this way it would be easier for anyone on the community to
>> checkout the trunk + android sandbox and jump on the code to help.
>> Also, we should review the scope of the support we are trying to
>> acomplish, I'd suggest to minimize the number of component types
>> supported (java) and bindings (default sca binding) and then try to
>> run the calculator sample application. Once we have acomplished this
>> first milestone, we could then discuss our next steps.
>>
>> Thoughts ?
>>
>> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
>> <ad...@apache.org> wrote:
>> > Ah, here is a tip to assure the classes are not recompiled again. Build
>> the
>> > project, then go in each project builder (in the properties window) and
>> > disable all the builders, then not even a clean/build will modify your
>> > project ; )
>> >
>> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
>> adrianocrestani@apache.org>
>> > wrote:
>> >
>> >> Hi Oscar,
>> >>
>> >> I say that it is more difficult to debug because you need attach a
>> source
>> >> code to each jar and etc, and when you are using projects, eclipse
>> already
>> >> knows where to find the source code : )
>> >>
>> >> The reply made sense to me, especially with regards to the fact that
>> with
>> >> the Android plugin Eclipse compiles sources into classes and then into
>> dex
>> >> files, so retrotranslator has no chance to translate classes in between
>> >> these steps - even if I do that outside of Eclipse. This shows from the
>> use
>> >> of non-translated binaries (as indicated by the
>> >> java.lang.Class.isAnnotationPr
>> >> esent(Class.java:1131) error in the stack
>> >> trace) that might have been related to the use of pre-existing dex files
>> or
>> >> over-writing of files by Eclipse. So unless I modify the ADT plugin the
>> >> result would still be the same, even if I use a simpler scenario.
>> >>
>> >> Sorry, I really did not comment this email yet. It does not make so much
>> >> sense for me. First, as you already know, eclipse android projects does
>> not
>> >> recognize any modifications in the imported projects, so it does not
>> call
>> >> the build or incremental build even if the imported projects have their
>> >> source code modified. Just to make sure I tested it again:
>> >>
>> >> 1-  imported in my workspace all the projects included in the
>> >> calculator-android, cleaned and built them...it takes a loooong time, as
>> you
>> >> already know.
>> >>
>> >> 2- imported the calculator-android project, cleaned and built it (only
>> the
>> >> calculator-android project), and this process was too much faster than
>> when
>> >> all the modules are built, so the imported projects were not recompiled,
>> >> otherwise it would take too much more time. I suppose here that the
>> android
>> >> project compiles the .java contained in the android project and convert
>> all
>> >> the .class files (generated by imported projects and android project) to
>> dex
>> >> format.
>> >>
>> >> So, it does not recompile the external class files (the ones contained
>> in
>> >> the imported projects) cause it seems not to check if it was modified or
>> >> not. Of course, I never tested it modifing the .class files, I'm just
>> >> assuming that, because when you modify .java files it does not get
>> >> recompiled.
>> >>
>> >> What do you think?
>> >>
>> >> As I mentioned before, your comments are really helpful as they give me
>> a
>> >> sense of direction. Please let me know if you still think we should
>> pursue
>> >> retrotranslator for files inside a folder.
>> >>
>> >> I really think you should try at first the simpler scenario and try to
>> >> understand how it works and IF it works. Also, you can try what you were
>> >> planning: to retrotranslate the each modules' jar, but I suppose it's a
>> lot
>> >> of work, because there are so many modules :S. So, as I've already said,
>> if
>> >> you think it's getting to complicated, forget it and go on with
>> Luciano's
>> >> suggestion.
>> >>
>> >> Feel free to choose the direction you want to take, and if there is
>> another
>> >> approach you think is better, just let us know ; )...you are the best
>> person
>> >> to choose the directions, cause you are working directly on it, we are
>> just
>> >> guinding/helping you ; )
>> >>
>> >> Thanks,
>> >> Adriano Crestani
>> >>
>> >>
>> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>> >> oscar.castaneda.gsoc@gmail.com> wrote:
>> >>
>> >>> Hi Adriano,
>> >>>
>> >>> If there is an option on retrotranslator to retrotranslate all the
>> classes
>> >>> > in a folder, it should work as well as it works on classes inside
>> .jar
>> >>> > files. So, I think you should try to understand why your first
>> approach
>> >>> > (retrotranslating the eclipse project classes) is not working trying
>> a
>> >>> > simpler scenario. Have you already tried it?
>> >>> >
>> >>>
>> >>> I agree that it's good to try out a simpler scenario to better
>> understand
>> >>> the problem. I haven't tried it yet because using retrotranslator for
>> >>> classes inside a folder doesn't seem to be a solution to the problem.
>> >>> Here's
>> >>> my reasoning:
>> >>>
>> >>> Yes, there is an option to translate classes in a folder. I tried it
>> and
>> >>> it
>> >>> successfully translated the classes inside my Eclipse workspace. When I
>> >>> ran
>> >>> the calculator-android application using the newly translated classes I
>> >>> was
>> >>> getting the errors in [1]. I posted a question in Android Developers
>> about
>> >>> this error and received a reply [2].
>> >>>
>> >>> The reply made sense to me, especially with regards to the fact that
>> with
>> >>> the Android plugin Eclipse compiles sources into classes and then into
>> dex
>> >>> files, so retrotranslator has no chance to translate classes in between
>> >>> these steps - even if I do that outside of Eclipse. This shows from the
>> >>> use
>> >>> of non-translated binaries (as indicated by the
>> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
>> >>> trace) that might have been related to the use of pre-existing dex
>> files
>> >>> or
>> >>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
>> >>> result would still be the same, even if I use a simpler scenario.
>> >>>
>> >>> The reply suggested to use JAR's instead. This also made sense to me
>> and
>> >>> seemed like a simpler way of solving the problem. I didn't see the
>> >>> disadvantage of debugging, which as you point out is more difficult
>> with
>> >>> JAR's instead of Eclipse projects.
>> >>>
>> >>> As I mentioned before, your comments are really helpful as they give me
>> a
>> >>> sense of direction. Please let me know if you still think we should
>> pursue
>> >>> retrotranslator for files inside a folder.
>> >>>
>> >>>
>> >>> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>> >>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> >>>
>> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>> >>> adrianocrestani@apache.org>
>> >>> wrote:
>> >>>
>> >>> > Hi Oscar,
>> >>> >
>> >>> > Yup, you're right - there are indeed Eclipse files inside the
>> folders. I
>> >>> > guess I was confused by the different names in [1] than those that
>> >>> result
>> >>> > [2] from importing to an Eclipse workspace - after which I see 13
>> >>> projects
>> >>> > in both cases. So please ignore my previous remark.
>> >>> >
>> >>> > I have added the projects, but still haven't changed their names. I
>> was
>> >>> > planning to modify their project names when we get it integrated to
>> SCA,
>> >>> > mainly because we will need to change the poms. Anyway, feel free to
>> >>> modify
>> >>> > the names whenever you want ; )
>> >>> >
>> >>> >
>> >>> > Per the reply I received on the Android Developers list [3] I started
>> >>> using
>> >>> > retrotranslator on JAR's instead of class files. For this I created a
>> >>> big
>> >>> > JAR file with all the Tuscany modules (including those you modified
>> for
>> >>> > Android). I translated this big JAR (around 15MB) with
>> retrotranslator
>> >>> [4].
>> >>> > Then I created a new workspace with only calculator-android and
>> >>> > android-jdk-classes as projects and added the translated JAR as an
>> >>> external
>> >>> > library for both projects. This resulted in errors [4] from the
>> Android
>> >>> > build process.
>> >>> >
>> >>> > I really do not understand this errors, but as this errors are only
>> >>> related
>> >>> > to testcase classes they can be ignored (removed from the jars). I
>> also
>> >>> did
>> >>> > not understand why it's not find the .apk file:
>> >>> >
>> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
>> >>> > /bin/calculator-android.apk!"
>> >>> >
>> >>> > To work around these errors I decided to take a different approach
>> and
>> >>> copy
>> >>> > all the jar files contained in the individual modules to a separate
>> >>> folder
>> >>> > and then run retrotranslator on each JAR. The jars are found inside
>> the
>> >>> > target folder of each module and are named as shown below:
>> >>> >
>> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> >>> >
>> >>> > From this I found that only the SCA modules have these JAR files
>> inside
>> >>> > their respective target folders, whereas the Android modules I
>> >>> downloaded
>> >>> > from [1] don't have these files at all
>> >>> >
>> >>> > Yep, this .jars are generated when the maven is executed. I'm not
>> sure
>> >>> if
>> >>> > you should use this .jars, because they were compiled with no
>> reference
>> >>> to
>> >>> > Android library. That's also why there are no .jar files for android
>> >>> > modules, because you did not execute the maven on them  (and you
>> >>> > shouldn't).
>> >>> >
>> >>> > So I decided to keep the Android
>> >>> > modules [2] and add the translated JARs as libraries where needed to
>> >>> have
>> >>> > the workspace build with no problems. If I get this running I would
>> look
>> >>> > into creating JAR files from the Android modules and then return to
>> only
>> >>> > having calculator-android and android-jdk-classes as projects and the
>> >>> rest
>> >>> > as JAR's added as external libraries. If this works out I could then
>> >>> look
>> >>> > into seeing which JAR's are important and which are not, in this way
>> >>> > reducing the total memory footprint and coming up with a "lightweight
>> >>> > mobile
>> >>> > SCA core/runtime." Please let me know your thoughts on these efforts.
>> >>> >
>> >>> > You haven't tried this yet, right? You may try it, but I do not like
>> >>> this
>> >>> > approach, because it will get difficult to debug sca classes as they
>> are
>> >>> > not
>> >>> > imported as eclipse projects.
>> >>> >
>> >>> > If there is an option on retrotranslator to retrotranslate all the
>> >>> classes
>> >>> > in a folder, it should work as well as it works on classes inside
>> .jar
>> >>> > files. So, I think you should try to understand why your first
>> approach
>> >>> > (retrotranslating the eclipse project classes) is not working trying
>> a
>> >>> > simpler scenario. Have you already tried it?
>> >>> >
>> >>> > Also, if the restrotranslator gets to complicated, you may try the
>> >>> > Luciano's
>> >>> > suggestion ; )
>> >>> >
>> >>> >
>> >>> > Kind Regards,
>> >>> > Adriano Crestani
>> >>> >
>> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> >>> >
>> >>> > > Hi Adriano,
>> >>> > >
>> >>> > >
>> >>> > > > Yep, they should be imported, if you check inside its folders,
>> there
>> >>> > are
>> >>> > > > the
>> >>> > > > eclipse project files, so they should be identified by the
>> eclipse
>> >>> > import
>> >>> > > > tool as an eclipse project.
>> >>> > >
>> >>> > >
>> >>> > > Yup, you're right - there are indeed Eclipse files inside the
>> folders.
>> >>> I
>> >>> > > guess I was confused by the different names in [1] than those that
>> >>> result
>> >>> > > [2] from importing to an Eclipse workspace - after which I see 13
>> >>> > projects
>> >>> > > in both cases. So please ignore my previous remark.
>> >>> > >
>> >>> > > I don't think introspection is a good solution, hence you will need
>> to
>> >>> > > > change how the sca reads the info about each service and also
>> >>> services
>> >>> > > > implemented for JVM would need to be adapted to run on Android.
>> >>> Let's
>> >>> > > avoid
>> >>> > > > to modify so much the SCA code, and lets try to keep
>> retrotranslator
>> >>> in
>> >>> > > > mind
>> >>> > > > as a temporary workaround for annotations till next SDK release
>> :S
>> >>> > >
>> >>> > >
>> >>> > > >  Also, if you get the retrotranslator working, forget the
>> Luciano's
>> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
>> >>> > > >
>> >>> > >
>> >>> > > Will do. Thanks for the advice it helps me to focus in the right
>> >>> > direction
>> >>> > > :-)
>> >>> > >
>> >>> > > Now, a summary of what I've done up to now:
>> >>> > >
>> >>> > > Per the reply I received on the Android Developers list [3] I
>> started
>> >>> > using
>> >>> > > retrotranslator on JAR's instead of class files. For this I created
>> a
>> >>> big
>> >>> > > JAR file with all the Tuscany modules (including those you modified
>> >>> for
>> >>> > > Android). I translated this big JAR (around 15MB) with
>> retrotranslator
>> >>> > [4].
>> >>> > > Then I created a new workspace with only calculator-android and
>> >>> > > android-jdk-classes as projects and added the translated JAR as an
>> >>> > external
>> >>> > > library for both projects. This resulted in errors [4] from the
>> >>> Android
>> >>> > > build process.
>> >>> > >
>> >>> > > To work around these errors I decided to take a different approach
>> and
>> >>> > copy
>> >>> > > all the jar files contained in the individual modules to a separate
>> >>> > folder
>> >>> > > and then run retrotranslator on each JAR. The jars are found inside
>> >>> the
>> >>> > > target folder of each module and are named as shown below:
>> >>> > >
>> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> >>> > >
>> >>> > > From this I found that only the SCA modules have these JAR files
>> >>> inside
>> >>> > > their respective target folders, whereas the Android modules I
>> >>> downloaded
>> >>> > > from [1] don't have these files at all. So I decided to keep the
>> >>> Android
>> >>> > > modules [2] and add the translated JARs as libraries where needed
>> to
>> >>> have
>> >>> > > the workspace build with no problems. If I get this running I would
>> >>> look
>> >>> > > into creating JAR files from the Android modules and then return to
>> >>> only
>> >>> > > having calculator-android and android-jdk-classes as projects and
>> the
>> >>> > rest
>> >>> > > as JAR's added as external libraries. If this works out I could
>> then
>> >>> look
>> >>> > > into seeing which JAR's are important and which are not, in this
>> way
>> >>> > > reducing the total memory footprint and coming up with a
>> "lightweight
>> >>> > > mobile
>> >>> > > SCA core/runtime." Please let me know your thoughts on these
>> efforts.
>> >>> > >
>> >>> > >
>> >>> > > [1]
>> >>> > >
>> >>> >
>> >>>
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>> >>> > > [3]
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> >>> > > [4]
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>> >>> > >
>> >>> > >
>> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>> >>> > > adrianocrestani@apache.org>
>> >>> > > wrote:
>> >>> > >
>> >>> > > > Hi Oscar,
>> >>> > > >
>> >>> > > >
>> >>> > > > When I imported the projects from [3] the following projects were
>> >>> not
>> >>> > > > imported:
>> >>> > > >
>> >>> > > > core-android
>> >>> > > > host-android
>> >>> > > > extensibility
>> >>> > > >
>> >>> > > > Is this normal? Should they be imported?
>> >>> > > >
>> >>> > > > Yep, they should be imported, if you check inside its folders,
>> there
>> >>> > are
>> >>> > > > the
>> >>> > > > eclipse project files, so they should be identified by the
>> eclipse
>> >>> > import
>> >>> > > > tool as an eclipse project.
>> >>> > > >
>> >>> > > > Thanks for the detailed explanation. I'm going to give this a try
>> as
>> >>> I
>> >>> > > > found
>> >>> > > > an introspection related comment [2] as a workaround to another
>> >>> > > annotations
>> >>> > > > problem with the current SDK.
>> >>> > > >
>> >>> > > > I don't think introspection is a good solution, hence you will
>> need
>> >>> to
>> >>> > > > change how the sca reads the info about each service and also
>> >>> services
>> >>> > > > implemented for JVM would need to be adapted to run on Android.
>> >>> Let's
>> >>> > > avoid
>> >>> > > > to modify so much the SCA code, and lets try to keep
>> retrotranslator
>> >>> in
>> >>> > > > mind
>> >>> > > > as a temporary workaround for annotations till next SDK release
>> :S
>> >>> > > >
>> >>> > > > Also, if you get the retrotranslator working, forget the
>> Luciano's
>> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
>> >>> > > >
>> >>> > > > Any progress testing retrotranslator on a simpler scenario, just
>> let
>> >>> us
>> >>> > > > know
>> >>> > > > ; )
>> >>> > > >
>> >>> > > > Kind Regards,
>> >>> > > > Adriano Crestani
>> >>> > > >
>> >>> > > >
>> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> >>> > > >
>> >>> > > > > Hi Adriano,
>> >>> > > > >
>> >>> > > > > At first, build a simple, but equivalent scenario, and test it.
>> >>> > > > >
>> >>> > > > >
>> >>> > > > > I think this is a great idea, especially because I found that
>> the
>> >>> > > "native
>> >>> > > > > method not implemented" errors I'm getting [1] are still
>> related
>> >>> to
>> >>> > the
>> >>> > > > > annotations problem. I'm getting the same errors when
>> converting
>> >>> the
>> >>> > > code
>> >>> > > > > to
>> >>> > > > > java 1.4. This makes me think that retrotranslator is actually
>> not
>> >>> > > > working.
>> >>> > > > > Hopefully, testing with a simpler scenario will help me to
>> >>> understand
>> >>> > > the
>> >>> > > > > problem better.
>> >>> > > > >
>> >>> > > > > Sorry for the not-well-detailed info here. I meant you to do:
>> >>> > > > > >
>> >>> > > > > > Search in every sca code for the usage of
>> >>> Class.isAnnotationPresent
>> >>> > > or
>> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
>> the
>> >>> > > > > @Remotable
>> >>> > > > > > annotations force it to true, for example:
>> >>> > > > > >
>> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
>> >>> > > > > >>
>> >>> > > > > >> (Remotable.class); =>
>> >>> > > > > >> Annotation isRemotable = true;
>> >>> > > > > >>
>> >>> > > > > >> otherwise, which means, when it's not checking for the
>> >>> @Remotable
>> >>> > > > > >> annnotation, force to false. For example:
>> >>> > > > > >>
>> >>> > > > > >> Annotation isReference =
>> >>> > class.isAnnotationPresent(Reference.class);
>> >>> > > > =>
>> >>> > > > > >> Annotation isReference = false;
>> >>> > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > > > Thanks for the detailed explanation. I'm going to give this a
>> try
>> >>> as
>> >>> > I
>> >>> > > > > found
>> >>> > > > > an introspection related comment [2] as a workaround to another
>> >>> > > > annotations
>> >>> > > > > problem with the current SDK.
>> >>> > > > >
>> >>> > > > > Also, I have another question for you...
>> >>> > > > >
>> >>> > > > > When I imported the projects from [3] the following projects
>> were
>> >>> not
>> >>> > > > > imported:
>> >>> > > > >
>> >>> > > > > core-android
>> >>> > > > > host-android
>> >>> > > > > extensibility
>> >>> > > > >
>> >>> > > > > Is this normal? Should they be imported?
>> >>> > > > >
>> >>> > > > >
>> >>> > > > > [1]
>> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >>> > > > > [2]
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>> >>> > > > > [3]
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> >>> > > > >
>> >>> > > > >
>> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>> >>> > > > > adrianocrestani@apache.org>
>> >>> > > > > wrote:
>> >>> > > > >
>> >>> > > > > > Well detailed Oscar ; )
>> >>> > > > > >
>> >>> > > > > > It is one thing I learnt after playing hours with Android,
>> you
>> >>> need
>> >>> > > to
>> >>> > > > > > rebuild every modified project which is imported in the
>> android
>> >>> > > > project,
>> >>> > > > > > the
>> >>> > > > > > android project itself does not check for modifications on
>> its
>> >>> > > > > dependencies
>> >>> > > > > > :S...so, when you rebuilt the imported project it recompiled
>> the
>> >>> > > > > > uncommented
>> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to
>> check
>> >>> for
>> >>> > > > > > annotations once again, so you got the errors on [1], which
>> >>> means
>> >>> > > > > > retrotranslator is still not working. Have you tested it on a
>> >>> > simpler
>> >>> > > > > > application as I previously suggested? Did it work? What was
>> the
>> >>> > most
>> >>> > > > > > critical scenario you tested it and it worked?
>> >>> > > > > >
>> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> /../workspace
>> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>> >>> > > > > >
>> >>> > > > > > You should also check if it's is working as expected, as I
>> >>> already
>> >>> > > > said,
>> >>> > > > > > does not go directly testing complex solutions on complex
>> things
>> >>> > like
>> >>> > > > > SCA.
>> >>> > > > > > At first, build a simple, but equivalent scenario, and test
>> it.
>> >>> For
>> >>> > > > > > example,
>> >>> > > > > > a simple android app project that uses an java library
>> project
>> >>> > which
>> >>> > > > > access
>> >>> > > > > > annotations on classes placed on the android project. Like
>> our
>> >>> > > android
>> >>> > > > > > calculator, it's an android app project (calculator-android)
>> >>> which
>> >>> > > uses
>> >>> > > > > > java
>> >>> > > > > > library projects (sca modules), and these libraries checks
>> for
>> >>> > > > > annotations
>> >>> > > > > > on classes located at the android app project
>> >>> > > (CalculatorService.java,
>> >>> > > > > > AddService.java, etc). When you get it working on the simpler
>> >>> > > scenario,
>> >>> > > > > > then
>> >>> > > > > > you are ready to test it on the complexer sceneario
>> >>> > > > (calculator-android).
>> >>> > > > > >
>> >>> > > > > > Please, if you get the retrotranslator working in the simpler
>> >>> > > scenario,
>> >>> > > > > > send
>> >>> > > > > > us a patch with it. You can create a JIRA and attach it. If
>> you
>> >>> > need
>> >>> > > > any
>> >>> > > > > > help, just ask ; )
>> >>> > > > > >
>> >>> > > > > > "code that checks for @Remotable you force to true, otherwise
>> >>> force
>> >>> > > to
>> >>> > > > > > false."
>> >>> > > > > >
>> >>> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
>> >>> > > > > >
>> >>> > > > > > Search in every sca code for the usage of
>> >>> Class.isAnnotationPresent
>> >>> > > or
>> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
>> the
>> >>> > > > > @Remotable
>> >>> > > > > > annotations force it to true, for example:
>> >>> > > > > >
>> >>> > > > > > Annotation isRemotable =
>> >>> > class.isAnnotationPresent(Remotable.class);
>> >>> > > =>
>> >>> > > > > > Annotation isRemotable = true;
>> >>> > > > > >
>> >>> > > > > > otherwise, which means, when it's not checking for the
>> >>> @Remotable
>> >>> > > > > > annnotation, force to false. For example:
>> >>> > > > > >
>> >>> > > > > > Annotation isReference =
>> >>> > class.isAnnotationPresent(Reference.class);
>> >>> > > =>
>> >>> > > > > > Annotation isReference = false;
>> >>> > > > > >
>> >>> > > > > > [1] -
>> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >>> > > > > >
>> >>> > > > > > Kind Regards,
>> >>> > > > > > Adriano Crestani
>> >>> > > > > >
>> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> >>> > > > > >
>> >>> > > > > > > Hi Adriano,
>> >>> > > > > > >
>> >>> > > > > > > I continued testing retrotranslator. Here's what I've done
>> up
>> >>> to
>> >>> > > now.
>> >>> > > > > > >
>> >>> > > > > > > 1. Downloaded the modified code from [1].
>> >>> > > > > > >
>> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
>> >>> below:
>> >>> > > > > > >
>> >>> > > > > > > svn checkout --revision 643746
>> >>> > > > > > >
>> >>> > >
>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>> >>> > > > > > >
>> >>> > > > > > > cd modules
>> >>> > > > > > >
>> >>> > > > > > > mvn clean install -Dtest=no
>> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>> >>> > > > > > >
>> >>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
>> >>> variable
>> >>> > as
>> >>> > > > > shown
>> >>> > > > > > > below:
>> >>> > > > > > >
>> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>> >>> > eclipse:add-maven-repo
>> >>> > > > > > >
>> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
>> >>> Android
>> >>> > > > library
>> >>> > > > > > to
>> >>> > > > > > > required modules, fixed references to jar files and other
>> >>> > > libraries.
>> >>> > > > > > >
>> >>> > > > > > > 5. Uncommented lines in
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > >
>> >>> > > > > > > 6. Ran retrotranslator as instructed on the project site
>> [3]
>> >>> and
>> >>> > > > shown
>> >>> > > > > > > below:
>> >>> > > > > > >
>> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> >>> /../workspace
>> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>> >>> > > > > > >
>> >>> > > > > > >  The output can be found in [4].
>> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > >
>> >>> > > > > > > and then re-ran retrotranslator.
>> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and
>> Android
>> >>> > > errors
>> >>> > > > in
>> >>> > > > > > > [6].
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > > As always, I'm documenting my progress on the project log.
>> I
>> >>> > > haven't
>> >>> > > > > > fully
>> >>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by
>> what
>> >>> you
>> >>> > > > mean
>> >>> > > > > by
>> >>> > > > > > > this:
>> >>> > > > > > >
>> >>> > > > > > > "code that checks for @Remotable you force to true,
>> otherwise
>> >>> > force
>> >>> > > > to
>> >>> > > > > > > false."
>> >>> > > > > > >
>> >>> > > > > > > I'll continue looking into it and hopefully get
>> >>> retrotranslator
>> >>> > to
>> >>> > > > > work.
>> >>> > > > > > I
>> >>> > > > > > > also think it's a simpler option.
>> >>> > > > > > >
>> >>> > > > > > > Luciano: Thanks for your suggestions.
>> >>> > > > > > >
>> >>> > > > > > > [1]
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> >>> > > > > > >
>> >>> > > > > > > [2]
>> >>> > > > >
>> >>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>> >>> > > > > > >
>> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
>> >>> > > > > > >
>> >>> > > > > > > [4]
>> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
>> >>> > > > > > >
>> >>> > > > > > > [5]
>> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
>> >>> > > > > > > adrianocrestani@apache.org> wrote:
>> >>> > > > > > >
>> >>> > > > > > > > Hi,
>> >>> > > > > > > >
>> >>> > > > > > > > I tried what Luciano suggested. It really works. To get
>> it
>> >>> > > working
>> >>> > > > > you
>> >>> > > > > > > > simply need to search on all modules where the code
>> checks
>> >>> for
>> >>> > > > > > @Remotable
>> >>> > > > > > > > annotation and force it to true:
>> >>> > > > > > > >
>> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
>> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
>> >>> > > > > > > >
>> >>> > > > > > > > It works fine on the sca revision we are testing on
>> Android
>> >>> and
>> >>> > > the
>> >>> > > > > > most
>> >>> > > > > > > > recent revision. I only tested it as a java application,
>> not
>> >>> as
>> >>> > > an
>> >>> > > > > > > android
>> >>> > > > > > > > application.
>> >>> > > > > > > >
>> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster
>> >>> and
>> >>> > > > simpler
>> >>> > > > > > > > solution. Because the Luciano's suggestion only forces
>> the
>> >>> SCA
>> >>> > to
>> >>> > > > > > > recognize
>> >>> > > > > > > > the services with no annotations declared on their
>> >>> interfaces,
>> >>> > > but
>> >>> > > > it
>> >>> > > > > > > does
>> >>> > > > > > > > not avoid the Exceptions we are getting when the SCA
>> invokes
>> >>> > > > methods
>> >>> > > > > > that
>> >>> > > > > > > > read annotations. So, our current problem is that we are
>> not
>> >>> > > being
>> >>> > > > > able
>> >>> > > > > > > to
>> >>> > > > > > > > use these methods and not only because we are not being
>> able
>> >>> to
>> >>> > > > read
>> >>> > > > > > the
>> >>> > > > > > > > annotations.
>> >>> > > > > > > >
>> >>> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you
>> will
>> >>> > need
>> >>> > > > to
>> >>> > > > > > > > comment/adapt every sca code that tries to read the class
>> >>> > > > > annotations.
>> >>> > > > > > It
>> >>> > > > > > > > is
>> >>> > > > > > > > not necessary to comment/adapt the methods that read
>> Method
>> >>> > > > > > annotations,
>> >>> > > > > > > > they are not throwning any exception. So, every code that
>> >>> > checks
>> >>> > > > for
>> >>> > > > > > > > @Remotable you force to true, otherwise force to false.
>> >>> > > > > > > >
>> >>> > > > > > > > Any doubt about what I have said, just let me know ; )
>> >>> > > > > > > >
>> >>> > > > > > > > Suggestions are welcome : )
>> >>> > > > > > > >
>> >>> > > > > > > > Adriano Crestani
>> >>> > > > > > > >
>> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
>> >>> > > > > > luckbr1975@gmail.com>
>> >>> > > > > > > > wrote:
>> >>> > > > > > > >
>> >>> > > > > > > > > FYI, if you comment out the code that checks if a
>> >>> interface
>> >>> > is
>> >>> > > > > > > > > remoteble, you could have a version of the calculator
>> >>> without
>> >>> > > any
>> >>> > > > > > > > > annotations, and the runtime would introspect the
>> >>> references
>> >>> > > for
>> >>> > > > > the
>> >>> > > > > > > > > multiple services. But note that, the introspection
>> code
>> >>> will
>> >>> > > > only
>> >>> > > > > be
>> >>> > > > > > > > > activated if there is no SCA annotations on the class.
>> >>> > > > > > > > >
>> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
>> >>> > > > > > > > > <ad...@apache.org> wrote:
>> >>> > > > > > > > > > Ah, the expected exception should look like this on
>> >>> android
>> >>> > > > > > emulator:
>> >>> > > > > > > > > >
>> >>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > > <
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > > > <
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> >>> >
>> >>> > > > > > <
>> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > > > > > <
>> >>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > > > > > > <
>> >>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> >>> > > > > > > > > >
>> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
>> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>> >>> > > > > > > > > >
>> >>> > > > > > > > > >> Hi Oscar,
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> I was indeed using the sca modules not from the
>> >>> sandbox.
>> >>> > As
>> >>> > > > you
>> >>> > > > > > > > > suggested,
>> >>> > > > > > > > > >> I
>> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
>> workspace
>> >>> > and
>> >>> > > > > added
>> >>> > > > > > > the
>> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
>> >>> uncommented
>> >>> > the
>> >>> > > > > lines
>> >>> > > > > > > in
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> following the comments pointing out why those lines
>> had
>> >>> > been
>> >>> > > > > > > > commented.
>> >>> > > > > > > > > I'm
>> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
>> However,
>> >>> > it's
>> >>> > > > > > getting
>> >>> > > > > > > > > stuck
>> >>> > > > > > > > > >> somewhere else (before getting there I guess)...I
>> think
>> >>> > this
>> >>> > > > is
>> >>> > > > > > the
>> >>> > > > > > > > case
>> >>> > > > > > > > > >> because before and after commenting the code I get
>> the
>> >>> > same
>> >>> > > > > error
>> >>> > > > > > in
>> >>> > > > > > > > the
>> >>> > > > > > > > > >> Android emulator, an InstantiationException [1].
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> Have you debugged to check exactly where this
>> exception
>> >>> is
>> >>> > > > being
>> >>> > > > > > > > thrown?
>> >>> > > > > > > > > I
>> >>> > > > > > > > > >> have done the procedure I previously described
>>  again
>> >>> and
>> >>> > I
>> >>> > > > got
>> >>> > > > > it
>> >>> > > > > > > > > "running"
>> >>> > > > > > > > > >> as expected, which means, running till the expected
>> >>> > > exception
>> >>> > > > is
>> >>> > > > > > > > thrown.
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> I also started tinkering with retrotranslator. First
>> I
>> >>> > tried
>> >>> > > > > doing
>> >>> > > > > > > it
>> >>> > > > > > > > > with
>> >>> > > > > > > > > >> Ant, but it seems that in order to build I have to
>> >>> include
>> >>> > > the
>> >>> > > > > > whole
>> >>> > > > > > > > > >> tuscany
>> >>> > > > > > > > > >> projects in a way similar to how I now have in
>> Eclipse.
>> >>> I
>> >>> > > also
>> >>> > > > > > tried
>> >>> > > > > > > > > making
>> >>> > > > > > > > > >> a jar out of
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> and then feeding it to retrotranslator but
>> >>> unfortunately
>> >>> > > it's
>> >>> > > > > not
>> >>> > > > > > > > > >> translating anything, as shown below.
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
>> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
>> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
>> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
>> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
>> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
>> >>> > > > > > > > > >> Processing 136 file(s) in
>> >>> JavaRuntimeModuleActivator.jar.
>> >>> > > > > > > > > >> Transformed 0 file(s).
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> There's also a maven plugin, so I might try
>> that...but
>> >>> > first
>> >>> > > > > I'll
>> >>> > > > > > > give
>> >>> > > > > > > > > Ant
>> >>> > > > > > > > > >> another go. Hopefully Google will release a new SDK
>> >>> soon,
>> >>> > > > > > otherwise
>> >>> > > > > > > as
>> >>> > > > > > > > > you
>> >>> > > > > > > > > >> say...retrotranslator will have to be the workaround
>> to
>> >>> > > > proceed
>> >>> > > > > > with
>> >>> > > > > > > > our
>> >>> > > > > > > > > >> project ;-)
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK version
>> will
>> >>> not
>> >>> > be
>> >>> > > > > > > released
>> >>> > > > > > > > > until
>> >>> > > > > > > > > >> july 28th :S. So, it's really good you have already
>> >>> > started
>> >>> > > > > > working
>> >>> > > > > > > on
>> >>> > > > > > > > > the
>> >>> > > > > > > > > >> retrotranslator, it will probably be the best
>> >>> workaround
>> >>> > for
>> >>> > > > the
>> >>> > > > > > > > > annotations
>> >>> > > > > > > > > >> problem till the next SDK release.
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> I suggest you to forget about the build process
>> right
>> >>> now,
>> >>> > > > > before,
>> >>> > > > > > > > check
>> >>> > > > > > > > > if
>> >>> > > > > > > > > >> this retrotranslator works and if it really works on
>> >>> > android
>> >>> > > > > > > platform.
>> >>> > > > > > > > > I´m
>> >>> > > > > > > > > >> really getting upset with Android, even its API
>> methods
>> >>> > does
>> >>> > > > not
>> >>> > > > > > > work
>> >>> > > > > > > > as
>> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile a
>> simple
>> >>> > class
>> >>> > > > > > (coded
>> >>> > > > > > > by
>> >>> > > > > > > > > you),
>> >>> > > > > > > > > >> which contains annotations, and access these
>> >>> annotations.
>> >>> > If
>> >>> > > > it
>> >>> > > > > > > works,
>> >>> > > > > > > > > make
>> >>> > > > > > > > > >> it more complex and test again, do it until you
>> reach a
>> >>> > > > scenario
>> >>> > > > > > as
>> >>> > > > > > > > > complex
>> >>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
>> >>> classes
>> >>> > > > > accessed
>> >>> > > > > > > by
>> >>> > > > > > > > > the
>> >>> > > > > > > > > >> other external jars and the Android app). Got it? :
>> )
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> Regards,
>> >>> > > > > > > > > >> Adriano Crestani
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
>> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>> Hi Adriano,
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> I was indeed using the sca modules not from the
>> >>> sandbox.
>> >>> > As
>> >>> > > > you
>> >>> > > > > > > > > suggested,
>> >>> > > > > > > > > >>> I
>> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
>> >>> workspace
>> >>> > and
>> >>> > > > > added
>> >>> > > > > > > the
>> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
>> >>> uncommented
>> >>> > > the
>> >>> > > > > > lines
>> >>> > > > > > > in
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> following the comments pointing out why those lines
>> >>> had
>> >>> > > been
>> >>> > > > > > > > commented.
>> >>> > > > > > > > > >>> I'm
>> >>> > > > > > > > > >>> no longer getting the ClassNotFoundException.
>> However,
>> >>> > it's
>> >>> > > > > > getting
>> >>> > > > > > > > > stuck
>> >>> > > > > > > > > >>> somewhere else (before getting there I guess)...I
>> >>> think
>> >>> > > this
>> >>> > > > is
>> >>> > > > > > the
>> >>> > > > > > > > > case
>> >>> > > > > > > > > >>> because before and after commenting the code I get
>> the
>> >>> > same
>> >>> > > > > error
>> >>> > > > > > > in
>> >>> > > > > > > > > the
>> >>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> I also started tinkering with retrotranslator.
>> First I
>> >>> > > tried
>> >>> > > > > > doing
>> >>> > > > > > > it
>> >>> > > > > > > > > with
>> >>> > > > > > > > > >>> Ant, but it seems that in order to build I have to
>> >>> > include
>> >>> > > > the
>> >>> > > > > > > whole
>> >>> > > > > > > > > >>> tuscany
>> >>> > > > > > > > > >>> projects in a way similar to how I now have in
>> >>> Eclipse. I
>> >>> > > > also
>> >>> > > > > > > tried
>> >>> > > > > > > > > >>> making
>> >>> > > > > > > > > >>> a jar out of
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
>> >>> unfortunately
>> >>> > > it's
>> >>> > > > > not
>> >>> > > > > > > > > >>> translating anything, as shown below.
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$
>> java
>> >>> -jar
>> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
>> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
>> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
>> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
>> >>> > > > > > > > > >>> Processing 136 file(s) in
>> >>> JavaRuntimeModuleActivator.jar.
>> >>> > > > > > > > > >>> Transformed 0 file(s).
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
>> that...but
>> >>> > > first
>> >>> > > > > I'll
>> >>> > > > > > > > give
>> >>> > > > > > > > > Ant
>> >>> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
>> >>> soon,
>> >>> > > > > > otherwise
>> >>> > > > > > > > as
>> >>> > > > > > > > > you
>> >>> > > > > > > > > >>> say...retrotranslator will have to be the
>> workaround
>> >>> to
>> >>> > > > proceed
>> >>> > > > > > > with
>> >>> > > > > > > > > our
>> >>> > > > > > > > > >>> project ;-)
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting ready
>> for
>> >>> > the
>> >>> > > > > > official
>> >>> > > > > > > > > start
>> >>> > > > > > > > > >>> :-)
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> [1]
>> >>> http://androidindelft.googlepages.com/20may2008.html
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani
>> <
>> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> > Hi Oscar,
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > My mistake again, the eclipse project files of
>> >>> > > > > > contribution-impl
>> >>> > > > > > > > > module
>> >>> > > > > > > > > >>> > were
>> >>> > > > > > > > > >>> > not uploaded, so you are probably using the
>> modules
>> >>> you
>> >>> > > > have
>> >>> > > > > > > > > downloaded
>> >>> > > > > > > > > >>> > from
>> >>> > > > > > > > > >>> > the sca modules. If you remove the
>> >>> > > > tuscany-contribution-impl
>> >>> > > > > > from
>> >>> > > > > > > > > your
>> >>> > > > > > > > > >>> > workspace and add this module from the sandbox it
>> >>> will
>> >>> > > > > probably
>> >>> > > > > > > > work.
>> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk again
>> to
>> >>> get
>> >>> > > the
>> >>> > > > > > > project
>> >>> > > > > > > > > >>> files
>> >>> > > > > > > > > >>> > I'm uploading right now ; )
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
>> >>> solution
>> >>> > > here
>> >>> > > > > is
>> >>> > > > > > a
>> >>> > > > > > > > tip:
>> >>> > > > > > > > > >>> most
>> >>> > > > > > > > > >>> > of the code that were using the Reflection API
>> was
>> >>> > > > commented
>> >>> > > > > on
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> >>> > > > > > > > > >>> > class, you just need to edit this class and
>> remove
>> >>> the
>> >>> > > > > > commented
>> >>> > > > > > > > code
>> >>> > > > > > > > > >>> (it's
>> >>> > > > > > > > > >>> > described there).
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > So, if you uncomment the code and the
>> >>> retrotranslador
>> >>> > > > > > successfuly
>> >>> > > > > > > > > work,
>> >>> > > > > > > > > >>> and
>> >>> > > > > > > > > >>> > I hope it will, you will reach the
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > >
>> >>> > > > > > >
>> >>> > > > >
>> >>> > >
>> >>>
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
>> >>> > > > constructor
>> >>> > > > > > I'm
>> >>> > > > > > > > > >>> getting a
>> >>> > > > > > > > > >>> > NPE when the code described above is commented.
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > About the ant, go on and use it. Further we can
>> >>> > evaluate
>> >>> > > > > better
>> >>> > > > > > > > where
>> >>> > > > > > > > > we
>> >>> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
>> >>> even
>> >>> > > dont
>> >>> > > > > > know
>> >>> > > > > > > if
>> >>> > > > > > > > > we
>> >>> > > > > > > > > >>> will
>> >>> > > > > > > > > >>> > still be using the retrotranslator in future,
>> >>> right?! :
>> >>> > )
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
>> >>> workaround
>> >>> > > > this
>> >>> > > > > > > > problem
>> >>> > > > > > > > > for
>> >>> > > > > > > > > >>> > now
>> >>> > > > > > > > > >>> > and go on with our project ; )
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > Kind Regards,
>> >>> > > > > > > > > >>> > Adriano Crestani
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda
>> <
>> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>> > > Hi Adriano,
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to
>> build
>> >>> the
>> >>> > > > > entire
>> >>> > > > > > > > > workspace
>> >>> > > > > > > > > >>> > from
>> >>> > > > > > > > > >>> > > your instructions. When running
>> calculator-android
>> >>> as
>> >>> > > an
>> >>> > > > > > > "Android
>> >>> > > > > > > > > >>> > > application" I'm getting a
>> ClassNotFoundException
>> >>> [1]
>> >>> > > for
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
>> >>> > > > > > > > > >>> > > Is the exception you referred to in your
>> original
>> >>> > > email?
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > ...when
>> >>> > > > > > > > > >>> > > > you run the calculator-android project as an
>> >>> > "Android
>> >>> > > > > > > > > application"
>> >>> > > > > > > > > >>> you
>> >>> > > > > > > > > >>> > > > should get an exception, that was generated
>> >>> > initially
>> >>> > > > by
>> >>> > > > > a
>> >>> > > > > > > NPE
>> >>> > > > > > > > > >>> thrown
>> >>> > > > > > > > > >>> > by
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > >
>> >>> > > > > > >
>> >>> > > > >
>> >>> > >
>> >>>
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> >>> > > > > > > > > >>> > > > constructor. This is caused because the
>> latest
>> >>> > > Android
>> >>> > > > > SDK
>> >>> > > > > > > does
>> >>> > > > > > > > > not
>> >>> > > > > > > > > >>> > > support
>> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot
>> check
>> >>> > the
>> >>> > > > > > > @Reference
>> >>> > > > > > > > > >>> > > annotations
>> >>> > > > > > > > > >>> > > > (I commented the code which tries to read the
>> >>> > > > > annotations,
>> >>> > > > > > so
>> >>> > > > > > > > > when
>> >>> > > > > > > > > >>> the
>> >>> > > > > > > > > >>> > > > execution reach this constructor it throws
>> the
>> >>> > NPE).
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > Searching for the class in the exception I'm
>> >>> getting
>> >>> > I
>> >>> > > > > found
>> >>> > > > > > > > > >>> > >
>> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
>> >>> > > In
>> >>> > > > > > > > > >>> > getServiceClasses
>> >>> > > > > > > > > >>> > > it loads the service class I'm getting problems
>> >>> with
>> >>> > > when
>> >>> > > > > > > running
>> >>> > > > > > > > > >>> > > calculator-android as an "Android application":
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > I couldn't find the corresponding java file in
>> my
>> >>> > > > imported
>> >>> > > > > > > > > workspace
>> >>> > > > > > > > > >>> and
>> >>> > > > > > > > > >>> > > found that there is no package like
>> >>> > > > > > > > > >>> > >
>> >>> org.apache.tuscany.sca.contribution.processor.impl.
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > Am I missing something? Or are these the errors
>> >>> you
>> >>> > > would
>> >>> > > > > > > expect?
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > I would like to get to the point where I get
>> the
>> >>> > > > exception
>> >>> > > > > > you
>> >>> > > > > > > > > >>> described
>> >>> > > > > > > > > >>> > > and
>> >>> > > > > > > > > >>> > > try to run retrotranslator from there. However,
>> as
>> >>> > I'm
>> >>> > > > > using
>> >>> > > > > > > the
>> >>> > > > > > > > > ADT
>> >>> > > > > > > > > >>> > plugin
>> >>> > > > > > > > > >>> > > in eclipse I would need to extract code that
>> >>> > "declares
>> >>> > > or
>> >>> > > > > > > > analyzes
>> >>> > > > > > > > > >>> > > annotations you may extract it into a separate
>> >>> > library
>> >>> > > > that
>> >>> > > > > > can
>> >>> > > > > > > > be
>> >>> > > > > > > > > >>> > > processed
>> >>> > > > > > > > > >>> > > with Retrotranslator and added to the main
>> >>> project."
>> >>> > > That
>> >>> > > > > is,
>> >>> > > > > > > > > unless I
>> >>> > > > > > > > > >>> > use
>> >>> > > > > > > > > >>> > > Ant, in which case I would only need to add a
>> few
>> >>> > lines
>> >>> > > > to
>> >>> > > > > > > > > build.xml.
>> >>> > > > > > > > > >>> I'm
>> >>> > > > > > > > > >>> > > continuing to look into this, any thoughts are
>> >>> more
>> >>> > > than
>> >>> > > > > > > welcome
>> >>> > > > > > > > > :-)
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > [1]
>> >>> > http://delftandroid.googlepages.com/14may2008.html
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
>> Crestani
>> >>> <
>> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > > Hi,
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > At first, I want to correct one mistake, on
>> the
>> >>> > first
>> >>> > > > > step
>> >>> > > > > > I
>> >>> > > > > > > > > >>> described
>> >>> > > > > > > > > >>> > on
>> >>> > > > > > > > > >>> > > > my
>> >>> > > > > > > > > >>> > > > previous email, I should not have added the
>> word
>> >>> > > > > "install",
>> >>> > > > > > > it
>> >>> > > > > > > > > >>> probably
>> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
>> >>> > install"
>> >>> > > in
>> >>> > > > > the
>> >>> > > > > > > > > >>> downloaded
>> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step,
>> >>> the
>> >>> > > code
>> >>> > > > > > should
>> >>> > > > > > > > not
>> >>> > > > > > > > > be
>> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Simon:
>> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java
>> source
>> >>> > codes
>> >>> > > > are
>> >>> > > > > > > under
>> >>> > > > > > > > > CDDL
>> >>> > > > > > > > > >>> > 1.0
>> >>> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
>> >>> > license
>> >>> > > > > > header
>> >>> > > > > > > on
>> >>> > > > > > > > > each
>> >>> > > > > > > > > >>> > > file,
>> >>> > > > > > > > > >>> > > > and it's already done : )
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Jean:
>> >>> > > > > > > > > >>> > > > I think it is better to keep the code in the
>> >>> > sandbox
>> >>> > > > for
>> >>> > > > > > now.
>> >>> > > > > > > > At
>> >>> > > > > > > > > >>> first,
>> >>> > > > > > > > > >>> > > > it's
>> >>> > > > > > > > > >>> > > > not working on the current SCA modules
>> revision
>> >>> > yet.
>> >>> > > > And
>> >>> > > > > > > also,
>> >>> > > > > > > > > I'm
>> >>> > > > > > > > > >>> > > > commenting many lines at some modules just to
>> >>> get a
>> >>> > > > > "first
>> >>> > > > > > > run"
>> >>> > > > > > > > > of
>> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate why and
>> >>> how
>> >>> > > this
>> >>> > > > > > > > commented
>> >>> > > > > > > > > >>> lines
>> >>> > > > > > > > > >>> > > will
>> >>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA
>> Java
>> >>> and
>> >>> > > SCA
>> >>> > > > > > > > Android.
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Oscar:
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > - Are host-android and core-android a part of
>> >>> > > > > > > > calculator-android?
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > What do you mean when you say "part"? They
>> are
>> >>> used
>> >>> > > by
>> >>> > > > > > > > > >>> > > calculator-android,
>> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
>> >>> modules
>> >>> > in
>> >>> > > > > future
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > - Should the calculator-android included in
>> [1]
>> >>> > have
>> >>> > > > > > included
>> >>> > > > > > > > an
>> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
>> >>> > eclipse
>> >>> > > > > > project
>> >>> > > > > > > > > files
>> >>> > > > > > > > > >>> of
>> >>> > > > > > > > > >>> > > > these
>> >>> > > > > > > > > >>> > > > projects. I have already commited these files
>> >>> and
>> >>> > if
>> >>> > > > you
>> >>> > > > > > > update
>> >>> > > > > > > > > your
>> >>> > > > > > > > > >>> > > trunk
>> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones
>> you
>> >>> have
>> >>> > > > > > created.
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
>> >>> > something
>> >>> > > > else
>> >>> > > > > > > > needed
>> >>> > > > > > > > > in
>> >>> > > > > > > > > >>> > > > addition
>> >>> > > > > > > > > >>> > > > to including the Android Library?
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > No, the Android library is really simples, it
>> >>> only
>> >>> > > > > contains
>> >>> > > > > > > the
>> >>> > > > > > > > > >>> > > android.jar
>> >>> > > > > > > > > >>> > > > file located in your Android SDK.
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and
>> >>> "mvn
>> >>> > > > > -Peclipse
>> >>> > > > > > > > > >>> > > > eclipse:eclipse"
>> >>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
>> >>> project
>> >>> > > > files
>> >>> > > > > > are
>> >>> > > > > > > > > already
>> >>> > > > > > > > > >>> in
>> >>> > > > > > > > > >>> > > > modules and you should build the modules
>> using
>> >>> the
>> >>> > > > > eclipse
>> >>> > > > > > > for
>> >>> > > > > > > > > now.
>> >>> > > > > > > > > >>> The
>> >>> > > > > > > > > >>> > > > maven config files are not updated yet with
>> the
>> >>> > > > > > modifications
>> >>> > > > > > > I
>> >>> > > > > > > > > have
>> >>> > > > > > > > > >>> > done
>> >>> > > > > > > > > >>> > > > on
>> >>> > > > > > > > > >>> > > > these modules, so they will not generate the
>> >>> > correct
>> >>> > > > > > project
>> >>> > > > > > > > > files,
>> >>> > > > > > > > > >>> > > worse,
>> >>> > > > > > > > > >>> > > > they will override the ones I have created.
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Then, clean and build your entire workspace,
>> if
>> >>> you
>> >>> > > > still
>> >>> > > > > > get
>> >>> > > > > > > > any
>> >>> > > > > > > > > >>> > errors,
>> >>> > > > > > > > > >>> > > > let me know ; )
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > - Should I import
>> 'tuscany-databinding-saxon'?
>> >>> Or,
>> >>> > > why
>> >>> > > > > > should
>> >>> > > > > > > > > this
>> >>> > > > > > > > > >>> not
>> >>> > > > > > > > > >>> > be
>> >>> > > > > > > > > >>> > > > imported?
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > It seems the revision I suggested already had
>> >>> the
>> >>> > > saxon
>> >>> > > > > > > module
>> >>> > > > > > > > > >>> removed
>> >>> > > > > > > > > >>> > > from
>> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one
>> >>> that
>> >>> > > > > > shouldn´t.
>> >>> > > > > > > > > Please,
>> >>> > > > > > > > > >>> > > import
>> >>> > > > > > > > > >>> > > > the databinding-saxon module again into your
>> >>> > > workspace.
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > Regards,
>> >>> > > > > > > > > >>> > > > Adriano Crestani
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > [1] -
>> >>> > > > > > > > >
>> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
>> >>> > > > > > > > > >>> > > > >
>> >>> > > > > > > > > >>> > > > [2] -
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> >
>> >>>
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
>> Jean-Sebastien
>> >>> > > > Delfino
>> >>> > > > > <
>> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
>> >>> > > > > > > > > >>> > > > >
>> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
>> >>> > > > > > > > > >>> > > > > > >
>> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from
>> [1]
>> >>> and
>> >>> > > > > > installed
>> >>> > > > > > > > as
>> >>> > > > > > > > > >>> shown
>> >>> > > > > > > > > >>> > > > > > > > below:
>> >>> > > > > > > > > >>> > > > > > > >
>> >>> > > > > > > > > >>> > > > > > > > svn checkout
>> >>> > > > > > > > > >>> > > > > > > >
>> >>> > > > > > > > >
>> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>> >>> > > > > > > > > >>> > > > > > > >
>> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
>> >>> > > > > > > > > >>> > > > > > > >
>> >>> > > > > > > > > >>> > > > > > > >
>> >>> > > > > > > > > >>> > > > > > > If there's no objection from others,
>> I'd
>> >>> be
>> >>> > > happy
>> >>> > > > > to
>> >>> > > > > > > see
>> >>> > > > > > > > > this
>> >>> > > > > > > > > >>> > code
>> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now
>> have
>> >>> > > several
>> >>> > > > > > > people
>> >>> > > > > > > > > doing
>> >>> > > > > > > > > >>> > > > development
>> >>> > > > > > > > > >>> > > > > > > on this android integration.
>> >>> > > > > > > > > >>> > > > > > >
>> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with something
>> >>> like
>> >>> > > > > > > > > >>> > trunk/java/sca/android
>> >>> > > > > > > > > >>> > > > > > > and later progressively try to converge
>> >>> the
>> >>> > > code
>> >>> > > > > with
>> >>> > > > > > > the
>> >>> > > > > > > > > code
>> >>> > > > > > > > > >>> in
>> >>> > > > > > > > > >>> > > > trunk,
>> >>> > > > > > > > > >>> > > > > > > with architected plug points for the
>> >>> android
>> >>> > > > > specific
>> >>> > > > > > > > code
>> >>> > > > > > > > > >>> etc.
>> >>> > > > > > > > > >>> > > > > > >
>> >>> > > > > > > > > >>> > > > > > > Thoughts?
>> >>> > > > > > > > > >>> > > > > > >
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not
>> also
>> >>> > imply
>> >>> > > > > > "making
>> >>> > > > > > > > > part
>> >>> > > > > > > > > >>> of
>> >>> > > > > > > > > >>> > the
>> >>> > > > > > > > > >>> > > > > > main build"?
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental
>> code
>> >>> > > > entering
>> >>> > > > > > the
>> >>> > > > > > > > > build
>> >>> > > > > > > > > >>> at
>> >>> > > > > > > > > >>> > > this
>> >>> > > > > > > > > >>> > > > > > stage.
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
>> >>> > > > > > > > > >>> > > > > >
>> >>> > > > > > > > > >>> > > > >
>> >>> > > > > > > > > >>> > > > > I think it's business as usual, code that
>> >>> doesn't
>> >>> > > > work
>> >>> > > > > > does
>> >>> > > > > > > > not
>> >>> > > > > > > > > go
>> >>> > > > > > > > > >>> in
>> >>> > > > > > > > > >>> > > the
>> >>> > > > > > > > > >>> > > > > main build, code that's getting stable can
>> go
>> >>> in
>> >>> > > the
>> >>> > > > > main
>> >>> > > > > > > > build
>> >>> > > > > > > > > at
>> >>> > > > > > > > > >>> > some
>> >>> > > > > > > > > >>> > > > > point when people have no specific
>> objections,
>> >>> > and
>> >>> > > > > > > different
>> >>> > > > > > > > > >>> profiles
>> >>> > > > > > > > > >>> > > can
>> >>> > > > > > > > > >>> > > > be
>> >>> > > > > > > > > >>> > > > > used to subset particular builds.
>> >>> > > > > > > > > >>> > > > >
>> >>> > > > > > > > > >>> > > > > --
>> >>> > > > > > > > > >>> > > > > Jean-Sebastien
>> >>> > > > > > > > > >>> > > > >
>> >>> > > > > > > > > >>> > > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > --
>> >>> > > > > > > > > >>> > > best,
>> >>> > > > > > > > > >>> > > -oscar
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> > > Oscar Castañeda
>> >>> > > > > > > > > >>> > >
>> >>> > > > > > > > > >>> >
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> --
>> >>> > > > > > > > > >>> best,
>> >>> > > > > > > > > >>> -oscar
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>> Oscar Castañeda
>> >>> > > > > > > > > >>>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >>
>> >>> > > > > > > > > >
>> >>> > > > > > > > >
>> >>> > > > > > > > >
>> >>> > > > > > > > >
>> >>> > > > > > > > > --
>> >>> > > > > > > > > Luciano Resende
>> >>> > > > > > > > > Apache Tuscany Committer
>> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
>> <http://people.apache.org/%7Elresende>
>> >>> <http://people.apache.org/%7Elresende>
>> >>> > <http://people.apache.org/%7Elresende>
>> >>> > > <http://people.apache.org/%7Elresende>
>> >>> > > > <http://people.apache.org/%7Elresende>
>> >>> > > > > <http://people.apache.org/%7Elresende>
>> >>> > > > > > <http://people.apache.org/%7Elresende>
>> >>> > > > > > > <http://people.apache.org/%7Elresende><
>> >>> > > > > > > > http://people.apache.org/%7Elresende>
>> >>> > > > > > > > > http://lresende.blogspot.com/
>> >>> > > > > > > > >
>> >>> > > > > > > >
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > >
>> >>> > > > > > > --
>> >>> > > > > > > best,
>> >>> > > > > > > -oscar
>> >>> > > > > > >
>> >>> > > > > > > Oscar Castañeda
>> >>> > > > > > >
>> >>> > > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > > > --
>> >>> > > > > best,
>> >>> > > > > -oscar
>> >>> > > > >
>> >>> > > > > Oscar Castañeda
>> >>> > > > >
>> >>> > > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > --
>> >>> > > best,
>> >>> > > -oscar
>> >>> > >
>> >>> > > Oscar Castañeda
>> >>> > >
>> >>> >
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> best,
>> >>> -oscar
>> >>>
>> >>> Oscar Castañeda
>> >>>
>> >>
>> >>
>> >
>>
>>
>>
>> --
>> Luciano Resende
>> Apache Tuscany Committer
>> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>> http://lresende.blogspot.com/
>>
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Luciano,

It's going better after the progress last week with retrotranslator. I'm now
able to translate the SCA classes and run calculator-android without getting
Annotation related issues. The problems now are related to RMI. In relation
to this, and from your comment about blocking issues, I created a child page
[1] in the project wiki for Blocking issues. Currently, the page lists the
RMI issue and suggested workarounds.

I think your suggestion about integration with maven is really good.
Especially because there is a retrotranslator plugin for maven. I'll start
looking into using this plugin. I also agree about reviewing the scope of
support. Right now, I see a need to reduce the dependency on RMI, either by
commenting all the code that uses the RMI API, or by following the
suggestions from Taras [3] to either replace java.rmi.Remote with
java.lang.Cloneable (as the result of using a retrotranslator option) or
taking the RMI source from Apache Harmony and putting it in a
retrotranslated JAR. What would you recommend? Hopefully after the
dependency reduction Android will be able to run calculator-android. Based
on the results of this experiment we can better consider the reduction of
component types and bindings. Please let me know your thoughts on this idea.

[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
[2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
[3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2


On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <lu...@gmail.com>
wrote:

> How is it going here ? I just want to check if there is any blocking
> issues with Android at the moment, if so, is there a list of these
> issues somewhere ?
>
> Also, some general suggestions/recommendations.: It would be great if
> we could spend sometime to get the modules well integrated using
> maven, this way it would be easier for anyone on the community to
> checkout the trunk + android sandbox and jump on the code to help.
> Also, we should review the scope of the support we are trying to
> acomplish, I'd suggest to minimize the number of component types
> supported (java) and bindings (default sca binding) and then try to
> run the calculator sample application. Once we have acomplished this
> first milestone, we could then discuss our next steps.
>
> Thoughts ?
>
> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Ah, here is a tip to assure the classes are not recompiled again. Build
> the
> > project, then go in each project builder (in the properties window) and
> > disable all the builders, then not even a clean/build will modify your
> > project ; )
> >
> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> adrianocrestani@apache.org>
> > wrote:
> >
> >> Hi Oscar,
> >>
> >> I say that it is more difficult to debug because you need attach a
> source
> >> code to each jar and etc, and when you are using projects, eclipse
> already
> >> knows where to find the source code : )
> >>
> >> The reply made sense to me, especially with regards to the fact that
> with
> >> the Android plugin Eclipse compiles sources into classes and then into
> dex
> >> files, so retrotranslator has no chance to translate classes in between
> >> these steps - even if I do that outside of Eclipse. This shows from the
> use
> >> of non-translated binaries (as indicated by the
> >> java.lang.Class.isAnnotationPr
> >> esent(Class.java:1131) error in the stack
> >> trace) that might have been related to the use of pre-existing dex files
> or
> >> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> >> result would still be the same, even if I use a simpler scenario.
> >>
> >> Sorry, I really did not comment this email yet. It does not make so much
> >> sense for me. First, as you already know, eclipse android projects does
> not
> >> recognize any modifications in the imported projects, so it does not
> call
> >> the build or incremental build even if the imported projects have their
> >> source code modified. Just to make sure I tested it again:
> >>
> >> 1-  imported in my workspace all the projects included in the
> >> calculator-android, cleaned and built them...it takes a loooong time, as
> you
> >> already know.
> >>
> >> 2- imported the calculator-android project, cleaned and built it (only
> the
> >> calculator-android project), and this process was too much faster than
> when
> >> all the modules are built, so the imported projects were not recompiled,
> >> otherwise it would take too much more time. I suppose here that the
> android
> >> project compiles the .java contained in the android project and convert
> all
> >> the .class files (generated by imported projects and android project) to
> dex
> >> format.
> >>
> >> So, it does not recompile the external class files (the ones contained
> in
> >> the imported projects) cause it seems not to check if it was modified or
> >> not. Of course, I never tested it modifing the .class files, I'm just
> >> assuming that, because when you modify .java files it does not get
> >> recompiled.
> >>
> >> What do you think?
> >>
> >> As I mentioned before, your comments are really helpful as they give me
> a
> >> sense of direction. Please let me know if you still think we should
> pursue
> >> retrotranslator for files inside a folder.
> >>
> >> I really think you should try at first the simpler scenario and try to
> >> understand how it works and IF it works. Also, you can try what you were
> >> planning: to retrotranslate the each modules' jar, but I suppose it's a
> lot
> >> of work, because there are so many modules :S. So, as I've already said,
> if
> >> you think it's getting to complicated, forget it and go on with
> Luciano's
> >> suggestion.
> >>
> >> Feel free to choose the direction you want to take, and if there is
> another
> >> approach you think is better, just let us know ; )...you are the best
> person
> >> to choose the directions, cause you are working directly on it, we are
> just
> >> guinding/helping you ; )
> >>
> >> Thanks,
> >> Adriano Crestani
> >>
> >>
> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>
> >>> Hi Adriano,
> >>>
> >>> If there is an option on retrotranslator to retrotranslate all the
> classes
> >>> > in a folder, it should work as well as it works on classes inside
> .jar
> >>> > files. So, I think you should try to understand why your first
> approach
> >>> > (retrotranslating the eclipse project classes) is not working trying
> a
> >>> > simpler scenario. Have you already tried it?
> >>> >
> >>>
> >>> I agree that it's good to try out a simpler scenario to better
> understand
> >>> the problem. I haven't tried it yet because using retrotranslator for
> >>> classes inside a folder doesn't seem to be a solution to the problem.
> >>> Here's
> >>> my reasoning:
> >>>
> >>> Yes, there is an option to translate classes in a folder. I tried it
> and
> >>> it
> >>> successfully translated the classes inside my Eclipse workspace. When I
> >>> ran
> >>> the calculator-android application using the newly translated classes I
> >>> was
> >>> getting the errors in [1]. I posted a question in Android Developers
> about
> >>> this error and received a reply [2].
> >>>
> >>> The reply made sense to me, especially with regards to the fact that
> with
> >>> the Android plugin Eclipse compiles sources into classes and then into
> dex
> >>> files, so retrotranslator has no chance to translate classes in between
> >>> these steps - even if I do that outside of Eclipse. This shows from the
> >>> use
> >>> of non-translated binaries (as indicated by the
> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
> >>> trace) that might have been related to the use of pre-existing dex
> files
> >>> or
> >>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> >>> result would still be the same, even if I use a simpler scenario.
> >>>
> >>> The reply suggested to use JAR's instead. This also made sense to me
> and
> >>> seemed like a simpler way of solving the problem. I didn't see the
> >>> disadvantage of debugging, which as you point out is more difficult
> with
> >>> JAR's instead of Eclipse projects.
> >>>
> >>> As I mentioned before, your comments are really helpful as they give me
> a
> >>> sense of direction. Please let me know if you still think we should
> pursue
> >>> retrotranslator for files inside a folder.
> >>>
> >>>
> >>> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> >>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >>>
> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> >>> adrianocrestani@apache.org>
> >>> wrote:
> >>>
> >>> > Hi Oscar,
> >>> >
> >>> > Yup, you're right - there are indeed Eclipse files inside the
> folders. I
> >>> > guess I was confused by the different names in [1] than those that
> >>> result
> >>> > [2] from importing to an Eclipse workspace - after which I see 13
> >>> projects
> >>> > in both cases. So please ignore my previous remark.
> >>> >
> >>> > I have added the projects, but still haven't changed their names. I
> was
> >>> > planning to modify their project names when we get it integrated to
> SCA,
> >>> > mainly because we will need to change the poms. Anyway, feel free to
> >>> modify
> >>> > the names whenever you want ; )
> >>> >
> >>> >
> >>> > Per the reply I received on the Android Developers list [3] I started
> >>> using
> >>> > retrotranslator on JAR's instead of class files. For this I created a
> >>> big
> >>> > JAR file with all the Tuscany modules (including those you modified
> for
> >>> > Android). I translated this big JAR (around 15MB) with
> retrotranslator
> >>> [4].
> >>> > Then I created a new workspace with only calculator-android and
> >>> > android-jdk-classes as projects and added the translated JAR as an
> >>> external
> >>> > library for both projects. This resulted in errors [4] from the
> Android
> >>> > build process.
> >>> >
> >>> > I really do not understand this errors, but as this errors are only
> >>> related
> >>> > to testcase classes they can be ignored (removed from the jars). I
> also
> >>> did
> >>> > not understand why it's not find the .apk file:
> >>> >
> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> >>> > /bin/calculator-android.apk!"
> >>> >
> >>> > To work around these errors I decided to take a different approach
> and
> >>> copy
> >>> > all the jar files contained in the individual modules to a separate
> >>> folder
> >>> > and then run retrotranslator on each JAR. The jars are found inside
> the
> >>> > target folder of each module and are named as shown below:
> >>> >
> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >>> >
> >>> > From this I found that only the SCA modules have these JAR files
> inside
> >>> > their respective target folders, whereas the Android modules I
> >>> downloaded
> >>> > from [1] don't have these files at all
> >>> >
> >>> > Yep, this .jars are generated when the maven is executed. I'm not
> sure
> >>> if
> >>> > you should use this .jars, because they were compiled with no
> reference
> >>> to
> >>> > Android library. That's also why there are no .jar files for android
> >>> > modules, because you did not execute the maven on them  (and you
> >>> > shouldn't).
> >>> >
> >>> > So I decided to keep the Android
> >>> > modules [2] and add the translated JARs as libraries where needed to
> >>> have
> >>> > the workspace build with no problems. If I get this running I would
> look
> >>> > into creating JAR files from the Android modules and then return to
> only
> >>> > having calculator-android and android-jdk-classes as projects and the
> >>> rest
> >>> > as JAR's added as external libraries. If this works out I could then
> >>> look
> >>> > into seeing which JAR's are important and which are not, in this way
> >>> > reducing the total memory footprint and coming up with a "lightweight
> >>> > mobile
> >>> > SCA core/runtime." Please let me know your thoughts on these efforts.
> >>> >
> >>> > You haven't tried this yet, right? You may try it, but I do not like
> >>> this
> >>> > approach, because it will get difficult to debug sca classes as they
> are
> >>> > not
> >>> > imported as eclipse projects.
> >>> >
> >>> > If there is an option on retrotranslator to retrotranslate all the
> >>> classes
> >>> > in a folder, it should work as well as it works on classes inside
> .jar
> >>> > files. So, I think you should try to understand why your first
> approach
> >>> > (retrotranslating the eclipse project classes) is not working trying
> a
> >>> > simpler scenario. Have you already tried it?
> >>> >
> >>> > Also, if the restrotranslator gets to complicated, you may try the
> >>> > Luciano's
> >>> > suggestion ; )
> >>> >
> >>> >
> >>> > Kind Regards,
> >>> > Adriano Crestani
> >>> >
> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> >
> >>> > > Hi Adriano,
> >>> > >
> >>> > >
> >>> > > > Yep, they should be imported, if you check inside its folders,
> there
> >>> > are
> >>> > > > the
> >>> > > > eclipse project files, so they should be identified by the
> eclipse
> >>> > import
> >>> > > > tool as an eclipse project.
> >>> > >
> >>> > >
> >>> > > Yup, you're right - there are indeed Eclipse files inside the
> folders.
> >>> I
> >>> > > guess I was confused by the different names in [1] than those that
> >>> result
> >>> > > [2] from importing to an Eclipse workspace - after which I see 13
> >>> > projects
> >>> > > in both cases. So please ignore my previous remark.
> >>> > >
> >>> > > I don't think introspection is a good solution, hence you will need
> to
> >>> > > > change how the sca reads the info about each service and also
> >>> services
> >>> > > > implemented for JVM would need to be adapted to run on Android.
> >>> Let's
> >>> > > avoid
> >>> > > > to modify so much the SCA code, and lets try to keep
> retrotranslator
> >>> in
> >>> > > > mind
> >>> > > > as a temporary workaround for annotations till next SDK release
> :S
> >>> > >
> >>> > >
> >>> > > >  Also, if you get the retrotranslator working, forget the
> Luciano's
> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
> >>> > > >
> >>> > >
> >>> > > Will do. Thanks for the advice it helps me to focus in the right
> >>> > direction
> >>> > > :-)
> >>> > >
> >>> > > Now, a summary of what I've done up to now:
> >>> > >
> >>> > > Per the reply I received on the Android Developers list [3] I
> started
> >>> > using
> >>> > > retrotranslator on JAR's instead of class files. For this I created
> a
> >>> big
> >>> > > JAR file with all the Tuscany modules (including those you modified
> >>> for
> >>> > > Android). I translated this big JAR (around 15MB) with
> retrotranslator
> >>> > [4].
> >>> > > Then I created a new workspace with only calculator-android and
> >>> > > android-jdk-classes as projects and added the translated JAR as an
> >>> > external
> >>> > > library for both projects. This resulted in errors [4] from the
> >>> Android
> >>> > > build process.
> >>> > >
> >>> > > To work around these errors I decided to take a different approach
> and
> >>> > copy
> >>> > > all the jar files contained in the individual modules to a separate
> >>> > folder
> >>> > > and then run retrotranslator on each JAR. The jars are found inside
> >>> the
> >>> > > target folder of each module and are named as shown below:
> >>> > >
> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >>> > >
> >>> > > From this I found that only the SCA modules have these JAR files
> >>> inside
> >>> > > their respective target folders, whereas the Android modules I
> >>> downloaded
> >>> > > from [1] don't have these files at all. So I decided to keep the
> >>> Android
> >>> > > modules [2] and add the translated JARs as libraries where needed
> to
> >>> have
> >>> > > the workspace build with no problems. If I get this running I would
> >>> look
> >>> > > into creating JAR files from the Android modules and then return to
> >>> only
> >>> > > having calculator-android and android-jdk-classes as projects and
> the
> >>> > rest
> >>> > > as JAR's added as external libraries. If this works out I could
> then
> >>> look
> >>> > > into seeing which JAR's are important and which are not, in this
> way
> >>> > > reducing the total memory footprint and coming up with a
> "lightweight
> >>> > > mobile
> >>> > > SCA core/runtime." Please let me know your thoughts on these
> efforts.
> >>> > >
> >>> > >
> >>> > > [1]
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> >>> > > [3]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >>> > > [4]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> >>> > >
> >>> > >
> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> >>> > > adrianocrestani@apache.org>
> >>> > > wrote:
> >>> > >
> >>> > > > Hi Oscar,
> >>> > > >
> >>> > > >
> >>> > > > When I imported the projects from [3] the following projects were
> >>> not
> >>> > > > imported:
> >>> > > >
> >>> > > > core-android
> >>> > > > host-android
> >>> > > > extensibility
> >>> > > >
> >>> > > > Is this normal? Should they be imported?
> >>> > > >
> >>> > > > Yep, they should be imported, if you check inside its folders,
> there
> >>> > are
> >>> > > > the
> >>> > > > eclipse project files, so they should be identified by the
> eclipse
> >>> > import
> >>> > > > tool as an eclipse project.
> >>> > > >
> >>> > > > Thanks for the detailed explanation. I'm going to give this a try
> as
> >>> I
> >>> > > > found
> >>> > > > an introspection related comment [2] as a workaround to another
> >>> > > annotations
> >>> > > > problem with the current SDK.
> >>> > > >
> >>> > > > I don't think introspection is a good solution, hence you will
> need
> >>> to
> >>> > > > change how the sca reads the info about each service and also
> >>> services
> >>> > > > implemented for JVM would need to be adapted to run on Android.
> >>> Let's
> >>> > > avoid
> >>> > > > to modify so much the SCA code, and lets try to keep
> retrotranslator
> >>> in
> >>> > > > mind
> >>> > > > as a temporary workaround for annotations till next SDK release
> :S
> >>> > > >
> >>> > > > Also, if you get the retrotranslator working, forget the
> Luciano's
> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
> >>> > > >
> >>> > > > Any progress testing retrotranslator on a simpler scenario, just
> let
> >>> us
> >>> > > > know
> >>> > > > ; )
> >>> > > >
> >>> > > > Kind Regards,
> >>> > > > Adriano Crestani
> >>> > > >
> >>> > > >
> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > >
> >>> > > > > Hi Adriano,
> >>> > > > >
> >>> > > > > At first, build a simple, but equivalent scenario, and test it.
> >>> > > > >
> >>> > > > >
> >>> > > > > I think this is a great idea, especially because I found that
> the
> >>> > > "native
> >>> > > > > method not implemented" errors I'm getting [1] are still
> related
> >>> to
> >>> > the
> >>> > > > > annotations problem. I'm getting the same errors when
> converting
> >>> the
> >>> > > code
> >>> > > > > to
> >>> > > > > java 1.4. This makes me think that retrotranslator is actually
> not
> >>> > > > working.
> >>> > > > > Hopefully, testing with a simpler scenario will help me to
> >>> understand
> >>> > > the
> >>> > > > > problem better.
> >>> > > > >
> >>> > > > > Sorry for the not-well-detailed info here. I meant you to do:
> >>> > > > > >
> >>> > > > > > Search in every sca code for the usage of
> >>> Class.isAnnotationPresent
> >>> > > or
> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
> the
> >>> > > > > @Remotable
> >>> > > > > > annotations force it to true, for example:
> >>> > > > > >
> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> >>> > > > > >>
> >>> > > > > >> (Remotable.class); =>
> >>> > > > > >> Annotation isRemotable = true;
> >>> > > > > >>
> >>> > > > > >> otherwise, which means, when it's not checking for the
> >>> @Remotable
> >>> > > > > >> annnotation, force to false. For example:
> >>> > > > > >>
> >>> > > > > >> Annotation isReference =
> >>> > class.isAnnotationPresent(Reference.class);
> >>> > > > =>
> >>> > > > > >> Annotation isReference = false;
> >>> > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > > > Thanks for the detailed explanation. I'm going to give this a
> try
> >>> as
> >>> > I
> >>> > > > > found
> >>> > > > > an introspection related comment [2] as a workaround to another
> >>> > > > annotations
> >>> > > > > problem with the current SDK.
> >>> > > > >
> >>> > > > > Also, I have another question for you...
> >>> > > > >
> >>> > > > > When I imported the projects from [3] the following projects
> were
> >>> not
> >>> > > > > imported:
> >>> > > > >
> >>> > > > > core-android
> >>> > > > > host-android
> >>> > > > > extensibility
> >>> > > > >
> >>> > > > > Is this normal? Should they be imported?
> >>> > > > >
> >>> > > > >
> >>> > > > > [1]
> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > [2]
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> >>> > > > > [3]
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > >
> >>> > > > >
> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> >>> > > > > adrianocrestani@apache.org>
> >>> > > > > wrote:
> >>> > > > >
> >>> > > > > > Well detailed Oscar ; )
> >>> > > > > >
> >>> > > > > > It is one thing I learnt after playing hours with Android,
> you
> >>> need
> >>> > > to
> >>> > > > > > rebuild every modified project which is imported in the
> android
> >>> > > > project,
> >>> > > > > > the
> >>> > > > > > android project itself does not check for modifications on
> its
> >>> > > > > dependencies
> >>> > > > > > :S...so, when you rebuilt the imported project it recompiled
> the
> >>> > > > > > uncommented
> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to
> check
> >>> for
> >>> > > > > > annotations once again, so you got the errors on [1], which
> >>> means
> >>> > > > > > retrotranslator is still not working. Have you tested it on a
> >>> > simpler
> >>> > > > > > application as I previously suggested? Did it work? What was
> the
> >>> > most
> >>> > > > > > critical scenario you tested it and it worked?
> >>> > > > > >
> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> /../workspace
> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> >>> > > > > >
> >>> > > > > > You should also check if it's is working as expected, as I
> >>> already
> >>> > > > said,
> >>> > > > > > does not go directly testing complex solutions on complex
> things
> >>> > like
> >>> > > > > SCA.
> >>> > > > > > At first, build a simple, but equivalent scenario, and test
> it.
> >>> For
> >>> > > > > > example,
> >>> > > > > > a simple android app project that uses an java library
> project
> >>> > which
> >>> > > > > access
> >>> > > > > > annotations on classes placed on the android project. Like
> our
> >>> > > android
> >>> > > > > > calculator, it's an android app project (calculator-android)
> >>> which
> >>> > > uses
> >>> > > > > > java
> >>> > > > > > library projects (sca modules), and these libraries checks
> for
> >>> > > > > annotations
> >>> > > > > > on classes located at the android app project
> >>> > > (CalculatorService.java,
> >>> > > > > > AddService.java, etc). When you get it working on the simpler
> >>> > > scenario,
> >>> > > > > > then
> >>> > > > > > you are ready to test it on the complexer sceneario
> >>> > > > (calculator-android).
> >>> > > > > >
> >>> > > > > > Please, if you get the retrotranslator working in the simpler
> >>> > > scenario,
> >>> > > > > > send
> >>> > > > > > us a patch with it. You can create a JIRA and attach it. If
> you
> >>> > need
> >>> > > > any
> >>> > > > > > help, just ask ; )
> >>> > > > > >
> >>> > > > > > "code that checks for @Remotable you force to true, otherwise
> >>> force
> >>> > > to
> >>> > > > > > false."
> >>> > > > > >
> >>> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
> >>> > > > > >
> >>> > > > > > Search in every sca code for the usage of
> >>> Class.isAnnotationPresent
> >>> > > or
> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
> the
> >>> > > > > @Remotable
> >>> > > > > > annotations force it to true, for example:
> >>> > > > > >
> >>> > > > > > Annotation isRemotable =
> >>> > class.isAnnotationPresent(Remotable.class);
> >>> > > =>
> >>> > > > > > Annotation isRemotable = true;
> >>> > > > > >
> >>> > > > > > otherwise, which means, when it's not checking for the
> >>> @Remotable
> >>> > > > > > annnotation, force to false. For example:
> >>> > > > > >
> >>> > > > > > Annotation isReference =
> >>> > class.isAnnotationPresent(Reference.class);
> >>> > > =>
> >>> > > > > > Annotation isReference = false;
> >>> > > > > >
> >>> > > > > > [1] -
> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > >
> >>> > > > > > Kind Regards,
> >>> > > > > > Adriano Crestani
> >>> > > > > >
> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > >
> >>> > > > > > > Hi Adriano,
> >>> > > > > > >
> >>> > > > > > > I continued testing retrotranslator. Here's what I've done
> up
> >>> to
> >>> > > now.
> >>> > > > > > >
> >>> > > > > > > 1. Downloaded the modified code from [1].
> >>> > > > > > >
> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
> >>> below:
> >>> > > > > > >
> >>> > > > > > > svn checkout --revision 643746
> >>> > > > > > >
> >>> > >
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> >>> > > > > > >
> >>> > > > > > > cd modules
> >>> > > > > > >
> >>> > > > > > > mvn clean install -Dtest=no
> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> >>> > > > > > >
> >>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
> >>> variable
> >>> > as
> >>> > > > > shown
> >>> > > > > > > below:
> >>> > > > > > >
> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> >>> > eclipse:add-maven-repo
> >>> > > > > > >
> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
> >>> Android
> >>> > > > library
> >>> > > > > > to
> >>> > > > > > > required modules, fixed references to jar files and other
> >>> > > libraries.
> >>> > > > > > >
> >>> > > > > > > 5. Uncommented lines in
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > >
> >>> > > > > > > 6. Ran retrotranslator as instructed on the project site
> [3]
> >>> and
> >>> > > > shown
> >>> > > > > > > below:
> >>> > > > > > >
> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >>> /../workspace
> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> >>> > > > > > >
> >>> > > > > > >  The output can be found in [4].
> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > >
> >>> > > > > > > and then re-ran retrotranslator.
> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and
> Android
> >>> > > errors
> >>> > > > in
> >>> > > > > > > [6].
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > As always, I'm documenting my progress on the project log.
> I
> >>> > > haven't
> >>> > > > > > fully
> >>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by
> what
> >>> you
> >>> > > > mean
> >>> > > > > by
> >>> > > > > > > this:
> >>> > > > > > >
> >>> > > > > > > "code that checks for @Remotable you force to true,
> otherwise
> >>> > force
> >>> > > > to
> >>> > > > > > > false."
> >>> > > > > > >
> >>> > > > > > > I'll continue looking into it and hopefully get
> >>> retrotranslator
> >>> > to
> >>> > > > > work.
> >>> > > > > > I
> >>> > > > > > > also think it's a simpler option.
> >>> > > > > > >
> >>> > > > > > > Luciano: Thanks for your suggestions.
> >>> > > > > > >
> >>> > > > > > > [1]
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > > > >
> >>> > > > > > > [2]
> >>> > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> >>> > > > > > >
> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> >>> > > > > > >
> >>> > > > > > > [4]
> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> >>> > > > > > >
> >>> > > > > > > [5]
> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> >>> > > > > > > adrianocrestani@apache.org> wrote:
> >>> > > > > > >
> >>> > > > > > > > Hi,
> >>> > > > > > > >
> >>> > > > > > > > I tried what Luciano suggested. It really works. To get
> it
> >>> > > working
> >>> > > > > you
> >>> > > > > > > > simply need to search on all modules where the code
> checks
> >>> for
> >>> > > > > > @Remotable
> >>> > > > > > > > annotation and force it to true:
> >>> > > > > > > >
> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> >>> > > > > > > >
> >>> > > > > > > > It works fine on the sca revision we are testing on
> Android
> >>> and
> >>> > > the
> >>> > > > > > most
> >>> > > > > > > > recent revision. I only tested it as a java application,
> not
> >>> as
> >>> > > an
> >>> > > > > > > android
> >>> > > > > > > > application.
> >>> > > > > > > >
> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster
> >>> and
> >>> > > > simpler
> >>> > > > > > > > solution. Because the Luciano's suggestion only forces
> the
> >>> SCA
> >>> > to
> >>> > > > > > > recognize
> >>> > > > > > > > the services with no annotations declared on their
> >>> interfaces,
> >>> > > but
> >>> > > > it
> >>> > > > > > > does
> >>> > > > > > > > not avoid the Exceptions we are getting when the SCA
> invokes
> >>> > > > methods
> >>> > > > > > that
> >>> > > > > > > > read annotations. So, our current problem is that we are
> not
> >>> > > being
> >>> > > > > able
> >>> > > > > > > to
> >>> > > > > > > > use these methods and not only because we are not being
> able
> >>> to
> >>> > > > read
> >>> > > > > > the
> >>> > > > > > > > annotations.
> >>> > > > > > > >
> >>> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you
> will
> >>> > need
> >>> > > > to
> >>> > > > > > > > comment/adapt every sca code that tries to read the class
> >>> > > > > annotations.
> >>> > > > > > It
> >>> > > > > > > > is
> >>> > > > > > > > not necessary to comment/adapt the methods that read
> Method
> >>> > > > > > annotations,
> >>> > > > > > > > they are not throwning any exception. So, every code that
> >>> > checks
> >>> > > > for
> >>> > > > > > > > @Remotable you force to true, otherwise force to false.
> >>> > > > > > > >
> >>> > > > > > > > Any doubt about what I have said, just let me know ; )
> >>> > > > > > > >
> >>> > > > > > > > Suggestions are welcome : )
> >>> > > > > > > >
> >>> > > > > > > > Adriano Crestani
> >>> > > > > > > >
> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> >>> > > > > > luckbr1975@gmail.com>
> >>> > > > > > > > wrote:
> >>> > > > > > > >
> >>> > > > > > > > > FYI, if you comment out the code that checks if a
> >>> interface
> >>> > is
> >>> > > > > > > > > remoteble, you could have a version of the calculator
> >>> without
> >>> > > any
> >>> > > > > > > > > annotations, and the runtime would introspect the
> >>> references
> >>> > > for
> >>> > > > > the
> >>> > > > > > > > > multiple services. But note that, the introspection
> code
> >>> will
> >>> > > > only
> >>> > > > > be
> >>> > > > > > > > > activated if there is no SCA annotations on the class.
> >>> > > > > > > > >
> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> >>> > > > > > > > > <ad...@apache.org> wrote:
> >>> > > > > > > > > > Ah, the expected exception should look like this on
> >>> android
> >>> > > > > > emulator:
> >>> > > > > > > > > >
> >>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >>> >
> >>> > > > > > <
> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > <
> >>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > > <
> >>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > > > >
> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >
> >>> > > > > > > > > >> Hi Oscar,
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I was indeed using the sca modules not from the
> >>> sandbox.
> >>> > As
> >>> > > > you
> >>> > > > > > > > > suggested,
> >>> > > > > > > > > >> I
> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
> workspace
> >>> > and
> >>> > > > > added
> >>> > > > > > > the
> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
> >>> uncommented
> >>> > the
> >>> > > > > lines
> >>> > > > > > > in
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> following the comments pointing out why those lines
> had
> >>> > been
> >>> > > > > > > > commented.
> >>> > > > > > > > > I'm
> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
> However,
> >>> > it's
> >>> > > > > > getting
> >>> > > > > > > > > stuck
> >>> > > > > > > > > >> somewhere else (before getting there I guess)...I
> think
> >>> > this
> >>> > > > is
> >>> > > > > > the
> >>> > > > > > > > case
> >>> > > > > > > > > >> because before and after commenting the code I get
> the
> >>> > same
> >>> > > > > error
> >>> > > > > > in
> >>> > > > > > > > the
> >>> > > > > > > > > >> Android emulator, an InstantiationException [1].
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Have you debugged to check exactly where this
> exception
> >>> is
> >>> > > > being
> >>> > > > > > > > thrown?
> >>> > > > > > > > > I
> >>> > > > > > > > > >> have done the procedure I previously described
>  again
> >>> and
> >>> > I
> >>> > > > got
> >>> > > > > it
> >>> > > > > > > > > "running"
> >>> > > > > > > > > >> as expected, which means, running till the expected
> >>> > > exception
> >>> > > > is
> >>> > > > > > > > thrown.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I also started tinkering with retrotranslator. First
> I
> >>> > tried
> >>> > > > > doing
> >>> > > > > > > it
> >>> > > > > > > > > with
> >>> > > > > > > > > >> Ant, but it seems that in order to build I have to
> >>> include
> >>> > > the
> >>> > > > > > whole
> >>> > > > > > > > > >> tuscany
> >>> > > > > > > > > >> projects in a way similar to how I now have in
> Eclipse.
> >>> I
> >>> > > also
> >>> > > > > > tried
> >>> > > > > > > > > making
> >>> > > > > > > > > >> a jar out of
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> >>> unfortunately
> >>> > > it's
> >>> > > > > not
> >>> > > > > > > > > >> translating anything, as shown below.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> >>> > > > > > > > > >> Processing 136 file(s) in
> >>> JavaRuntimeModuleActivator.jar.
> >>> > > > > > > > > >> Transformed 0 file(s).
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> There's also a maven plugin, so I might try
> that...but
> >>> > first
> >>> > > > > I'll
> >>> > > > > > > give
> >>> > > > > > > > > Ant
> >>> > > > > > > > > >> another go. Hopefully Google will release a new SDK
> >>> soon,
> >>> > > > > > otherwise
> >>> > > > > > > as
> >>> > > > > > > > > you
> >>> > > > > > > > > >> say...retrotranslator will have to be the workaround
> to
> >>> > > > proceed
> >>> > > > > > with
> >>> > > > > > > > our
> >>> > > > > > > > > >> project ;-)
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK version
> will
> >>> not
> >>> > be
> >>> > > > > > > released
> >>> > > > > > > > > until
> >>> > > > > > > > > >> july 28th :S. So, it's really good you have already
> >>> > started
> >>> > > > > > working
> >>> > > > > > > on
> >>> > > > > > > > > the
> >>> > > > > > > > > >> retrotranslator, it will probably be the best
> >>> workaround
> >>> > for
> >>> > > > the
> >>> > > > > > > > > annotations
> >>> > > > > > > > > >> problem till the next SDK release.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I suggest you to forget about the build process
> right
> >>> now,
> >>> > > > > before,
> >>> > > > > > > > check
> >>> > > > > > > > > if
> >>> > > > > > > > > >> this retrotranslator works and if it really works on
> >>> > android
> >>> > > > > > > platform.
> >>> > > > > > > > > I´m
> >>> > > > > > > > > >> really getting upset with Android, even its API
> methods
> >>> > does
> >>> > > > not
> >>> > > > > > > work
> >>> > > > > > > > as
> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile a
> simple
> >>> > class
> >>> > > > > > (coded
> >>> > > > > > > by
> >>> > > > > > > > > you),
> >>> > > > > > > > > >> which contains annotations, and access these
> >>> annotations.
> >>> > If
> >>> > > > it
> >>> > > > > > > works,
> >>> > > > > > > > > make
> >>> > > > > > > > > >> it more complex and test again, do it until you
> reach a
> >>> > > > scenario
> >>> > > > > > as
> >>> > > > > > > > > complex
> >>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
> >>> classes
> >>> > > > > accessed
> >>> > > > > > > by
> >>> > > > > > > > > the
> >>> > > > > > > > > >> other external jars and the Android app). Got it? :
> )
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Regards,
> >>> > > > > > > > > >> Adriano Crestani
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>> Hi Adriano,
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> I was indeed using the sca modules not from the
> >>> sandbox.
> >>> > As
> >>> > > > you
> >>> > > > > > > > > suggested,
> >>> > > > > > > > > >>> I
> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
> >>> workspace
> >>> > and
> >>> > > > > added
> >>> > > > > > > the
> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> >>> uncommented
> >>> > > the
> >>> > > > > > lines
> >>> > > > > > > in
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> following the comments pointing out why those lines
> >>> had
> >>> > > been
> >>> > > > > > > > commented.
> >>> > > > > > > > > >>> I'm
> >>> > > > > > > > > >>> no longer getting the ClassNotFoundException.
> However,
> >>> > it's
> >>> > > > > > getting
> >>> > > > > > > > > stuck
> >>> > > > > > > > > >>> somewhere else (before getting there I guess)...I
> >>> think
> >>> > > this
> >>> > > > is
> >>> > > > > > the
> >>> > > > > > > > > case
> >>> > > > > > > > > >>> because before and after commenting the code I get
> the
> >>> > same
> >>> > > > > error
> >>> > > > > > > in
> >>> > > > > > > > > the
> >>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> I also started tinkering with retrotranslator.
> First I
> >>> > > tried
> >>> > > > > > doing
> >>> > > > > > > it
> >>> > > > > > > > > with
> >>> > > > > > > > > >>> Ant, but it seems that in order to build I have to
> >>> > include
> >>> > > > the
> >>> > > > > > > whole
> >>> > > > > > > > > >>> tuscany
> >>> > > > > > > > > >>> projects in a way similar to how I now have in
> >>> Eclipse. I
> >>> > > > also
> >>> > > > > > > tried
> >>> > > > > > > > > >>> making
> >>> > > > > > > > > >>> a jar out of
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
> >>> unfortunately
> >>> > > it's
> >>> > > > > not
> >>> > > > > > > > > >>> translating anything, as shown below.
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$
> java
> >>> -jar
> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> >>> > > > > > > > > >>> Processing 136 file(s) in
> >>> JavaRuntimeModuleActivator.jar.
> >>> > > > > > > > > >>> Transformed 0 file(s).
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
> that...but
> >>> > > first
> >>> > > > > I'll
> >>> > > > > > > > give
> >>> > > > > > > > > Ant
> >>> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
> >>> soon,
> >>> > > > > > otherwise
> >>> > > > > > > > as
> >>> > > > > > > > > you
> >>> > > > > > > > > >>> say...retrotranslator will have to be the
> workaround
> >>> to
> >>> > > > proceed
> >>> > > > > > > with
> >>> > > > > > > > > our
> >>> > > > > > > > > >>> project ;-)
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting ready
> for
> >>> > the
> >>> > > > > > official
> >>> > > > > > > > > start
> >>> > > > > > > > > >>> :-)
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> [1]
> >>> http://androidindelft.googlepages.com/20may2008.html
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani
> <
> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> > Hi Oscar,
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > My mistake again, the eclipse project files of
> >>> > > > > > contribution-impl
> >>> > > > > > > > > module
> >>> > > > > > > > > >>> > were
> >>> > > > > > > > > >>> > not uploaded, so you are probably using the
> modules
> >>> you
> >>> > > > have
> >>> > > > > > > > > downloaded
> >>> > > > > > > > > >>> > from
> >>> > > > > > > > > >>> > the sca modules. If you remove the
> >>> > > > tuscany-contribution-impl
> >>> > > > > > from
> >>> > > > > > > > > your
> >>> > > > > > > > > >>> > workspace and add this module from the sandbox it
> >>> will
> >>> > > > > probably
> >>> > > > > > > > work.
> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk again
> to
> >>> get
> >>> > > the
> >>> > > > > > > project
> >>> > > > > > > > > >>> files
> >>> > > > > > > > > >>> > I'm uploading right now ; )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
> >>> solution
> >>> > > here
> >>> > > > > is
> >>> > > > > > a
> >>> > > > > > > > tip:
> >>> > > > > > > > > >>> most
> >>> > > > > > > > > >>> > of the code that were using the Reflection API
> was
> >>> > > > commented
> >>> > > > > on
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>> > class, you just need to edit this class and
> remove
> >>> the
> >>> > > > > > commented
> >>> > > > > > > > code
> >>> > > > > > > > > >>> (it's
> >>> > > > > > > > > >>> > described there).
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > So, if you uncomment the code and the
> >>> retrotranslador
> >>> > > > > > successfuly
> >>> > > > > > > > > work,
> >>> > > > > > > > > >>> and
> >>> > > > > > > > > >>> > I hope it will, you will reach the
> >>> > > > > > > > > >>> >
> >>> > > > > > > > >
> >>> > > > > > >
> >>> > > > >
> >>> > >
> >>>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
> >>> > > > constructor
> >>> > > > > > I'm
> >>> > > > > > > > > >>> getting a
> >>> > > > > > > > > >>> > NPE when the code described above is commented.
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > About the ant, go on and use it. Further we can
> >>> > evaluate
> >>> > > > > better
> >>> > > > > > > > where
> >>> > > > > > > > > we
> >>> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
> >>> even
> >>> > > dont
> >>> > > > > > know
> >>> > > > > > > if
> >>> > > > > > > > > we
> >>> > > > > > > > > >>> will
> >>> > > > > > > > > >>> > still be using the retrotranslator in future,
> >>> right?! :
> >>> > )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
> >>> workaround
> >>> > > > this
> >>> > > > > > > > problem
> >>> > > > > > > > > for
> >>> > > > > > > > > >>> > now
> >>> > > > > > > > > >>> > and go on with our project ; )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > Kind Regards,
> >>> > > > > > > > > >>> > Adriano Crestani
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda
> <
> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > > Hi Adriano,
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to
> build
> >>> the
> >>> > > > > entire
> >>> > > > > > > > > workspace
> >>> > > > > > > > > >>> > from
> >>> > > > > > > > > >>> > > your instructions. When running
> calculator-android
> >>> as
> >>> > > an
> >>> > > > > > > "Android
> >>> > > > > > > > > >>> > > application" I'm getting a
> ClassNotFoundException
> >>> [1]
> >>> > > for
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> >>> > > > > > > > > >>> > > Is the exception you referred to in your
> original
> >>> > > email?
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > ...when
> >>> > > > > > > > > >>> > > > you run the calculator-android project as an
> >>> > "Android
> >>> > > > > > > > > application"
> >>> > > > > > > > > >>> you
> >>> > > > > > > > > >>> > > > should get an exception, that was generated
> >>> > initially
> >>> > > > by
> >>> > > > > a
> >>> > > > > > > NPE
> >>> > > > > > > > > >>> thrown
> >>> > > > > > > > > >>> > by
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > >
> >>> > > > > > >
> >>> > > > >
> >>> > >
> >>>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > > > > > > > > >>> > > > constructor. This is caused because the
> latest
> >>> > > Android
> >>> > > > > SDK
> >>> > > > > > > does
> >>> > > > > > > > > not
> >>> > > > > > > > > >>> > > support
> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot
> check
> >>> > the
> >>> > > > > > > @Reference
> >>> > > > > > > > > >>> > > annotations
> >>> > > > > > > > > >>> > > > (I commented the code which tries to read the
> >>> > > > > annotations,
> >>> > > > > > so
> >>> > > > > > > > > when
> >>> > > > > > > > > >>> the
> >>> > > > > > > > > >>> > > > execution reach this constructor it throws
> the
> >>> > NPE).
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Searching for the class in the exception I'm
> >>> getting
> >>> > I
> >>> > > > > found
> >>> > > > > > > > > >>> > >
> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> >>> > > In
> >>> > > > > > > > > >>> > getServiceClasses
> >>> > > > > > > > > >>> > > it loads the service class I'm getting problems
> >>> with
> >>> > > when
> >>> > > > > > > running
> >>> > > > > > > > > >>> > > calculator-android as an "Android application":
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > I couldn't find the corresponding java file in
> my
> >>> > > > imported
> >>> > > > > > > > > workspace
> >>> > > > > > > > > >>> and
> >>> > > > > > > > > >>> > > found that there is no package like
> >>> > > > > > > > > >>> > >
> >>> org.apache.tuscany.sca.contribution.processor.impl.
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Am I missing something? Or are these the errors
> >>> you
> >>> > > would
> >>> > > > > > > expect?
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > I would like to get to the point where I get
> the
> >>> > > > exception
> >>> > > > > > you
> >>> > > > > > > > > >>> described
> >>> > > > > > > > > >>> > > and
> >>> > > > > > > > > >>> > > try to run retrotranslator from there. However,
> as
> >>> > I'm
> >>> > > > > using
> >>> > > > > > > the
> >>> > > > > > > > > ADT
> >>> > > > > > > > > >>> > plugin
> >>> > > > > > > > > >>> > > in eclipse I would need to extract code that
> >>> > "declares
> >>> > > or
> >>> > > > > > > > analyzes
> >>> > > > > > > > > >>> > > annotations you may extract it into a separate
> >>> > library
> >>> > > > that
> >>> > > > > > can
> >>> > > > > > > > be
> >>> > > > > > > > > >>> > > processed
> >>> > > > > > > > > >>> > > with Retrotranslator and added to the main
> >>> project."
> >>> > > That
> >>> > > > > is,
> >>> > > > > > > > > unless I
> >>> > > > > > > > > >>> > use
> >>> > > > > > > > > >>> > > Ant, in which case I would only need to add a
> few
> >>> > lines
> >>> > > > to
> >>> > > > > > > > > build.xml.
> >>> > > > > > > > > >>> I'm
> >>> > > > > > > > > >>> > > continuing to look into this, any thoughts are
> >>> more
> >>> > > than
> >>> > > > > > > welcome
> >>> > > > > > > > > :-)
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > [1]
> >>> > http://delftandroid.googlepages.com/14may2008.html
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
> Crestani
> >>> <
> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > > Hi,
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > At first, I want to correct one mistake, on
> the
> >>> > first
> >>> > > > > step
> >>> > > > > > I
> >>> > > > > > > > > >>> described
> >>> > > > > > > > > >>> > on
> >>> > > > > > > > > >>> > > > my
> >>> > > > > > > > > >>> > > > previous email, I should not have added the
> word
> >>> > > > > "install",
> >>> > > > > > > it
> >>> > > > > > > > > >>> probably
> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
> >>> > install"
> >>> > > in
> >>> > > > > the
> >>> > > > > > > > > >>> downloaded
> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step,
> >>> the
> >>> > > code
> >>> > > > > > should
> >>> > > > > > > > not
> >>> > > > > > > > > be
> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Simon:
> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java
> source
> >>> > codes
> >>> > > > are
> >>> > > > > > > under
> >>> > > > > > > > > CDDL
> >>> > > > > > > > > >>> > 1.0
> >>> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
> >>> > license
> >>> > > > > > header
> >>> > > > > > > on
> >>> > > > > > > > > each
> >>> > > > > > > > > >>> > > file,
> >>> > > > > > > > > >>> > > > and it's already done : )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Jean:
> >>> > > > > > > > > >>> > > > I think it is better to keep the code in the
> >>> > sandbox
> >>> > > > for
> >>> > > > > > now.
> >>> > > > > > > > At
> >>> > > > > > > > > >>> first,
> >>> > > > > > > > > >>> > > > it's
> >>> > > > > > > > > >>> > > > not working on the current SCA modules
> revision
> >>> > yet.
> >>> > > > And
> >>> > > > > > > also,
> >>> > > > > > > > > I'm
> >>> > > > > > > > > >>> > > > commenting many lines at some modules just to
> >>> get a
> >>> > > > > "first
> >>> > > > > > > run"
> >>> > > > > > > > > of
> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate why and
> >>> how
> >>> > > this
> >>> > > > > > > > commented
> >>> > > > > > > > > >>> lines
> >>> > > > > > > > > >>> > > will
> >>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA
> Java
> >>> and
> >>> > > SCA
> >>> > > > > > > > Android.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Oscar:
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Are host-android and core-android a part of
> >>> > > > > > > > calculator-android?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > What do you mean when you say "part"? They
> are
> >>> used
> >>> > > by
> >>> > > > > > > > > >>> > > calculator-android,
> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
> >>> modules
> >>> > in
> >>> > > > > future
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Should the calculator-android included in
> [1]
> >>> > have
> >>> > > > > > included
> >>> > > > > > > > an
> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
> >>> > eclipse
> >>> > > > > > project
> >>> > > > > > > > > files
> >>> > > > > > > > > >>> of
> >>> > > > > > > > > >>> > > > these
> >>> > > > > > > > > >>> > > > projects. I have already commited these files
> >>> and
> >>> > if
> >>> > > > you
> >>> > > > > > > update
> >>> > > > > > > > > your
> >>> > > > > > > > > >>> > > trunk
> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones
> you
> >>> have
> >>> > > > > > created.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
> >>> > something
> >>> > > > else
> >>> > > > > > > > needed
> >>> > > > > > > > > in
> >>> > > > > > > > > >>> > > > addition
> >>> > > > > > > > > >>> > > > to including the Android Library?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > No, the Android library is really simples, it
> >>> only
> >>> > > > > contains
> >>> > > > > > > the
> >>> > > > > > > > > >>> > > android.jar
> >>> > > > > > > > > >>> > > > file located in your Android SDK.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and
> >>> "mvn
> >>> > > > > -Peclipse
> >>> > > > > > > > > >>> > > > eclipse:eclipse"
> >>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
> >>> project
> >>> > > > files
> >>> > > > > > are
> >>> > > > > > > > > already
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > > modules and you should build the modules
> using
> >>> the
> >>> > > > > eclipse
> >>> > > > > > > for
> >>> > > > > > > > > now.
> >>> > > > > > > > > >>> The
> >>> > > > > > > > > >>> > > > maven config files are not updated yet with
> the
> >>> > > > > > modifications
> >>> > > > > > > I
> >>> > > > > > > > > have
> >>> > > > > > > > > >>> > done
> >>> > > > > > > > > >>> > > > on
> >>> > > > > > > > > >>> > > > these modules, so they will not generate the
> >>> > correct
> >>> > > > > > project
> >>> > > > > > > > > files,
> >>> > > > > > > > > >>> > > worse,
> >>> > > > > > > > > >>> > > > they will override the ones I have created.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Then, clean and build your entire workspace,
> if
> >>> you
> >>> > > > still
> >>> > > > > > get
> >>> > > > > > > > any
> >>> > > > > > > > > >>> > errors,
> >>> > > > > > > > > >>> > > > let me know ; )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Should I import
> 'tuscany-databinding-saxon'?
> >>> Or,
> >>> > > why
> >>> > > > > > should
> >>> > > > > > > > > this
> >>> > > > > > > > > >>> not
> >>> > > > > > > > > >>> > be
> >>> > > > > > > > > >>> > > > imported?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > It seems the revision I suggested already had
> >>> the
> >>> > > saxon
> >>> > > > > > > module
> >>> > > > > > > > > >>> removed
> >>> > > > > > > > > >>> > > from
> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one
> >>> that
> >>> > > > > > shouldn´t.
> >>> > > > > > > > > Please,
> >>> > > > > > > > > >>> > > import
> >>> > > > > > > > > >>> > > > the databinding-saxon module again into your
> >>> > > workspace.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Regards,
> >>> > > > > > > > > >>> > > > Adriano Crestani
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > [1] -
> >>> > > > > > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > [2] -
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
> Jean-Sebastien
> >>> > > > Delfino
> >>> > > > > <
> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from
> [1]
> >>> and
> >>> > > > > > installed
> >>> > > > > > > > as
> >>> > > > > > > > > >>> shown
> >>> > > > > > > > > >>> > > > > > > > below:
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > > svn checkout
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > If there's no objection from others,
> I'd
> >>> be
> >>> > > happy
> >>> > > > > to
> >>> > > > > > > see
> >>> > > > > > > > > this
> >>> > > > > > > > > >>> > code
> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now
> have
> >>> > > several
> >>> > > > > > > people
> >>> > > > > > > > > doing
> >>> > > > > > > > > >>> > > > development
> >>> > > > > > > > > >>> > > > > > > on this android integration.
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with something
> >>> like
> >>> > > > > > > > > >>> > trunk/java/sca/android
> >>> > > > > > > > > >>> > > > > > > and later progressively try to converge
> >>> the
> >>> > > code
> >>> > > > > with
> >>> > > > > > > the
> >>> > > > > > > > > code
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > > trunk,
> >>> > > > > > > > > >>> > > > > > > with architected plug points for the
> >>> android
> >>> > > > > specific
> >>> > > > > > > > code
> >>> > > > > > > > > >>> etc.
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > > Thoughts?
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not
> also
> >>> > imply
> >>> > > > > > "making
> >>> > > > > > > > > part
> >>> > > > > > > > > >>> of
> >>> > > > > > > > > >>> > the
> >>> > > > > > > > > >>> > > > > > main build"?
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental
> code
> >>> > > > entering
> >>> > > > > > the
> >>> > > > > > > > > build
> >>> > > > > > > > > >>> at
> >>> > > > > > > > > >>> > > this
> >>> > > > > > > > > >>> > > > > > stage.
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > I think it's business as usual, code that
> >>> doesn't
> >>> > > > work
> >>> > > > > > does
> >>> > > > > > > > not
> >>> > > > > > > > > go
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > the
> >>> > > > > > > > > >>> > > > > main build, code that's getting stable can
> go
> >>> in
> >>> > > the
> >>> > > > > main
> >>> > > > > > > > build
> >>> > > > > > > > > at
> >>> > > > > > > > > >>> > some
> >>> > > > > > > > > >>> > > > > point when people have no specific
> objections,
> >>> > and
> >>> > > > > > > different
> >>> > > > > > > > > >>> profiles
> >>> > > > > > > > > >>> > > can
> >>> > > > > > > > > >>> > > > be
> >>> > > > > > > > > >>> > > > > used to subset particular builds.
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > --
> >>> > > > > > > > > >>> > > > > Jean-Sebastien
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > --
> >>> > > > > > > > > >>> > > best,
> >>> > > > > > > > > >>> > > -oscar
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Oscar Castañeda
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> --
> >>> > > > > > > > > >>> best,
> >>> > > > > > > > > >>> -oscar
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Oscar Castañeda
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > > --
> >>> > > > > > > > > Luciano Resende
> >>> > > > > > > > > Apache Tuscany Committer
> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> >>> <http://people.apache.org/%7Elresende>
> >>> > <http://people.apache.org/%7Elresende>
> >>> > > <http://people.apache.org/%7Elresende>
> >>> > > > <http://people.apache.org/%7Elresende>
> >>> > > > > <http://people.apache.org/%7Elresende>
> >>> > > > > > <http://people.apache.org/%7Elresende>
> >>> > > > > > > <http://people.apache.org/%7Elresende><
> >>> > > > > > > > http://people.apache.org/%7Elresende>
> >>> > > > > > > > > http://lresende.blogspot.com/
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > --
> >>> > > > > > > best,
> >>> > > > > > > -oscar
> >>> > > > > > >
> >>> > > > > > > Oscar Castañeda
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > > --
> >>> > > > > best,
> >>> > > > > -oscar
> >>> > > > >
> >>> > > > > Oscar Castañeda
> >>> > > > >
> >>> > > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > best,
> >>> > > -oscar
> >>> > >
> >>> > > Oscar Castañeda
> >>> > >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> best,
> >>> -oscar
> >>>
> >>> Oscar Castañeda
> >>>
> >>
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Luciano,

It's going better after the progress last week with retrotranslator. I'm now
able to translate the SCA classes and run calculator-android without getting
Annotation related issues. The problems now are related to RMI. In relation
to this, and from your comment about blocking issues, I created a child page
[1] in the project wiki for Blocking issues. Currently, the page lists the
RMI issue and suggested workarounds.

I think your suggestion about integration with maven is really good.
Especially because there is a retrotranslator plugin for maven. I'll start
looking into using this plugin. I also agree about reviewing the scope of
support. Right now, I see a need to reduce the dependency on RMI, either by
commenting all the code that uses the RMI API, or by following the
suggestions from Taras [3] to either replace java.rmi.Remote with
java.lang.Cloneable (as the result of using a retrotranslator option) or
taking the RMI source from Apache Harmony and putting it in a
retrotranslated JAR. What would you recommend? Hopefully after the
dependency reduction Android will be able to run calculator-android. Based
on the results of this experiment we can better consider the reduction of
component types and bindings. Please let me know your thoughts on this idea.

[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/Blocking+issues
[2] http://mojo.codehaus.org/retrotranslator-maven-plugin/
[3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/18Jun2008-2


On Tue, Jun 24, 2008 at 10:04 AM, Luciano Resende <lu...@gmail.com>
wrote:

> How is it going here ? I just want to check if there is any blocking
> issues with Android at the moment, if so, is there a list of these
> issues somewhere ?
>
> Also, some general suggestions/recommendations.: It would be great if
> we could spend sometime to get the modules well integrated using
> maven, this way it would be easier for anyone on the community to
> checkout the trunk + android sandbox and jump on the code to help.
> Also, we should review the scope of the support we are trying to
> acomplish, I'd suggest to minimize the number of component types
> supported (java) and bindings (default sca binding) and then try to
> run the calculator sample application. Once we have acomplished this
> first milestone, we could then discuss our next steps.
>
> Thoughts ?
>
> On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Ah, here is a tip to assure the classes are not recompiled again. Build
> the
> > project, then go in each project builder (in the properties window) and
> > disable all the builders, then not even a clean/build will modify your
> > project ; )
> >
> > On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <
> adrianocrestani@apache.org>
> > wrote:
> >
> >> Hi Oscar,
> >>
> >> I say that it is more difficult to debug because you need attach a
> source
> >> code to each jar and etc, and when you are using projects, eclipse
> already
> >> knows where to find the source code : )
> >>
> >> The reply made sense to me, especially with regards to the fact that
> with
> >> the Android plugin Eclipse compiles sources into classes and then into
> dex
> >> files, so retrotranslator has no chance to translate classes in between
> >> these steps - even if I do that outside of Eclipse. This shows from the
> use
> >> of non-translated binaries (as indicated by the
> >> java.lang.Class.isAnnotationPr
> >> esent(Class.java:1131) error in the stack
> >> trace) that might have been related to the use of pre-existing dex files
> or
> >> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> >> result would still be the same, even if I use a simpler scenario.
> >>
> >> Sorry, I really did not comment this email yet. It does not make so much
> >> sense for me. First, as you already know, eclipse android projects does
> not
> >> recognize any modifications in the imported projects, so it does not
> call
> >> the build or incremental build even if the imported projects have their
> >> source code modified. Just to make sure I tested it again:
> >>
> >> 1-  imported in my workspace all the projects included in the
> >> calculator-android, cleaned and built them...it takes a loooong time, as
> you
> >> already know.
> >>
> >> 2- imported the calculator-android project, cleaned and built it (only
> the
> >> calculator-android project), and this process was too much faster than
> when
> >> all the modules are built, so the imported projects were not recompiled,
> >> otherwise it would take too much more time. I suppose here that the
> android
> >> project compiles the .java contained in the android project and convert
> all
> >> the .class files (generated by imported projects and android project) to
> dex
> >> format.
> >>
> >> So, it does not recompile the external class files (the ones contained
> in
> >> the imported projects) cause it seems not to check if it was modified or
> >> not. Of course, I never tested it modifing the .class files, I'm just
> >> assuming that, because when you modify .java files it does not get
> >> recompiled.
> >>
> >> What do you think?
> >>
> >> As I mentioned before, your comments are really helpful as they give me
> a
> >> sense of direction. Please let me know if you still think we should
> pursue
> >> retrotranslator for files inside a folder.
> >>
> >> I really think you should try at first the simpler scenario and try to
> >> understand how it works and IF it works. Also, you can try what you were
> >> planning: to retrotranslate the each modules' jar, but I suppose it's a
> lot
> >> of work, because there are so many modules :S. So, as I've already said,
> if
> >> you think it's getting to complicated, forget it and go on with
> Luciano's
> >> suggestion.
> >>
> >> Feel free to choose the direction you want to take, and if there is
> another
> >> approach you think is better, just let us know ; )...you are the best
> person
> >> to choose the directions, cause you are working directly on it, we are
> just
> >> guinding/helping you ; )
> >>
> >> Thanks,
> >> Adriano Crestani
> >>
> >>
> >> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>
> >>> Hi Adriano,
> >>>
> >>> If there is an option on retrotranslator to retrotranslate all the
> classes
> >>> > in a folder, it should work as well as it works on classes inside
> .jar
> >>> > files. So, I think you should try to understand why your first
> approach
> >>> > (retrotranslating the eclipse project classes) is not working trying
> a
> >>> > simpler scenario. Have you already tried it?
> >>> >
> >>>
> >>> I agree that it's good to try out a simpler scenario to better
> understand
> >>> the problem. I haven't tried it yet because using retrotranslator for
> >>> classes inside a folder doesn't seem to be a solution to the problem.
> >>> Here's
> >>> my reasoning:
> >>>
> >>> Yes, there is an option to translate classes in a folder. I tried it
> and
> >>> it
> >>> successfully translated the classes inside my Eclipse workspace. When I
> >>> ran
> >>> the calculator-android application using the newly translated classes I
> >>> was
> >>> getting the errors in [1]. I posted a question in Android Developers
> about
> >>> this error and received a reply [2].
> >>>
> >>> The reply made sense to me, especially with regards to the fact that
> with
> >>> the Android plugin Eclipse compiles sources into classes and then into
> dex
> >>> files, so retrotranslator has no chance to translate classes in between
> >>> these steps - even if I do that outside of Eclipse. This shows from the
> >>> use
> >>> of non-translated binaries (as indicated by the
> >>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
> >>> trace) that might have been related to the use of pre-existing dex
> files
> >>> or
> >>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> >>> result would still be the same, even if I use a simpler scenario.
> >>>
> >>> The reply suggested to use JAR's instead. This also made sense to me
> and
> >>> seemed like a simpler way of solving the problem. I didn't see the
> >>> disadvantage of debugging, which as you point out is more difficult
> with
> >>> JAR's instead of Eclipse projects.
> >>>
> >>> As I mentioned before, your comments are really helpful as they give me
> a
> >>> sense of direction. Please let me know if you still think we should
> pursue
> >>> retrotranslator for files inside a folder.
> >>>
> >>>
> >>> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> >>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >>>
> >>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> >>> adrianocrestani@apache.org>
> >>> wrote:
> >>>
> >>> > Hi Oscar,
> >>> >
> >>> > Yup, you're right - there are indeed Eclipse files inside the
> folders. I
> >>> > guess I was confused by the different names in [1] than those that
> >>> result
> >>> > [2] from importing to an Eclipse workspace - after which I see 13
> >>> projects
> >>> > in both cases. So please ignore my previous remark.
> >>> >
> >>> > I have added the projects, but still haven't changed their names. I
> was
> >>> > planning to modify their project names when we get it integrated to
> SCA,
> >>> > mainly because we will need to change the poms. Anyway, feel free to
> >>> modify
> >>> > the names whenever you want ; )
> >>> >
> >>> >
> >>> > Per the reply I received on the Android Developers list [3] I started
> >>> using
> >>> > retrotranslator on JAR's instead of class files. For this I created a
> >>> big
> >>> > JAR file with all the Tuscany modules (including those you modified
> for
> >>> > Android). I translated this big JAR (around 15MB) with
> retrotranslator
> >>> [4].
> >>> > Then I created a new workspace with only calculator-android and
> >>> > android-jdk-classes as projects and added the translated JAR as an
> >>> external
> >>> > library for both projects. This resulted in errors [4] from the
> Android
> >>> > build process.
> >>> >
> >>> > I really do not understand this errors, but as this errors are only
> >>> related
> >>> > to testcase classes they can be ignored (removed from the jars). I
> also
> >>> did
> >>> > not understand why it's not find the .apk file:
> >>> >
> >>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> >>> > /bin/calculator-android.apk!"
> >>> >
> >>> > To work around these errors I decided to take a different approach
> and
> >>> copy
> >>> > all the jar files contained in the individual modules to a separate
> >>> folder
> >>> > and then run retrotranslator on each JAR. The jars are found inside
> the
> >>> > target folder of each module and are named as shown below:
> >>> >
> >>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >>> >
> >>> > From this I found that only the SCA modules have these JAR files
> inside
> >>> > their respective target folders, whereas the Android modules I
> >>> downloaded
> >>> > from [1] don't have these files at all
> >>> >
> >>> > Yep, this .jars are generated when the maven is executed. I'm not
> sure
> >>> if
> >>> > you should use this .jars, because they were compiled with no
> reference
> >>> to
> >>> > Android library. That's also why there are no .jar files for android
> >>> > modules, because you did not execute the maven on them  (and you
> >>> > shouldn't).
> >>> >
> >>> > So I decided to keep the Android
> >>> > modules [2] and add the translated JARs as libraries where needed to
> >>> have
> >>> > the workspace build with no problems. If I get this running I would
> look
> >>> > into creating JAR files from the Android modules and then return to
> only
> >>> > having calculator-android and android-jdk-classes as projects and the
> >>> rest
> >>> > as JAR's added as external libraries. If this works out I could then
> >>> look
> >>> > into seeing which JAR's are important and which are not, in this way
> >>> > reducing the total memory footprint and coming up with a "lightweight
> >>> > mobile
> >>> > SCA core/runtime." Please let me know your thoughts on these efforts.
> >>> >
> >>> > You haven't tried this yet, right? You may try it, but I do not like
> >>> this
> >>> > approach, because it will get difficult to debug sca classes as they
> are
> >>> > not
> >>> > imported as eclipse projects.
> >>> >
> >>> > If there is an option on retrotranslator to retrotranslate all the
> >>> classes
> >>> > in a folder, it should work as well as it works on classes inside
> .jar
> >>> > files. So, I think you should try to understand why your first
> approach
> >>> > (retrotranslating the eclipse project classes) is not working trying
> a
> >>> > simpler scenario. Have you already tried it?
> >>> >
> >>> > Also, if the restrotranslator gets to complicated, you may try the
> >>> > Luciano's
> >>> > suggestion ; )
> >>> >
> >>> >
> >>> > Kind Regards,
> >>> > Adriano Crestani
> >>> >
> >>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> >
> >>> > > Hi Adriano,
> >>> > >
> >>> > >
> >>> > > > Yep, they should be imported, if you check inside its folders,
> there
> >>> > are
> >>> > > > the
> >>> > > > eclipse project files, so they should be identified by the
> eclipse
> >>> > import
> >>> > > > tool as an eclipse project.
> >>> > >
> >>> > >
> >>> > > Yup, you're right - there are indeed Eclipse files inside the
> folders.
> >>> I
> >>> > > guess I was confused by the different names in [1] than those that
> >>> result
> >>> > > [2] from importing to an Eclipse workspace - after which I see 13
> >>> > projects
> >>> > > in both cases. So please ignore my previous remark.
> >>> > >
> >>> > > I don't think introspection is a good solution, hence you will need
> to
> >>> > > > change how the sca reads the info about each service and also
> >>> services
> >>> > > > implemented for JVM would need to be adapted to run on Android.
> >>> Let's
> >>> > > avoid
> >>> > > > to modify so much the SCA code, and lets try to keep
> retrotranslator
> >>> in
> >>> > > > mind
> >>> > > > as a temporary workaround for annotations till next SDK release
> :S
> >>> > >
> >>> > >
> >>> > > >  Also, if you get the retrotranslator working, forget the
> Luciano's
> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
> >>> > > >
> >>> > >
> >>> > > Will do. Thanks for the advice it helps me to focus in the right
> >>> > direction
> >>> > > :-)
> >>> > >
> >>> > > Now, a summary of what I've done up to now:
> >>> > >
> >>> > > Per the reply I received on the Android Developers list [3] I
> started
> >>> > using
> >>> > > retrotranslator on JAR's instead of class files. For this I created
> a
> >>> big
> >>> > > JAR file with all the Tuscany modules (including those you modified
> >>> for
> >>> > > Android). I translated this big JAR (around 15MB) with
> retrotranslator
> >>> > [4].
> >>> > > Then I created a new workspace with only calculator-android and
> >>> > > android-jdk-classes as projects and added the translated JAR as an
> >>> > external
> >>> > > library for both projects. This resulted in errors [4] from the
> >>> Android
> >>> > > build process.
> >>> > >
> >>> > > To work around these errors I decided to take a different approach
> and
> >>> > copy
> >>> > > all the jar files contained in the individual modules to a separate
> >>> > folder
> >>> > > and then run retrotranslator on each JAR. The jars are found inside
> >>> the
> >>> > > target folder of each module and are named as shown below:
> >>> > >
> >>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >>> > >
> >>> > > From this I found that only the SCA modules have these JAR files
> >>> inside
> >>> > > their respective target folders, whereas the Android modules I
> >>> downloaded
> >>> > > from [1] don't have these files at all. So I decided to keep the
> >>> Android
> >>> > > modules [2] and add the translated JARs as libraries where needed
> to
> >>> have
> >>> > > the workspace build with no problems. If I get this running I would
> >>> look
> >>> > > into creating JAR files from the Android modules and then return to
> >>> only
> >>> > > having calculator-android and android-jdk-classes as projects and
> the
> >>> > rest
> >>> > > as JAR's added as external libraries. If this works out I could
> then
> >>> look
> >>> > > into seeing which JAR's are important and which are not, in this
> way
> >>> > > reducing the total memory footprint and coming up with a
> "lightweight
> >>> > > mobile
> >>> > > SCA core/runtime." Please let me know your thoughts on these
> efforts.
> >>> > >
> >>> > >
> >>> > > [1]
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> >>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> >>> > > [3]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> >>> > > [4]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> >>> > >
> >>> > >
> >>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> >>> > > adrianocrestani@apache.org>
> >>> > > wrote:
> >>> > >
> >>> > > > Hi Oscar,
> >>> > > >
> >>> > > >
> >>> > > > When I imported the projects from [3] the following projects were
> >>> not
> >>> > > > imported:
> >>> > > >
> >>> > > > core-android
> >>> > > > host-android
> >>> > > > extensibility
> >>> > > >
> >>> > > > Is this normal? Should they be imported?
> >>> > > >
> >>> > > > Yep, they should be imported, if you check inside its folders,
> there
> >>> > are
> >>> > > > the
> >>> > > > eclipse project files, so they should be identified by the
> eclipse
> >>> > import
> >>> > > > tool as an eclipse project.
> >>> > > >
> >>> > > > Thanks for the detailed explanation. I'm going to give this a try
> as
> >>> I
> >>> > > > found
> >>> > > > an introspection related comment [2] as a workaround to another
> >>> > > annotations
> >>> > > > problem with the current SDK.
> >>> > > >
> >>> > > > I don't think introspection is a good solution, hence you will
> need
> >>> to
> >>> > > > change how the sca reads the info about each service and also
> >>> services
> >>> > > > implemented for JVM would need to be adapted to run on Android.
> >>> Let's
> >>> > > avoid
> >>> > > > to modify so much the SCA code, and lets try to keep
> retrotranslator
> >>> in
> >>> > > > mind
> >>> > > > as a temporary workaround for annotations till next SDK release
> :S
> >>> > > >
> >>> > > > Also, if you get the retrotranslator working, forget the
> Luciano's
> >>> > > > suggestion and vice-versa...do not try both at the same time ; )
> >>> > > >
> >>> > > > Any progress testing retrotranslator on a simpler scenario, just
> let
> >>> us
> >>> > > > know
> >>> > > > ; )
> >>> > > >
> >>> > > > Kind Regards,
> >>> > > > Adriano Crestani
> >>> > > >
> >>> > > >
> >>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> >>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > >
> >>> > > > > Hi Adriano,
> >>> > > > >
> >>> > > > > At first, build a simple, but equivalent scenario, and test it.
> >>> > > > >
> >>> > > > >
> >>> > > > > I think this is a great idea, especially because I found that
> the
> >>> > > "native
> >>> > > > > method not implemented" errors I'm getting [1] are still
> related
> >>> to
> >>> > the
> >>> > > > > annotations problem. I'm getting the same errors when
> converting
> >>> the
> >>> > > code
> >>> > > > > to
> >>> > > > > java 1.4. This makes me think that retrotranslator is actually
> not
> >>> > > > working.
> >>> > > > > Hopefully, testing with a simpler scenario will help me to
> >>> understand
> >>> > > the
> >>> > > > > problem better.
> >>> > > > >
> >>> > > > > Sorry for the not-well-detailed info here. I meant you to do:
> >>> > > > > >
> >>> > > > > > Search in every sca code for the usage of
> >>> Class.isAnnotationPresent
> >>> > > or
> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
> the
> >>> > > > > @Remotable
> >>> > > > > > annotations force it to true, for example:
> >>> > > > > >
> >>> > > > > > Annotation isRemotable = class.isAnnotationPresent
> >>> > > > > >>
> >>> > > > > >> (Remotable.class); =>
> >>> > > > > >> Annotation isRemotable = true;
> >>> > > > > >>
> >>> > > > > >> otherwise, which means, when it's not checking for the
> >>> @Remotable
> >>> > > > > >> annnotation, force to false. For example:
> >>> > > > > >>
> >>> > > > > >> Annotation isReference =
> >>> > class.isAnnotationPresent(Reference.class);
> >>> > > > =>
> >>> > > > > >> Annotation isReference = false;
> >>> > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > > > Thanks for the detailed explanation. I'm going to give this a
> try
> >>> as
> >>> > I
> >>> > > > > found
> >>> > > > > an introspection related comment [2] as a workaround to another
> >>> > > > annotations
> >>> > > > > problem with the current SDK.
> >>> > > > >
> >>> > > > > Also, I have another question for you...
> >>> > > > >
> >>> > > > > When I imported the projects from [3] the following projects
> were
> >>> not
> >>> > > > > imported:
> >>> > > > >
> >>> > > > > core-android
> >>> > > > > host-android
> >>> > > > > extensibility
> >>> > > > >
> >>> > > > > Is this normal? Should they be imported?
> >>> > > > >
> >>> > > > >
> >>> > > > > [1]
> >>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > [2]
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> >>> > > > > [3]
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > >
> >>> > > > >
> >>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> >>> > > > > adrianocrestani@apache.org>
> >>> > > > > wrote:
> >>> > > > >
> >>> > > > > > Well detailed Oscar ; )
> >>> > > > > >
> >>> > > > > > It is one thing I learnt after playing hours with Android,
> you
> >>> need
> >>> > > to
> >>> > > > > > rebuild every modified project which is imported in the
> android
> >>> > > > project,
> >>> > > > > > the
> >>> > > > > > android project itself does not check for modifications on
> its
> >>> > > > > dependencies
> >>> > > > > > :S...so, when you rebuilt the imported project it recompiled
> the
> >>> > > > > > uncommented
> >>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to
> check
> >>> for
> >>> > > > > > annotations once again, so you got the errors on [1], which
> >>> means
> >>> > > > > > retrotranslator is still not working. Have you tested it on a
> >>> > simpler
> >>> > > > > > application as I previously suggested? Did it work? What was
> the
> >>> > most
> >>> > > > > > critical scenario you tested it and it worked?
> >>> > > > > >
> >>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> >>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> /../workspace
> >>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> >>> > > > > >
> >>> > > > > > You should also check if it's is working as expected, as I
> >>> already
> >>> > > > said,
> >>> > > > > > does not go directly testing complex solutions on complex
> things
> >>> > like
> >>> > > > > SCA.
> >>> > > > > > At first, build a simple, but equivalent scenario, and test
> it.
> >>> For
> >>> > > > > > example,
> >>> > > > > > a simple android app project that uses an java library
> project
> >>> > which
> >>> > > > > access
> >>> > > > > > annotations on classes placed on the android project. Like
> our
> >>> > > android
> >>> > > > > > calculator, it's an android app project (calculator-android)
> >>> which
> >>> > > uses
> >>> > > > > > java
> >>> > > > > > library projects (sca modules), and these libraries checks
> for
> >>> > > > > annotations
> >>> > > > > > on classes located at the android app project
> >>> > > (CalculatorService.java,
> >>> > > > > > AddService.java, etc). When you get it working on the simpler
> >>> > > scenario,
> >>> > > > > > then
> >>> > > > > > you are ready to test it on the complexer sceneario
> >>> > > > (calculator-android).
> >>> > > > > >
> >>> > > > > > Please, if you get the retrotranslator working in the simpler
> >>> > > scenario,
> >>> > > > > > send
> >>> > > > > > us a patch with it. You can create a JIRA and attach it. If
> you
> >>> > need
> >>> > > > any
> >>> > > > > > help, just ask ; )
> >>> > > > > >
> >>> > > > > > "code that checks for @Remotable you force to true, otherwise
> >>> force
> >>> > > to
> >>> > > > > > false."
> >>> > > > > >
> >>> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
> >>> > > > > >
> >>> > > > > > Search in every sca code for the usage of
> >>> Class.isAnnotationPresent
> >>> > > or
> >>> > > > > > getAnnotations or getAnnotation methods. If it checks for a
> the
> >>> > > > > @Remotable
> >>> > > > > > annotations force it to true, for example:
> >>> > > > > >
> >>> > > > > > Annotation isRemotable =
> >>> > class.isAnnotationPresent(Remotable.class);
> >>> > > =>
> >>> > > > > > Annotation isRemotable = true;
> >>> > > > > >
> >>> > > > > > otherwise, which means, when it's not checking for the
> >>> @Remotable
> >>> > > > > > annnotation, force to false. For example:
> >>> > > > > >
> >>> > > > > > Annotation isReference =
> >>> > class.isAnnotationPresent(Reference.class);
> >>> > > =>
> >>> > > > > > Annotation isReference = false;
> >>> > > > > >
> >>> > > > > > [1] -
> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > >
> >>> > > > > > Kind Regards,
> >>> > > > > > Adriano Crestani
> >>> > > > > >
> >>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> >>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > >
> >>> > > > > > > Hi Adriano,
> >>> > > > > > >
> >>> > > > > > > I continued testing retrotranslator. Here's what I've done
> up
> >>> to
> >>> > > now.
> >>> > > > > > >
> >>> > > > > > > 1. Downloaded the modified code from [1].
> >>> > > > > > >
> >>> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
> >>> below:
> >>> > > > > > >
> >>> > > > > > > svn checkout --revision 643746
> >>> > > > > > >
> >>> > >
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> >>> > > > > > >
> >>> > > > > > > cd modules
> >>> > > > > > >
> >>> > > > > > > mvn clean install -Dtest=no
> >>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> >>> > > > > > >
> >>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
> >>> variable
> >>> > as
> >>> > > > > shown
> >>> > > > > > > below:
> >>> > > > > > >
> >>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> >>> > eclipse:add-maven-repo
> >>> > > > > > >
> >>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
> >>> Android
> >>> > > > library
> >>> > > > > > to
> >>> > > > > > > required modules, fixed references to jar files and other
> >>> > > libraries.
> >>> > > > > > >
> >>> > > > > > > 5. Uncommented lines in
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > >
> >>> > > > > > > 6. Ran retrotranslator as instructed on the project site
> [3]
> >>> and
> >>> > > > shown
> >>> > > > > > > below:
> >>> > > > > > >
> >>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> >>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
> >>> /../workspace
> >>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> >>> > > > > > >
> >>> > > > > > >  The output can be found in [4].
> >>> > > > > > > 7. Rebuilt project after uncommenting lines in
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > >
> >>> > > > > > > and then re-ran retrotranslator.
> >>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and
> Android
> >>> > > errors
> >>> > > > in
> >>> > > > > > > [6].
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > As always, I'm documenting my progress on the project log.
> I
> >>> > > haven't
> >>> > > > > > fully
> >>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by
> what
> >>> you
> >>> > > > mean
> >>> > > > > by
> >>> > > > > > > this:
> >>> > > > > > >
> >>> > > > > > > "code that checks for @Remotable you force to true,
> otherwise
> >>> > force
> >>> > > > to
> >>> > > > > > > false."
> >>> > > > > > >
> >>> > > > > > > I'll continue looking into it and hopefully get
> >>> retrotranslator
> >>> > to
> >>> > > > > work.
> >>> > > > > > I
> >>> > > > > > > also think it's a simpler option.
> >>> > > > > > >
> >>> > > > > > > Luciano: Thanks for your suggestions.
> >>> > > > > > >
> >>> > > > > > > [1]
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > > > >
> >>> > > > > > > [2]
> >>> > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> >>> > > > > > >
> >>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> >>> > > > > > >
> >>> > > > > > > [4]
> >>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> >>> > > > > > >
> >>> > > > > > > [5]
> >>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> >>> > > > > > > adrianocrestani@apache.org> wrote:
> >>> > > > > > >
> >>> > > > > > > > Hi,
> >>> > > > > > > >
> >>> > > > > > > > I tried what Luciano suggested. It really works. To get
> it
> >>> > > working
> >>> > > > > you
> >>> > > > > > > > simply need to search on all modules where the code
> checks
> >>> for
> >>> > > > > > @Remotable
> >>> > > > > > > > annotation and force it to true:
> >>> > > > > > > >
> >>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> >>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> >>> > > > > > > >
> >>> > > > > > > > It works fine on the sca revision we are testing on
> Android
> >>> and
> >>> > > the
> >>> > > > > > most
> >>> > > > > > > > recent revision. I only tested it as a java application,
> not
> >>> as
> >>> > > an
> >>> > > > > > > android
> >>> > > > > > > > application.
> >>> > > > > > > >
> >>> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster
> >>> and
> >>> > > > simpler
> >>> > > > > > > > solution. Because the Luciano's suggestion only forces
> the
> >>> SCA
> >>> > to
> >>> > > > > > > recognize
> >>> > > > > > > > the services with no annotations declared on their
> >>> interfaces,
> >>> > > but
> >>> > > > it
> >>> > > > > > > does
> >>> > > > > > > > not avoid the Exceptions we are getting when the SCA
> invokes
> >>> > > > methods
> >>> > > > > > that
> >>> > > > > > > > read annotations. So, our current problem is that we are
> not
> >>> > > being
> >>> > > > > able
> >>> > > > > > > to
> >>> > > > > > > > use these methods and not only because we are not being
> able
> >>> to
> >>> > > > read
> >>> > > > > > the
> >>> > > > > > > > annotations.
> >>> > > > > > > >
> >>> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you
> will
> >>> > need
> >>> > > > to
> >>> > > > > > > > comment/adapt every sca code that tries to read the class
> >>> > > > > annotations.
> >>> > > > > > It
> >>> > > > > > > > is
> >>> > > > > > > > not necessary to comment/adapt the methods that read
> Method
> >>> > > > > > annotations,
> >>> > > > > > > > they are not throwning any exception. So, every code that
> >>> > checks
> >>> > > > for
> >>> > > > > > > > @Remotable you force to true, otherwise force to false.
> >>> > > > > > > >
> >>> > > > > > > > Any doubt about what I have said, just let me know ; )
> >>> > > > > > > >
> >>> > > > > > > > Suggestions are welcome : )
> >>> > > > > > > >
> >>> > > > > > > > Adriano Crestani
> >>> > > > > > > >
> >>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> >>> > > > > > luckbr1975@gmail.com>
> >>> > > > > > > > wrote:
> >>> > > > > > > >
> >>> > > > > > > > > FYI, if you comment out the code that checks if a
> >>> interface
> >>> > is
> >>> > > > > > > > > remoteble, you could have a version of the calculator
> >>> without
> >>> > > any
> >>> > > > > > > > > annotations, and the runtime would introspect the
> >>> references
> >>> > > for
> >>> > > > > the
> >>> > > > > > > > > multiple services. But note that, the introspection
> code
> >>> will
> >>> > > > only
> >>> > > > > be
> >>> > > > > > > > > activated if there is no SCA annotations on the class.
> >>> > > > > > > > >
> >>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> >>> > > > > > > > > <ad...@apache.org> wrote:
> >>> > > > > > > > > > Ah, the expected exception should look like this on
> >>> android
> >>> > > > > > emulator:
> >>> > > > > > > > > >
> >>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
> >>> >
> >>> > > > > > <
> >>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > <
> >>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > > <
> >>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >>> > > > > > > > > >
> >>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> >>> > > > > > > > > > adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >
> >>> > > > > > > > > >> Hi Oscar,
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I was indeed using the sca modules not from the
> >>> sandbox.
> >>> > As
> >>> > > > you
> >>> > > > > > > > > suggested,
> >>> > > > > > > > > >> I
> >>> > > > > > > > > >> removed the tuscany-contribution-impl from my
> workspace
> >>> > and
> >>> > > > > added
> >>> > > > > > > the
> >>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
> >>> uncommented
> >>> > the
> >>> > > > > lines
> >>> > > > > > > in
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> following the comments pointing out why those lines
> had
> >>> > been
> >>> > > > > > > > commented.
> >>> > > > > > > > > I'm
> >>> > > > > > > > > >> no longer getting the ClassNotFoundException.
> However,
> >>> > it's
> >>> > > > > > getting
> >>> > > > > > > > > stuck
> >>> > > > > > > > > >> somewhere else (before getting there I guess)...I
> think
> >>> > this
> >>> > > > is
> >>> > > > > > the
> >>> > > > > > > > case
> >>> > > > > > > > > >> because before and after commenting the code I get
> the
> >>> > same
> >>> > > > > error
> >>> > > > > > in
> >>> > > > > > > > the
> >>> > > > > > > > > >> Android emulator, an InstantiationException [1].
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Have you debugged to check exactly where this
> exception
> >>> is
> >>> > > > being
> >>> > > > > > > > thrown?
> >>> > > > > > > > > I
> >>> > > > > > > > > >> have done the procedure I previously described
>  again
> >>> and
> >>> > I
> >>> > > > got
> >>> > > > > it
> >>> > > > > > > > > "running"
> >>> > > > > > > > > >> as expected, which means, running till the expected
> >>> > > exception
> >>> > > > is
> >>> > > > > > > > thrown.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I also started tinkering with retrotranslator. First
> I
> >>> > tried
> >>> > > > > doing
> >>> > > > > > > it
> >>> > > > > > > > > with
> >>> > > > > > > > > >> Ant, but it seems that in order to build I have to
> >>> include
> >>> > > the
> >>> > > > > > whole
> >>> > > > > > > > > >> tuscany
> >>> > > > > > > > > >> projects in a way similar to how I now have in
> Eclipse.
> >>> I
> >>> > > also
> >>> > > > > > tried
> >>> > > > > > > > > making
> >>> > > > > > > > > >> a jar out of
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> and then feeding it to retrotranslator but
> >>> unfortunately
> >>> > > it's
> >>> > > > > not
> >>> > > > > > > > > >> translating anything, as shown below.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> >>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> >>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> >>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> >>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> >>> > > > > > > > > >> Processing 136 file(s) in
> >>> JavaRuntimeModuleActivator.jar.
> >>> > > > > > > > > >> Transformed 0 file(s).
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> There's also a maven plugin, so I might try
> that...but
> >>> > first
> >>> > > > > I'll
> >>> > > > > > > give
> >>> > > > > > > > > Ant
> >>> > > > > > > > > >> another go. Hopefully Google will release a new SDK
> >>> soon,
> >>> > > > > > otherwise
> >>> > > > > > > as
> >>> > > > > > > > > you
> >>> > > > > > > > > >> say...retrotranslator will have to be the workaround
> to
> >>> > > > proceed
> >>> > > > > > with
> >>> > > > > > > > our
> >>> > > > > > > > > >> project ;-)
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Unfortunately the rumors say the new SDK version
> will
> >>> not
> >>> > be
> >>> > > > > > > released
> >>> > > > > > > > > until
> >>> > > > > > > > > >> july 28th :S. So, it's really good you have already
> >>> > started
> >>> > > > > > working
> >>> > > > > > > on
> >>> > > > > > > > > the
> >>> > > > > > > > > >> retrotranslator, it will probably be the best
> >>> workaround
> >>> > for
> >>> > > > the
> >>> > > > > > > > > annotations
> >>> > > > > > > > > >> problem till the next SDK release.
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> I suggest you to forget about the build process
> right
> >>> now,
> >>> > > > > before,
> >>> > > > > > > > check
> >>> > > > > > > > > if
> >>> > > > > > > > > >> this retrotranslator works and if it really works on
> >>> > android
> >>> > > > > > > platform.
> >>> > > > > > > > > I´m
> >>> > > > > > > > > >> really getting upset with Android, even its API
> methods
> >>> > does
> >>> > > > not
> >>> > > > > > > work
> >>> > > > > > > > as
> >>> > > > > > > > > >> expected :@. Anyway, try initially to compile a
> simple
> >>> > class
> >>> > > > > > (coded
> >>> > > > > > > by
> >>> > > > > > > > > you),
> >>> > > > > > > > > >> which contains annotations, and access these
> >>> annotations.
> >>> > If
> >>> > > > it
> >>> > > > > > > works,
> >>> > > > > > > > > make
> >>> > > > > > > > > >> it more complex and test again, do it until you
> reach a
> >>> > > > scenario
> >>> > > > > > as
> >>> > > > > > > > > complex
> >>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
> >>> classes
> >>> > > > > accessed
> >>> > > > > > > by
> >>> > > > > > > > > the
> >>> > > > > > > > > >> other external jars and the Android app). Got it? :
> )
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> Regards,
> >>> > > > > > > > > >> Adriano Crestani
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> >>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>> Hi Adriano,
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> I was indeed using the sca modules not from the
> >>> sandbox.
> >>> > As
> >>> > > > you
> >>> > > > > > > > > suggested,
> >>> > > > > > > > > >>> I
> >>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
> >>> workspace
> >>> > and
> >>> > > > > added
> >>> > > > > > > the
> >>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> >>> uncommented
> >>> > > the
> >>> > > > > > lines
> >>> > > > > > > in
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> following the comments pointing out why those lines
> >>> had
> >>> > > been
> >>> > > > > > > > commented.
> >>> > > > > > > > > >>> I'm
> >>> > > > > > > > > >>> no longer getting the ClassNotFoundException.
> However,
> >>> > it's
> >>> > > > > > getting
> >>> > > > > > > > > stuck
> >>> > > > > > > > > >>> somewhere else (before getting there I guess)...I
> >>> think
> >>> > > this
> >>> > > > is
> >>> > > > > > the
> >>> > > > > > > > > case
> >>> > > > > > > > > >>> because before and after commenting the code I get
> the
> >>> > same
> >>> > > > > error
> >>> > > > > > > in
> >>> > > > > > > > > the
> >>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> I also started tinkering with retrotranslator.
> First I
> >>> > > tried
> >>> > > > > > doing
> >>> > > > > > > it
> >>> > > > > > > > > with
> >>> > > > > > > > > >>> Ant, but it seems that in order to build I have to
> >>> > include
> >>> > > > the
> >>> > > > > > > whole
> >>> > > > > > > > > >>> tuscany
> >>> > > > > > > > > >>> projects in a way similar to how I now have in
> >>> Eclipse. I
> >>> > > > also
> >>> > > > > > > tried
> >>> > > > > > > > > >>> making
> >>> > > > > > > > > >>> a jar out of
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> and then feeding it to retrotranslator but
> >>> unfortunately
> >>> > > it's
> >>> > > > > not
> >>> > > > > > > > > >>> translating anything, as shown below.
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$
> java
> >>> -jar
> >>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> >>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> >>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> >>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> >>> > > > > > > > > >>> Processing 136 file(s) in
> >>> JavaRuntimeModuleActivator.jar.
> >>> > > > > > > > > >>> Transformed 0 file(s).
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> There's also a maven plugin, so I might try
> that...but
> >>> > > first
> >>> > > > > I'll
> >>> > > > > > > > give
> >>> > > > > > > > > Ant
> >>> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
> >>> soon,
> >>> > > > > > otherwise
> >>> > > > > > > > as
> >>> > > > > > > > > you
> >>> > > > > > > > > >>> say...retrotranslator will have to be the
> workaround
> >>> to
> >>> > > > proceed
> >>> > > > > > > with
> >>> > > > > > > > > our
> >>> > > > > > > > > >>> project ;-)
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Thanks again for all your help...I'm getting ready
> for
> >>> > the
> >>> > > > > > official
> >>> > > > > > > > > start
> >>> > > > > > > > > >>> :-)
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> [1]
> >>> http://androidindelft.googlepages.com/20may2008.html
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani
> <
> >>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> > Hi Oscar,
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > My mistake again, the eclipse project files of
> >>> > > > > > contribution-impl
> >>> > > > > > > > > module
> >>> > > > > > > > > >>> > were
> >>> > > > > > > > > >>> > not uploaded, so you are probably using the
> modules
> >>> you
> >>> > > > have
> >>> > > > > > > > > downloaded
> >>> > > > > > > > > >>> > from
> >>> > > > > > > > > >>> > the sca modules. If you remove the
> >>> > > > tuscany-contribution-impl
> >>> > > > > > from
> >>> > > > > > > > > your
> >>> > > > > > > > > >>> > workspace and add this module from the sandbox it
> >>> will
> >>> > > > > probably
> >>> > > > > > > > work.
> >>> > > > > > > > > >>> > Anyway, you will need to update your trunk again
> to
> >>> get
> >>> > > the
> >>> > > > > > > project
> >>> > > > > > > > > >>> files
> >>> > > > > > > > > >>> > I'm uploading right now ; )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
> >>> solution
> >>> > > here
> >>> > > > > is
> >>> > > > > > a
> >>> > > > > > > > tip:
> >>> > > > > > > > > >>> most
> >>> > > > > > > > > >>> > of the code that were using the Reflection API
> was
> >>> > > > commented
> >>> > > > > on
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > > > > > > > > >>> > class, you just need to edit this class and
> remove
> >>> the
> >>> > > > > > commented
> >>> > > > > > > > code
> >>> > > > > > > > > >>> (it's
> >>> > > > > > > > > >>> > described there).
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > So, if you uncomment the code and the
> >>> retrotranslador
> >>> > > > > > successfuly
> >>> > > > > > > > > work,
> >>> > > > > > > > > >>> and
> >>> > > > > > > > > >>> > I hope it will, you will reach the
> >>> > > > > > > > > >>> >
> >>> > > > > > > > >
> >>> > > > > > >
> >>> > > > >
> >>> > >
> >>>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
> >>> > > > constructor
> >>> > > > > > I'm
> >>> > > > > > > > > >>> getting a
> >>> > > > > > > > > >>> > NPE when the code described above is commented.
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > About the ant, go on and use it. Further we can
> >>> > evaluate
> >>> > > > > better
> >>> > > > > > > > where
> >>> > > > > > > > > we
> >>> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
> >>> even
> >>> > > dont
> >>> > > > > > know
> >>> > > > > > > if
> >>> > > > > > > > > we
> >>> > > > > > > > > >>> will
> >>> > > > > > > > > >>> > still be using the retrotranslator in future,
> >>> right?! :
> >>> > )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
> >>> workaround
> >>> > > > this
> >>> > > > > > > > problem
> >>> > > > > > > > > for
> >>> > > > > > > > > >>> > now
> >>> > > > > > > > > >>> > and go on with our project ; )
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > Kind Regards,
> >>> > > > > > > > > >>> > Adriano Crestani
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda
> <
> >>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>> > > Hi Adriano,
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to
> build
> >>> the
> >>> > > > > entire
> >>> > > > > > > > > workspace
> >>> > > > > > > > > >>> > from
> >>> > > > > > > > > >>> > > your instructions. When running
> calculator-android
> >>> as
> >>> > > an
> >>> > > > > > > "Android
> >>> > > > > > > > > >>> > > application" I'm getting a
> ClassNotFoundException
> >>> [1]
> >>> > > for
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> >>> > > > > > > > > >>> > > Is the exception you referred to in your
> original
> >>> > > email?
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > ...when
> >>> > > > > > > > > >>> > > > you run the calculator-android project as an
> >>> > "Android
> >>> > > > > > > > > application"
> >>> > > > > > > > > >>> you
> >>> > > > > > > > > >>> > > > should get an exception, that was generated
> >>> > initially
> >>> > > > by
> >>> > > > > a
> >>> > > > > > > NPE
> >>> > > > > > > > > >>> thrown
> >>> > > > > > > > > >>> > by
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > >
> >>> > > > > > >
> >>> > > > >
> >>> > >
> >>>
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > > > > > > > > >>> > > > constructor. This is caused because the
> latest
> >>> > > Android
> >>> > > > > SDK
> >>> > > > > > > does
> >>> > > > > > > > > not
> >>> > > > > > > > > >>> > > support
> >>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot
> check
> >>> > the
> >>> > > > > > > @Reference
> >>> > > > > > > > > >>> > > annotations
> >>> > > > > > > > > >>> > > > (I commented the code which tries to read the
> >>> > > > > annotations,
> >>> > > > > > so
> >>> > > > > > > > > when
> >>> > > > > > > > > >>> the
> >>> > > > > > > > > >>> > > > execution reach this constructor it throws
> the
> >>> > NPE).
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Searching for the class in the exception I'm
> >>> getting
> >>> > I
> >>> > > > > found
> >>> > > > > > > > > >>> > >
> >>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> >>> > > In
> >>> > > > > > > > > >>> > getServiceClasses
> >>> > > > > > > > > >>> > > it loads the service class I'm getting problems
> >>> with
> >>> > > when
> >>> > > > > > > running
> >>> > > > > > > > > >>> > > calculator-android as an "Android application":
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > I couldn't find the corresponding java file in
> my
> >>> > > > imported
> >>> > > > > > > > > workspace
> >>> > > > > > > > > >>> and
> >>> > > > > > > > > >>> > > found that there is no package like
> >>> > > > > > > > > >>> > >
> >>> org.apache.tuscany.sca.contribution.processor.impl.
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Am I missing something? Or are these the errors
> >>> you
> >>> > > would
> >>> > > > > > > expect?
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > I would like to get to the point where I get
> the
> >>> > > > exception
> >>> > > > > > you
> >>> > > > > > > > > >>> described
> >>> > > > > > > > > >>> > > and
> >>> > > > > > > > > >>> > > try to run retrotranslator from there. However,
> as
> >>> > I'm
> >>> > > > > using
> >>> > > > > > > the
> >>> > > > > > > > > ADT
> >>> > > > > > > > > >>> > plugin
> >>> > > > > > > > > >>> > > in eclipse I would need to extract code that
> >>> > "declares
> >>> > > or
> >>> > > > > > > > analyzes
> >>> > > > > > > > > >>> > > annotations you may extract it into a separate
> >>> > library
> >>> > > > that
> >>> > > > > > can
> >>> > > > > > > > be
> >>> > > > > > > > > >>> > > processed
> >>> > > > > > > > > >>> > > with Retrotranslator and added to the main
> >>> project."
> >>> > > That
> >>> > > > > is,
> >>> > > > > > > > > unless I
> >>> > > > > > > > > >>> > use
> >>> > > > > > > > > >>> > > Ant, in which case I would only need to add a
> few
> >>> > lines
> >>> > > > to
> >>> > > > > > > > > build.xml.
> >>> > > > > > > > > >>> I'm
> >>> > > > > > > > > >>> > > continuing to look into this, any thoughts are
> >>> more
> >>> > > than
> >>> > > > > > > welcome
> >>> > > > > > > > > :-)
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > [1]
> >>> > http://delftandroid.googlepages.com/14may2008.html
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano
> Crestani
> >>> <
> >>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > > Hi,
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > At first, I want to correct one mistake, on
> the
> >>> > first
> >>> > > > > step
> >>> > > > > > I
> >>> > > > > > > > > >>> described
> >>> > > > > > > > > >>> > on
> >>> > > > > > > > > >>> > > > my
> >>> > > > > > > > > >>> > > > previous email, I should not have added the
> word
> >>> > > > > "install",
> >>> > > > > > > it
> >>> > > > > > > > > >>> probably
> >>> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
> >>> > install"
> >>> > > in
> >>> > > > > the
> >>> > > > > > > > > >>> downloaded
> >>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step,
> >>> the
> >>> > > code
> >>> > > > > > should
> >>> > > > > > > > not
> >>> > > > > > > > > be
> >>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Simon:
> >>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java
> source
> >>> > codes
> >>> > > > are
> >>> > > > > > > under
> >>> > > > > > > > > CDDL
> >>> > > > > > > > > >>> > 1.0
> >>> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
> >>> > license
> >>> > > > > > header
> >>> > > > > > > on
> >>> > > > > > > > > each
> >>> > > > > > > > > >>> > > file,
> >>> > > > > > > > > >>> > > > and it's already done : )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Jean:
> >>> > > > > > > > > >>> > > > I think it is better to keep the code in the
> >>> > sandbox
> >>> > > > for
> >>> > > > > > now.
> >>> > > > > > > > At
> >>> > > > > > > > > >>> first,
> >>> > > > > > > > > >>> > > > it's
> >>> > > > > > > > > >>> > > > not working on the current SCA modules
> revision
> >>> > yet.
> >>> > > > And
> >>> > > > > > > also,
> >>> > > > > > > > > I'm
> >>> > > > > > > > > >>> > > > commenting many lines at some modules just to
> >>> get a
> >>> > > > > "first
> >>> > > > > > > run"
> >>> > > > > > > > > of
> >>> > > > > > > > > >>> > > > calculator-sample to further evaluate why and
> >>> how
> >>> > > this
> >>> > > > > > > > commented
> >>> > > > > > > > > >>> lines
> >>> > > > > > > > > >>> > > will
> >>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA
> Java
> >>> and
> >>> > > SCA
> >>> > > > > > > > Android.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Oscar:
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Are host-android and core-android a part of
> >>> > > > > > > > calculator-android?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > What do you mean when you say "part"? They
> are
> >>> used
> >>> > > by
> >>> > > > > > > > > >>> > > calculator-android,
> >>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
> >>> modules
> >>> > in
> >>> > > > > future
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Should the calculator-android included in
> [1]
> >>> > have
> >>> > > > > > included
> >>> > > > > > > > an
> >>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
> >>> > eclipse
> >>> > > > > > project
> >>> > > > > > > > > files
> >>> > > > > > > > > >>> of
> >>> > > > > > > > > >>> > > > these
> >>> > > > > > > > > >>> > > > projects. I have already commited these files
> >>> and
> >>> > if
> >>> > > > you
> >>> > > > > > > update
> >>> > > > > > > > > your
> >>> > > > > > > > > >>> > > trunk
> >>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones
> you
> >>> have
> >>> > > > > > created.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
> >>> > something
> >>> > > > else
> >>> > > > > > > > needed
> >>> > > > > > > > > in
> >>> > > > > > > > > >>> > > > addition
> >>> > > > > > > > > >>> > > > to including the Android Library?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > No, the Android library is really simples, it
> >>> only
> >>> > > > > contains
> >>> > > > > > > the
> >>> > > > > > > > > >>> > > android.jar
> >>> > > > > > > > > >>> > > > file located in your Android SDK.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and
> >>> "mvn
> >>> > > > > -Peclipse
> >>> > > > > > > > > >>> > > > eclipse:eclipse"
> >>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
> >>> project
> >>> > > > files
> >>> > > > > > are
> >>> > > > > > > > > already
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > > modules and you should build the modules
> using
> >>> the
> >>> > > > > eclipse
> >>> > > > > > > for
> >>> > > > > > > > > now.
> >>> > > > > > > > > >>> The
> >>> > > > > > > > > >>> > > > maven config files are not updated yet with
> the
> >>> > > > > > modifications
> >>> > > > > > > I
> >>> > > > > > > > > have
> >>> > > > > > > > > >>> > done
> >>> > > > > > > > > >>> > > > on
> >>> > > > > > > > > >>> > > > these modules, so they will not generate the
> >>> > correct
> >>> > > > > > project
> >>> > > > > > > > > files,
> >>> > > > > > > > > >>> > > worse,
> >>> > > > > > > > > >>> > > > they will override the ones I have created.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Then, clean and build your entire workspace,
> if
> >>> you
> >>> > > > still
> >>> > > > > > get
> >>> > > > > > > > any
> >>> > > > > > > > > >>> > errors,
> >>> > > > > > > > > >>> > > > let me know ; )
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > - Should I import
> 'tuscany-databinding-saxon'?
> >>> Or,
> >>> > > why
> >>> > > > > > should
> >>> > > > > > > > > this
> >>> > > > > > > > > >>> not
> >>> > > > > > > > > >>> > be
> >>> > > > > > > > > >>> > > > imported?
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > It seems the revision I suggested already had
> >>> the
> >>> > > saxon
> >>> > > > > > > module
> >>> > > > > > > > > >>> removed
> >>> > > > > > > > > >>> > > from
> >>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one
> >>> that
> >>> > > > > > shouldn´t.
> >>> > > > > > > > > Please,
> >>> > > > > > > > > >>> > > import
> >>> > > > > > > > > >>> > > > the databinding-saxon module again into your
> >>> > > workspace.
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > Regards,
> >>> > > > > > > > > >>> > > > Adriano Crestani
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > [1] -
> >>> > > > > > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > [2] -
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM,
> Jean-Sebastien
> >>> > > > Delfino
> >>> > > > > <
> >>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > > > > Mike Edwards wrote:
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from
> [1]
> >>> and
> >>> > > > > > installed
> >>> > > > > > > > as
> >>> > > > > > > > > >>> shown
> >>> > > > > > > > > >>> > > > > > > > below:
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > > svn checkout
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > >
> >>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > > cd mobile-android
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > >
> >>> > > > > > > > > >>> > > > > > > If there's no objection from others,
> I'd
> >>> be
> >>> > > happy
> >>> > > > > to
> >>> > > > > > > see
> >>> > > > > > > > > this
> >>> > > > > > > > > >>> > code
> >>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now
> have
> >>> > > several
> >>> > > > > > > people
> >>> > > > > > > > > doing
> >>> > > > > > > > > >>> > > > development
> >>> > > > > > > > > >>> > > > > > > on this android integration.
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > > Adriano, you could start with something
> >>> like
> >>> > > > > > > > > >>> > trunk/java/sca/android
> >>> > > > > > > > > >>> > > > > > > and later progressively try to converge
> >>> the
> >>> > > code
> >>> > > > > with
> >>> > > > > > > the
> >>> > > > > > > > > code
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > > trunk,
> >>> > > > > > > > > >>> > > > > > > with architected plug points for the
> >>> android
> >>> > > > > specific
> >>> > > > > > > > code
> >>> > > > > > > > > >>> etc.
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > > > Thoughts?
> >>> > > > > > > > > >>> > > > > > >
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not
> also
> >>> > imply
> >>> > > > > > "making
> >>> > > > > > > > > part
> >>> > > > > > > > > >>> of
> >>> > > > > > > > > >>> > the
> >>> > > > > > > > > >>> > > > > > main build"?
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental
> code
> >>> > > > entering
> >>> > > > > > the
> >>> > > > > > > > > build
> >>> > > > > > > > > >>> at
> >>> > > > > > > > > >>> > > this
> >>> > > > > > > > > >>> > > > > > stage.
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > > > Yours,  Mike.
> >>> > > > > > > > > >>> > > > > >
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > I think it's business as usual, code that
> >>> doesn't
> >>> > > > work
> >>> > > > > > does
> >>> > > > > > > > not
> >>> > > > > > > > > go
> >>> > > > > > > > > >>> in
> >>> > > > > > > > > >>> > > the
> >>> > > > > > > > > >>> > > > > main build, code that's getting stable can
> go
> >>> in
> >>> > > the
> >>> > > > > main
> >>> > > > > > > > build
> >>> > > > > > > > > at
> >>> > > > > > > > > >>> > some
> >>> > > > > > > > > >>> > > > > point when people have no specific
> objections,
> >>> > and
> >>> > > > > > > different
> >>> > > > > > > > > >>> profiles
> >>> > > > > > > > > >>> > > can
> >>> > > > > > > > > >>> > > > be
> >>> > > > > > > > > >>> > > > > used to subset particular builds.
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > > > --
> >>> > > > > > > > > >>> > > > > Jean-Sebastien
> >>> > > > > > > > > >>> > > > >
> >>> > > > > > > > > >>> > > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > --
> >>> > > > > > > > > >>> > > best,
> >>> > > > > > > > > >>> > > -oscar
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> > > Oscar Castañeda
> >>> > > > > > > > > >>> > >
> >>> > > > > > > > > >>> >
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> --
> >>> > > > > > > > > >>> best,
> >>> > > > > > > > > >>> -oscar
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>> Oscar Castañeda
> >>> > > > > > > > > >>>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >>
> >>> > > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > >
> >>> > > > > > > > > --
> >>> > > > > > > > > Luciano Resende
> >>> > > > > > > > > Apache Tuscany Committer
> >>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> >>> <http://people.apache.org/%7Elresende>
> >>> > <http://people.apache.org/%7Elresende>
> >>> > > <http://people.apache.org/%7Elresende>
> >>> > > > <http://people.apache.org/%7Elresende>
> >>> > > > > <http://people.apache.org/%7Elresende>
> >>> > > > > > <http://people.apache.org/%7Elresende>
> >>> > > > > > > <http://people.apache.org/%7Elresende><
> >>> > > > > > > > http://people.apache.org/%7Elresende>
> >>> > > > > > > > > http://lresende.blogspot.com/
> >>> > > > > > > > >
> >>> > > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > >
> >>> > > > > > > --
> >>> > > > > > > best,
> >>> > > > > > > -oscar
> >>> > > > > > >
> >>> > > > > > > Oscar Castañeda
> >>> > > > > > >
> >>> > > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > >
> >>> > > > > --
> >>> > > > > best,
> >>> > > > > -oscar
> >>> > > > >
> >>> > > > > Oscar Castañeda
> >>> > > > >
> >>> > > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > best,
> >>> > > -oscar
> >>> > >
> >>> > > Oscar Castañeda
> >>> > >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> best,
> >>> -oscar
> >>>
> >>> Oscar Castañeda
> >>>
> >>
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
How is it going here ? I just want to check if there is any blocking
issues with Android at the moment, if so, is there a list of these
issues somewhere ?

Also, some general suggestions/recommendations.: It would be great if
we could spend sometime to get the modules well integrated using
maven, this way it would be easier for anyone on the community to
checkout the trunk + android sandbox and jump on the code to help.
Also, we should review the scope of the support we are trying to
acomplish, I'd suggest to minimize the number of component types
supported (java) and bindings (default sca binding) and then try to
run the calculator sample application. Once we have acomplished this
first milestone, we could then discuss our next steps.

Thoughts ?

On Sat, Jun 7, 2008 at 7:52 AM, Adriano Crestani
<ad...@apache.org> wrote:
> Ah, here is a tip to assure the classes are not recompiled again. Build the
> project, then go in each project builder (in the properties window) and
> disable all the builders, then not even a clean/build will modify your
> project ; )
>
> On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <ad...@apache.org>
> wrote:
>
>> Hi Oscar,
>>
>> I say that it is more difficult to debug because you need attach a source
>> code to each jar and etc, and when you are using projects, eclipse already
>> knows where to find the source code : )
>>
>> The reply made sense to me, especially with regards to the fact that with
>> the Android plugin Eclipse compiles sources into classes and then into dex
>> files, so retrotranslator has no chance to translate classes in between
>> these steps - even if I do that outside of Eclipse. This shows from the use
>> of non-translated binaries (as indicated by the
>> java.lang.Class.isAnnotationPr
>> esent(Class.java:1131) error in the stack
>> trace) that might have been related to the use of pre-existing dex files or
>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
>> result would still be the same, even if I use a simpler scenario.
>>
>> Sorry, I really did not comment this email yet. It does not make so much
>> sense for me. First, as you already know, eclipse android projects does not
>> recognize any modifications in the imported projects, so it does not call
>> the build or incremental build even if the imported projects have their
>> source code modified. Just to make sure I tested it again:
>>
>> 1-  imported in my workspace all the projects included in the
>> calculator-android, cleaned and built them...it takes a loooong time, as you
>> already know.
>>
>> 2- imported the calculator-android project, cleaned and built it (only the
>> calculator-android project), and this process was too much faster than when
>> all the modules are built, so the imported projects were not recompiled,
>> otherwise it would take too much more time. I suppose here that the android
>> project compiles the .java contained in the android project and convert all
>> the .class files (generated by imported projects and android project) to dex
>> format.
>>
>> So, it does not recompile the external class files (the ones contained in
>> the imported projects) cause it seems not to check if it was modified or
>> not. Of course, I never tested it modifing the .class files, I'm just
>> assuming that, because when you modify .java files it does not get
>> recompiled.
>>
>> What do you think?
>>
>> As I mentioned before, your comments are really helpful as they give me a
>> sense of direction. Please let me know if you still think we should pursue
>> retrotranslator for files inside a folder.
>>
>> I really think you should try at first the simpler scenario and try to
>> understand how it works and IF it works. Also, you can try what you were
>> planning: to retrotranslate the each modules' jar, but I suppose it's a lot
>> of work, because there are so many modules :S. So, as I've already said, if
>> you think it's getting to complicated, forget it and go on with Luciano's
>> suggestion.
>>
>> Feel free to choose the direction you want to take, and if there is another
>> approach you think is better, just let us know ; )...you are the best person
>> to choose the directions, cause you are working directly on it, we are just
>> guinding/helping you ; )
>>
>> Thanks,
>> Adriano Crestani
>>
>>
>> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
>> oscar.castaneda.gsoc@gmail.com> wrote:
>>
>>> Hi Adriano,
>>>
>>> If there is an option on retrotranslator to retrotranslate all the classes
>>> > in a folder, it should work as well as it works on classes inside .jar
>>> > files. So, I think you should try to understand why your first approach
>>> > (retrotranslating the eclipse project classes) is not working trying a
>>> > simpler scenario. Have you already tried it?
>>> >
>>>
>>> I agree that it's good to try out a simpler scenario to better understand
>>> the problem. I haven't tried it yet because using retrotranslator for
>>> classes inside a folder doesn't seem to be a solution to the problem.
>>> Here's
>>> my reasoning:
>>>
>>> Yes, there is an option to translate classes in a folder. I tried it and
>>> it
>>> successfully translated the classes inside my Eclipse workspace. When I
>>> ran
>>> the calculator-android application using the newly translated classes I
>>> was
>>> getting the errors in [1]. I posted a question in Android Developers about
>>> this error and received a reply [2].
>>>
>>> The reply made sense to me, especially with regards to the fact that with
>>> the Android plugin Eclipse compiles sources into classes and then into dex
>>> files, so retrotranslator has no chance to translate classes in between
>>> these steps - even if I do that outside of Eclipse. This shows from the
>>> use
>>> of non-translated binaries (as indicated by the
>>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
>>> trace) that might have been related to the use of pre-existing dex files
>>> or
>>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
>>> result would still be the same, even if I use a simpler scenario.
>>>
>>> The reply suggested to use JAR's instead. This also made sense to me and
>>> seemed like a simpler way of solving the problem. I didn't see the
>>> disadvantage of debugging, which as you point out is more difficult with
>>> JAR's instead of Eclipse projects.
>>>
>>> As I mentioned before, your comments are really helpful as they give me a
>>> sense of direction. Please let me know if you still think we should pursue
>>> retrotranslator for files inside a folder.
>>>
>>>
>>> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>>
>>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>>> adrianocrestani@apache.org>
>>> wrote:
>>>
>>> > Hi Oscar,
>>> >
>>> > Yup, you're right - there are indeed Eclipse files inside the folders. I
>>> > guess I was confused by the different names in [1] than those that
>>> result
>>> > [2] from importing to an Eclipse workspace - after which I see 13
>>> projects
>>> > in both cases. So please ignore my previous remark.
>>> >
>>> > I have added the projects, but still haven't changed their names. I was
>>> > planning to modify their project names when we get it integrated to SCA,
>>> > mainly because we will need to change the poms. Anyway, feel free to
>>> modify
>>> > the names whenever you want ; )
>>> >
>>> >
>>> > Per the reply I received on the Android Developers list [3] I started
>>> using
>>> > retrotranslator on JAR's instead of class files. For this I created a
>>> big
>>> > JAR file with all the Tuscany modules (including those you modified for
>>> > Android). I translated this big JAR (around 15MB) with retrotranslator
>>> [4].
>>> > Then I created a new workspace with only calculator-android and
>>> > android-jdk-classes as projects and added the translated JAR as an
>>> external
>>> > library for both projects. This resulted in errors [4] from the Android
>>> > build process.
>>> >
>>> > I really do not understand this errors, but as this errors are only
>>> related
>>> > to testcase classes they can be ignored (removed from the jars). I also
>>> did
>>> > not understand why it's not find the .apk file:
>>> >
>>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
>>> > /bin/calculator-android.apk!"
>>> >
>>> > To work around these errors I decided to take a different approach and
>>> copy
>>> > all the jar files contained in the individual modules to a separate
>>> folder
>>> > and then run retrotranslator on each JAR. The jars are found inside the
>>> > target folder of each module and are named as shown below:
>>> >
>>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>> >
>>> > From this I found that only the SCA modules have these JAR files inside
>>> > their respective target folders, whereas the Android modules I
>>> downloaded
>>> > from [1] don't have these files at all
>>> >
>>> > Yep, this .jars are generated when the maven is executed. I'm not sure
>>> if
>>> > you should use this .jars, because they were compiled with no reference
>>> to
>>> > Android library. That's also why there are no .jar files for android
>>> > modules, because you did not execute the maven on them  (and you
>>> > shouldn't).
>>> >
>>> > So I decided to keep the Android
>>> > modules [2] and add the translated JARs as libraries where needed to
>>> have
>>> > the workspace build with no problems. If I get this running I would look
>>> > into creating JAR files from the Android modules and then return to only
>>> > having calculator-android and android-jdk-classes as projects and the
>>> rest
>>> > as JAR's added as external libraries. If this works out I could then
>>> look
>>> > into seeing which JAR's are important and which are not, in this way
>>> > reducing the total memory footprint and coming up with a "lightweight
>>> > mobile
>>> > SCA core/runtime." Please let me know your thoughts on these efforts.
>>> >
>>> > You haven't tried this yet, right? You may try it, but I do not like
>>> this
>>> > approach, because it will get difficult to debug sca classes as they are
>>> > not
>>> > imported as eclipse projects.
>>> >
>>> > If there is an option on retrotranslator to retrotranslate all the
>>> classes
>>> > in a folder, it should work as well as it works on classes inside .jar
>>> > files. So, I think you should try to understand why your first approach
>>> > (retrotranslating the eclipse project classes) is not working trying a
>>> > simpler scenario. Have you already tried it?
>>> >
>>> > Also, if the restrotranslator gets to complicated, you may try the
>>> > Luciano's
>>> > suggestion ; )
>>> >
>>> >
>>> > Kind Regards,
>>> > Adriano Crestani
>>> >
>>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>> >
>>> > > Hi Adriano,
>>> > >
>>> > >
>>> > > > Yep, they should be imported, if you check inside its folders, there
>>> > are
>>> > > > the
>>> > > > eclipse project files, so they should be identified by the eclipse
>>> > import
>>> > > > tool as an eclipse project.
>>> > >
>>> > >
>>> > > Yup, you're right - there are indeed Eclipse files inside the folders.
>>> I
>>> > > guess I was confused by the different names in [1] than those that
>>> result
>>> > > [2] from importing to an Eclipse workspace - after which I see 13
>>> > projects
>>> > > in both cases. So please ignore my previous remark.
>>> > >
>>> > > I don't think introspection is a good solution, hence you will need to
>>> > > > change how the sca reads the info about each service and also
>>> services
>>> > > > implemented for JVM would need to be adapted to run on Android.
>>> Let's
>>> > > avoid
>>> > > > to modify so much the SCA code, and lets try to keep retrotranslator
>>> in
>>> > > > mind
>>> > > > as a temporary workaround for annotations till next SDK release :S
>>> > >
>>> > >
>>> > > >  Also, if you get the retrotranslator working, forget the Luciano's
>>> > > > suggestion and vice-versa...do not try both at the same time ; )
>>> > > >
>>> > >
>>> > > Will do. Thanks for the advice it helps me to focus in the right
>>> > direction
>>> > > :-)
>>> > >
>>> > > Now, a summary of what I've done up to now:
>>> > >
>>> > > Per the reply I received on the Android Developers list [3] I started
>>> > using
>>> > > retrotranslator on JAR's instead of class files. For this I created a
>>> big
>>> > > JAR file with all the Tuscany modules (including those you modified
>>> for
>>> > > Android). I translated this big JAR (around 15MB) with retrotranslator
>>> > [4].
>>> > > Then I created a new workspace with only calculator-android and
>>> > > android-jdk-classes as projects and added the translated JAR as an
>>> > external
>>> > > library for both projects. This resulted in errors [4] from the
>>> Android
>>> > > build process.
>>> > >
>>> > > To work around these errors I decided to take a different approach and
>>> > copy
>>> > > all the jar files contained in the individual modules to a separate
>>> > folder
>>> > > and then run retrotranslator on each JAR. The jars are found inside
>>> the
>>> > > target folder of each module and are named as shown below:
>>> > >
>>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>>> > >
>>> > > From this I found that only the SCA modules have these JAR files
>>> inside
>>> > > their respective target folders, whereas the Android modules I
>>> downloaded
>>> > > from [1] don't have these files at all. So I decided to keep the
>>> Android
>>> > > modules [2] and add the translated JARs as libraries where needed to
>>> have
>>> > > the workspace build with no problems. If I get this running I would
>>> look
>>> > > into creating JAR files from the Android modules and then return to
>>> only
>>> > > having calculator-android and android-jdk-classes as projects and the
>>> > rest
>>> > > as JAR's added as external libraries. If this works out I could then
>>> look
>>> > > into seeing which JAR's are important and which are not, in this way
>>> > > reducing the total memory footprint and coming up with a "lightweight
>>> > > mobile
>>> > > SCA core/runtime." Please let me know your thoughts on these efforts.
>>> > >
>>> > >
>>> > > [1]
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>>> > > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>> > > [4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>>> > >
>>> > >
>>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>>> > > adrianocrestani@apache.org>
>>> > > wrote:
>>> > >
>>> > > > Hi Oscar,
>>> > > >
>>> > > >
>>> > > > When I imported the projects from [3] the following projects were
>>> not
>>> > > > imported:
>>> > > >
>>> > > > core-android
>>> > > > host-android
>>> > > > extensibility
>>> > > >
>>> > > > Is this normal? Should they be imported?
>>> > > >
>>> > > > Yep, they should be imported, if you check inside its folders, there
>>> > are
>>> > > > the
>>> > > > eclipse project files, so they should be identified by the eclipse
>>> > import
>>> > > > tool as an eclipse project.
>>> > > >
>>> > > > Thanks for the detailed explanation. I'm going to give this a try as
>>> I
>>> > > > found
>>> > > > an introspection related comment [2] as a workaround to another
>>> > > annotations
>>> > > > problem with the current SDK.
>>> > > >
>>> > > > I don't think introspection is a good solution, hence you will need
>>> to
>>> > > > change how the sca reads the info about each service and also
>>> services
>>> > > > implemented for JVM would need to be adapted to run on Android.
>>> Let's
>>> > > avoid
>>> > > > to modify so much the SCA code, and lets try to keep retrotranslator
>>> in
>>> > > > mind
>>> > > > as a temporary workaround for annotations till next SDK release :S
>>> > > >
>>> > > > Also, if you get the retrotranslator working, forget the Luciano's
>>> > > > suggestion and vice-versa...do not try both at the same time ; )
>>> > > >
>>> > > > Any progress testing retrotranslator on a simpler scenario, just let
>>> us
>>> > > > know
>>> > > > ; )
>>> > > >
>>> > > > Kind Regards,
>>> > > > Adriano Crestani
>>> > > >
>>> > > >
>>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>> > > >
>>> > > > > Hi Adriano,
>>> > > > >
>>> > > > > At first, build a simple, but equivalent scenario, and test it.
>>> > > > >
>>> > > > >
>>> > > > > I think this is a great idea, especially because I found that the
>>> > > "native
>>> > > > > method not implemented" errors I'm getting [1] are still related
>>> to
>>> > the
>>> > > > > annotations problem. I'm getting the same errors when converting
>>> the
>>> > > code
>>> > > > > to
>>> > > > > java 1.4. This makes me think that retrotranslator is actually not
>>> > > > working.
>>> > > > > Hopefully, testing with a simpler scenario will help me to
>>> understand
>>> > > the
>>> > > > > problem better.
>>> > > > >
>>> > > > > Sorry for the not-well-detailed info here. I meant you to do:
>>> > > > > >
>>> > > > > > Search in every sca code for the usage of
>>> Class.isAnnotationPresent
>>> > > or
>>> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
>>> > > > > @Remotable
>>> > > > > > annotations force it to true, for example:
>>> > > > > >
>>> > > > > > Annotation isRemotable = class.isAnnotationPresent
>>> > > > > >>
>>> > > > > >> (Remotable.class); =>
>>> > > > > >> Annotation isRemotable = true;
>>> > > > > >>
>>> > > > > >> otherwise, which means, when it's not checking for the
>>> @Remotable
>>> > > > > >> annnotation, force to false. For example:
>>> > > > > >>
>>> > > > > >> Annotation isReference =
>>> > class.isAnnotationPresent(Reference.class);
>>> > > > =>
>>> > > > > >> Annotation isReference = false;
>>> > > > > >
>>> > > > > >
>>> > > > >
>>> > > > > Thanks for the detailed explanation. I'm going to give this a try
>>> as
>>> > I
>>> > > > > found
>>> > > > > an introspection related comment [2] as a workaround to another
>>> > > > annotations
>>> > > > > problem with the current SDK.
>>> > > > >
>>> > > > > Also, I have another question for you...
>>> > > > >
>>> > > > > When I imported the projects from [3] the following projects were
>>> not
>>> > > > > imported:
>>> > > > >
>>> > > > > core-android
>>> > > > > host-android
>>> > > > > extensibility
>>> > > > >
>>> > > > > Is this normal? Should they be imported?
>>> > > > >
>>> > > > >
>>> > > > > [1]
>>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> > > > > [2]
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>>> > > > > [3]
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> > > > >
>>> > > > >
>>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>>> > > > > adrianocrestani@apache.org>
>>> > > > > wrote:
>>> > > > >
>>> > > > > > Well detailed Oscar ; )
>>> > > > > >
>>> > > > > > It is one thing I learnt after playing hours with Android, you
>>> need
>>> > > to
>>> > > > > > rebuild every modified project which is imported in the android
>>> > > > project,
>>> > > > > > the
>>> > > > > > android project itself does not check for modifications on its
>>> > > > > dependencies
>>> > > > > > :S...so, when you rebuilt the imported project it recompiled the
>>> > > > > > uncommented
>>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to check
>>> for
>>> > > > > > annotations once again, so you got the errors on [1], which
>>> means
>>> > > > > > retrotranslator is still not working. Have you tested it on a
>>> > simpler
>>> > > > > > application as I previously suggested? Did it work? What was the
>>> > most
>>> > > > > > critical scenario you tested it and it worked?
>>> > > > > >
>>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
>>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
>>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>>> > > > > >
>>> > > > > > You should also check if it's is working as expected, as I
>>> already
>>> > > > said,
>>> > > > > > does not go directly testing complex solutions on complex things
>>> > like
>>> > > > > SCA.
>>> > > > > > At first, build a simple, but equivalent scenario, and test it.
>>> For
>>> > > > > > example,
>>> > > > > > a simple android app project that uses an java library project
>>> > which
>>> > > > > access
>>> > > > > > annotations on classes placed on the android project. Like our
>>> > > android
>>> > > > > > calculator, it's an android app project (calculator-android)
>>> which
>>> > > uses
>>> > > > > > java
>>> > > > > > library projects (sca modules), and these libraries checks for
>>> > > > > annotations
>>> > > > > > on classes located at the android app project
>>> > > (CalculatorService.java,
>>> > > > > > AddService.java, etc). When you get it working on the simpler
>>> > > scenario,
>>> > > > > > then
>>> > > > > > you are ready to test it on the complexer sceneario
>>> > > > (calculator-android).
>>> > > > > >
>>> > > > > > Please, if you get the retrotranslator working in the simpler
>>> > > scenario,
>>> > > > > > send
>>> > > > > > us a patch with it. You can create a JIRA and attach it. If you
>>> > need
>>> > > > any
>>> > > > > > help, just ask ; )
>>> > > > > >
>>> > > > > > "code that checks for @Remotable you force to true, otherwise
>>> force
>>> > > to
>>> > > > > > false."
>>> > > > > >
>>> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
>>> > > > > >
>>> > > > > > Search in every sca code for the usage of
>>> Class.isAnnotationPresent
>>> > > or
>>> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
>>> > > > > @Remotable
>>> > > > > > annotations force it to true, for example:
>>> > > > > >
>>> > > > > > Annotation isRemotable =
>>> > class.isAnnotationPresent(Remotable.class);
>>> > > =>
>>> > > > > > Annotation isRemotable = true;
>>> > > > > >
>>> > > > > > otherwise, which means, when it's not checking for the
>>> @Remotable
>>> > > > > > annnotation, force to false. For example:
>>> > > > > >
>>> > > > > > Annotation isReference =
>>> > class.isAnnotationPresent(Reference.class);
>>> > > =>
>>> > > > > > Annotation isReference = false;
>>> > > > > >
>>> > > > > > [1] -
>>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> > > > > >
>>> > > > > > Kind Regards,
>>> > > > > > Adriano Crestani
>>> > > > > >
>>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>>> > > > > >
>>> > > > > > > Hi Adriano,
>>> > > > > > >
>>> > > > > > > I continued testing retrotranslator. Here's what I've done up
>>> to
>>> > > now.
>>> > > > > > >
>>> > > > > > > 1. Downloaded the modified code from [1].
>>> > > > > > >
>>> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
>>> below:
>>> > > > > > >
>>> > > > > > > svn checkout --revision 643746
>>> > > > > > >
>>> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>>> > > > > > >
>>> > > > > > > cd modules
>>> > > > > > >
>>> > > > > > > mvn clean install -Dtest=no
>>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>>> > > > > > >
>>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
>>> variable
>>> > as
>>> > > > > shown
>>> > > > > > > below:
>>> > > > > > >
>>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>>> > eclipse:add-maven-repo
>>> > > > > > >
>>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
>>> Android
>>> > > > library
>>> > > > > > to
>>> > > > > > > required modules, fixed references to jar files and other
>>> > > libraries.
>>> > > > > > >
>>> > > > > > > 5. Uncommented lines in
>>> > > > > > >
>>> > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > >
>>> > > > > > > 6. Ran retrotranslator as instructed on the project site [3]
>>> and
>>> > > > shown
>>> > > > > > > below:
>>> > > > > > >
>>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>>> /../workspace
>>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
>>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>>> > > > > > >
>>> > > > > > >  The output can be found in [4].
>>> > > > > > > 7. Rebuilt project after uncommenting lines in
>>> > > > > > >
>>> > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > >
>>> > > > > > > and then re-ran retrotranslator.
>>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and Android
>>> > > errors
>>> > > > in
>>> > > > > > > [6].
>>> > > > > > >
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > As always, I'm documenting my progress on the project log. I
>>> > > haven't
>>> > > > > > fully
>>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by what
>>> you
>>> > > > mean
>>> > > > > by
>>> > > > > > > this:
>>> > > > > > >
>>> > > > > > > "code that checks for @Remotable you force to true, otherwise
>>> > force
>>> > > > to
>>> > > > > > > false."
>>> > > > > > >
>>> > > > > > > I'll continue looking into it and hopefully get
>>> retrotranslator
>>> > to
>>> > > > > work.
>>> > > > > > I
>>> > > > > > > also think it's a simpler option.
>>> > > > > > >
>>> > > > > > > Luciano: Thanks for your suggestions.
>>> > > > > > >
>>> > > > > > > [1]
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> > > > > > >
>>> > > > > > > [2]
>>> > > > >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>>> > > > > > >
>>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
>>> > > > > > >
>>> > > > > > > [4]
>>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
>>> > > > > > >
>>> > > > > > > [5]
>>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
>>> > > > > > > adrianocrestani@apache.org> wrote:
>>> > > > > > >
>>> > > > > > > > Hi,
>>> > > > > > > >
>>> > > > > > > > I tried what Luciano suggested. It really works. To get it
>>> > > working
>>> > > > > you
>>> > > > > > > > simply need to search on all modules where the code checks
>>> for
>>> > > > > > @Remotable
>>> > > > > > > > annotation and force it to true:
>>> > > > > > > >
>>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
>>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
>>> > > > > > > >
>>> > > > > > > > It works fine on the sca revision we are testing on Android
>>> and
>>> > > the
>>> > > > > > most
>>> > > > > > > > recent revision. I only tested it as a java application, not
>>> as
>>> > > an
>>> > > > > > > android
>>> > > > > > > > application.
>>> > > > > > > >
>>> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster
>>> and
>>> > > > simpler
>>> > > > > > > > solution. Because the Luciano's suggestion only forces the
>>> SCA
>>> > to
>>> > > > > > > recognize
>>> > > > > > > > the services with no annotations declared on their
>>> interfaces,
>>> > > but
>>> > > > it
>>> > > > > > > does
>>> > > > > > > > not avoid the Exceptions we are getting when the SCA invokes
>>> > > > methods
>>> > > > > > that
>>> > > > > > > > read annotations. So, our current problem is that we are not
>>> > > being
>>> > > > > able
>>> > > > > > > to
>>> > > > > > > > use these methods and not only because we are not being able
>>> to
>>> > > > read
>>> > > > > > the
>>> > > > > > > > annotations.
>>> > > > > > > >
>>> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you will
>>> > need
>>> > > > to
>>> > > > > > > > comment/adapt every sca code that tries to read the class
>>> > > > > annotations.
>>> > > > > > It
>>> > > > > > > > is
>>> > > > > > > > not necessary to comment/adapt the methods that read Method
>>> > > > > > annotations,
>>> > > > > > > > they are not throwning any exception. So, every code that
>>> > checks
>>> > > > for
>>> > > > > > > > @Remotable you force to true, otherwise force to false.
>>> > > > > > > >
>>> > > > > > > > Any doubt about what I have said, just let me know ; )
>>> > > > > > > >
>>> > > > > > > > Suggestions are welcome : )
>>> > > > > > > >
>>> > > > > > > > Adriano Crestani
>>> > > > > > > >
>>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
>>> > > > > > luckbr1975@gmail.com>
>>> > > > > > > > wrote:
>>> > > > > > > >
>>> > > > > > > > > FYI, if you comment out the code that checks if a
>>> interface
>>> > is
>>> > > > > > > > > remoteble, you could have a version of the calculator
>>> without
>>> > > any
>>> > > > > > > > > annotations, and the runtime would introspect the
>>> references
>>> > > for
>>> > > > > the
>>> > > > > > > > > multiple services. But note that, the introspection code
>>> will
>>> > > > only
>>> > > > > be
>>> > > > > > > > > activated if there is no SCA annotations on the class.
>>> > > > > > > > >
>>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
>>> > > > > > > > > <ad...@apache.org> wrote:
>>> > > > > > > > > > Ah, the expected exception should look like this on
>>> android
>>> > > > > > emulator:
>>> > > > > > > > > >
>>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>>> >
>>> > > > > > <
>>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > > > > > <
>>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > > > > > > <
>>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>>> > > > > > > > > >
>>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
>>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>>> > > > > > > > > >
>>> > > > > > > > > >> Hi Oscar,
>>> > > > > > > > > >>
>>> > > > > > > > > >> I was indeed using the sca modules not from the
>>> sandbox.
>>> > As
>>> > > > you
>>> > > > > > > > > suggested,
>>> > > > > > > > > >> I
>>> > > > > > > > > >> removed the tuscany-contribution-impl from my workspace
>>> > and
>>> > > > > added
>>> > > > > > > the
>>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
>>> uncommented
>>> > the
>>> > > > > lines
>>> > > > > > > in
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > > > > >>
>>> > > > > > > > > >> following the comments pointing out why those lines had
>>> > been
>>> > > > > > > > commented.
>>> > > > > > > > > I'm
>>> > > > > > > > > >> no longer getting the ClassNotFoundException. However,
>>> > it's
>>> > > > > > getting
>>> > > > > > > > > stuck
>>> > > > > > > > > >> somewhere else (before getting there I guess)...I think
>>> > this
>>> > > > is
>>> > > > > > the
>>> > > > > > > > case
>>> > > > > > > > > >> because before and after commenting the code I get the
>>> > same
>>> > > > > error
>>> > > > > > in
>>> > > > > > > > the
>>> > > > > > > > > >> Android emulator, an InstantiationException [1].
>>> > > > > > > > > >>
>>> > > > > > > > > >> Have you debugged to check exactly where this exception
>>> is
>>> > > > being
>>> > > > > > > > thrown?
>>> > > > > > > > > I
>>> > > > > > > > > >> have done the procedure I previously described  again
>>> and
>>> > I
>>> > > > got
>>> > > > > it
>>> > > > > > > > > "running"
>>> > > > > > > > > >> as expected, which means, running till the expected
>>> > > exception
>>> > > > is
>>> > > > > > > > thrown.
>>> > > > > > > > > >>
>>> > > > > > > > > >> I also started tinkering with retrotranslator. First I
>>> > tried
>>> > > > > doing
>>> > > > > > > it
>>> > > > > > > > > with
>>> > > > > > > > > >> Ant, but it seems that in order to build I have to
>>> include
>>> > > the
>>> > > > > > whole
>>> > > > > > > > > >> tuscany
>>> > > > > > > > > >> projects in a way similar to how I now have in Eclipse.
>>> I
>>> > > also
>>> > > > > > tried
>>> > > > > > > > > making
>>> > > > > > > > > >> a jar out of
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > > > > >>
>>> > > > > > > > > >> and then feeding it to retrotranslator but
>>> unfortunately
>>> > > it's
>>> > > > > not
>>> > > > > > > > > >> translating anything, as shown below.
>>> > > > > > > > > >>
>>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
>>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
>>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
>>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
>>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
>>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
>>> > > > > > > > > >> Processing 136 file(s) in
>>> JavaRuntimeModuleActivator.jar.
>>> > > > > > > > > >> Transformed 0 file(s).
>>> > > > > > > > > >>
>>> > > > > > > > > >> There's also a maven plugin, so I might try that...but
>>> > first
>>> > > > > I'll
>>> > > > > > > give
>>> > > > > > > > > Ant
>>> > > > > > > > > >> another go. Hopefully Google will release a new SDK
>>> soon,
>>> > > > > > otherwise
>>> > > > > > > as
>>> > > > > > > > > you
>>> > > > > > > > > >> say...retrotranslator will have to be the workaround to
>>> > > > proceed
>>> > > > > > with
>>> > > > > > > > our
>>> > > > > > > > > >> project ;-)
>>> > > > > > > > > >>
>>> > > > > > > > > >> Unfortunately the rumors say the new SDK version will
>>> not
>>> > be
>>> > > > > > > released
>>> > > > > > > > > until
>>> > > > > > > > > >> july 28th :S. So, it's really good you have already
>>> > started
>>> > > > > > working
>>> > > > > > > on
>>> > > > > > > > > the
>>> > > > > > > > > >> retrotranslator, it will probably be the best
>>> workaround
>>> > for
>>> > > > the
>>> > > > > > > > > annotations
>>> > > > > > > > > >> problem till the next SDK release.
>>> > > > > > > > > >>
>>> > > > > > > > > >> I suggest you to forget about the build process right
>>> now,
>>> > > > > before,
>>> > > > > > > > check
>>> > > > > > > > > if
>>> > > > > > > > > >> this retrotranslator works and if it really works on
>>> > android
>>> > > > > > > platform.
>>> > > > > > > > > I´m
>>> > > > > > > > > >> really getting upset with Android, even its API methods
>>> > does
>>> > > > not
>>> > > > > > > work
>>> > > > > > > > as
>>> > > > > > > > > >> expected :@. Anyway, try initially to compile a simple
>>> > class
>>> > > > > > (coded
>>> > > > > > > by
>>> > > > > > > > > you),
>>> > > > > > > > > >> which contains annotations, and access these
>>> annotations.
>>> > If
>>> > > > it
>>> > > > > > > works,
>>> > > > > > > > > make
>>> > > > > > > > > >> it more complex and test again, do it until you reach a
>>> > > > scenario
>>> > > > > > as
>>> > > > > > > > > complex
>>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
>>> classes
>>> > > > > accessed
>>> > > > > > > by
>>> > > > > > > > > the
>>> > > > > > > > > >> other external jars and the Android app). Got it? : )
>>> > > > > > > > > >>
>>> > > > > > > > > >> Regards,
>>> > > > > > > > > >> Adriano Crestani
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
>>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
>>> > > > > > > > > >>
>>> > > > > > > > > >>> Hi Adriano,
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> I was indeed using the sca modules not from the
>>> sandbox.
>>> > As
>>> > > > you
>>> > > > > > > > > suggested,
>>> > > > > > > > > >>> I
>>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
>>> workspace
>>> > and
>>> > > > > added
>>> > > > > > > the
>>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
>>> uncommented
>>> > > the
>>> > > > > > lines
>>> > > > > > > in
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> following the comments pointing out why those lines
>>> had
>>> > > been
>>> > > > > > > > commented.
>>> > > > > > > > > >>> I'm
>>> > > > > > > > > >>> no longer getting the ClassNotFoundException. However,
>>> > it's
>>> > > > > > getting
>>> > > > > > > > > stuck
>>> > > > > > > > > >>> somewhere else (before getting there I guess)...I
>>> think
>>> > > this
>>> > > > is
>>> > > > > > the
>>> > > > > > > > > case
>>> > > > > > > > > >>> because before and after commenting the code I get the
>>> > same
>>> > > > > error
>>> > > > > > > in
>>> > > > > > > > > the
>>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> I also started tinkering with retrotranslator. First I
>>> > > tried
>>> > > > > > doing
>>> > > > > > > it
>>> > > > > > > > > with
>>> > > > > > > > > >>> Ant, but it seems that in order to build I have to
>>> > include
>>> > > > the
>>> > > > > > > whole
>>> > > > > > > > > >>> tuscany
>>> > > > > > > > > >>> projects in a way similar to how I now have in
>>> Eclipse. I
>>> > > > also
>>> > > > > > > tried
>>> > > > > > > > > >>> making
>>> > > > > > > > > >>> a jar out of
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> and then feeding it to retrotranslator but
>>> unfortunately
>>> > > it's
>>> > > > > not
>>> > > > > > > > > >>> translating anything, as shown below.
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java
>>> -jar
>>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
>>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
>>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
>>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
>>> > > > > > > > > >>> Processing 136 file(s) in
>>> JavaRuntimeModuleActivator.jar.
>>> > > > > > > > > >>> Transformed 0 file(s).
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> There's also a maven plugin, so I might try that...but
>>> > > first
>>> > > > > I'll
>>> > > > > > > > give
>>> > > > > > > > > Ant
>>> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
>>> soon,
>>> > > > > > otherwise
>>> > > > > > > > as
>>> > > > > > > > > you
>>> > > > > > > > > >>> say...retrotranslator will have to be the workaround
>>> to
>>> > > > proceed
>>> > > > > > > with
>>> > > > > > > > > our
>>> > > > > > > > > >>> project ;-)
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> Thanks again for all your help...I'm getting ready for
>>> > the
>>> > > > > > official
>>> > > > > > > > > start
>>> > > > > > > > > >>> :-)
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> [1]
>>> http://androidindelft.googlepages.com/20may2008.html
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
>>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> > Hi Oscar,
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > My mistake again, the eclipse project files of
>>> > > > > > contribution-impl
>>> > > > > > > > > module
>>> > > > > > > > > >>> > were
>>> > > > > > > > > >>> > not uploaded, so you are probably using the modules
>>> you
>>> > > > have
>>> > > > > > > > > downloaded
>>> > > > > > > > > >>> > from
>>> > > > > > > > > >>> > the sca modules. If you remove the
>>> > > > tuscany-contribution-impl
>>> > > > > > from
>>> > > > > > > > > your
>>> > > > > > > > > >>> > workspace and add this module from the sandbox it
>>> will
>>> > > > > probably
>>> > > > > > > > work.
>>> > > > > > > > > >>> > Anyway, you will need to update your trunk again to
>>> get
>>> > > the
>>> > > > > > > project
>>> > > > > > > > > >>> files
>>> > > > > > > > > >>> > I'm uploading right now ; )
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
>>> solution
>>> > > here
>>> > > > > is
>>> > > > > > a
>>> > > > > > > > tip:
>>> > > > > > > > > >>> most
>>> > > > > > > > > >>> > of the code that were using the Reflection API was
>>> > > > commented
>>> > > > > on
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > > > > > > > > >>> > class, you just need to edit this class and remove
>>> the
>>> > > > > > commented
>>> > > > > > > > code
>>> > > > > > > > > >>> (it's
>>> > > > > > > > > >>> > described there).
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > So, if you uncomment the code and the
>>> retrotranslador
>>> > > > > > successfuly
>>> > > > > > > > > work,
>>> > > > > > > > > >>> and
>>> > > > > > > > > >>> > I hope it will, you will reach the
>>> > > > > > > > > >>> >
>>> > > > > > > > >
>>> > > > > > >
>>> > > > >
>>> > >
>>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>>> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
>>> > > > constructor
>>> > > > > > I'm
>>> > > > > > > > > >>> getting a
>>> > > > > > > > > >>> > NPE when the code described above is commented.
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > About the ant, go on and use it. Further we can
>>> > evaluate
>>> > > > > better
>>> > > > > > > > where
>>> > > > > > > > > we
>>> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
>>> even
>>> > > dont
>>> > > > > > know
>>> > > > > > > if
>>> > > > > > > > > we
>>> > > > > > > > > >>> will
>>> > > > > > > > > >>> > still be using the retrotranslator in future,
>>> right?! :
>>> > )
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
>>> workaround
>>> > > > this
>>> > > > > > > > problem
>>> > > > > > > > > for
>>> > > > > > > > > >>> > now
>>> > > > > > > > > >>> > and go on with our project ; )
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > Kind Regards,
>>> > > > > > > > > >>> > Adriano Crestani
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
>>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>> > > Hi Adriano,
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to build
>>> the
>>> > > > > entire
>>> > > > > > > > > workspace
>>> > > > > > > > > >>> > from
>>> > > > > > > > > >>> > > your instructions. When running calculator-android
>>> as
>>> > > an
>>> > > > > > > "Android
>>> > > > > > > > > >>> > > application" I'm getting a ClassNotFoundException
>>> [1]
>>> > > for
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
>>> > > > > > > > > >>> > > Is the exception you referred to in your original
>>> > > email?
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > ...when
>>> > > > > > > > > >>> > > > you run the calculator-android project as an
>>> > "Android
>>> > > > > > > > > application"
>>> > > > > > > > > >>> you
>>> > > > > > > > > >>> > > > should get an exception, that was generated
>>> > initially
>>> > > > by
>>> > > > > a
>>> > > > > > > NPE
>>> > > > > > > > > >>> thrown
>>> > > > > > > > > >>> > by
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> >
>>> > > > > > > > >
>>> > > > > > >
>>> > > > >
>>> > >
>>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>>> > > > > > > > > >>> > > > constructor. This is caused because the latest
>>> > > Android
>>> > > > > SDK
>>> > > > > > > does
>>> > > > > > > > > not
>>> > > > > > > > > >>> > > support
>>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check
>>> > the
>>> > > > > > > @Reference
>>> > > > > > > > > >>> > > annotations
>>> > > > > > > > > >>> > > > (I commented the code which tries to read the
>>> > > > > annotations,
>>> > > > > > so
>>> > > > > > > > > when
>>> > > > > > > > > >>> the
>>> > > > > > > > > >>> > > > execution reach this constructor it throws the
>>> > NPE).
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > Searching for the class in the exception I'm
>>> getting
>>> > I
>>> > > > > found
>>> > > > > > > > > >>> > >
>>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
>>> > > In
>>> > > > > > > > > >>> > getServiceClasses
>>> > > > > > > > > >>> > > it loads the service class I'm getting problems
>>> with
>>> > > when
>>> > > > > > > running
>>> > > > > > > > > >>> > > calculator-android as an "Android application":
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > I couldn't find the corresponding java file in my
>>> > > > imported
>>> > > > > > > > > workspace
>>> > > > > > > > > >>> and
>>> > > > > > > > > >>> > > found that there is no package like
>>> > > > > > > > > >>> > >
>>> org.apache.tuscany.sca.contribution.processor.impl.
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > Am I missing something? Or are these the errors
>>> you
>>> > > would
>>> > > > > > > expect?
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > I would like to get to the point where I get the
>>> > > > exception
>>> > > > > > you
>>> > > > > > > > > >>> described
>>> > > > > > > > > >>> > > and
>>> > > > > > > > > >>> > > try to run retrotranslator from there. However, as
>>> > I'm
>>> > > > > using
>>> > > > > > > the
>>> > > > > > > > > ADT
>>> > > > > > > > > >>> > plugin
>>> > > > > > > > > >>> > > in eclipse I would need to extract code that
>>> > "declares
>>> > > or
>>> > > > > > > > analyzes
>>> > > > > > > > > >>> > > annotations you may extract it into a separate
>>> > library
>>> > > > that
>>> > > > > > can
>>> > > > > > > > be
>>> > > > > > > > > >>> > > processed
>>> > > > > > > > > >>> > > with Retrotranslator and added to the main
>>> project."
>>> > > That
>>> > > > > is,
>>> > > > > > > > > unless I
>>> > > > > > > > > >>> > use
>>> > > > > > > > > >>> > > Ant, in which case I would only need to add a few
>>> > lines
>>> > > > to
>>> > > > > > > > > build.xml.
>>> > > > > > > > > >>> I'm
>>> > > > > > > > > >>> > > continuing to look into this, any thoughts are
>>> more
>>> > > than
>>> > > > > > > welcome
>>> > > > > > > > > :-)
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > [1]
>>> > http://delftandroid.googlepages.com/14may2008.html
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani
>>> <
>>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > > Hi,
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > At first, I want to correct one mistake, on the
>>> > first
>>> > > > > step
>>> > > > > > I
>>> > > > > > > > > >>> described
>>> > > > > > > > > >>> > on
>>> > > > > > > > > >>> > > > my
>>> > > > > > > > > >>> > > > previous email, I should not have added the word
>>> > > > > "install",
>>> > > > > > > it
>>> > > > > > > > > >>> probably
>>> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
>>> > install"
>>> > > in
>>> > > > > the
>>> > > > > > > > > >>> downloaded
>>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step,
>>> the
>>> > > code
>>> > > > > > should
>>> > > > > > > > not
>>> > > > > > > > > be
>>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Simon:
>>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source
>>> > codes
>>> > > > are
>>> > > > > > > under
>>> > > > > > > > > CDDL
>>> > > > > > > > > >>> > 1.0
>>> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
>>> > license
>>> > > > > > header
>>> > > > > > > on
>>> > > > > > > > > each
>>> > > > > > > > > >>> > > file,
>>> > > > > > > > > >>> > > > and it's already done : )
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Jean:
>>> > > > > > > > > >>> > > > I think it is better to keep the code in the
>>> > sandbox
>>> > > > for
>>> > > > > > now.
>>> > > > > > > > At
>>> > > > > > > > > >>> first,
>>> > > > > > > > > >>> > > > it's
>>> > > > > > > > > >>> > > > not working on the current SCA modules revision
>>> > yet.
>>> > > > And
>>> > > > > > > also,
>>> > > > > > > > > I'm
>>> > > > > > > > > >>> > > > commenting many lines at some modules just to
>>> get a
>>> > > > > "first
>>> > > > > > > run"
>>> > > > > > > > > of
>>> > > > > > > > > >>> > > > calculator-sample to further evaluate why and
>>> how
>>> > > this
>>> > > > > > > > commented
>>> > > > > > > > > >>> lines
>>> > > > > > > > > >>> > > will
>>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA Java
>>> and
>>> > > SCA
>>> > > > > > > > Android.
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Oscar:
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > - Are host-android and core-android a part of
>>> > > > > > > > calculator-android?
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > What do you mean when you say "part"? They are
>>> used
>>> > > by
>>> > > > > > > > > >>> > > calculator-android,
>>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
>>> modules
>>> > in
>>> > > > > future
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > - Should the calculator-android included in [1]
>>> > have
>>> > > > > > included
>>> > > > > > > > an
>>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
>>> > eclipse
>>> > > > > > project
>>> > > > > > > > > files
>>> > > > > > > > > >>> of
>>> > > > > > > > > >>> > > > these
>>> > > > > > > > > >>> > > > projects. I have already commited these files
>>> and
>>> > if
>>> > > > you
>>> > > > > > > update
>>> > > > > > > > > your
>>> > > > > > > > > >>> > > trunk
>>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones you
>>> have
>>> > > > > > created.
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
>>> > something
>>> > > > else
>>> > > > > > > > needed
>>> > > > > > > > > in
>>> > > > > > > > > >>> > > > addition
>>> > > > > > > > > >>> > > > to including the Android Library?
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > No, the Android library is really simples, it
>>> only
>>> > > > > contains
>>> > > > > > > the
>>> > > > > > > > > >>> > > android.jar
>>> > > > > > > > > >>> > > > file located in your Android SDK.
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and
>>> "mvn
>>> > > > > -Peclipse
>>> > > > > > > > > >>> > > > eclipse:eclipse"
>>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
>>> project
>>> > > > files
>>> > > > > > are
>>> > > > > > > > > already
>>> > > > > > > > > >>> in
>>> > > > > > > > > >>> > > > modules and you should build the modules using
>>> the
>>> > > > > eclipse
>>> > > > > > > for
>>> > > > > > > > > now.
>>> > > > > > > > > >>> The
>>> > > > > > > > > >>> > > > maven config files are not updated yet with the
>>> > > > > > modifications
>>> > > > > > > I
>>> > > > > > > > > have
>>> > > > > > > > > >>> > done
>>> > > > > > > > > >>> > > > on
>>> > > > > > > > > >>> > > > these modules, so they will not generate the
>>> > correct
>>> > > > > > project
>>> > > > > > > > > files,
>>> > > > > > > > > >>> > > worse,
>>> > > > > > > > > >>> > > > they will override the ones I have created.
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Then, clean and build your entire workspace, if
>>> you
>>> > > > still
>>> > > > > > get
>>> > > > > > > > any
>>> > > > > > > > > >>> > errors,
>>> > > > > > > > > >>> > > > let me know ; )
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'?
>>> Or,
>>> > > why
>>> > > > > > should
>>> > > > > > > > > this
>>> > > > > > > > > >>> not
>>> > > > > > > > > >>> > be
>>> > > > > > > > > >>> > > > imported?
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > It seems the revision I suggested already had
>>> the
>>> > > saxon
>>> > > > > > > module
>>> > > > > > > > > >>> removed
>>> > > > > > > > > >>> > > from
>>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one
>>> that
>>> > > > > > shouldn´t.
>>> > > > > > > > > Please,
>>> > > > > > > > > >>> > > import
>>> > > > > > > > > >>> > > > the databinding-saxon module again into your
>>> > > workspace.
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > Regards,
>>> > > > > > > > > >>> > > > Adriano Crestani
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > [1] -
>>> > > > > > > > >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
>>> > > > > > > > > >>> > > > >
>>> > > > > > > > > >>> > > > [2] -
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
>>> > > > Delfino
>>> > > > > <
>>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > > > > Mike Edwards wrote:
>>> > > > > > > > > >>> > > > >
>>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
>>> > > > > > > > > >>> > > > > > >
>>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from [1]
>>> and
>>> > > > > > installed
>>> > > > > > > > as
>>> > > > > > > > > >>> shown
>>> > > > > > > > > >>> > > > > > > > below:
>>> > > > > > > > > >>> > > > > > > >
>>> > > > > > > > > >>> > > > > > > > svn checkout
>>> > > > > > > > > >>> > > > > > > >
>>> > > > > > > > >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>>> > > > > > > > > >>> > > > > > > >
>>> > > > > > > > > >>> > > > > > > > cd mobile-android
>>> > > > > > > > > >>> > > > > > > >
>>> > > > > > > > > >>> > > > > > > >
>>> > > > > > > > > >>> > > > > > > If there's no objection from others, I'd
>>> be
>>> > > happy
>>> > > > > to
>>> > > > > > > see
>>> > > > > > > > > this
>>> > > > > > > > > >>> > code
>>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now have
>>> > > several
>>> > > > > > > people
>>> > > > > > > > > doing
>>> > > > > > > > > >>> > > > development
>>> > > > > > > > > >>> > > > > > > on this android integration.
>>> > > > > > > > > >>> > > > > > >
>>> > > > > > > > > >>> > > > > > > Adriano, you could start with something
>>> like
>>> > > > > > > > > >>> > trunk/java/sca/android
>>> > > > > > > > > >>> > > > > > > and later progressively try to converge
>>> the
>>> > > code
>>> > > > > with
>>> > > > > > > the
>>> > > > > > > > > code
>>> > > > > > > > > >>> in
>>> > > > > > > > > >>> > > > trunk,
>>> > > > > > > > > >>> > > > > > > with architected plug points for the
>>> android
>>> > > > > specific
>>> > > > > > > > code
>>> > > > > > > > > >>> etc.
>>> > > > > > > > > >>> > > > > > >
>>> > > > > > > > > >>> > > > > > > Thoughts?
>>> > > > > > > > > >>> > > > > > >
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not also
>>> > imply
>>> > > > > > "making
>>> > > > > > > > > part
>>> > > > > > > > > >>> of
>>> > > > > > > > > >>> > the
>>> > > > > > > > > >>> > > > > > main build"?
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental code
>>> > > > entering
>>> > > > > > the
>>> > > > > > > > > build
>>> > > > > > > > > >>> at
>>> > > > > > > > > >>> > > this
>>> > > > > > > > > >>> > > > > > stage.
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > > > Yours,  Mike.
>>> > > > > > > > > >>> > > > > >
>>> > > > > > > > > >>> > > > >
>>> > > > > > > > > >>> > > > > I think it's business as usual, code that
>>> doesn't
>>> > > > work
>>> > > > > > does
>>> > > > > > > > not
>>> > > > > > > > > go
>>> > > > > > > > > >>> in
>>> > > > > > > > > >>> > > the
>>> > > > > > > > > >>> > > > > main build, code that's getting stable can go
>>> in
>>> > > the
>>> > > > > main
>>> > > > > > > > build
>>> > > > > > > > > at
>>> > > > > > > > > >>> > some
>>> > > > > > > > > >>> > > > > point when people have no specific objections,
>>> > and
>>> > > > > > > different
>>> > > > > > > > > >>> profiles
>>> > > > > > > > > >>> > > can
>>> > > > > > > > > >>> > > > be
>>> > > > > > > > > >>> > > > > used to subset particular builds.
>>> > > > > > > > > >>> > > > >
>>> > > > > > > > > >>> > > > > --
>>> > > > > > > > > >>> > > > > Jean-Sebastien
>>> > > > > > > > > >>> > > > >
>>> > > > > > > > > >>> > > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > --
>>> > > > > > > > > >>> > > best,
>>> > > > > > > > > >>> > > -oscar
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> > > Oscar Castañeda
>>> > > > > > > > > >>> > >
>>> > > > > > > > > >>> >
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> --
>>> > > > > > > > > >>> best,
>>> > > > > > > > > >>> -oscar
>>> > > > > > > > > >>>
>>> > > > > > > > > >>> Oscar Castañeda
>>> > > > > > > > > >>>
>>> > > > > > > > > >>
>>> > > > > > > > > >>
>>> > > > > > > > > >
>>> > > > > > > > >
>>> > > > > > > > >
>>> > > > > > > > >
>>> > > > > > > > > --
>>> > > > > > > > > Luciano Resende
>>> > > > > > > > > Apache Tuscany Committer
>>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
>>> <http://people.apache.org/%7Elresende>
>>> > <http://people.apache.org/%7Elresende>
>>> > > <http://people.apache.org/%7Elresende>
>>> > > > <http://people.apache.org/%7Elresende>
>>> > > > > <http://people.apache.org/%7Elresende>
>>> > > > > > <http://people.apache.org/%7Elresende>
>>> > > > > > > <http://people.apache.org/%7Elresende><
>>> > > > > > > > http://people.apache.org/%7Elresende>
>>> > > > > > > > > http://lresende.blogspot.com/
>>> > > > > > > > >
>>> > > > > > > >
>>> > > > > > >
>>> > > > > > >
>>> > > > > > >
>>> > > > > > > --
>>> > > > > > > best,
>>> > > > > > > -oscar
>>> > > > > > >
>>> > > > > > > Oscar Castañeda
>>> > > > > > >
>>> > > > > >
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > > --
>>> > > > > best,
>>> > > > > -oscar
>>> > > > >
>>> > > > > Oscar Castañeda
>>> > > > >
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > best,
>>> > > -oscar
>>> > >
>>> > > Oscar Castañeda
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> best,
>>> -oscar
>>>
>>> Oscar Castañeda
>>>
>>
>>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Ah, here is a tip to assure the classes are not recompiled again. Build the
project, then go in each project builder (in the properties window) and
disable all the builders, then not even a clean/build will modify your
project ; )

On Fri, Jun 6, 2008 at 5:38 PM, Adriano Crestani <ad...@apache.org>
wrote:

> Hi Oscar,
>
> I say that it is more difficult to debug because you need attach a source
> code to each jar and etc, and when you are using projects, eclipse already
> knows where to find the source code : )
>
> The reply made sense to me, especially with regards to the fact that with
> the Android plugin Eclipse compiles sources into classes and then into dex
> files, so retrotranslator has no chance to translate classes in between
> these steps - even if I do that outside of Eclipse. This shows from the use
> of non-translated binaries (as indicated by the
> java.lang.Class.isAnnotationPr
> esent(Class.java:1131) error in the stack
> trace) that might have been related to the use of pre-existing dex files or
> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> result would still be the same, even if I use a simpler scenario.
>
> Sorry, I really did not comment this email yet. It does not make so much
> sense for me. First, as you already know, eclipse android projects does not
> recognize any modifications in the imported projects, so it does not call
> the build or incremental build even if the imported projects have their
> source code modified. Just to make sure I tested it again:
>
> 1-  imported in my workspace all the projects included in the
> calculator-android, cleaned and built them...it takes a loooong time, as you
> already know.
>
> 2- imported the calculator-android project, cleaned and built it (only the
> calculator-android project), and this process was too much faster than when
> all the modules are built, so the imported projects were not recompiled,
> otherwise it would take too much more time. I suppose here that the android
> project compiles the .java contained in the android project and convert all
> the .class files (generated by imported projects and android project) to dex
> format.
>
> So, it does not recompile the external class files (the ones contained in
> the imported projects) cause it seems not to check if it was modified or
> not. Of course, I never tested it modifing the .class files, I'm just
> assuming that, because when you modify .java files it does not get
> recompiled.
>
> What do you think?
>
> As I mentioned before, your comments are really helpful as they give me a
> sense of direction. Please let me know if you still think we should pursue
> retrotranslator for files inside a folder.
>
> I really think you should try at first the simpler scenario and try to
> understand how it works and IF it works. Also, you can try what you were
> planning: to retrotranslate the each modules' jar, but I suppose it's a lot
> of work, because there are so many modules :S. So, as I've already said, if
> you think it's getting to complicated, forget it and go on with Luciano's
> suggestion.
>
> Feel free to choose the direction you want to take, and if there is another
> approach you think is better, just let us know ; )...you are the best person
> to choose the directions, cause you are working directly on it, we are just
> guinding/helping you ; )
>
> Thanks,
> Adriano Crestani
>
>
> On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
>> Hi Adriano,
>>
>> If there is an option on retrotranslator to retrotranslate all the classes
>> > in a folder, it should work as well as it works on classes inside .jar
>> > files. So, I think you should try to understand why your first approach
>> > (retrotranslating the eclipse project classes) is not working trying a
>> > simpler scenario. Have you already tried it?
>> >
>>
>> I agree that it's good to try out a simpler scenario to better understand
>> the problem. I haven't tried it yet because using retrotranslator for
>> classes inside a folder doesn't seem to be a solution to the problem.
>> Here's
>> my reasoning:
>>
>> Yes, there is an option to translate classes in a folder. I tried it and
>> it
>> successfully translated the classes inside my Eclipse workspace. When I
>> ran
>> the calculator-android application using the newly translated classes I
>> was
>> getting the errors in [1]. I posted a question in Android Developers about
>> this error and received a reply [2].
>>
>> The reply made sense to me, especially with regards to the fact that with
>> the Android plugin Eclipse compiles sources into classes and then into dex
>> files, so retrotranslator has no chance to translate classes in between
>> these steps - even if I do that outside of Eclipse. This shows from the
>> use
>> of non-translated binaries (as indicated by the
>> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
>> trace) that might have been related to the use of pre-existing dex files
>> or
>> over-writing of files by Eclipse. So unless I modify the ADT plugin the
>> result would still be the same, even if I use a simpler scenario.
>>
>> The reply suggested to use JAR's instead. This also made sense to me and
>> seemed like a simpler way of solving the problem. I didn't see the
>> disadvantage of debugging, which as you point out is more difficult with
>> JAR's instead of Eclipse projects.
>>
>> As I mentioned before, your comments are really helpful as they give me a
>> sense of direction. Please let me know if you still think we should pursue
>> retrotranslator for files inside a folder.
>>
>>
>> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
>> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>>
>> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
>> adrianocrestani@apache.org>
>> wrote:
>>
>> > Hi Oscar,
>> >
>> > Yup, you're right - there are indeed Eclipse files inside the folders. I
>> > guess I was confused by the different names in [1] than those that
>> result
>> > [2] from importing to an Eclipse workspace - after which I see 13
>> projects
>> > in both cases. So please ignore my previous remark.
>> >
>> > I have added the projects, but still haven't changed their names. I was
>> > planning to modify their project names when we get it integrated to SCA,
>> > mainly because we will need to change the poms. Anyway, feel free to
>> modify
>> > the names whenever you want ; )
>> >
>> >
>> > Per the reply I received on the Android Developers list [3] I started
>> using
>> > retrotranslator on JAR's instead of class files. For this I created a
>> big
>> > JAR file with all the Tuscany modules (including those you modified for
>> > Android). I translated this big JAR (around 15MB) with retrotranslator
>> [4].
>> > Then I created a new workspace with only calculator-android and
>> > android-jdk-classes as projects and added the translated JAR as an
>> external
>> > library for both projects. This resulted in errors [4] from the Android
>> > build process.
>> >
>> > I really do not understand this errors, but as this errors are only
>> related
>> > to testcase classes they can be ignored (removed from the jars). I also
>> did
>> > not understand why it's not find the .apk file:
>> >
>> > "[2008-06-06 12:52:49 - calculator-android] Could not find
>> > /bin/calculator-android.apk!"
>> >
>> > To work around these errors I decided to take a different approach and
>> copy
>> > all the jar files contained in the individual modules to a separate
>> folder
>> > and then run retrotranslator on each JAR. The jars are found inside the
>> > target folder of each module and are named as shown below:
>> >
>> > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> >
>> > From this I found that only the SCA modules have these JAR files inside
>> > their respective target folders, whereas the Android modules I
>> downloaded
>> > from [1] don't have these files at all
>> >
>> > Yep, this .jars are generated when the maven is executed. I'm not sure
>> if
>> > you should use this .jars, because they were compiled with no reference
>> to
>> > Android library. That's also why there are no .jar files for android
>> > modules, because you did not execute the maven on them  (and you
>> > shouldn't).
>> >
>> > So I decided to keep the Android
>> > modules [2] and add the translated JARs as libraries where needed to
>> have
>> > the workspace build with no problems. If I get this running I would look
>> > into creating JAR files from the Android modules and then return to only
>> > having calculator-android and android-jdk-classes as projects and the
>> rest
>> > as JAR's added as external libraries. If this works out I could then
>> look
>> > into seeing which JAR's are important and which are not, in this way
>> > reducing the total memory footprint and coming up with a "lightweight
>> > mobile
>> > SCA core/runtime." Please let me know your thoughts on these efforts.
>> >
>> > You haven't tried this yet, right? You may try it, but I do not like
>> this
>> > approach, because it will get difficult to debug sca classes as they are
>> > not
>> > imported as eclipse projects.
>> >
>> > If there is an option on retrotranslator to retrotranslate all the
>> classes
>> > in a folder, it should work as well as it works on classes inside .jar
>> > files. So, I think you should try to understand why your first approach
>> > (retrotranslating the eclipse project classes) is not working trying a
>> > simpler scenario. Have you already tried it?
>> >
>> > Also, if the restrotranslator gets to complicated, you may try the
>> > Luciano's
>> > suggestion ; )
>> >
>> >
>> > Kind Regards,
>> > Adriano Crestani
>> >
>> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> >
>> > > Hi Adriano,
>> > >
>> > >
>> > > > Yep, they should be imported, if you check inside its folders, there
>> > are
>> > > > the
>> > > > eclipse project files, so they should be identified by the eclipse
>> > import
>> > > > tool as an eclipse project.
>> > >
>> > >
>> > > Yup, you're right - there are indeed Eclipse files inside the folders.
>> I
>> > > guess I was confused by the different names in [1] than those that
>> result
>> > > [2] from importing to an Eclipse workspace - after which I see 13
>> > projects
>> > > in both cases. So please ignore my previous remark.
>> > >
>> > > I don't think introspection is a good solution, hence you will need to
>> > > > change how the sca reads the info about each service and also
>> services
>> > > > implemented for JVM would need to be adapted to run on Android.
>> Let's
>> > > avoid
>> > > > to modify so much the SCA code, and lets try to keep retrotranslator
>> in
>> > > > mind
>> > > > as a temporary workaround for annotations till next SDK release :S
>> > >
>> > >
>> > > >  Also, if you get the retrotranslator working, forget the Luciano's
>> > > > suggestion and vice-versa...do not try both at the same time ; )
>> > > >
>> > >
>> > > Will do. Thanks for the advice it helps me to focus in the right
>> > direction
>> > > :-)
>> > >
>> > > Now, a summary of what I've done up to now:
>> > >
>> > > Per the reply I received on the Android Developers list [3] I started
>> > using
>> > > retrotranslator on JAR's instead of class files. For this I created a
>> big
>> > > JAR file with all the Tuscany modules (including those you modified
>> for
>> > > Android). I translated this big JAR (around 15MB) with retrotranslator
>> > [4].
>> > > Then I created a new workspace with only calculator-android and
>> > > android-jdk-classes as projects and added the translated JAR as an
>> > external
>> > > library for both projects. This resulted in errors [4] from the
>> Android
>> > > build process.
>> > >
>> > > To work around these errors I decided to take a different approach and
>> > copy
>> > > all the jar files contained in the individual modules to a separate
>> > folder
>> > > and then run retrotranslator on each JAR. The jars are found inside
>> the
>> > > target folder of each module and are named as shown below:
>> > >
>> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
>> > >
>> > > From this I found that only the SCA modules have these JAR files
>> inside
>> > > their respective target folders, whereas the Android modules I
>> downloaded
>> > > from [1] don't have these files at all. So I decided to keep the
>> Android
>> > > modules [2] and add the translated JARs as libraries where needed to
>> have
>> > > the workspace build with no problems. If I get this running I would
>> look
>> > > into creating JAR files from the Android modules and then return to
>> only
>> > > having calculator-android and android-jdk-classes as projects and the
>> > rest
>> > > as JAR's added as external libraries. If this works out I could then
>> look
>> > > into seeing which JAR's are important and which are not, in this way
>> > > reducing the total memory footprint and coming up with a "lightweight
>> > > mobile
>> > > SCA core/runtime." Please let me know your thoughts on these efforts.
>> > >
>> > >
>> > > [1]
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
>> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
>> > > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>> > > [4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>> > >
>> > >
>> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
>> > > adrianocrestani@apache.org>
>> > > wrote:
>> > >
>> > > > Hi Oscar,
>> > > >
>> > > >
>> > > > When I imported the projects from [3] the following projects were
>> not
>> > > > imported:
>> > > >
>> > > > core-android
>> > > > host-android
>> > > > extensibility
>> > > >
>> > > > Is this normal? Should they be imported?
>> > > >
>> > > > Yep, they should be imported, if you check inside its folders, there
>> > are
>> > > > the
>> > > > eclipse project files, so they should be identified by the eclipse
>> > import
>> > > > tool as an eclipse project.
>> > > >
>> > > > Thanks for the detailed explanation. I'm going to give this a try as
>> I
>> > > > found
>> > > > an introspection related comment [2] as a workaround to another
>> > > annotations
>> > > > problem with the current SDK.
>> > > >
>> > > > I don't think introspection is a good solution, hence you will need
>> to
>> > > > change how the sca reads the info about each service and also
>> services
>> > > > implemented for JVM would need to be adapted to run on Android.
>> Let's
>> > > avoid
>> > > > to modify so much the SCA code, and lets try to keep retrotranslator
>> in
>> > > > mind
>> > > > as a temporary workaround for annotations till next SDK release :S
>> > > >
>> > > > Also, if you get the retrotranslator working, forget the Luciano's
>> > > > suggestion and vice-versa...do not try both at the same time ; )
>> > > >
>> > > > Any progress testing retrotranslator on a simpler scenario, just let
>> us
>> > > > know
>> > > > ; )
>> > > >
>> > > > Kind Regards,
>> > > > Adriano Crestani
>> > > >
>> > > >
>> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
>> > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > >
>> > > > > Hi Adriano,
>> > > > >
>> > > > > At first, build a simple, but equivalent scenario, and test it.
>> > > > >
>> > > > >
>> > > > > I think this is a great idea, especially because I found that the
>> > > "native
>> > > > > method not implemented" errors I'm getting [1] are still related
>> to
>> > the
>> > > > > annotations problem. I'm getting the same errors when converting
>> the
>> > > code
>> > > > > to
>> > > > > java 1.4. This makes me think that retrotranslator is actually not
>> > > > working.
>> > > > > Hopefully, testing with a simpler scenario will help me to
>> understand
>> > > the
>> > > > > problem better.
>> > > > >
>> > > > > Sorry for the not-well-detailed info here. I meant you to do:
>> > > > > >
>> > > > > > Search in every sca code for the usage of
>> Class.isAnnotationPresent
>> > > or
>> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
>> > > > > @Remotable
>> > > > > > annotations force it to true, for example:
>> > > > > >
>> > > > > > Annotation isRemotable = class.isAnnotationPresent
>> > > > > >>
>> > > > > >> (Remotable.class); =>
>> > > > > >> Annotation isRemotable = true;
>> > > > > >>
>> > > > > >> otherwise, which means, when it's not checking for the
>> @Remotable
>> > > > > >> annnotation, force to false. For example:
>> > > > > >>
>> > > > > >> Annotation isReference =
>> > class.isAnnotationPresent(Reference.class);
>> > > > =>
>> > > > > >> Annotation isReference = false;
>> > > > > >
>> > > > > >
>> > > > >
>> > > > > Thanks for the detailed explanation. I'm going to give this a try
>> as
>> > I
>> > > > > found
>> > > > > an introspection related comment [2] as a workaround to another
>> > > > annotations
>> > > > > problem with the current SDK.
>> > > > >
>> > > > > Also, I have another question for you...
>> > > > >
>> > > > > When I imported the projects from [3] the following projects were
>> not
>> > > > > imported:
>> > > > >
>> > > > > core-android
>> > > > > host-android
>> > > > > extensibility
>> > > > >
>> > > > > Is this normal? Should they be imported?
>> > > > >
>> > > > >
>> > > > > [1]
>> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > > > [2]
>> > > > >
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
>> > > > > [3]
>> > > > >
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > > >
>> > > > >
>> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
>> > > > > adrianocrestani@apache.org>
>> > > > > wrote:
>> > > > >
>> > > > > > Well detailed Oscar ; )
>> > > > > >
>> > > > > > It is one thing I learnt after playing hours with Android, you
>> need
>> > > to
>> > > > > > rebuild every modified project which is imported in the android
>> > > > project,
>> > > > > > the
>> > > > > > android project itself does not check for modifications on its
>> > > > > dependencies
>> > > > > > :S...so, when you rebuilt the imported project it recompiled the
>> > > > > > uncommented
>> > > > > > code at JavaRuntimeModuleActivator and the SCA started to check
>> for
>> > > > > > annotations once again, so you got the errors on [1], which
>> means
>> > > > > > retrotranslator is still not working. Have you tested it on a
>> > simpler
>> > > > > > application as I previously suggested? Did it work? What was the
>> > most
>> > > > > > critical scenario you tested it and it worked?
>> > > > > >
>> > > > > > " Voyager-2:30May ocastaneda$ java -jar
>> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
>> > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
>> > > > > >
>> > > > > > You should also check if it's is working as expected, as I
>> already
>> > > > said,
>> > > > > > does not go directly testing complex solutions on complex things
>> > like
>> > > > > SCA.
>> > > > > > At first, build a simple, but equivalent scenario, and test it.
>> For
>> > > > > > example,
>> > > > > > a simple android app project that uses an java library project
>> > which
>> > > > > access
>> > > > > > annotations on classes placed on the android project. Like our
>> > > android
>> > > > > > calculator, it's an android app project (calculator-android)
>> which
>> > > uses
>> > > > > > java
>> > > > > > library projects (sca modules), and these libraries checks for
>> > > > > annotations
>> > > > > > on classes located at the android app project
>> > > (CalculatorService.java,
>> > > > > > AddService.java, etc). When you get it working on the simpler
>> > > scenario,
>> > > > > > then
>> > > > > > you are ready to test it on the complexer sceneario
>> > > > (calculator-android).
>> > > > > >
>> > > > > > Please, if you get the retrotranslator working in the simpler
>> > > scenario,
>> > > > > > send
>> > > > > > us a patch with it. You can create a JIRA and attach it. If you
>> > need
>> > > > any
>> > > > > > help, just ask ; )
>> > > > > >
>> > > > > > "code that checks for @Remotable you force to true, otherwise
>> force
>> > > to
>> > > > > > false."
>> > > > > >
>> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
>> > > > > >
>> > > > > > Search in every sca code for the usage of
>> Class.isAnnotationPresent
>> > > or
>> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
>> > > > > @Remotable
>> > > > > > annotations force it to true, for example:
>> > > > > >
>> > > > > > Annotation isRemotable =
>> > class.isAnnotationPresent(Remotable.class);
>> > > =>
>> > > > > > Annotation isRemotable = true;
>> > > > > >
>> > > > > > otherwise, which means, when it's not checking for the
>> @Remotable
>> > > > > > annnotation, force to false. For example:
>> > > > > >
>> > > > > > Annotation isReference =
>> > class.isAnnotationPresent(Reference.class);
>> > > =>
>> > > > > > Annotation isReference = false;
>> > > > > >
>> > > > > > [1] -
>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > > > >
>> > > > > > Kind Regards,
>> > > > > > Adriano Crestani
>> > > > > >
>> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
>> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > > > >
>> > > > > > > Hi Adriano,
>> > > > > > >
>> > > > > > > I continued testing retrotranslator. Here's what I've done up
>> to
>> > > now.
>> > > > > > >
>> > > > > > > 1. Downloaded the modified code from [1].
>> > > > > > >
>> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
>> below:
>> > > > > > >
>> > > > > > > svn checkout --revision 643746
>> > > > > > >
>> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>> > > > > > >
>> > > > > > > cd modules
>> > > > > > >
>> > > > > > > mvn clean install -Dtest=no
>> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
>> > > > > > >
>> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
>> variable
>> > as
>> > > > > shown
>> > > > > > > below:
>> > > > > > >
>> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
>> > eclipse:add-maven-repo
>> > > > > > >
>> > > > > > >  4. Adjusted buildpath to eliminate build errors, added
>> Android
>> > > > library
>> > > > > > to
>> > > > > > > required modules, fixed references to jar files and other
>> > > libraries.
>> > > > > > >
>> > > > > > > 5. Uncommented lines in
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > >
>> > > > > > > 6. Ran retrotranslator as instructed on the project site [3]
>> and
>> > > > shown
>> > > > > > > below:
>> > > > > > >
>> > > > > > > Voyager-2:30May ocastaneda$ java -jar
>> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir
>> /../workspace
>> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
>> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
>> > > > > > >
>> > > > > > >  The output can be found in [4].
>> > > > > > > 7. Rebuilt project after uncommenting lines in
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > >
>> > > > > > > and then re-ran retrotranslator.
>> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and Android
>> > > errors
>> > > > in
>> > > > > > > [6].
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > As always, I'm documenting my progress on the project log. I
>> > > haven't
>> > > > > > fully
>> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by what
>> you
>> > > > mean
>> > > > > by
>> > > > > > > this:
>> > > > > > >
>> > > > > > > "code that checks for @Remotable you force to true, otherwise
>> > force
>> > > > to
>> > > > > > > false."
>> > > > > > >
>> > > > > > > I'll continue looking into it and hopefully get
>> retrotranslator
>> > to
>> > > > > work.
>> > > > > > I
>> > > > > > > also think it's a simpler option.
>> > > > > > >
>> > > > > > > Luciano: Thanks for your suggestions.
>> > > > > > >
>> > > > > > > [1]
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > > > > >
>> > > > > > > [2]
>> > > > >
>> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>> > > > > > >
>> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
>> > > > > > >
>> > > > > > > [4]
>> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
>> > > > > > >
>> > > > > > > [5]
>> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
>> > > > > > >
>> > > > > > >
>> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
>> > > > > > > adrianocrestani@apache.org> wrote:
>> > > > > > >
>> > > > > > > > Hi,
>> > > > > > > >
>> > > > > > > > I tried what Luciano suggested. It really works. To get it
>> > > working
>> > > > > you
>> > > > > > > > simply need to search on all modules where the code checks
>> for
>> > > > > > @Remotable
>> > > > > > > > annotation and force it to true:
>> > > > > > > >
>> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
>> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
>> > > > > > > >
>> > > > > > > > It works fine on the sca revision we are testing on Android
>> and
>> > > the
>> > > > > > most
>> > > > > > > > recent revision. I only tested it as a java application, not
>> as
>> > > an
>> > > > > > > android
>> > > > > > > > application.
>> > > > > > > >
>> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster
>> and
>> > > > simpler
>> > > > > > > > solution. Because the Luciano's suggestion only forces the
>> SCA
>> > to
>> > > > > > > recognize
>> > > > > > > > the services with no annotations declared on their
>> interfaces,
>> > > but
>> > > > it
>> > > > > > > does
>> > > > > > > > not avoid the Exceptions we are getting when the SCA invokes
>> > > > methods
>> > > > > > that
>> > > > > > > > read annotations. So, our current problem is that we are not
>> > > being
>> > > > > able
>> > > > > > > to
>> > > > > > > > use these methods and not only because we are not being able
>> to
>> > > > read
>> > > > > > the
>> > > > > > > > annotations.
>> > > > > > > >
>> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you will
>> > need
>> > > > to
>> > > > > > > > comment/adapt every sca code that tries to read the class
>> > > > > annotations.
>> > > > > > It
>> > > > > > > > is
>> > > > > > > > not necessary to comment/adapt the methods that read Method
>> > > > > > annotations,
>> > > > > > > > they are not throwning any exception. So, every code that
>> > checks
>> > > > for
>> > > > > > > > @Remotable you force to true, otherwise force to false.
>> > > > > > > >
>> > > > > > > > Any doubt about what I have said, just let me know ; )
>> > > > > > > >
>> > > > > > > > Suggestions are welcome : )
>> > > > > > > >
>> > > > > > > > Adriano Crestani
>> > > > > > > >
>> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
>> > > > > > luckbr1975@gmail.com>
>> > > > > > > > wrote:
>> > > > > > > >
>> > > > > > > > > FYI, if you comment out the code that checks if a
>> interface
>> > is
>> > > > > > > > > remoteble, you could have a version of the calculator
>> without
>> > > any
>> > > > > > > > > annotations, and the runtime would introspect the
>> references
>> > > for
>> > > > > the
>> > > > > > > > > multiple services. But note that, the introspection code
>> will
>> > > > only
>> > > > > be
>> > > > > > > > > activated if there is no SCA annotations on the class.
>> > > > > > > > >
>> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
>> > > > > > > > > <ad...@apache.org> wrote:
>> > > > > > > > > > Ah, the expected exception should look like this on
>> android
>> > > > > > emulator:
>> > > > > > > > > >
>> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg
>> >
>> > > > > > <
>> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > > > > > <
>> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > > > > > > <
>> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
>> > > > > > > > > >
>> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
>> > > > > > > > > > adrianocrestani@apache.org> wrote:
>> > > > > > > > > >
>> > > > > > > > > >> Hi Oscar,
>> > > > > > > > > >>
>> > > > > > > > > >> I was indeed using the sca modules not from the
>> sandbox.
>> > As
>> > > > you
>> > > > > > > > > suggested,
>> > > > > > > > > >> I
>> > > > > > > > > >> removed the tuscany-contribution-impl from my workspace
>> > and
>> > > > > added
>> > > > > > > the
>> > > > > > > > > >> version you uploaded to the sandbox. Then, I
>> uncommented
>> > the
>> > > > > lines
>> > > > > > > in
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > > > > >>
>> > > > > > > > > >> following the comments pointing out why those lines had
>> > been
>> > > > > > > > commented.
>> > > > > > > > > I'm
>> > > > > > > > > >> no longer getting the ClassNotFoundException. However,
>> > it's
>> > > > > > getting
>> > > > > > > > > stuck
>> > > > > > > > > >> somewhere else (before getting there I guess)...I think
>> > this
>> > > > is
>> > > > > > the
>> > > > > > > > case
>> > > > > > > > > >> because before and after commenting the code I get the
>> > same
>> > > > > error
>> > > > > > in
>> > > > > > > > the
>> > > > > > > > > >> Android emulator, an InstantiationException [1].
>> > > > > > > > > >>
>> > > > > > > > > >> Have you debugged to check exactly where this exception
>> is
>> > > > being
>> > > > > > > > thrown?
>> > > > > > > > > I
>> > > > > > > > > >> have done the procedure I previously described  again
>> and
>> > I
>> > > > got
>> > > > > it
>> > > > > > > > > "running"
>> > > > > > > > > >> as expected, which means, running till the expected
>> > > exception
>> > > > is
>> > > > > > > > thrown.
>> > > > > > > > > >>
>> > > > > > > > > >> I also started tinkering with retrotranslator. First I
>> > tried
>> > > > > doing
>> > > > > > > it
>> > > > > > > > > with
>> > > > > > > > > >> Ant, but it seems that in order to build I have to
>> include
>> > > the
>> > > > > > whole
>> > > > > > > > > >> tuscany
>> > > > > > > > > >> projects in a way similar to how I now have in Eclipse.
>> I
>> > > also
>> > > > > > tried
>> > > > > > > > > making
>> > > > > > > > > >> a jar out of
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > > > > >>
>> > > > > > > > > >> and then feeding it to retrotranslator but
>> unfortunately
>> > > it's
>> > > > > not
>> > > > > > > > > >> translating anything, as shown below.
>> > > > > > > > > >>
>> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
>> > > > > > > > > >> .6-bin ocastaneda$ java -jar
>> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
>> > > > > > > > > >> JavaRuntimeModuleActivator.jar
>> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
>> > > > > > > > > >> retrotranslator-android-1.2.6.jar
>> > > > > > > > > >> Processing 136 file(s) in
>> JavaRuntimeModuleActivator.jar.
>> > > > > > > > > >> Transformed 0 file(s).
>> > > > > > > > > >>
>> > > > > > > > > >> There's also a maven plugin, so I might try that...but
>> > first
>> > > > > I'll
>> > > > > > > give
>> > > > > > > > > Ant
>> > > > > > > > > >> another go. Hopefully Google will release a new SDK
>> soon,
>> > > > > > otherwise
>> > > > > > > as
>> > > > > > > > > you
>> > > > > > > > > >> say...retrotranslator will have to be the workaround to
>> > > > proceed
>> > > > > > with
>> > > > > > > > our
>> > > > > > > > > >> project ;-)
>> > > > > > > > > >>
>> > > > > > > > > >> Unfortunately the rumors say the new SDK version will
>> not
>> > be
>> > > > > > > released
>> > > > > > > > > until
>> > > > > > > > > >> july 28th :S. So, it's really good you have already
>> > started
>> > > > > > working
>> > > > > > > on
>> > > > > > > > > the
>> > > > > > > > > >> retrotranslator, it will probably be the best
>> workaround
>> > for
>> > > > the
>> > > > > > > > > annotations
>> > > > > > > > > >> problem till the next SDK release.
>> > > > > > > > > >>
>> > > > > > > > > >> I suggest you to forget about the build process right
>> now,
>> > > > > before,
>> > > > > > > > check
>> > > > > > > > > if
>> > > > > > > > > >> this retrotranslator works and if it really works on
>> > android
>> > > > > > > platform.
>> > > > > > > > > I´m
>> > > > > > > > > >> really getting upset with Android, even its API methods
>> > does
>> > > > not
>> > > > > > > work
>> > > > > > > > as
>> > > > > > > > > >> expected :@. Anyway, try initially to compile a simple
>> > class
>> > > > > > (coded
>> > > > > > > by
>> > > > > > > > > you),
>> > > > > > > > > >> which contains annotations, and access these
>> annotations.
>> > If
>> > > > it
>> > > > > > > works,
>> > > > > > > > > make
>> > > > > > > > > >> it more complex and test again, do it until you reach a
>> > > > scenario
>> > > > > > as
>> > > > > > > > > complex
>> > > > > > > > > >> as the SCA (a lot of external jars with annotated
>> classes
>> > > > > accessed
>> > > > > > > by
>> > > > > > > > > the
>> > > > > > > > > >> other external jars and the Android app). Got it? : )
>> > > > > > > > > >>
>> > > > > > > > > >> Regards,
>> > > > > > > > > >> Adriano Crestani
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
>> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
>> > > > > > > > > >>
>> > > > > > > > > >>> Hi Adriano,
>> > > > > > > > > >>>
>> > > > > > > > > >>> I was indeed using the sca modules not from the
>> sandbox.
>> > As
>> > > > you
>> > > > > > > > > suggested,
>> > > > > > > > > >>> I
>> > > > > > > > > >>> removed the tuscany-contribution-impl from my
>> workspace
>> > and
>> > > > > added
>> > > > > > > the
>> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
>> uncommented
>> > > the
>> > > > > > lines
>> > > > > > > in
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > > > > >>>
>> > > > > > > > > >>> following the comments pointing out why those lines
>> had
>> > > been
>> > > > > > > > commented.
>> > > > > > > > > >>> I'm
>> > > > > > > > > >>> no longer getting the ClassNotFoundException. However,
>> > it's
>> > > > > > getting
>> > > > > > > > > stuck
>> > > > > > > > > >>> somewhere else (before getting there I guess)...I
>> think
>> > > this
>> > > > is
>> > > > > > the
>> > > > > > > > > case
>> > > > > > > > > >>> because before and after commenting the code I get the
>> > same
>> > > > > error
>> > > > > > > in
>> > > > > > > > > the
>> > > > > > > > > >>> Android emulator, an InstantiationException [1].
>> > > > > > > > > >>>
>> > > > > > > > > >>> I also started tinkering with retrotranslator. First I
>> > > tried
>> > > > > > doing
>> > > > > > > it
>> > > > > > > > > with
>> > > > > > > > > >>> Ant, but it seems that in order to build I have to
>> > include
>> > > > the
>> > > > > > > whole
>> > > > > > > > > >>> tuscany
>> > > > > > > > > >>> projects in a way similar to how I now have in
>> Eclipse. I
>> > > > also
>> > > > > > > tried
>> > > > > > > > > >>> making
>> > > > > > > > > >>> a jar out of
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > > > > >>>
>> > > > > > > > > >>> and then feeding it to retrotranslator but
>> unfortunately
>> > > it's
>> > > > > not
>> > > > > > > > > >>> translating anything, as shown below.
>> > > > > > > > > >>>
>> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java
>> -jar
>> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
>> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
>> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
>> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
>> > > > > > > > > >>> Processing 136 file(s) in
>> JavaRuntimeModuleActivator.jar.
>> > > > > > > > > >>> Transformed 0 file(s).
>> > > > > > > > > >>>
>> > > > > > > > > >>> There's also a maven plugin, so I might try that...but
>> > > first
>> > > > > I'll
>> > > > > > > > give
>> > > > > > > > > Ant
>> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
>> soon,
>> > > > > > otherwise
>> > > > > > > > as
>> > > > > > > > > you
>> > > > > > > > > >>> say...retrotranslator will have to be the workaround
>> to
>> > > > proceed
>> > > > > > > with
>> > > > > > > > > our
>> > > > > > > > > >>> project ;-)
>> > > > > > > > > >>>
>> > > > > > > > > >>> Thanks again for all your help...I'm getting ready for
>> > the
>> > > > > > official
>> > > > > > > > > start
>> > > > > > > > > >>> :-)
>> > > > > > > > > >>>
>> > > > > > > > > >>> [1]
>> http://androidindelft.googlepages.com/20may2008.html
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
>> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
>> > > > > > > > > >>>
>> > > > > > > > > >>> > Hi Oscar,
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > My mistake again, the eclipse project files of
>> > > > > > contribution-impl
>> > > > > > > > > module
>> > > > > > > > > >>> > were
>> > > > > > > > > >>> > not uploaded, so you are probably using the modules
>> you
>> > > > have
>> > > > > > > > > downloaded
>> > > > > > > > > >>> > from
>> > > > > > > > > >>> > the sca modules. If you remove the
>> > > > tuscany-contribution-impl
>> > > > > > from
>> > > > > > > > > your
>> > > > > > > > > >>> > workspace and add this module from the sandbox it
>> will
>> > > > > probably
>> > > > > > > > work.
>> > > > > > > > > >>> > Anyway, you will need to update your trunk again to
>> get
>> > > the
>> > > > > > > project
>> > > > > > > > > >>> files
>> > > > > > > > > >>> > I'm uploading right now ; )
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
>> solution
>> > > here
>> > > > > is
>> > > > > > a
>> > > > > > > > tip:
>> > > > > > > > > >>> most
>> > > > > > > > > >>> > of the code that were using the Reflection API was
>> > > > commented
>> > > > > on
>> > > > > > > > > >>> >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > > > > > > > > >>> > class, you just need to edit this class and remove
>> the
>> > > > > > commented
>> > > > > > > > code
>> > > > > > > > > >>> (it's
>> > > > > > > > > >>> > described there).
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > So, if you uncomment the code and the
>> retrotranslador
>> > > > > > successfuly
>> > > > > > > > > work,
>> > > > > > > > > >>> and
>> > > > > > > > > >>> > I hope it will, you will reach the
>> > > > > > > > > >>> >
>> > > > > > > > >
>> > > > > > >
>> > > > >
>> > >
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
>> > > > constructor
>> > > > > > I'm
>> > > > > > > > > >>> getting a
>> > > > > > > > > >>> > NPE when the code described above is commented.
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > About the ant, go on and use it. Further we can
>> > evaluate
>> > > > > better
>> > > > > > > > where
>> > > > > > > > > we
>> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
>> even
>> > > dont
>> > > > > > know
>> > > > > > > if
>> > > > > > > > > we
>> > > > > > > > > >>> will
>> > > > > > > > > >>> > still be using the retrotranslator in future,
>> right?! :
>> > )
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
>> workaround
>> > > > this
>> > > > > > > > problem
>> > > > > > > > > for
>> > > > > > > > > >>> > now
>> > > > > > > > > >>> > and go on with our project ; )
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > Kind Regards,
>> > > > > > > > > >>> > Adriano Crestani
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
>> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> > > > > > > > > >>> >
>> > > > > > > > > >>> > > Hi Adriano,
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > Thanks alot for your answers. I was able to build
>> the
>> > > > > entire
>> > > > > > > > > workspace
>> > > > > > > > > >>> > from
>> > > > > > > > > >>> > > your instructions. When running calculator-android
>> as
>> > > an
>> > > > > > > "Android
>> > > > > > > > > >>> > > application" I'm getting a ClassNotFoundException
>> [1]
>> > > for
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
>> > > > > > > > > >>> > > Is the exception you referred to in your original
>> > > email?
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > ...when
>> > > > > > > > > >>> > > > you run the calculator-android project as an
>> > "Android
>> > > > > > > > > application"
>> > > > > > > > > >>> you
>> > > > > > > > > >>> > > > should get an exception, that was generated
>> > initially
>> > > > by
>> > > > > a
>> > > > > > > NPE
>> > > > > > > > > >>> thrown
>> > > > > > > > > >>> > by
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> >
>> > > > > > > > >
>> > > > > > >
>> > > > >
>> > >
>> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> > > > > > > > > >>> > > > constructor. This is caused because the latest
>> > > Android
>> > > > > SDK
>> > > > > > > does
>> > > > > > > > > not
>> > > > > > > > > >>> > > support
>> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check
>> > the
>> > > > > > > @Reference
>> > > > > > > > > >>> > > annotations
>> > > > > > > > > >>> > > > (I commented the code which tries to read the
>> > > > > annotations,
>> > > > > > so
>> > > > > > > > > when
>> > > > > > > > > >>> the
>> > > > > > > > > >>> > > > execution reach this constructor it throws the
>> > NPE).
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > Searching for the class in the exception I'm
>> getting
>> > I
>> > > > > found
>> > > > > > > > > >>> > >
>> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
>> > > In
>> > > > > > > > > >>> > getServiceClasses
>> > > > > > > > > >>> > > it loads the service class I'm getting problems
>> with
>> > > when
>> > > > > > > running
>> > > > > > > > > >>> > > calculator-android as an "Android application":
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > I couldn't find the corresponding java file in my
>> > > > imported
>> > > > > > > > > workspace
>> > > > > > > > > >>> and
>> > > > > > > > > >>> > > found that there is no package like
>> > > > > > > > > >>> > >
>> org.apache.tuscany.sca.contribution.processor.impl.
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > Am I missing something? Or are these the errors
>> you
>> > > would
>> > > > > > > expect?
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > I would like to get to the point where I get the
>> > > > exception
>> > > > > > you
>> > > > > > > > > >>> described
>> > > > > > > > > >>> > > and
>> > > > > > > > > >>> > > try to run retrotranslator from there. However, as
>> > I'm
>> > > > > using
>> > > > > > > the
>> > > > > > > > > ADT
>> > > > > > > > > >>> > plugin
>> > > > > > > > > >>> > > in eclipse I would need to extract code that
>> > "declares
>> > > or
>> > > > > > > > analyzes
>> > > > > > > > > >>> > > annotations you may extract it into a separate
>> > library
>> > > > that
>> > > > > > can
>> > > > > > > > be
>> > > > > > > > > >>> > > processed
>> > > > > > > > > >>> > > with Retrotranslator and added to the main
>> project."
>> > > That
>> > > > > is,
>> > > > > > > > > unless I
>> > > > > > > > > >>> > use
>> > > > > > > > > >>> > > Ant, in which case I would only need to add a few
>> > lines
>> > > > to
>> > > > > > > > > build.xml.
>> > > > > > > > > >>> I'm
>> > > > > > > > > >>> > > continuing to look into this, any thoughts are
>> more
>> > > than
>> > > > > > > welcome
>> > > > > > > > > :-)
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > [1]
>> > http://delftandroid.googlepages.com/14may2008.html
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani
>> <
>> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > > Hi,
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Thanks all for the feedback ; )
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > At first, I want to correct one mistake, on the
>> > first
>> > > > > step
>> > > > > > I
>> > > > > > > > > >>> described
>> > > > > > > > > >>> > on
>> > > > > > > > > >>> > > > my
>> > > > > > > > > >>> > > > previous email, I should not have added the word
>> > > > > "install",
>> > > > > > > it
>> > > > > > > > > >>> probably
>> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
>> > install"
>> > > in
>> > > > > the
>> > > > > > > > > >>> downloaded
>> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step,
>> the
>> > > code
>> > > > > > should
>> > > > > > > > not
>> > > > > > > > > be
>> > > > > > > > > >>> > > > downloaded from [1], but from [2].
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Simon:
>> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source
>> > codes
>> > > > are
>> > > > > > > under
>> > > > > > > > > CDDL
>> > > > > > > > > >>> > 1.0
>> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
>> > license
>> > > > > > header
>> > > > > > > on
>> > > > > > > > > each
>> > > > > > > > > >>> > > file,
>> > > > > > > > > >>> > > > and it's already done : )
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Jean:
>> > > > > > > > > >>> > > > I think it is better to keep the code in the
>> > sandbox
>> > > > for
>> > > > > > now.
>> > > > > > > > At
>> > > > > > > > > >>> first,
>> > > > > > > > > >>> > > > it's
>> > > > > > > > > >>> > > > not working on the current SCA modules revision
>> > yet.
>> > > > And
>> > > > > > > also,
>> > > > > > > > > I'm
>> > > > > > > > > >>> > > > commenting many lines at some modules just to
>> get a
>> > > > > "first
>> > > > > > > run"
>> > > > > > > > > of
>> > > > > > > > > >>> > > > calculator-sample to further evaluate why and
>> how
>> > > this
>> > > > > > > > commented
>> > > > > > > > > >>> lines
>> > > > > > > > > >>> > > will
>> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA Java
>> and
>> > > SCA
>> > > > > > > > Android.
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Oscar:
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > - Are host-android and core-android a part of
>> > > > > > > > calculator-android?
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > What do you mean when you say "part"? They are
>> used
>> > > by
>> > > > > > > > > >>> > > calculator-android,
>> > > > > > > > > >>> > > > and will prabably be added to tuscany sca
>> modules
>> > in
>> > > > > future
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > - Should the calculator-android included in [1]
>> > have
>> > > > > > included
>> > > > > > > > an
>> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
>> > eclipse
>> > > > > > project
>> > > > > > > > > files
>> > > > > > > > > >>> of
>> > > > > > > > > >>> > > > these
>> > > > > > > > > >>> > > > projects. I have already commited these files
>> and
>> > if
>> > > > you
>> > > > > > > update
>> > > > > > > > > your
>> > > > > > > > > >>> > > trunk
>> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones you
>> have
>> > > > > > created.
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
>> > something
>> > > > else
>> > > > > > > > needed
>> > > > > > > > > in
>> > > > > > > > > >>> > > > addition
>> > > > > > > > > >>> > > > to including the Android Library?
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > No, the Android library is really simples, it
>> only
>> > > > > contains
>> > > > > > > the
>> > > > > > > > > >>> > > android.jar
>> > > > > > > > > >>> > > > file located in your Android SDK.
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and
>> "mvn
>> > > > > -Peclipse
>> > > > > > > > > >>> > > > eclipse:eclipse"
>> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
>> project
>> > > > files
>> > > > > > are
>> > > > > > > > > already
>> > > > > > > > > >>> in
>> > > > > > > > > >>> > > > modules and you should build the modules using
>> the
>> > > > > eclipse
>> > > > > > > for
>> > > > > > > > > now.
>> > > > > > > > > >>> The
>> > > > > > > > > >>> > > > maven config files are not updated yet with the
>> > > > > > modifications
>> > > > > > > I
>> > > > > > > > > have
>> > > > > > > > > >>> > done
>> > > > > > > > > >>> > > > on
>> > > > > > > > > >>> > > > these modules, so they will not generate the
>> > correct
>> > > > > > project
>> > > > > > > > > files,
>> > > > > > > > > >>> > > worse,
>> > > > > > > > > >>> > > > they will override the ones I have created.
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Then, clean and build your entire workspace, if
>> you
>> > > > still
>> > > > > > get
>> > > > > > > > any
>> > > > > > > > > >>> > errors,
>> > > > > > > > > >>> > > > let me know ; )
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'?
>> Or,
>> > > why
>> > > > > > should
>> > > > > > > > > this
>> > > > > > > > > >>> not
>> > > > > > > > > >>> > be
>> > > > > > > > > >>> > > > imported?
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > It seems the revision I suggested already had
>> the
>> > > saxon
>> > > > > > > module
>> > > > > > > > > >>> removed
>> > > > > > > > > >>> > > from
>> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one
>> that
>> > > > > > shouldn´t.
>> > > > > > > > > Please,
>> > > > > > > > > >>> > > import
>> > > > > > > > > >>> > > > the databinding-saxon module again into your
>> > > workspace.
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > Regards,
>> > > > > > > > > >>> > > > Adriano Crestani
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > [1] -
>> > > > > > > > >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
>> > > > > > > > > >>> > > > >
>> > > > > > > > > >>> > > > [2] -
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
>> > > > Delfino
>> > > > > <
>> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > > > > Mike Edwards wrote:
>> > > > > > > > > >>> > > > >
>> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
>> > > > > > > > > >>> > > > > > >
>> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from [1]
>> and
>> > > > > > installed
>> > > > > > > > as
>> > > > > > > > > >>> shown
>> > > > > > > > > >>> > > > > > > > below:
>> > > > > > > > > >>> > > > > > > >
>> > > > > > > > > >>> > > > > > > > svn checkout
>> > > > > > > > > >>> > > > > > > >
>> > > > > > > > >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>> > > > > > > > > >>> > > > > > > >
>> > > > > > > > > >>> > > > > > > > cd mobile-android
>> > > > > > > > > >>> > > > > > > >
>> > > > > > > > > >>> > > > > > > >
>> > > > > > > > > >>> > > > > > > If there's no objection from others, I'd
>> be
>> > > happy
>> > > > > to
>> > > > > > > see
>> > > > > > > > > this
>> > > > > > > > > >>> > code
>> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now have
>> > > several
>> > > > > > > people
>> > > > > > > > > doing
>> > > > > > > > > >>> > > > development
>> > > > > > > > > >>> > > > > > > on this android integration.
>> > > > > > > > > >>> > > > > > >
>> > > > > > > > > >>> > > > > > > Adriano, you could start with something
>> like
>> > > > > > > > > >>> > trunk/java/sca/android
>> > > > > > > > > >>> > > > > > > and later progressively try to converge
>> the
>> > > code
>> > > > > with
>> > > > > > > the
>> > > > > > > > > code
>> > > > > > > > > >>> in
>> > > > > > > > > >>> > > > trunk,
>> > > > > > > > > >>> > > > > > > with architected plug points for the
>> android
>> > > > > specific
>> > > > > > > > code
>> > > > > > > > > >>> etc.
>> > > > > > > > > >>> > > > > > >
>> > > > > > > > > >>> > > > > > > Thoughts?
>> > > > > > > > > >>> > > > > > >
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > > > I assume that moving to trunk does not also
>> > imply
>> > > > > > "making
>> > > > > > > > > part
>> > > > > > > > > >>> of
>> > > > > > > > > >>> > the
>> > > > > > > > > >>> > > > > > main build"?
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental code
>> > > > entering
>> > > > > > the
>> > > > > > > > > build
>> > > > > > > > > >>> at
>> > > > > > > > > >>> > > this
>> > > > > > > > > >>> > > > > > stage.
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > > > Yours,  Mike.
>> > > > > > > > > >>> > > > > >
>> > > > > > > > > >>> > > > >
>> > > > > > > > > >>> > > > > I think it's business as usual, code that
>> doesn't
>> > > > work
>> > > > > > does
>> > > > > > > > not
>> > > > > > > > > go
>> > > > > > > > > >>> in
>> > > > > > > > > >>> > > the
>> > > > > > > > > >>> > > > > main build, code that's getting stable can go
>> in
>> > > the
>> > > > > main
>> > > > > > > > build
>> > > > > > > > > at
>> > > > > > > > > >>> > some
>> > > > > > > > > >>> > > > > point when people have no specific objections,
>> > and
>> > > > > > > different
>> > > > > > > > > >>> profiles
>> > > > > > > > > >>> > > can
>> > > > > > > > > >>> > > > be
>> > > > > > > > > >>> > > > > used to subset particular builds.
>> > > > > > > > > >>> > > > >
>> > > > > > > > > >>> > > > > --
>> > > > > > > > > >>> > > > > Jean-Sebastien
>> > > > > > > > > >>> > > > >
>> > > > > > > > > >>> > > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > --
>> > > > > > > > > >>> > > best,
>> > > > > > > > > >>> > > -oscar
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> > > Oscar Castañeda
>> > > > > > > > > >>> > >
>> > > > > > > > > >>> >
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>>
>> > > > > > > > > >>> --
>> > > > > > > > > >>> best,
>> > > > > > > > > >>> -oscar
>> > > > > > > > > >>>
>> > > > > > > > > >>> Oscar Castañeda
>> > > > > > > > > >>>
>> > > > > > > > > >>
>> > > > > > > > > >>
>> > > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > --
>> > > > > > > > > Luciano Resende
>> > > > > > > > > Apache Tuscany Committer
>> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
>> <http://people.apache.org/%7Elresende>
>> > <http://people.apache.org/%7Elresende>
>> > > <http://people.apache.org/%7Elresende>
>> > > > <http://people.apache.org/%7Elresende>
>> > > > > <http://people.apache.org/%7Elresende>
>> > > > > > <http://people.apache.org/%7Elresende>
>> > > > > > > <http://people.apache.org/%7Elresende><
>> > > > > > > > http://people.apache.org/%7Elresende>
>> > > > > > > > > http://lresende.blogspot.com/
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > >
>> > > > > > > --
>> > > > > > > best,
>> > > > > > > -oscar
>> > > > > > >
>> > > > > > > Oscar Castañeda
>> > > > > > >
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > best,
>> > > > > -oscar
>> > > > >
>> > > > > Oscar Castañeda
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > best,
>> > > -oscar
>> > >
>> > > Oscar Castañeda
>> > >
>> >
>>
>>
>>
>> --
>> best,
>> -oscar
>>
>> Oscar Castañeda
>>
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,

I say that it is more difficult to debug because you need attach a source
code to each jar and etc, and when you are using projects, eclipse already
knows where to find the source code : )

The reply made sense to me, especially with regards to the fact that with
the Android plugin Eclipse compiles sources into classes and then into dex
files, so retrotranslator has no chance to translate classes in between
these steps - even if I do that outside of Eclipse. This shows from the use
of non-translated binaries (as indicated by the
java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
trace) that might have been related to the use of pre-existing dex files or
over-writing of files by Eclipse. So unless I modify the ADT plugin the
result would still be the same, even if I use a simpler scenario.

Sorry, I really did not comment this email yet. It does not make so much
sense for me. First, as you already know, eclipse android projects does not
recognize any modifications in the imported projects, so it does not call
the build or incremental build even if the imported projects have their
source code modified. Just to make sure I tested it again:

1-  imported in my workspace all the projects included in the
calculator-android, cleaned and built them...it takes a loooong time, as you
already know.

2- imported the calculator-android project, cleaned and built it (only the
calculator-android project), and this process was too much faster than when
all the modules are built, so the imported projects were not recompiled,
otherwise it would take too much more time. I suppose here that the android
project compiles the .java contained in the android project and convert all
the .class files (generated by imported projects and android project) to dex
format.

So, it does not recompile the external class files (the ones contained in
the imported projects) cause it seems not to check if it was modified or
not. Of course, I never tested it modifing the .class files, I'm just
assuming that, because when you modify .java files it does not get
recompiled.

What do you think?

As I mentioned before, your comments are really helpful as they give me a
sense of direction. Please let me know if you still think we should pursue
retrotranslator for files inside a folder.

I really think you should try at first the simpler scenario and try to
understand how it works and IF it works. Also, you can try what you were
planning: to retrotranslate the each modules' jar, but I suppose it's a lot
of work, because there are so many modules :S. So, as I've already said, if
you think it's getting to complicated, forget it and go on with Luciano's
suggestion.

Feel free to choose the direction you want to take, and if there is another
approach you think is better, just let us know ; )...you are the best person
to choose the directions, cause you are working directly on it, we are just
guinding/helping you ; )

Thanks,
Adriano Crestani


On Fri, Jun 6, 2008 at 3:45 PM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> If there is an option on retrotranslator to retrotranslate all the classes
> > in a folder, it should work as well as it works on classes inside .jar
> > files. So, I think you should try to understand why your first approach
> > (retrotranslating the eclipse project classes) is not working trying a
> > simpler scenario. Have you already tried it?
> >
>
> I agree that it's good to try out a simpler scenario to better understand
> the problem. I haven't tried it yet because using retrotranslator for
> classes inside a folder doesn't seem to be a solution to the problem.
> Here's
> my reasoning:
>
> Yes, there is an option to translate classes in a folder. I tried it and it
> successfully translated the classes inside my Eclipse workspace. When I ran
> the calculator-android application using the newly translated classes I was
> getting the errors in [1]. I posted a question in Android Developers about
> this error and received a reply [2].
>
> The reply made sense to me, especially with regards to the fact that with
> the Android plugin Eclipse compiles sources into classes and then into dex
> files, so retrotranslator has no chance to translate classes in between
> these steps - even if I do that outside of Eclipse. This shows from the use
> of non-translated binaries (as indicated by the
> java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
> trace) that might have been related to the use of pre-existing dex files or
> over-writing of files by Eclipse. So unless I modify the ADT plugin the
> result would still be the same, even if I use a simpler scenario.
>
> The reply suggested to use JAR's instead. This also made sense to me and
> seemed like a simpler way of solving the problem. I didn't see the
> disadvantage of debugging, which as you point out is more difficult with
> JAR's instead of Eclipse projects.
>
> As I mentioned before, your comments are really helpful as they give me a
> sense of direction. Please let me know if you still think we should pursue
> retrotranslator for files inside a folder.
>
>
> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
> [2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
>
> On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <
> adrianocrestani@apache.org>
> wrote:
>
> > Hi Oscar,
> >
> > Yup, you're right - there are indeed Eclipse files inside the folders. I
> > guess I was confused by the different names in [1] than those that result
> > [2] from importing to an Eclipse workspace - after which I see 13
> projects
> > in both cases. So please ignore my previous remark.
> >
> > I have added the projects, but still haven't changed their names. I was
> > planning to modify their project names when we get it integrated to SCA,
> > mainly because we will need to change the poms. Anyway, feel free to
> modify
> > the names whenever you want ; )
> >
> >
> > Per the reply I received on the Android Developers list [3] I started
> using
> > retrotranslator on JAR's instead of class files. For this I created a big
> > JAR file with all the Tuscany modules (including those you modified for
> > Android). I translated this big JAR (around 15MB) with retrotranslator
> [4].
> > Then I created a new workspace with only calculator-android and
> > android-jdk-classes as projects and added the translated JAR as an
> external
> > library for both projects. This resulted in errors [4] from the Android
> > build process.
> >
> > I really do not understand this errors, but as this errors are only
> related
> > to testcase classes they can be ignored (removed from the jars). I also
> did
> > not understand why it's not find the .apk file:
> >
> > "[2008-06-06 12:52:49 - calculator-android] Could not find
> > /bin/calculator-android.apk!"
> >
> > To work around these errors I decided to take a different approach and
> copy
> > all the jar files contained in the individual modules to a separate
> folder
> > and then run retrotranslator on each JAR. The jars are found inside the
> > target folder of each module and are named as shown below:
> >
> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >
> > From this I found that only the SCA modules have these JAR files inside
> > their respective target folders, whereas the Android modules I downloaded
> > from [1] don't have these files at all
> >
> > Yep, this .jars are generated when the maven is executed. I'm not sure if
> > you should use this .jars, because they were compiled with no reference
> to
> > Android library. That's also why there are no .jar files for android
> > modules, because you did not execute the maven on them  (and you
> > shouldn't).
> >
> > So I decided to keep the Android
> > modules [2] and add the translated JARs as libraries where needed to have
> > the workspace build with no problems. If I get this running I would look
> > into creating JAR files from the Android modules and then return to only
> > having calculator-android and android-jdk-classes as projects and the
> rest
> > as JAR's added as external libraries. If this works out I could then look
> > into seeing which JAR's are important and which are not, in this way
> > reducing the total memory footprint and coming up with a "lightweight
> > mobile
> > SCA core/runtime." Please let me know your thoughts on these efforts.
> >
> > You haven't tried this yet, right? You may try it, but I do not like this
> > approach, because it will get difficult to debug sca classes as they are
> > not
> > imported as eclipse projects.
> >
> > If there is an option on retrotranslator to retrotranslate all the
> classes
> > in a folder, it should work as well as it works on classes inside .jar
> > files. So, I think you should try to understand why your first approach
> > (retrotranslating the eclipse project classes) is not working trying a
> > simpler scenario. Have you already tried it?
> >
> > Also, if the restrotranslator gets to complicated, you may try the
> > Luciano's
> > suggestion ; )
> >
> >
> > Kind Regards,
> > Adriano Crestani
> >
> > On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> > oscar.castaneda.gsoc@gmail.com> wrote:
> >
> > > Hi Adriano,
> > >
> > >
> > > > Yep, they should be imported, if you check inside its folders, there
> > are
> > > > the
> > > > eclipse project files, so they should be identified by the eclipse
> > import
> > > > tool as an eclipse project.
> > >
> > >
> > > Yup, you're right - there are indeed Eclipse files inside the folders.
> I
> > > guess I was confused by the different names in [1] than those that
> result
> > > [2] from importing to an Eclipse workspace - after which I see 13
> > projects
> > > in both cases. So please ignore my previous remark.
> > >
> > > I don't think introspection is a good solution, hence you will need to
> > > > change how the sca reads the info about each service and also
> services
> > > > implemented for JVM would need to be adapted to run on Android. Let's
> > > avoid
> > > > to modify so much the SCA code, and lets try to keep retrotranslator
> in
> > > > mind
> > > > as a temporary workaround for annotations till next SDK release :S
> > >
> > >
> > > >  Also, if you get the retrotranslator working, forget the Luciano's
> > > > suggestion and vice-versa...do not try both at the same time ; )
> > > >
> > >
> > > Will do. Thanks for the advice it helps me to focus in the right
> > direction
> > > :-)
> > >
> > > Now, a summary of what I've done up to now:
> > >
> > > Per the reply I received on the Android Developers list [3] I started
> > using
> > > retrotranslator on JAR's instead of class files. For this I created a
> big
> > > JAR file with all the Tuscany modules (including those you modified for
> > > Android). I translated this big JAR (around 15MB) with retrotranslator
> > [4].
> > > Then I created a new workspace with only calculator-android and
> > > android-jdk-classes as projects and added the translated JAR as an
> > external
> > > library for both projects. This resulted in errors [4] from the Android
> > > build process.
> > >
> > > To work around these errors I decided to take a different approach and
> > copy
> > > all the jar files contained in the individual modules to a separate
> > folder
> > > and then run retrotranslator on each JAR. The jars are found inside the
> > > target folder of each module and are named as shown below:
> > >
> > > tuscany-<NAME>-incubating-SNAPSHOT.jar
> > >
> > > From this I found that only the SCA modules have these JAR files inside
> > > their respective target folders, whereas the Android modules I
> downloaded
> > > from [1] don't have these files at all. So I decided to keep the
> Android
> > > modules [2] and add the translated JARs as libraries where needed to
> have
> > > the workspace build with no problems. If I get this running I would
> look
> > > into creating JAR files from the Android modules and then return to
> only
> > > having calculator-android and android-jdk-classes as projects and the
> > rest
> > > as JAR's added as external libraries. If this works out I could then
> look
> > > into seeing which JAR's are important and which are not, in this way
> > > reducing the total memory footprint and coming up with a "lightweight
> > > mobile
> > > SCA core/runtime." Please let me know your thoughts on these efforts.
> > >
> > >
> > > [1]
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> > > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> > > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > > [4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> > >
> > >
> > > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> > > adrianocrestani@apache.org>
> > > wrote:
> > >
> > > > Hi Oscar,
> > > >
> > > >
> > > > When I imported the projects from [3] the following projects were not
> > > > imported:
> > > >
> > > > core-android
> > > > host-android
> > > > extensibility
> > > >
> > > > Is this normal? Should they be imported?
> > > >
> > > > Yep, they should be imported, if you check inside its folders, there
> > are
> > > > the
> > > > eclipse project files, so they should be identified by the eclipse
> > import
> > > > tool as an eclipse project.
> > > >
> > > > Thanks for the detailed explanation. I'm going to give this a try as
> I
> > > > found
> > > > an introspection related comment [2] as a workaround to another
> > > annotations
> > > > problem with the current SDK.
> > > >
> > > > I don't think introspection is a good solution, hence you will need
> to
> > > > change how the sca reads the info about each service and also
> services
> > > > implemented for JVM would need to be adapted to run on Android. Let's
> > > avoid
> > > > to modify so much the SCA code, and lets try to keep retrotranslator
> in
> > > > mind
> > > > as a temporary workaround for annotations till next SDK release :S
> > > >
> > > > Also, if you get the retrotranslator working, forget the Luciano's
> > > > suggestion and vice-versa...do not try both at the same time ; )
> > > >
> > > > Any progress testing retrotranslator on a simpler scenario, just let
> us
> > > > know
> > > > ; )
> > > >
> > > > Kind Regards,
> > > > Adriano Crestani
> > > >
> > > >
> > > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >
> > > > > Hi Adriano,
> > > > >
> > > > > At first, build a simple, but equivalent scenario, and test it.
> > > > >
> > > > >
> > > > > I think this is a great idea, especially because I found that the
> > > "native
> > > > > method not implemented" errors I'm getting [1] are still related to
> > the
> > > > > annotations problem. I'm getting the same errors when converting
> the
> > > code
> > > > > to
> > > > > java 1.4. This makes me think that retrotranslator is actually not
> > > > working.
> > > > > Hopefully, testing with a simpler scenario will help me to
> understand
> > > the
> > > > > problem better.
> > > > >
> > > > > Sorry for the not-well-detailed info here. I meant you to do:
> > > > > >
> > > > > > Search in every sca code for the usage of
> Class.isAnnotationPresent
> > > or
> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > > > @Remotable
> > > > > > annotations force it to true, for example:
> > > > > >
> > > > > > Annotation isRemotable = class.isAnnotationPresent
> > > > > >>
> > > > > >> (Remotable.class); =>
> > > > > >> Annotation isRemotable = true;
> > > > > >>
> > > > > >> otherwise, which means, when it's not checking for the
> @Remotable
> > > > > >> annnotation, force to false. For example:
> > > > > >>
> > > > > >> Annotation isReference =
> > class.isAnnotationPresent(Reference.class);
> > > > =>
> > > > > >> Annotation isReference = false;
> > > > > >
> > > > > >
> > > > >
> > > > > Thanks for the detailed explanation. I'm going to give this a try
> as
> > I
> > > > > found
> > > > > an introspection related comment [2] as a workaround to another
> > > > annotations
> > > > > problem with the current SDK.
> > > > >
> > > > > Also, I have another question for you...
> > > > >
> > > > > When I imported the projects from [3] the following projects were
> not
> > > > > imported:
> > > > >
> > > > > core-android
> > > > > host-android
> > > > > extensibility
> > > > >
> > > > > Is this normal? Should they be imported?
> > > > >
> > > > >
> > > > > [1]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > > [2]
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > > > > [3]
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > >
> > > > >
> > > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > > > > adrianocrestani@apache.org>
> > > > > wrote:
> > > > >
> > > > > > Well detailed Oscar ; )
> > > > > >
> > > > > > It is one thing I learnt after playing hours with Android, you
> need
> > > to
> > > > > > rebuild every modified project which is imported in the android
> > > > project,
> > > > > > the
> > > > > > android project itself does not check for modifications on its
> > > > > dependencies
> > > > > > :S...so, when you rebuilt the imported project it recompiled the
> > > > > > uncommented
> > > > > > code at JavaRuntimeModuleActivator and the SCA started to check
> for
> > > > > > annotations once again, so you got the errors on [1], which means
> > > > > > retrotranslator is still not working. Have you tested it on a
> > simpler
> > > > > > application as I previously suggested? Did it work? What was the
> > most
> > > > > > critical scenario you tested it and it worked?
> > > > > >
> > > > > > " Voyager-2:30May ocastaneda$ java -jar
> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> > > > > >
> > > > > > You should also check if it's is working as expected, as I
> already
> > > > said,
> > > > > > does not go directly testing complex solutions on complex things
> > like
> > > > > SCA.
> > > > > > At first, build a simple, but equivalent scenario, and test it.
> For
> > > > > > example,
> > > > > > a simple android app project that uses an java library project
> > which
> > > > > access
> > > > > > annotations on classes placed on the android project. Like our
> > > android
> > > > > > calculator, it's an android app project (calculator-android)
> which
> > > uses
> > > > > > java
> > > > > > library projects (sca modules), and these libraries checks for
> > > > > annotations
> > > > > > on classes located at the android app project
> > > (CalculatorService.java,
> > > > > > AddService.java, etc). When you get it working on the simpler
> > > scenario,
> > > > > > then
> > > > > > you are ready to test it on the complexer sceneario
> > > > (calculator-android).
> > > > > >
> > > > > > Please, if you get the retrotranslator working in the simpler
> > > scenario,
> > > > > > send
> > > > > > us a patch with it. You can create a JIRA and attach it. If you
> > need
> > > > any
> > > > > > help, just ask ; )
> > > > > >
> > > > > > "code that checks for @Remotable you force to true, otherwise
> force
> > > to
> > > > > > false."
> > > > > >
> > > > > > Sorry for the not-well-detailed info here. I meant you to do:
> > > > > >
> > > > > > Search in every sca code for the usage of
> Class.isAnnotationPresent
> > > or
> > > > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > > > @Remotable
> > > > > > annotations force it to true, for example:
> > > > > >
> > > > > > Annotation isRemotable =
> > class.isAnnotationPresent(Remotable.class);
> > > =>
> > > > > > Annotation isRemotable = true;
> > > > > >
> > > > > > otherwise, which means, when it's not checking for the @Remotable
> > > > > > annnotation, force to false. For example:
> > > > > >
> > > > > > Annotation isReference =
> > class.isAnnotationPresent(Reference.class);
> > > =>
> > > > > > Annotation isReference = false;
> > > > > >
> > > > > > [1] -
> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > > >
> > > > > > Kind Regards,
> > > > > > Adriano Crestani
> > > > > >
> > > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > >
> > > > > > > Hi Adriano,
> > > > > > >
> > > > > > > I continued testing retrotranslator. Here's what I've done up
> to
> > > now.
> > > > > > >
> > > > > > > 1. Downloaded the modified code from [1].
> > > > > > >
> > > > > > > 2. Downloaded SCA modules from [2] and installed as shown
> below:
> > > > > > >
> > > > > > > svn checkout --revision 643746
> > > > > > >
> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > > > > > >
> > > > > > > cd modules
> > > > > > >
> > > > > > > mvn clean install -Dtest=no
> > > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > > > > > >
> > > > > > >  3. Created a new eclipse workspace and set the M2_REPO
> variable
> > as
> > > > > shown
> > > > > > > below:
> > > > > > >
> > > > > > > mvn -Declipse.workspace=/Users/.../workspace
> > eclipse:add-maven-repo
> > > > > > >
> > > > > > >  4. Adjusted buildpath to eliminate build errors, added Android
> > > > library
> > > > > > to
> > > > > > > required modules, fixed references to jar files and other
> > > libraries.
> > > > > > >
> > > > > > > 5. Uncommented lines in
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >
> > > > > > > 6. Ran retrotranslator as instructed on the project site [3]
> and
> > > > shown
> > > > > > > below:
> > > > > > >
> > > > > > > Voyager-2:30May ocastaneda$ java -jar
> > > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> > > > > > >
> > > > > > >  The output can be found in [4].
> > > > > > > 7. Rebuilt project after uncommenting lines in
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >
> > > > > > > and then re-ran retrotranslator.
> > > > > > > 8. Debugging in Eclipse shows errors shown in [5] and Android
> > > errors
> > > > in
> > > > > > > [6].
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > As always, I'm documenting my progress on the project log. I
> > > haven't
> > > > > > fully
> > > > > > > tested out Luciano's suggestions. I guess I'm puzzled by what
> you
> > > > mean
> > > > > by
> > > > > > > this:
> > > > > > >
> > > > > > > "code that checks for @Remotable you force to true, otherwise
> > force
> > > > to
> > > > > > > false."
> > > > > > >
> > > > > > > I'll continue looking into it and hopefully get retrotranslator
> > to
> > > > > work.
> > > > > > I
> > > > > > > also think it's a simpler option.
> > > > > > >
> > > > > > > Luciano: Thanks for your suggestions.
> > > > > > >
> > > > > > > [1]
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > > >
> > > > > > > [2]
> > > > >
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > > > > > >
> > > > > > > [3] http://retrotranslator.sourceforge.net/#android
> > > > > > >
> > > > > > > [4]
> > http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > > > > > >
> > > > > > > [5]
> > > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > > > > > >
> > > > > > >
> > > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > > > > > adrianocrestani@apache.org> wrote:
> > > > > > >
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I tried what Luciano suggested. It really works. To get it
> > > working
> > > > > you
> > > > > > > > simply need to search on all modules where the code checks
> for
> > > > > > @Remotable
> > > > > > > > annotation and force it to true:
> > > > > > > >
> > > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > > > > > > >
> > > > > > > > It works fine on the sca revision we are testing on Android
> and
> > > the
> > > > > > most
> > > > > > > > recent revision. I only tested it as a java application, not
> as
> > > an
> > > > > > > android
> > > > > > > > application.
> > > > > > > >
> > > > > > > > Unfortunatelly, I still think retrotranslator is a faster and
> > > > simpler
> > > > > > > > solution. Because the Luciano's suggestion only forces the
> SCA
> > to
> > > > > > > recognize
> > > > > > > > the services with no annotations declared on their
> interfaces,
> > > but
> > > > it
> > > > > > > does
> > > > > > > > not avoid the Exceptions we are getting when the SCA invokes
> > > > methods
> > > > > > that
> > > > > > > > read annotations. So, our current problem is that we are not
> > > being
> > > > > able
> > > > > > > to
> > > > > > > > use these methods and not only because we are not being able
> to
> > > > read
> > > > > > the
> > > > > > > > annotations.
> > > > > > > >
> > > > > > > > Oscar, if you want to try the Luciano's suggestion, you will
> > need
> > > > to
> > > > > > > > comment/adapt every sca code that tries to read the class
> > > > > annotations.
> > > > > > It
> > > > > > > > is
> > > > > > > > not necessary to comment/adapt the methods that read Method
> > > > > > annotations,
> > > > > > > > they are not throwning any exception. So, every code that
> > checks
> > > > for
> > > > > > > > @Remotable you force to true, otherwise force to false.
> > > > > > > >
> > > > > > > > Any doubt about what I have said, just let me know ; )
> > > > > > > >
> > > > > > > > Suggestions are welcome : )
> > > > > > > >
> > > > > > > > Adriano Crestani
> > > > > > > >
> > > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > > > > > luckbr1975@gmail.com>
> > > > > > > > wrote:
> > > > > > > >
> > > > > > > > > FYI, if you comment out the code that checks if a interface
> > is
> > > > > > > > > remoteble, you could have a version of the calculator
> without
> > > any
> > > > > > > > > annotations, and the runtime would introspect the
> references
> > > for
> > > > > the
> > > > > > > > > multiple services. But note that, the introspection code
> will
> > > > only
> > > > > be
> > > > > > > > > activated if there is no SCA annotations on the class.
> > > > > > > > >
> > > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > > > > > > <ad...@apache.org> wrote:
> > > > > > > > > > Ah, the expected exception should look like this on
> android
> > > > > > emulator:
> > > > > > > > > >
> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > <
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > > <
> > > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > > > >
> > > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > > > > > > adrianocrestani@apache.org> wrote:
> > > > > > > > > >
> > > > > > > > > >> Hi Oscar,
> > > > > > > > > >>
> > > > > > > > > >> I was indeed using the sca modules not from the sandbox.
> > As
> > > > you
> > > > > > > > > suggested,
> > > > > > > > > >> I
> > > > > > > > > >> removed the tuscany-contribution-impl from my workspace
> > and
> > > > > added
> > > > > > > the
> > > > > > > > > >> version you uploaded to the sandbox. Then, I uncommented
> > the
> > > > > lines
> > > > > > > in
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > > >>
> > > > > > > > > >> following the comments pointing out why those lines had
> > been
> > > > > > > > commented.
> > > > > > > > > I'm
> > > > > > > > > >> no longer getting the ClassNotFoundException. However,
> > it's
> > > > > > getting
> > > > > > > > > stuck
> > > > > > > > > >> somewhere else (before getting there I guess)...I think
> > this
> > > > is
> > > > > > the
> > > > > > > > case
> > > > > > > > > >> because before and after commenting the code I get the
> > same
> > > > > error
> > > > > > in
> > > > > > > > the
> > > > > > > > > >> Android emulator, an InstantiationException [1].
> > > > > > > > > >>
> > > > > > > > > >> Have you debugged to check exactly where this exception
> is
> > > > being
> > > > > > > > thrown?
> > > > > > > > > I
> > > > > > > > > >> have done the procedure I previously described  again
> and
> > I
> > > > got
> > > > > it
> > > > > > > > > "running"
> > > > > > > > > >> as expected, which means, running till the expected
> > > exception
> > > > is
> > > > > > > > thrown.
> > > > > > > > > >>
> > > > > > > > > >> I also started tinkering with retrotranslator. First I
> > tried
> > > > > doing
> > > > > > > it
> > > > > > > > > with
> > > > > > > > > >> Ant, but it seems that in order to build I have to
> include
> > > the
> > > > > > whole
> > > > > > > > > >> tuscany
> > > > > > > > > >> projects in a way similar to how I now have in Eclipse.
> I
> > > also
> > > > > > tried
> > > > > > > > > making
> > > > > > > > > >> a jar out of
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > > >>
> > > > > > > > > >> and then feeding it to retrotranslator but unfortunately
> > > it's
> > > > > not
> > > > > > > > > >> translating anything, as shown below.
> > > > > > > > > >>
> > > > > > > > > >> Voyager-2:Retrotranslator-1.2
> > > > > > > > > >> .6-bin ocastaneda$ java -jar
> > > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > > > >> JavaRuntimeModuleActivator.jar
> > > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > > > >> retrotranslator-android-1.2.6.jar
> > > > > > > > > >> Processing 136 file(s) in
> JavaRuntimeModuleActivator.jar.
> > > > > > > > > >> Transformed 0 file(s).
> > > > > > > > > >>
> > > > > > > > > >> There's also a maven plugin, so I might try that...but
> > first
> > > > > I'll
> > > > > > > give
> > > > > > > > > Ant
> > > > > > > > > >> another go. Hopefully Google will release a new SDK
> soon,
> > > > > > otherwise
> > > > > > > as
> > > > > > > > > you
> > > > > > > > > >> say...retrotranslator will have to be the workaround to
> > > > proceed
> > > > > > with
> > > > > > > > our
> > > > > > > > > >> project ;-)
> > > > > > > > > >>
> > > > > > > > > >> Unfortunately the rumors say the new SDK version will
> not
> > be
> > > > > > > released
> > > > > > > > > until
> > > > > > > > > >> july 28th :S. So, it's really good you have already
> > started
> > > > > > working
> > > > > > > on
> > > > > > > > > the
> > > > > > > > > >> retrotranslator, it will probably be the best workaround
> > for
> > > > the
> > > > > > > > > annotations
> > > > > > > > > >> problem till the next SDK release.
> > > > > > > > > >>
> > > > > > > > > >> I suggest you to forget about the build process right
> now,
> > > > > before,
> > > > > > > > check
> > > > > > > > > if
> > > > > > > > > >> this retrotranslator works and if it really works on
> > android
> > > > > > > platform.
> > > > > > > > > I´m
> > > > > > > > > >> really getting upset with Android, even its API methods
> > does
> > > > not
> > > > > > > work
> > > > > > > > as
> > > > > > > > > >> expected :@. Anyway, try initially to compile a simple
> > class
> > > > > > (coded
> > > > > > > by
> > > > > > > > > you),
> > > > > > > > > >> which contains annotations, and access these
> annotations.
> > If
> > > > it
> > > > > > > works,
> > > > > > > > > make
> > > > > > > > > >> it more complex and test again, do it until you reach a
> > > > scenario
> > > > > > as
> > > > > > > > > complex
> > > > > > > > > >> as the SCA (a lot of external jars with annotated
> classes
> > > > > accessed
> > > > > > > by
> > > > > > > > > the
> > > > > > > > > >> other external jars and the Android app). Got it? : )
> > > > > > > > > >>
> > > > > > > > > >> Regards,
> > > > > > > > > >> Adriano Crestani
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > > > >>
> > > > > > > > > >>> Hi Adriano,
> > > > > > > > > >>>
> > > > > > > > > >>> I was indeed using the sca modules not from the
> sandbox.
> > As
> > > > you
> > > > > > > > > suggested,
> > > > > > > > > >>> I
> > > > > > > > > >>> removed the tuscany-contribution-impl from my workspace
> > and
> > > > > added
> > > > > > > the
> > > > > > > > > >>> version you uploaded to the sandbox. Then, I
> uncommented
> > > the
> > > > > > lines
> > > > > > > in
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > > >>>
> > > > > > > > > >>> following the comments pointing out why those lines had
> > > been
> > > > > > > > commented.
> > > > > > > > > >>> I'm
> > > > > > > > > >>> no longer getting the ClassNotFoundException. However,
> > it's
> > > > > > getting
> > > > > > > > > stuck
> > > > > > > > > >>> somewhere else (before getting there I guess)...I think
> > > this
> > > > is
> > > > > > the
> > > > > > > > > case
> > > > > > > > > >>> because before and after commenting the code I get the
> > same
> > > > > error
> > > > > > > in
> > > > > > > > > the
> > > > > > > > > >>> Android emulator, an InstantiationException [1].
> > > > > > > > > >>>
> > > > > > > > > >>> I also started tinkering with retrotranslator. First I
> > > tried
> > > > > > doing
> > > > > > > it
> > > > > > > > > with
> > > > > > > > > >>> Ant, but it seems that in order to build I have to
> > include
> > > > the
> > > > > > > whole
> > > > > > > > > >>> tuscany
> > > > > > > > > >>> projects in a way similar to how I now have in Eclipse.
> I
> > > > also
> > > > > > > tried
> > > > > > > > > >>> making
> > > > > > > > > >>> a jar out of
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > > >>>
> > > > > > > > > >>> and then feeding it to retrotranslator but
> unfortunately
> > > it's
> > > > > not
> > > > > > > > > >>> translating anything, as shown below.
> > > > > > > > > >>>
> > > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java
> -jar
> > > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > > > >>> JavaRuntimeModuleActivator.jar
> > > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > > > >>> retrotranslator-android-1.2.6.jar
> > > > > > > > > >>> Processing 136 file(s) in
> JavaRuntimeModuleActivator.jar.
> > > > > > > > > >>> Transformed 0 file(s).
> > > > > > > > > >>>
> > > > > > > > > >>> There's also a maven plugin, so I might try that...but
> > > first
> > > > > I'll
> > > > > > > > give
> > > > > > > > > Ant
> > > > > > > > > >>> another go. Hopefully Google will release a new SDK
> soon,
> > > > > > otherwise
> > > > > > > > as
> > > > > > > > > you
> > > > > > > > > >>> say...retrotranslator will have to be the workaround to
> > > > proceed
> > > > > > > with
> > > > > > > > > our
> > > > > > > > > >>> project ;-)
> > > > > > > > > >>>
> > > > > > > > > >>> Thanks again for all your help...I'm getting ready for
> > the
> > > > > > official
> > > > > > > > > start
> > > > > > > > > >>> :-)
> > > > > > > > > >>>
> > > > > > > > > >>> [1]
> http://androidindelft.googlepages.com/20may2008.html
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > > > > > > >>> adrianocrestani@apache.org> wrote:
> > > > > > > > > >>>
> > > > > > > > > >>> > Hi Oscar,
> > > > > > > > > >>> >
> > > > > > > > > >>> > My mistake again, the eclipse project files of
> > > > > > contribution-impl
> > > > > > > > > module
> > > > > > > > > >>> > were
> > > > > > > > > >>> > not uploaded, so you are probably using the modules
> you
> > > > have
> > > > > > > > > downloaded
> > > > > > > > > >>> > from
> > > > > > > > > >>> > the sca modules. If you remove the
> > > > tuscany-contribution-impl
> > > > > > from
> > > > > > > > > your
> > > > > > > > > >>> > workspace and add this module from the sandbox it
> will
> > > > > probably
> > > > > > > > work.
> > > > > > > > > >>> > Anyway, you will need to update your trunk again to
> get
> > > the
> > > > > > > project
> > > > > > > > > >>> files
> > > > > > > > > >>> > I'm uploading right now ; )
> > > > > > > > > >>> >
> > > > > > > > > >>> > OK, if you wanna try the retrotranslator as a
> solution
> > > here
> > > > > is
> > > > > > a
> > > > > > > > tip:
> > > > > > > > > >>> most
> > > > > > > > > >>> > of the code that were using the Reflection API was
> > > > commented
> > > > > on
> > > > > > > > > >>> >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > > >>> > class, you just need to edit this class and remove
> the
> > > > > > commented
> > > > > > > > code
> > > > > > > > > >>> (it's
> > > > > > > > > >>> > described there).
> > > > > > > > > >>> >
> > > > > > > > > >>> > So, if you uncomment the code and the retrotranslador
> > > > > > successfuly
> > > > > > > > > work,
> > > > > > > > > >>> and
> > > > > > > > > >>> > I hope it will, you will reach the
> > > > > > > > > >>> >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > > > >>> > constructor and it should run OK. Exactly on this
> > > > constructor
> > > > > > I'm
> > > > > > > > > >>> getting a
> > > > > > > > > >>> > NPE when the code described above is commented.
> > > > > > > > > >>> >
> > > > > > > > > >>> > About the ant, go on and use it. Further we can
> > evaluate
> > > > > better
> > > > > > > > where
> > > > > > > > > we
> > > > > > > > > >>> > place it in the entire SCA build process. BTW, we
> even
> > > dont
> > > > > > know
> > > > > > > if
> > > > > > > > > we
> > > > > > > > > >>> will
> > > > > > > > > >>> > still be using the retrotranslator in future, right?!
> :
> > )
> > > > > > > > > >>> >
> > > > > > > > > >>> > Use the retrotranslator may help us a lot to
> workaround
> > > > this
> > > > > > > > problem
> > > > > > > > > for
> > > > > > > > > >>> > now
> > > > > > > > > >>> > and go on with our project ; )
> > > > > > > > > >>> >
> > > > > > > > > >>> > Kind Regards,
> > > > > > > > > >>> > Adriano Crestani
> > > > > > > > > >>> >
> > > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > > > >>> >
> > > > > > > > > >>> > > Hi Adriano,
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > Thanks alot for your answers. I was able to build
> the
> > > > > entire
> > > > > > > > > workspace
> > > > > > > > > >>> > from
> > > > > > > > > >>> > > your instructions. When running calculator-android
> as
> > > an
> > > > > > > "Android
> > > > > > > > > >>> > > application" I'm getting a ClassNotFoundException
> [1]
> > > for
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > > > > > > >>> > > Is the exception you referred to in your original
> > > email?
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > ...when
> > > > > > > > > >>> > > > you run the calculator-android project as an
> > "Android
> > > > > > > > > application"
> > > > > > > > > >>> you
> > > > > > > > > >>> > > > should get an exception, that was generated
> > initially
> > > > by
> > > > > a
> > > > > > > NPE
> > > > > > > > > >>> thrown
> > > > > > > > > >>> > by
> > > > > > > > > >>> > > >
> > > > > > > > > >>> >
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > > > >>> > > > constructor. This is caused because the latest
> > > Android
> > > > > SDK
> > > > > > > does
> > > > > > > > > not
> > > > > > > > > >>> > > support
> > > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check
> > the
> > > > > > > @Reference
> > > > > > > > > >>> > > annotations
> > > > > > > > > >>> > > > (I commented the code which tries to read the
> > > > > annotations,
> > > > > > so
> > > > > > > > > when
> > > > > > > > > >>> the
> > > > > > > > > >>> > > > execution reach this constructor it throws the
> > NPE).
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > Searching for the class in the exception I'm
> getting
> > I
> > > > > found
> > > > > > > > > >>> > >
> > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> > > In
> > > > > > > > > >>> > getServiceClasses
> > > > > > > > > >>> > > it loads the service class I'm getting problems
> with
> > > when
> > > > > > > running
> > > > > > > > > >>> > > calculator-android as an "Android application":
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > I couldn't find the corresponding java file in my
> > > > imported
> > > > > > > > > workspace
> > > > > > > > > >>> and
> > > > > > > > > >>> > > found that there is no package like
> > > > > > > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > Am I missing something? Or are these the errors you
> > > would
> > > > > > > expect?
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > I would like to get to the point where I get the
> > > > exception
> > > > > > you
> > > > > > > > > >>> described
> > > > > > > > > >>> > > and
> > > > > > > > > >>> > > try to run retrotranslator from there. However, as
> > I'm
> > > > > using
> > > > > > > the
> > > > > > > > > ADT
> > > > > > > > > >>> > plugin
> > > > > > > > > >>> > > in eclipse I would need to extract code that
> > "declares
> > > or
> > > > > > > > analyzes
> > > > > > > > > >>> > > annotations you may extract it into a separate
> > library
> > > > that
> > > > > > can
> > > > > > > > be
> > > > > > > > > >>> > > processed
> > > > > > > > > >>> > > with Retrotranslator and added to the main
> project."
> > > That
> > > > > is,
> > > > > > > > > unless I
> > > > > > > > > >>> > use
> > > > > > > > > >>> > > Ant, in which case I would only need to add a few
> > lines
> > > > to
> > > > > > > > > build.xml.
> > > > > > > > > >>> I'm
> > > > > > > > > >>> > > continuing to look into this, any thoughts are more
> > > than
> > > > > > > welcome
> > > > > > > > > :-)
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > [1]
> > http://delftandroid.googlepages.com/14may2008.html
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > > Hi,
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Thanks all for the feedback ; )
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > At first, I want to correct one mistake, on the
> > first
> > > > > step
> > > > > > I
> > > > > > > > > >>> described
> > > > > > > > > >>> > on
> > > > > > > > > >>> > > > my
> > > > > > > > > >>> > > > previous email, I should not have added the word
> > > > > "install",
> > > > > > > it
> > > > > > > > > >>> probably
> > > > > > > > > >>> > > > would lead the reader to run the "mvn clean
> > install"
> > > in
> > > > > the
> > > > > > > > > >>> downloaded
> > > > > > > > > >>> > > > files, as Oscar did. Also, on this same step, the
> > > code
> > > > > > should
> > > > > > > > not
> > > > > > > > > be
> > > > > > > > > >>> > > > downloaded from [1], but from [2].
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Simon:
> > > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source
> > codes
> > > > are
> > > > > > > under
> > > > > > > > > CDDL
> > > > > > > > > >>> > 1.0
> > > > > > > > > >>> > > > license, it's only needed to include the CDDL
> > license
> > > > > > header
> > > > > > > on
> > > > > > > > > each
> > > > > > > > > >>> > > file,
> > > > > > > > > >>> > > > and it's already done : )
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Jean:
> > > > > > > > > >>> > > > I think it is better to keep the code in the
> > sandbox
> > > > for
> > > > > > now.
> > > > > > > > At
> > > > > > > > > >>> first,
> > > > > > > > > >>> > > > it's
> > > > > > > > > >>> > > > not working on the current SCA modules revision
> > yet.
> > > > And
> > > > > > > also,
> > > > > > > > > I'm
> > > > > > > > > >>> > > > commenting many lines at some modules just to get
> a
> > > > > "first
> > > > > > > run"
> > > > > > > > > of
> > > > > > > > > >>> > > > calculator-sample to further evaluate why and how
> > > this
> > > > > > > > commented
> > > > > > > > > >>> lines
> > > > > > > > > >>> > > will
> > > > > > > > > >>> > > > be adapted to be compatible with both: SCA Java
> and
> > > SCA
> > > > > > > > Android.
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Oscar:
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > - Are host-android and core-android a part of
> > > > > > > > calculator-android?
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > What do you mean when you say "part"? They are
> used
> > > by
> > > > > > > > > >>> > > calculator-android,
> > > > > > > > > >>> > > > and will prabably be added to tuscany sca modules
> > in
> > > > > future
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > - Should the calculator-android included in [1]
> > have
> > > > > > included
> > > > > > > > an
> > > > > > > > > >>> > > > "AndroidManifest.xml" file?
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
> > eclipse
> > > > > > project
> > > > > > > > > files
> > > > > > > > > >>> of
> > > > > > > > > >>> > > > these
> > > > > > > > > >>> > > > projects. I have already commited these files and
> > if
> > > > you
> > > > > > > update
> > > > > > > > > your
> > > > > > > > > >>> > > trunk
> > > > > > > > > >>> > > > you will get them ; ). So, delete the ones you
> have
> > > > > > created.
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > - How can I fix the build errors? Is there
> > something
> > > > else
> > > > > > > > needed
> > > > > > > > > in
> > > > > > > > > >>> > > > addition
> > > > > > > > > >>> > > > to including the Android Library?
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > No, the Android library is really simples, it
> only
> > > > > contains
> > > > > > > the
> > > > > > > > > >>> > > android.jar
> > > > > > > > > >>> > > > file located in your Android SDK.
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Please, do not run the "mvn clean build" and "mvn
> > > > > -Peclipse
> > > > > > > > > >>> > > > eclipse:eclipse"
> > > > > > > > > >>> > > > commands on the sandbox files, the eclipse
> project
> > > > files
> > > > > > are
> > > > > > > > > already
> > > > > > > > > >>> in
> > > > > > > > > >>> > > > modules and you should build the modules using
> the
> > > > > eclipse
> > > > > > > for
> > > > > > > > > now.
> > > > > > > > > >>> The
> > > > > > > > > >>> > > > maven config files are not updated yet with the
> > > > > > modifications
> > > > > > > I
> > > > > > > > > have
> > > > > > > > > >>> > done
> > > > > > > > > >>> > > > on
> > > > > > > > > >>> > > > these modules, so they will not generate the
> > correct
> > > > > > project
> > > > > > > > > files,
> > > > > > > > > >>> > > worse,
> > > > > > > > > >>> > > > they will override the ones I have created.
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Then, clean and build your entire workspace, if
> you
> > > > still
> > > > > > get
> > > > > > > > any
> > > > > > > > > >>> > errors,
> > > > > > > > > >>> > > > let me know ; )
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'?
> Or,
> > > why
> > > > > > should
> > > > > > > > > this
> > > > > > > > > >>> not
> > > > > > > > > >>> > be
> > > > > > > > > >>> > > > imported?
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > It seems the revision I suggested already had the
> > > saxon
> > > > > > > module
> > > > > > > > > >>> removed
> > > > > > > > > >>> > > from
> > > > > > > > > >>> > > > repo. So, you mistakenly removed another one that
> > > > > > shouldn´t.
> > > > > > > > > Please,
> > > > > > > > > >>> > > import
> > > > > > > > > >>> > > > the databinding-saxon module again into your
> > > workspace.
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > Regards,
> > > > > > > > > >>> > > > Adriano Crestani
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > [1] -
> > > > > > > > >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > > > > > > >>> > > > >
> > > > > > > > > >>> > > > [2] -
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
> > > > Delfino
> > > > > <
> > > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > > > > Mike Edwards wrote:
> > > > > > > > > >>> > > > >
> > > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > > > > > > >>> > > > > > >
> > > > > > > > > >>> > > > > > >  1. Downloaded the modified code from [1]
> and
> > > > > > installed
> > > > > > > > as
> > > > > > > > > >>> shown
> > > > > > > > > >>> > > > > > > > below:
> > > > > > > > > >>> > > > > > > >
> > > > > > > > > >>> > > > > > > > svn checkout
> > > > > > > > > >>> > > > > > > >
> > > > > > > > >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > > > > >>> > > > > > > >
> > > > > > > > > >>> > > > > > > > cd mobile-android
> > > > > > > > > >>> > > > > > > >
> > > > > > > > > >>> > > > > > > >
> > > > > > > > > >>> > > > > > > If there's no objection from others, I'd be
> > > happy
> > > > > to
> > > > > > > see
> > > > > > > > > this
> > > > > > > > > >>> > code
> > > > > > > > > >>> > > > > > > move from sandbox to trunk as we now have
> > > several
> > > > > > > people
> > > > > > > > > doing
> > > > > > > > > >>> > > > development
> > > > > > > > > >>> > > > > > > on this android integration.
> > > > > > > > > >>> > > > > > >
> > > > > > > > > >>> > > > > > > Adriano, you could start with something
> like
> > > > > > > > > >>> > trunk/java/sca/android
> > > > > > > > > >>> > > > > > > and later progressively try to converge the
> > > code
> > > > > with
> > > > > > > the
> > > > > > > > > code
> > > > > > > > > >>> in
> > > > > > > > > >>> > > > trunk,
> > > > > > > > > >>> > > > > > > with architected plug points for the
> android
> > > > > specific
> > > > > > > > code
> > > > > > > > > >>> etc.
> > > > > > > > > >>> > > > > > >
> > > > > > > > > >>> > > > > > > Thoughts?
> > > > > > > > > >>> > > > > > >
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > > > I assume that moving to trunk does not also
> > imply
> > > > > > "making
> > > > > > > > > part
> > > > > > > > > >>> of
> > > > > > > > > >>> > the
> > > > > > > > > >>> > > > > > main build"?
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > > > I'd be a bit concerned at experimental code
> > > > entering
> > > > > > the
> > > > > > > > > build
> > > > > > > > > >>> at
> > > > > > > > > >>> > > this
> > > > > > > > > >>> > > > > > stage.
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > > > Yours,  Mike.
> > > > > > > > > >>> > > > > >
> > > > > > > > > >>> > > > >
> > > > > > > > > >>> > > > > I think it's business as usual, code that
> doesn't
> > > > work
> > > > > > does
> > > > > > > > not
> > > > > > > > > go
> > > > > > > > > >>> in
> > > > > > > > > >>> > > the
> > > > > > > > > >>> > > > > main build, code that's getting stable can go
> in
> > > the
> > > > > main
> > > > > > > > build
> > > > > > > > > at
> > > > > > > > > >>> > some
> > > > > > > > > >>> > > > > point when people have no specific objections,
> > and
> > > > > > > different
> > > > > > > > > >>> profiles
> > > > > > > > > >>> > > can
> > > > > > > > > >>> > > > be
> > > > > > > > > >>> > > > > used to subset particular builds.
> > > > > > > > > >>> > > > >
> > > > > > > > > >>> > > > > --
> > > > > > > > > >>> > > > > Jean-Sebastien
> > > > > > > > > >>> > > > >
> > > > > > > > > >>> > > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > --
> > > > > > > > > >>> > > best,
> > > > > > > > > >>> > > -oscar
> > > > > > > > > >>> > >
> > > > > > > > > >>> > > Oscar Castañeda
> > > > > > > > > >>> > >
> > > > > > > > > >>> >
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>>
> > > > > > > > > >>> --
> > > > > > > > > >>> best,
> > > > > > > > > >>> -oscar
> > > > > > > > > >>>
> > > > > > > > > >>> Oscar Castañeda
> > > > > > > > > >>>
> > > > > > > > > >>
> > > > > > > > > >>
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Luciano Resende
> > > > > > > > > Apache Tuscany Committer
> > > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende>
> > > > <http://people.apache.org/%7Elresende>
> > > > > <http://people.apache.org/%7Elresende>
> > > > > > <http://people.apache.org/%7Elresende>
> > > > > > > <http://people.apache.org/%7Elresende><
> > > > > > > > http://people.apache.org/%7Elresende>
> > > > > > > > > http://lresende.blogspot.com/
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > best,
> > > > > > > -oscar
> > > > > > >
> > > > > > > Oscar Castañeda
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > best,
> > > > > -oscar
> > > > >
> > > > > Oscar Castañeda
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > best,
> > > -oscar
> > >
> > > Oscar Castañeda
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

If there is an option on retrotranslator to retrotranslate all the classes
> in a folder, it should work as well as it works on classes inside .jar
> files. So, I think you should try to understand why your first approach
> (retrotranslating the eclipse project classes) is not working trying a
> simpler scenario. Have you already tried it?
>

I agree that it's good to try out a simpler scenario to better understand
the problem. I haven't tried it yet because using retrotranslator for
classes inside a folder doesn't seem to be a solution to the problem. Here's
my reasoning:

Yes, there is an option to translate classes in a folder. I tried it and it
successfully translated the classes inside my Eclipse workspace. When I ran
the calculator-android application using the newly translated classes I was
getting the errors in [1]. I posted a question in Android Developers about
this error and received a reply [2].

The reply made sense to me, especially with regards to the fact that with
the Android plugin Eclipse compiles sources into classes and then into dex
files, so retrotranslator has no chance to translate classes in between
these steps - even if I do that outside of Eclipse. This shows from the use
of non-translated binaries (as indicated by the
java.lang.Class.isAnnotationPresent(Class.java:1131) error in the stack
trace) that might have been related to the use of pre-existing dex files or
over-writing of files by Eclipse. So unless I modify the ADT plugin the
result would still be the same, even if I use a simpler scenario.

The reply suggested to use JAR's instead. This also made sense to me and
seemed like a simpler way of solving the problem. I didn't see the
disadvantage of debugging, which as you point out is more difficult with
JAR's instead of Eclipse projects.

As I mentioned before, your comments are really helpful as they give me a
sense of direction. Please let me know if you still think we should pursue
retrotranslator for files inside a folder.


[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/30may2008
[2] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008

On Fri, Jun 6, 2008 at 9:44 PM, Adriano Crestani <ad...@apache.org>
wrote:

> Hi Oscar,
>
> Yup, you're right - there are indeed Eclipse files inside the folders. I
> guess I was confused by the different names in [1] than those that result
> [2] from importing to an Eclipse workspace - after which I see 13 projects
> in both cases. So please ignore my previous remark.
>
> I have added the projects, but still haven't changed their names. I was
> planning to modify their project names when we get it integrated to SCA,
> mainly because we will need to change the poms. Anyway, feel free to modify
> the names whenever you want ; )
>
>
> Per the reply I received on the Android Developers list [3] I started using
> retrotranslator on JAR's instead of class files. For this I created a big
> JAR file with all the Tuscany modules (including those you modified for
> Android). I translated this big JAR (around 15MB) with retrotranslator [4].
> Then I created a new workspace with only calculator-android and
> android-jdk-classes as projects and added the translated JAR as an external
> library for both projects. This resulted in errors [4] from the Android
> build process.
>
> I really do not understand this errors, but as this errors are only related
> to testcase classes they can be ignored (removed from the jars). I also did
> not understand why it's not find the .apk file:
>
> "[2008-06-06 12:52:49 - calculator-android] Could not find
> /bin/calculator-android.apk!"
>
> To work around these errors I decided to take a different approach and copy
> all the jar files contained in the individual modules to a separate folder
> and then run retrotranslator on each JAR. The jars are found inside the
> target folder of each module and are named as shown below:
>
> tuscany-<NAME>-incubating-SNAPSHOT.jar
>
> From this I found that only the SCA modules have these JAR files inside
> their respective target folders, whereas the Android modules I downloaded
> from [1] don't have these files at all
>
> Yep, this .jars are generated when the maven is executed. I'm not sure if
> you should use this .jars, because they were compiled with no reference to
> Android library. That's also why there are no .jar files for android
> modules, because you did not execute the maven on them  (and you
> shouldn't).
>
> So I decided to keep the Android
> modules [2] and add the translated JARs as libraries where needed to have
> the workspace build with no problems. If I get this running I would look
> into creating JAR files from the Android modules and then return to only
> having calculator-android and android-jdk-classes as projects and the rest
> as JAR's added as external libraries. If this works out I could then look
> into seeing which JAR's are important and which are not, in this way
> reducing the total memory footprint and coming up with a "lightweight
> mobile
> SCA core/runtime." Please let me know your thoughts on these efforts.
>
> You haven't tried this yet, right? You may try it, but I do not like this
> approach, because it will get difficult to debug sca classes as they are
> not
> imported as eclipse projects.
>
> If there is an option on retrotranslator to retrotranslate all the classes
> in a folder, it should work as well as it works on classes inside .jar
> files. So, I think you should try to understand why your first approach
> (retrotranslating the eclipse project classes) is not working trying a
> simpler scenario. Have you already tried it?
>
> Also, if the restrotranslator gets to complicated, you may try the
> Luciano's
> suggestion ; )
>
>
> Kind Regards,
> Adriano Crestani
>
> On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
> > Hi Adriano,
> >
> >
> > > Yep, they should be imported, if you check inside its folders, there
> are
> > > the
> > > eclipse project files, so they should be identified by the eclipse
> import
> > > tool as an eclipse project.
> >
> >
> > Yup, you're right - there are indeed Eclipse files inside the folders. I
> > guess I was confused by the different names in [1] than those that result
> > [2] from importing to an Eclipse workspace - after which I see 13
> projects
> > in both cases. So please ignore my previous remark.
> >
> > I don't think introspection is a good solution, hence you will need to
> > > change how the sca reads the info about each service and also services
> > > implemented for JVM would need to be adapted to run on Android. Let's
> > avoid
> > > to modify so much the SCA code, and lets try to keep retrotranslator in
> > > mind
> > > as a temporary workaround for annotations till next SDK release :S
> >
> >
> > >  Also, if you get the retrotranslator working, forget the Luciano's
> > > suggestion and vice-versa...do not try both at the same time ; )
> > >
> >
> > Will do. Thanks for the advice it helps me to focus in the right
> direction
> > :-)
> >
> > Now, a summary of what I've done up to now:
> >
> > Per the reply I received on the Android Developers list [3] I started
> using
> > retrotranslator on JAR's instead of class files. For this I created a big
> > JAR file with all the Tuscany modules (including those you modified for
> > Android). I translated this big JAR (around 15MB) with retrotranslator
> [4].
> > Then I created a new workspace with only calculator-android and
> > android-jdk-classes as projects and added the translated JAR as an
> external
> > library for both projects. This resulted in errors [4] from the Android
> > build process.
> >
> > To work around these errors I decided to take a different approach and
> copy
> > all the jar files contained in the individual modules to a separate
> folder
> > and then run retrotranslator on each JAR. The jars are found inside the
> > target folder of each module and are named as shown below:
> >
> > tuscany-<NAME>-incubating-SNAPSHOT.jar
> >
> > From this I found that only the SCA modules have these JAR files inside
> > their respective target folders, whereas the Android modules I downloaded
> > from [1] don't have these files at all. So I decided to keep the Android
> > modules [2] and add the translated JARs as libraries where needed to have
> > the workspace build with no problems. If I get this running I would look
> > into creating JAR files from the Android modules and then return to only
> > having calculator-android and android-jdk-classes as projects and the
> rest
> > as JAR's added as external libraries. If this works out I could then look
> > into seeing which JAR's are important and which are not, in this way
> > reducing the total memory footprint and coming up with a "lightweight
> > mobile
> > SCA core/runtime." Please let me know your thoughts on these efforts.
> >
> >
> > [1]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> > [2] http://androidindelft.googlepages.com/6Jun1.jpg
> > [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> > [4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
> >
> >
> > On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> > adrianocrestani@apache.org>
> > wrote:
> >
> > > Hi Oscar,
> > >
> > >
> > > When I imported the projects from [3] the following projects were not
> > > imported:
> > >
> > > core-android
> > > host-android
> > > extensibility
> > >
> > > Is this normal? Should they be imported?
> > >
> > > Yep, they should be imported, if you check inside its folders, there
> are
> > > the
> > > eclipse project files, so they should be identified by the eclipse
> import
> > > tool as an eclipse project.
> > >
> > > Thanks for the detailed explanation. I'm going to give this a try as I
> > > found
> > > an introspection related comment [2] as a workaround to another
> > annotations
> > > problem with the current SDK.
> > >
> > > I don't think introspection is a good solution, hence you will need to
> > > change how the sca reads the info about each service and also services
> > > implemented for JVM would need to be adapted to run on Android. Let's
> > avoid
> > > to modify so much the SCA code, and lets try to keep retrotranslator in
> > > mind
> > > as a temporary workaround for annotations till next SDK release :S
> > >
> > > Also, if you get the retrotranslator working, forget the Luciano's
> > > suggestion and vice-versa...do not try both at the same time ; )
> > >
> > > Any progress testing retrotranslator on a simpler scenario, just let us
> > > know
> > > ; )
> > >
> > > Kind Regards,
> > > Adriano Crestani
> > >
> > >
> > > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> > > oscar.castaneda.gsoc@gmail.com> wrote:
> > >
> > > > Hi Adriano,
> > > >
> > > > At first, build a simple, but equivalent scenario, and test it.
> > > >
> > > >
> > > > I think this is a great idea, especially because I found that the
> > "native
> > > > method not implemented" errors I'm getting [1] are still related to
> the
> > > > annotations problem. I'm getting the same errors when converting the
> > code
> > > > to
> > > > java 1.4. This makes me think that retrotranslator is actually not
> > > working.
> > > > Hopefully, testing with a simpler scenario will help me to understand
> > the
> > > > problem better.
> > > >
> > > > Sorry for the not-well-detailed info here. I meant you to do:
> > > > >
> > > > > Search in every sca code for the usage of Class.isAnnotationPresent
> > or
> > > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > > @Remotable
> > > > > annotations force it to true, for example:
> > > > >
> > > > > Annotation isRemotable = class.isAnnotationPresent
> > > > >>
> > > > >> (Remotable.class); =>
> > > > >> Annotation isRemotable = true;
> > > > >>
> > > > >> otherwise, which means, when it's not checking for the @Remotable
> > > > >> annnotation, force to false. For example:
> > > > >>
> > > > >> Annotation isReference =
> class.isAnnotationPresent(Reference.class);
> > > =>
> > > > >> Annotation isReference = false;
> > > > >
> > > > >
> > > >
> > > > Thanks for the detailed explanation. I'm going to give this a try as
> I
> > > > found
> > > > an introspection related comment [2] as a workaround to another
> > > annotations
> > > > problem with the current SDK.
> > > >
> > > > Also, I have another question for you...
> > > >
> > > > When I imported the projects from [3] the following projects were not
> > > > imported:
> > > >
> > > > core-android
> > > > host-android
> > > > extensibility
> > > >
> > > > Is this normal? Should they be imported?
> > > >
> > > >
> > > > [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > [2]
> > > >
> > > >
> > > >
> > >
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > > > [3]
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >
> > > >
> > > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > > > adrianocrestani@apache.org>
> > > > wrote:
> > > >
> > > > > Well detailed Oscar ; )
> > > > >
> > > > > It is one thing I learnt after playing hours with Android, you need
> > to
> > > > > rebuild every modified project which is imported in the android
> > > project,
> > > > > the
> > > > > android project itself does not check for modifications on its
> > > > dependencies
> > > > > :S...so, when you rebuilt the imported project it recompiled the
> > > > > uncommented
> > > > > code at JavaRuntimeModuleActivator and the SCA started to check for
> > > > > annotations once again, so you got the errors on [1], which means
> > > > > retrotranslator is still not working. Have you tested it on a
> simpler
> > > > > application as I previously suggested? Did it work? What was the
> most
> > > > > critical scenario you tested it and it worked?
> > > > >
> > > > > " Voyager-2:30May ocastaneda$ java -jar
> > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > > /../retrotranslator-android-1.2.6.jar -verbose"
> > > > >
> > > > > You should also check if it's is working as expected, as I already
> > > said,
> > > > > does not go directly testing complex solutions on complex things
> like
> > > > SCA.
> > > > > At first, build a simple, but equivalent scenario, and test it. For
> > > > > example,
> > > > > a simple android app project that uses an java library project
> which
> > > > access
> > > > > annotations on classes placed on the android project. Like our
> > android
> > > > > calculator, it's an android app project (calculator-android) which
> > uses
> > > > > java
> > > > > library projects (sca modules), and these libraries checks for
> > > > annotations
> > > > > on classes located at the android app project
> > (CalculatorService.java,
> > > > > AddService.java, etc). When you get it working on the simpler
> > scenario,
> > > > > then
> > > > > you are ready to test it on the complexer sceneario
> > > (calculator-android).
> > > > >
> > > > > Please, if you get the retrotranslator working in the simpler
> > scenario,
> > > > > send
> > > > > us a patch with it. You can create a JIRA and attach it. If you
> need
> > > any
> > > > > help, just ask ; )
> > > > >
> > > > > "code that checks for @Remotable you force to true, otherwise force
> > to
> > > > > false."
> > > > >
> > > > > Sorry for the not-well-detailed info here. I meant you to do:
> > > > >
> > > > > Search in every sca code for the usage of Class.isAnnotationPresent
> > or
> > > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > > @Remotable
> > > > > annotations force it to true, for example:
> > > > >
> > > > > Annotation isRemotable =
> class.isAnnotationPresent(Remotable.class);
> > =>
> > > > > Annotation isRemotable = true;
> > > > >
> > > > > otherwise, which means, when it's not checking for the @Remotable
> > > > > annnotation, force to false. For example:
> > > > >
> > > > > Annotation isReference =
> class.isAnnotationPresent(Reference.class);
> > =>
> > > > > Annotation isReference = false;
> > > > >
> > > > > [1] -
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > >
> > > > > Kind Regards,
> > > > > Adriano Crestani
> > > > >
> > > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > >
> > > > > > Hi Adriano,
> > > > > >
> > > > > > I continued testing retrotranslator. Here's what I've done up to
> > now.
> > > > > >
> > > > > > 1. Downloaded the modified code from [1].
> > > > > >
> > > > > > 2. Downloaded SCA modules from [2] and installed as shown below:
> > > > > >
> > > > > > svn checkout --revision 643746
> > > > > >
> > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > > > > >
> > > > > > cd modules
> > > > > >
> > > > > > mvn clean install -Dtest=no
> > > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > > > > >
> > > > > >  3. Created a new eclipse workspace and set the M2_REPO variable
> as
> > > > shown
> > > > > > below:
> > > > > >
> > > > > > mvn -Declipse.workspace=/Users/.../workspace
> eclipse:add-maven-repo
> > > > > >
> > > > > >  4. Adjusted buildpath to eliminate build errors, added Android
> > > library
> > > > > to
> > > > > > required modules, fixed references to jar files and other
> > libraries.
> > > > > >
> > > > > > 5. Uncommented lines in
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >
> > > > > > 6. Ran retrotranslator as instructed on the project site [3] and
> > > shown
> > > > > > below:
> > > > > >
> > > > > > Voyager-2:30May ocastaneda$ java -jar
> > > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > > > /../retrotranslator-android-1.2.6.jar -verbose
> > > > > >
> > > > > >  The output can be found in [4].
> > > > > > 7. Rebuilt project after uncommenting lines in
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >
> > > > > > and then re-ran retrotranslator.
> > > > > > 8. Debugging in Eclipse shows errors shown in [5] and Android
> > errors
> > > in
> > > > > > [6].
> > > > > >
> > > > > >
> > > > > >
> > > > > > As always, I'm documenting my progress on the project log. I
> > haven't
> > > > > fully
> > > > > > tested out Luciano's suggestions. I guess I'm puzzled by what you
> > > mean
> > > > by
> > > > > > this:
> > > > > >
> > > > > > "code that checks for @Remotable you force to true, otherwise
> force
> > > to
> > > > > > false."
> > > > > >
> > > > > > I'll continue looking into it and hopefully get retrotranslator
> to
> > > > work.
> > > > > I
> > > > > > also think it's a simpler option.
> > > > > >
> > > > > > Luciano: Thanks for your suggestions.
> > > > > >
> > > > > > [1]
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > >
> > > > > > [2]
> > > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > > > > >
> > > > > > [3] http://retrotranslator.sourceforge.net/#android
> > > > > >
> > > > > > [4]
> http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > > > > >
> > > > > > [5]
> > http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > > > > >
> > > > > >
> > > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > > > > adrianocrestani@apache.org> wrote:
> > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > I tried what Luciano suggested. It really works. To get it
> > working
> > > > you
> > > > > > > simply need to search on all modules where the code checks for
> > > > > @Remotable
> > > > > > > annotation and force it to true:
> > > > > > >
> > > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > > > > > >
> > > > > > > It works fine on the sca revision we are testing on Android and
> > the
> > > > > most
> > > > > > > recent revision. I only tested it as a java application, not as
> > an
> > > > > > android
> > > > > > > application.
> > > > > > >
> > > > > > > Unfortunatelly, I still think retrotranslator is a faster and
> > > simpler
> > > > > > > solution. Because the Luciano's suggestion only forces the SCA
> to
> > > > > > recognize
> > > > > > > the services with no annotations declared on their interfaces,
> > but
> > > it
> > > > > > does
> > > > > > > not avoid the Exceptions we are getting when the SCA invokes
> > > methods
> > > > > that
> > > > > > > read annotations. So, our current problem is that we are not
> > being
> > > > able
> > > > > > to
> > > > > > > use these methods and not only because we are not being able to
> > > read
> > > > > the
> > > > > > > annotations.
> > > > > > >
> > > > > > > Oscar, if you want to try the Luciano's suggestion, you will
> need
> > > to
> > > > > > > comment/adapt every sca code that tries to read the class
> > > > annotations.
> > > > > It
> > > > > > > is
> > > > > > > not necessary to comment/adapt the methods that read Method
> > > > > annotations,
> > > > > > > they are not throwning any exception. So, every code that
> checks
> > > for
> > > > > > > @Remotable you force to true, otherwise force to false.
> > > > > > >
> > > > > > > Any doubt about what I have said, just let me know ; )
> > > > > > >
> > > > > > > Suggestions are welcome : )
> > > > > > >
> > > > > > > Adriano Crestani
> > > > > > >
> > > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > > > > luckbr1975@gmail.com>
> > > > > > > wrote:
> > > > > > >
> > > > > > > > FYI, if you comment out the code that checks if a interface
> is
> > > > > > > > remoteble, you could have a version of the calculator without
> > any
> > > > > > > > annotations, and the runtime would introspect the references
> > for
> > > > the
> > > > > > > > multiple services. But note that, the introspection code will
> > > only
> > > > be
> > > > > > > > activated if there is no SCA annotations on the class.
> > > > > > > >
> > > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > > > > > <ad...@apache.org> wrote:
> > > > > > > > > Ah, the expected exception should look like this on android
> > > > > emulator:
> > > > > > > > >
> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > <
> > http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > > >
> > > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > > > > > adrianocrestani@apache.org> wrote:
> > > > > > > > >
> > > > > > > > >> Hi Oscar,
> > > > > > > > >>
> > > > > > > > >> I was indeed using the sca modules not from the sandbox.
> As
> > > you
> > > > > > > > suggested,
> > > > > > > > >> I
> > > > > > > > >> removed the tuscany-contribution-impl from my workspace
> and
> > > > added
> > > > > > the
> > > > > > > > >> version you uploaded to the sandbox. Then, I uncommented
> the
> > > > lines
> > > > > > in
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > >>
> > > > > > > > >> following the comments pointing out why those lines had
> been
> > > > > > > commented.
> > > > > > > > I'm
> > > > > > > > >> no longer getting the ClassNotFoundException. However,
> it's
> > > > > getting
> > > > > > > > stuck
> > > > > > > > >> somewhere else (before getting there I guess)...I think
> this
> > > is
> > > > > the
> > > > > > > case
> > > > > > > > >> because before and after commenting the code I get the
> same
> > > > error
> > > > > in
> > > > > > > the
> > > > > > > > >> Android emulator, an InstantiationException [1].
> > > > > > > > >>
> > > > > > > > >> Have you debugged to check exactly where this exception is
> > > being
> > > > > > > thrown?
> > > > > > > > I
> > > > > > > > >> have done the procedure I previously described  again and
> I
> > > got
> > > > it
> > > > > > > > "running"
> > > > > > > > >> as expected, which means, running till the expected
> > exception
> > > is
> > > > > > > thrown.
> > > > > > > > >>
> > > > > > > > >> I also started tinkering with retrotranslator. First I
> tried
> > > > doing
> > > > > > it
> > > > > > > > with
> > > > > > > > >> Ant, but it seems that in order to build I have to include
> > the
> > > > > whole
> > > > > > > > >> tuscany
> > > > > > > > >> projects in a way similar to how I now have in Eclipse. I
> > also
> > > > > tried
> > > > > > > > making
> > > > > > > > >> a jar out of
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > >>
> > > > > > > > >> and then feeding it to retrotranslator but unfortunately
> > it's
> > > > not
> > > > > > > > >> translating anything, as shown below.
> > > > > > > > >>
> > > > > > > > >> Voyager-2:Retrotranslator-1.2
> > > > > > > > >> .6-bin ocastaneda$ java -jar
> > > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > > >> JavaRuntimeModuleActivator.jar
> > > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > > >> retrotranslator-android-1.2.6.jar
> > > > > > > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > > > >> Transformed 0 file(s).
> > > > > > > > >>
> > > > > > > > >> There's also a maven plugin, so I might try that...but
> first
> > > > I'll
> > > > > > give
> > > > > > > > Ant
> > > > > > > > >> another go. Hopefully Google will release a new SDK soon,
> > > > > otherwise
> > > > > > as
> > > > > > > > you
> > > > > > > > >> say...retrotranslator will have to be the workaround to
> > > proceed
> > > > > with
> > > > > > > our
> > > > > > > > >> project ;-)
> > > > > > > > >>
> > > > > > > > >> Unfortunately the rumors say the new SDK version will not
> be
> > > > > > released
> > > > > > > > until
> > > > > > > > >> july 28th :S. So, it's really good you have already
> started
> > > > > working
> > > > > > on
> > > > > > > > the
> > > > > > > > >> retrotranslator, it will probably be the best workaround
> for
> > > the
> > > > > > > > annotations
> > > > > > > > >> problem till the next SDK release.
> > > > > > > > >>
> > > > > > > > >> I suggest you to forget about the build process right now,
> > > > before,
> > > > > > > check
> > > > > > > > if
> > > > > > > > >> this retrotranslator works and if it really works on
> android
> > > > > > platform.
> > > > > > > > I´m
> > > > > > > > >> really getting upset with Android, even its API methods
> does
> > > not
> > > > > > work
> > > > > > > as
> > > > > > > > >> expected :@. Anyway, try initially to compile a simple
> class
> > > > > (coded
> > > > > > by
> > > > > > > > you),
> > > > > > > > >> which contains annotations, and access these annotations.
> If
> > > it
> > > > > > works,
> > > > > > > > make
> > > > > > > > >> it more complex and test again, do it until you reach a
> > > scenario
> > > > > as
> > > > > > > > complex
> > > > > > > > >> as the SCA (a lot of external jars with annotated classes
> > > > accessed
> > > > > > by
> > > > > > > > the
> > > > > > > > >> other external jars and the Android app). Got it? : )
> > > > > > > > >>
> > > > > > > > >> Regards,
> > > > > > > > >> Adriano Crestani
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > > >>
> > > > > > > > >>> Hi Adriano,
> > > > > > > > >>>
> > > > > > > > >>> I was indeed using the sca modules not from the sandbox.
> As
> > > you
> > > > > > > > suggested,
> > > > > > > > >>> I
> > > > > > > > >>> removed the tuscany-contribution-impl from my workspace
> and
> > > > added
> > > > > > the
> > > > > > > > >>> version you uploaded to the sandbox. Then, I uncommented
> > the
> > > > > lines
> > > > > > in
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > >>>
> > > > > > > > >>> following the comments pointing out why those lines had
> > been
> > > > > > > commented.
> > > > > > > > >>> I'm
> > > > > > > > >>> no longer getting the ClassNotFoundException. However,
> it's
> > > > > getting
> > > > > > > > stuck
> > > > > > > > >>> somewhere else (before getting there I guess)...I think
> > this
> > > is
> > > > > the
> > > > > > > > case
> > > > > > > > >>> because before and after commenting the code I get the
> same
> > > > error
> > > > > > in
> > > > > > > > the
> > > > > > > > >>> Android emulator, an InstantiationException [1].
> > > > > > > > >>>
> > > > > > > > >>> I also started tinkering with retrotranslator. First I
> > tried
> > > > > doing
> > > > > > it
> > > > > > > > with
> > > > > > > > >>> Ant, but it seems that in order to build I have to
> include
> > > the
> > > > > > whole
> > > > > > > > >>> tuscany
> > > > > > > > >>> projects in a way similar to how I now have in Eclipse. I
> > > also
> > > > > > tried
> > > > > > > > >>> making
> > > > > > > > >>> a jar out of
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > >>>
> > > > > > > > >>> and then feeding it to retrotranslator but unfortunately
> > it's
> > > > not
> > > > > > > > >>> translating anything, as shown below.
> > > > > > > > >>>
> > > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > > >>> JavaRuntimeModuleActivator.jar
> > > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > > >>> retrotranslator-android-1.2.6.jar
> > > > > > > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > > > >>> Transformed 0 file(s).
> > > > > > > > >>>
> > > > > > > > >>> There's also a maven plugin, so I might try that...but
> > first
> > > > I'll
> > > > > > > give
> > > > > > > > Ant
> > > > > > > > >>> another go. Hopefully Google will release a new SDK soon,
> > > > > otherwise
> > > > > > > as
> > > > > > > > you
> > > > > > > > >>> say...retrotranslator will have to be the workaround to
> > > proceed
> > > > > > with
> > > > > > > > our
> > > > > > > > >>> project ;-)
> > > > > > > > >>>
> > > > > > > > >>> Thanks again for all your help...I'm getting ready for
> the
> > > > > official
> > > > > > > > start
> > > > > > > > >>> :-)
> > > > > > > > >>>
> > > > > > > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > > > > > >>> adrianocrestani@apache.org> wrote:
> > > > > > > > >>>
> > > > > > > > >>> > Hi Oscar,
> > > > > > > > >>> >
> > > > > > > > >>> > My mistake again, the eclipse project files of
> > > > > contribution-impl
> > > > > > > > module
> > > > > > > > >>> > were
> > > > > > > > >>> > not uploaded, so you are probably using the modules you
> > > have
> > > > > > > > downloaded
> > > > > > > > >>> > from
> > > > > > > > >>> > the sca modules. If you remove the
> > > tuscany-contribution-impl
> > > > > from
> > > > > > > > your
> > > > > > > > >>> > workspace and add this module from the sandbox it will
> > > > probably
> > > > > > > work.
> > > > > > > > >>> > Anyway, you will need to update your trunk again to get
> > the
> > > > > > project
> > > > > > > > >>> files
> > > > > > > > >>> > I'm uploading right now ; )
> > > > > > > > >>> >
> > > > > > > > >>> > OK, if you wanna try the retrotranslator as a solution
> > here
> > > > is
> > > > > a
> > > > > > > tip:
> > > > > > > > >>> most
> > > > > > > > >>> > of the code that were using the Reflection API was
> > > commented
> > > > on
> > > > > > > > >>> >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > > >>> > class, you just need to edit this class and remove the
> > > > > commented
> > > > > > > code
> > > > > > > > >>> (it's
> > > > > > > > >>> > described there).
> > > > > > > > >>> >
> > > > > > > > >>> > So, if you uncomment the code and the retrotranslador
> > > > > successfuly
> > > > > > > > work,
> > > > > > > > >>> and
> > > > > > > > >>> > I hope it will, you will reach the
> > > > > > > > >>> >
> > > > > > > >
> > > > > >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > > >>> > constructor and it should run OK. Exactly on this
> > > constructor
> > > > > I'm
> > > > > > > > >>> getting a
> > > > > > > > >>> > NPE when the code described above is commented.
> > > > > > > > >>> >
> > > > > > > > >>> > About the ant, go on and use it. Further we can
> evaluate
> > > > better
> > > > > > > where
> > > > > > > > we
> > > > > > > > >>> > place it in the entire SCA build process. BTW, we even
> > dont
> > > > > know
> > > > > > if
> > > > > > > > we
> > > > > > > > >>> will
> > > > > > > > >>> > still be using the retrotranslator in future, right?! :
> )
> > > > > > > > >>> >
> > > > > > > > >>> > Use the retrotranslator may help us a lot to workaround
> > > this
> > > > > > > problem
> > > > > > > > for
> > > > > > > > >>> > now
> > > > > > > > >>> > and go on with our project ; )
> > > > > > > > >>> >
> > > > > > > > >>> > Kind Regards,
> > > > > > > > >>> > Adriano Crestani
> > > > > > > > >>> >
> > > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > > >>> >
> > > > > > > > >>> > > Hi Adriano,
> > > > > > > > >>> > >
> > > > > > > > >>> > > Thanks alot for your answers. I was able to build the
> > > > entire
> > > > > > > > workspace
> > > > > > > > >>> > from
> > > > > > > > >>> > > your instructions. When running calculator-android as
> > an
> > > > > > "Android
> > > > > > > > >>> > > application" I'm getting a ClassNotFoundException [1]
> > for
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > > > > > >>> > > Is the exception you referred to in your original
> > email?
> > > > > > > > >>> > >
> > > > > > > > >>> > > ...when
> > > > > > > > >>> > > > you run the calculator-android project as an
> "Android
> > > > > > > > application"
> > > > > > > > >>> you
> > > > > > > > >>> > > > should get an exception, that was generated
> initially
> > > by
> > > > a
> > > > > > NPE
> > > > > > > > >>> thrown
> > > > > > > > >>> > by
> > > > > > > > >>> > > >
> > > > > > > > >>> >
> > > > > > > >
> > > > > >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > > >>> > > > constructor. This is caused because the latest
> > Android
> > > > SDK
> > > > > > does
> > > > > > > > not
> > > > > > > > >>> > > support
> > > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check
> the
> > > > > > @Reference
> > > > > > > > >>> > > annotations
> > > > > > > > >>> > > > (I commented the code which tries to read the
> > > > annotations,
> > > > > so
> > > > > > > > when
> > > > > > > > >>> the
> > > > > > > > >>> > > > execution reach this constructor it throws the
> NPE).
> > > > > > > > >>> > > >
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > > Searching for the class in the exception I'm getting
> I
> > > > found
> > > > > > > > >>> > >
> org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> > In
> > > > > > > > >>> > getServiceClasses
> > > > > > > > >>> > > it loads the service class I'm getting problems with
> > when
> > > > > > running
> > > > > > > > >>> > > calculator-android as an "Android application":
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > > I couldn't find the corresponding java file in my
> > > imported
> > > > > > > > workspace
> > > > > > > > >>> and
> > > > > > > > >>> > > found that there is no package like
> > > > > > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > > > > > >>> > >
> > > > > > > > >>> > > Am I missing something? Or are these the errors you
> > would
> > > > > > expect?
> > > > > > > > >>> > >
> > > > > > > > >>> > > I would like to get to the point where I get the
> > > exception
> > > > > you
> > > > > > > > >>> described
> > > > > > > > >>> > > and
> > > > > > > > >>> > > try to run retrotranslator from there. However, as
> I'm
> > > > using
> > > > > > the
> > > > > > > > ADT
> > > > > > > > >>> > plugin
> > > > > > > > >>> > > in eclipse I would need to extract code that
> "declares
> > or
> > > > > > > analyzes
> > > > > > > > >>> > > annotations you may extract it into a separate
> library
> > > that
> > > > > can
> > > > > > > be
> > > > > > > > >>> > > processed
> > > > > > > > >>> > > with Retrotranslator and added to the main project."
> > That
> > > > is,
> > > > > > > > unless I
> > > > > > > > >>> > use
> > > > > > > > >>> > > Ant, in which case I would only need to add a few
> lines
> > > to
> > > > > > > > build.xml.
> > > > > > > > >>> I'm
> > > > > > > > >>> > > continuing to look into this, any thoughts are more
> > than
> > > > > > welcome
> > > > > > > > :-)
> > > > > > > > >>> > >
> > > > > > > > >>> > > [1]
> http://delftandroid.googlepages.com/14may2008.html
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > > > > > >>> > >
> > > > > > > > >>> > > > Hi,
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Thanks all for the feedback ; )
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > At first, I want to correct one mistake, on the
> first
> > > > step
> > > > > I
> > > > > > > > >>> described
> > > > > > > > >>> > on
> > > > > > > > >>> > > > my
> > > > > > > > >>> > > > previous email, I should not have added the word
> > > > "install",
> > > > > > it
> > > > > > > > >>> probably
> > > > > > > > >>> > > > would lead the reader to run the "mvn clean
> install"
> > in
> > > > the
> > > > > > > > >>> downloaded
> > > > > > > > >>> > > > files, as Oscar did. Also, on this same step, the
> > code
> > > > > should
> > > > > > > not
> > > > > > > > be
> > > > > > > > >>> > > > downloaded from [1], but from [2].
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Simon:
> > > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source
> codes
> > > are
> > > > > > under
> > > > > > > > CDDL
> > > > > > > > >>> > 1.0
> > > > > > > > >>> > > > license, it's only needed to include the CDDL
> license
> > > > > header
> > > > > > on
> > > > > > > > each
> > > > > > > > >>> > > file,
> > > > > > > > >>> > > > and it's already done : )
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Jean:
> > > > > > > > >>> > > > I think it is better to keep the code in the
> sandbox
> > > for
> > > > > now.
> > > > > > > At
> > > > > > > > >>> first,
> > > > > > > > >>> > > > it's
> > > > > > > > >>> > > > not working on the current SCA modules revision
> yet.
> > > And
> > > > > > also,
> > > > > > > > I'm
> > > > > > > > >>> > > > commenting many lines at some modules just to get a
> > > > "first
> > > > > > run"
> > > > > > > > of
> > > > > > > > >>> > > > calculator-sample to further evaluate why and how
> > this
> > > > > > > commented
> > > > > > > > >>> lines
> > > > > > > > >>> > > will
> > > > > > > > >>> > > > be adapted to be compatible with both: SCA Java and
> > SCA
> > > > > > > Android.
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Oscar:
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > - Are host-android and core-android a part of
> > > > > > > calculator-android?
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > What do you mean when you say "part"? They are used
> > by
> > > > > > > > >>> > > calculator-android,
> > > > > > > > >>> > > > and will prabably be added to tuscany sca modules
> in
> > > > future
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > - Should the calculator-android included in [1]
> have
> > > > > included
> > > > > > > an
> > > > > > > > >>> > > > "AndroidManifest.xml" file?
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the
> eclipse
> > > > > project
> > > > > > > > files
> > > > > > > > >>> of
> > > > > > > > >>> > > > these
> > > > > > > > >>> > > > projects. I have already commited these files and
> if
> > > you
> > > > > > update
> > > > > > > > your
> > > > > > > > >>> > > trunk
> > > > > > > > >>> > > > you will get them ; ). So, delete the ones you have
> > > > > created.
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > - How can I fix the build errors? Is there
> something
> > > else
> > > > > > > needed
> > > > > > > > in
> > > > > > > > >>> > > > addition
> > > > > > > > >>> > > > to including the Android Library?
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > No, the Android library is really simples, it only
> > > > contains
> > > > > > the
> > > > > > > > >>> > > android.jar
> > > > > > > > >>> > > > file located in your Android SDK.
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Please, do not run the "mvn clean build" and "mvn
> > > > -Peclipse
> > > > > > > > >>> > > > eclipse:eclipse"
> > > > > > > > >>> > > > commands on the sandbox files, the eclipse project
> > > files
> > > > > are
> > > > > > > > already
> > > > > > > > >>> in
> > > > > > > > >>> > > > modules and you should build the modules using the
> > > > eclipse
> > > > > > for
> > > > > > > > now.
> > > > > > > > >>> The
> > > > > > > > >>> > > > maven config files are not updated yet with the
> > > > > modifications
> > > > > > I
> > > > > > > > have
> > > > > > > > >>> > done
> > > > > > > > >>> > > > on
> > > > > > > > >>> > > > these modules, so they will not generate the
> correct
> > > > > project
> > > > > > > > files,
> > > > > > > > >>> > > worse,
> > > > > > > > >>> > > > they will override the ones I have created.
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Then, clean and build your entire workspace, if you
> > > still
> > > > > get
> > > > > > > any
> > > > > > > > >>> > errors,
> > > > > > > > >>> > > > let me know ; )
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or,
> > why
> > > > > should
> > > > > > > > this
> > > > > > > > >>> not
> > > > > > > > >>> > be
> > > > > > > > >>> > > > imported?
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > It seems the revision I suggested already had the
> > saxon
> > > > > > module
> > > > > > > > >>> removed
> > > > > > > > >>> > > from
> > > > > > > > >>> > > > repo. So, you mistakenly removed another one that
> > > > > shouldn´t.
> > > > > > > > Please,
> > > > > > > > >>> > > import
> > > > > > > > >>> > > > the databinding-saxon module again into your
> > workspace.
> > > > > > > > >>> > > >
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > Regards,
> > > > > > > > >>> > > > Adriano Crestani
> > > > > > > > >>> > > >
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > [1] -
> > > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > > > > > >>> > > >
> > > > > > > > >>> > >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > > > > > >>> > > > >
> > > > > > > > >>> > > > [2] -
> > > > > > > > >>> > > >
> > > > > > > > >>> > >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
> > > Delfino
> > > > <
> > > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > > > > > >>> > > >
> > > > > > > > >>> > > > > Mike Edwards wrote:
> > > > > > > > >>> > > > >
> > > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > > > > > >>> > > > > > >
> > > > > > > > >>> > > > > > >  1. Downloaded the modified code from [1] and
> > > > > installed
> > > > > > > as
> > > > > > > > >>> shown
> > > > > > > > >>> > > > > > > > below:
> > > > > > > > >>> > > > > > > >
> > > > > > > > >>> > > > > > > > svn checkout
> > > > > > > > >>> > > > > > > >
> > > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > > > >>> > > > > > > >
> > > > > > > > >>> > > > > > > > cd mobile-android
> > > > > > > > >>> > > > > > > >
> > > > > > > > >>> > > > > > > >
> > > > > > > > >>> > > > > > > If there's no objection from others, I'd be
> > happy
> > > > to
> > > > > > see
> > > > > > > > this
> > > > > > > > >>> > code
> > > > > > > > >>> > > > > > > move from sandbox to trunk as we now have
> > several
> > > > > > people
> > > > > > > > doing
> > > > > > > > >>> > > > development
> > > > > > > > >>> > > > > > > on this android integration.
> > > > > > > > >>> > > > > > >
> > > > > > > > >>> > > > > > > Adriano, you could start with something like
> > > > > > > > >>> > trunk/java/sca/android
> > > > > > > > >>> > > > > > > and later progressively try to converge the
> > code
> > > > with
> > > > > > the
> > > > > > > > code
> > > > > > > > >>> in
> > > > > > > > >>> > > > trunk,
> > > > > > > > >>> > > > > > > with architected plug points for the android
> > > > specific
> > > > > > > code
> > > > > > > > >>> etc.
> > > > > > > > >>> > > > > > >
> > > > > > > > >>> > > > > > > Thoughts?
> > > > > > > > >>> > > > > > >
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > > > I assume that moving to trunk does not also
> imply
> > > > > "making
> > > > > > > > part
> > > > > > > > >>> of
> > > > > > > > >>> > the
> > > > > > > > >>> > > > > > main build"?
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > > > I'd be a bit concerned at experimental code
> > > entering
> > > > > the
> > > > > > > > build
> > > > > > > > >>> at
> > > > > > > > >>> > > this
> > > > > > > > >>> > > > > > stage.
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > > > Yours,  Mike.
> > > > > > > > >>> > > > > >
> > > > > > > > >>> > > > >
> > > > > > > > >>> > > > > I think it's business as usual, code that doesn't
> > > work
> > > > > does
> > > > > > > not
> > > > > > > > go
> > > > > > > > >>> in
> > > > > > > > >>> > > the
> > > > > > > > >>> > > > > main build, code that's getting stable can go in
> > the
> > > > main
> > > > > > > build
> > > > > > > > at
> > > > > > > > >>> > some
> > > > > > > > >>> > > > > point when people have no specific objections,
> and
> > > > > > different
> > > > > > > > >>> profiles
> > > > > > > > >>> > > can
> > > > > > > > >>> > > > be
> > > > > > > > >>> > > > > used to subset particular builds.
> > > > > > > > >>> > > > >
> > > > > > > > >>> > > > > --
> > > > > > > > >>> > > > > Jean-Sebastien
> > > > > > > > >>> > > > >
> > > > > > > > >>> > > >
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > >
> > > > > > > > >>> > > --
> > > > > > > > >>> > > best,
> > > > > > > > >>> > > -oscar
> > > > > > > > >>> > >
> > > > > > > > >>> > > Oscar Castañeda
> > > > > > > > >>> > >
> > > > > > > > >>> >
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>>
> > > > > > > > >>> --
> > > > > > > > >>> best,
> > > > > > > > >>> -oscar
> > > > > > > > >>>
> > > > > > > > >>> Oscar Castañeda
> > > > > > > > >>>
> > > > > > > > >>
> > > > > > > > >>
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Luciano Resende
> > > > > > > > Apache Tuscany Committer
> > > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende>
> > > > <http://people.apache.org/%7Elresende>
> > > > > <http://people.apache.org/%7Elresende>
> > > > > > <http://people.apache.org/%7Elresende><
> > > > > > > http://people.apache.org/%7Elresende>
> > > > > > > > http://lresende.blogspot.com/
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > best,
> > > > > > -oscar
> > > > > >
> > > > > > Oscar Castañeda
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > best,
> > > > -oscar
> > > >
> > > > Oscar Castañeda
> > > >
> > >
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,

Yup, you're right - there are indeed Eclipse files inside the folders. I
guess I was confused by the different names in [1] than those that result
[2] from importing to an Eclipse workspace - after which I see 13 projects
in both cases. So please ignore my previous remark.

I have added the projects, but still haven't changed their names. I was
planning to modify their project names when we get it integrated to SCA,
mainly because we will need to change the poms. Anyway, feel free to modify
the names whenever you want ; )


Per the reply I received on the Android Developers list [3] I started using
retrotranslator on JAR's instead of class files. For this I created a big
JAR file with all the Tuscany modules (including those you modified for
Android). I translated this big JAR (around 15MB) with retrotranslator [4].
Then I created a new workspace with only calculator-android and
android-jdk-classes as projects and added the translated JAR as an external
library for both projects. This resulted in errors [4] from the Android
build process.

I really do not understand this errors, but as this errors are only related
to testcase classes they can be ignored (removed from the jars). I also did
not understand why it's not find the .apk file:

"[2008-06-06 12:52:49 - calculator-android] Could not find
/bin/calculator-android.apk!"

To work around these errors I decided to take a different approach and copy
all the jar files contained in the individual modules to a separate folder
and then run retrotranslator on each JAR. The jars are found inside the
target folder of each module and are named as shown below:

tuscany-<NAME>-incubating-SNAPSHOT.jar

>From this I found that only the SCA modules have these JAR files inside
their respective target folders, whereas the Android modules I downloaded
from [1] don't have these files at all

Yep, this .jars are generated when the maven is executed. I'm not sure if
you should use this .jars, because they were compiled with no reference to
Android library. That's also why there are no .jar files for android
modules, because you did not execute the maven on them  (and you shouldn't).

So I decided to keep the Android
modules [2] and add the translated JARs as libraries where needed to have
the workspace build with no problems. If I get this running I would look
into creating JAR files from the Android modules and then return to only
having calculator-android and android-jdk-classes as projects and the rest
as JAR's added as external libraries. If this works out I could then look
into seeing which JAR's are important and which are not, in this way
reducing the total memory footprint and coming up with a "lightweight mobile
SCA core/runtime." Please let me know your thoughts on these efforts.

You haven't tried this yet, right? You may try it, but I do not like this
approach, because it will get difficult to debug sca classes as they are not
imported as eclipse projects.

If there is an option on retrotranslator to retrotranslate all the classes
in a folder, it should work as well as it works on classes inside .jar
files. So, I think you should try to understand why your first approach
(retrotranslating the eclipse project classes) is not working trying a
simpler scenario. Have you already tried it?

Also, if the restrotranslator gets to complicated, you may try the Luciano's
suggestion ; )


Kind Regards,
Adriano Crestani

On Fri, Jun 6, 2008 at 9:50 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
>
> > Yep, they should be imported, if you check inside its folders, there are
> > the
> > eclipse project files, so they should be identified by the eclipse import
> > tool as an eclipse project.
>
>
> Yup, you're right - there are indeed Eclipse files inside the folders. I
> guess I was confused by the different names in [1] than those that result
> [2] from importing to an Eclipse workspace - after which I see 13 projects
> in both cases. So please ignore my previous remark.
>
> I don't think introspection is a good solution, hence you will need to
> > change how the sca reads the info about each service and also services
> > implemented for JVM would need to be adapted to run on Android. Let's
> avoid
> > to modify so much the SCA code, and lets try to keep retrotranslator in
> > mind
> > as a temporary workaround for annotations till next SDK release :S
>
>
> >  Also, if you get the retrotranslator working, forget the Luciano's
> > suggestion and vice-versa...do not try both at the same time ; )
> >
>
> Will do. Thanks for the advice it helps me to focus in the right direction
> :-)
>
> Now, a summary of what I've done up to now:
>
> Per the reply I received on the Android Developers list [3] I started using
> retrotranslator on JAR's instead of class files. For this I created a big
> JAR file with all the Tuscany modules (including those you modified for
> Android). I translated this big JAR (around 15MB) with retrotranslator [4].
> Then I created a new workspace with only calculator-android and
> android-jdk-classes as projects and added the translated JAR as an external
> library for both projects. This resulted in errors [4] from the Android
> build process.
>
> To work around these errors I decided to take a different approach and copy
> all the jar files contained in the individual modules to a separate folder
> and then run retrotranslator on each JAR. The jars are found inside the
> target folder of each module and are named as shown below:
>
> tuscany-<NAME>-incubating-SNAPSHOT.jar
>
> From this I found that only the SCA modules have these JAR files inside
> their respective target folders, whereas the Android modules I downloaded
> from [1] don't have these files at all. So I decided to keep the Android
> modules [2] and add the translated JARs as libraries where needed to have
> the workspace build with no problems. If I get this running I would look
> into creating JAR files from the Android modules and then return to only
> having calculator-android and android-jdk-classes as projects and the rest
> as JAR's added as external libraries. If this works out I could then look
> into seeing which JAR's are important and which are not, in this way
> reducing the total memory footprint and coming up with a "lightweight
> mobile
> SCA core/runtime." Please let me know your thoughts on these efforts.
>
>
> [1]
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> [2] http://androidindelft.googlepages.com/6Jun1.jpg
> [3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
> [4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008
>
>
> On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <
> adrianocrestani@apache.org>
> wrote:
>
> > Hi Oscar,
> >
> >
> > When I imported the projects from [3] the following projects were not
> > imported:
> >
> > core-android
> > host-android
> > extensibility
> >
> > Is this normal? Should they be imported?
> >
> > Yep, they should be imported, if you check inside its folders, there are
> > the
> > eclipse project files, so they should be identified by the eclipse import
> > tool as an eclipse project.
> >
> > Thanks for the detailed explanation. I'm going to give this a try as I
> > found
> > an introspection related comment [2] as a workaround to another
> annotations
> > problem with the current SDK.
> >
> > I don't think introspection is a good solution, hence you will need to
> > change how the sca reads the info about each service and also services
> > implemented for JVM would need to be adapted to run on Android. Let's
> avoid
> > to modify so much the SCA code, and lets try to keep retrotranslator in
> > mind
> > as a temporary workaround for annotations till next SDK release :S
> >
> > Also, if you get the retrotranslator working, forget the Luciano's
> > suggestion and vice-versa...do not try both at the same time ; )
> >
> > Any progress testing retrotranslator on a simpler scenario, just let us
> > know
> > ; )
> >
> > Kind Regards,
> > Adriano Crestani
> >
> >
> > On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> > oscar.castaneda.gsoc@gmail.com> wrote:
> >
> > > Hi Adriano,
> > >
> > > At first, build a simple, but equivalent scenario, and test it.
> > >
> > >
> > > I think this is a great idea, especially because I found that the
> "native
> > > method not implemented" errors I'm getting [1] are still related to the
> > > annotations problem. I'm getting the same errors when converting the
> code
> > > to
> > > java 1.4. This makes me think that retrotranslator is actually not
> > working.
> > > Hopefully, testing with a simpler scenario will help me to understand
> the
> > > problem better.
> > >
> > > Sorry for the not-well-detailed info here. I meant you to do:
> > > >
> > > > Search in every sca code for the usage of Class.isAnnotationPresent
> or
> > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > @Remotable
> > > > annotations force it to true, for example:
> > > >
> > > > Annotation isRemotable = class.isAnnotationPresent
> > > >>
> > > >> (Remotable.class); =>
> > > >> Annotation isRemotable = true;
> > > >>
> > > >> otherwise, which means, when it's not checking for the @Remotable
> > > >> annnotation, force to false. For example:
> > > >>
> > > >> Annotation isReference = class.isAnnotationPresent(Reference.class);
> > =>
> > > >> Annotation isReference = false;
> > > >
> > > >
> > >
> > > Thanks for the detailed explanation. I'm going to give this a try as I
> > > found
> > > an introspection related comment [2] as a workaround to another
> > annotations
> > > problem with the current SDK.
> > >
> > > Also, I have another question for you...
> > >
> > > When I imported the projects from [3] the following projects were not
> > > imported:
> > >
> > > core-android
> > > host-android
> > > extensibility
> > >
> > > Is this normal? Should they be imported?
> > >
> > >
> > > [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > [2]
> > >
> > >
> > >
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > > [3]
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >
> > >
> > > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > > adrianocrestani@apache.org>
> > > wrote:
> > >
> > > > Well detailed Oscar ; )
> > > >
> > > > It is one thing I learnt after playing hours with Android, you need
> to
> > > > rebuild every modified project which is imported in the android
> > project,
> > > > the
> > > > android project itself does not check for modifications on its
> > > dependencies
> > > > :S...so, when you rebuilt the imported project it recompiled the
> > > > uncommented
> > > > code at JavaRuntimeModuleActivator and the SCA started to check for
> > > > annotations once again, so you got the errors on [1], which means
> > > > retrotranslator is still not working. Have you tested it on a simpler
> > > > application as I previously suggested? Did it work? What was the most
> > > > critical scenario you tested it and it worked?
> > > >
> > > > " Voyager-2:30May ocastaneda$ java -jar
> > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > /../retrotranslator-android-1.2.6.jar -verbose"
> > > >
> > > > You should also check if it's is working as expected, as I already
> > said,
> > > > does not go directly testing complex solutions on complex things like
> > > SCA.
> > > > At first, build a simple, but equivalent scenario, and test it. For
> > > > example,
> > > > a simple android app project that uses an java library project which
> > > access
> > > > annotations on classes placed on the android project. Like our
> android
> > > > calculator, it's an android app project (calculator-android) which
> uses
> > > > java
> > > > library projects (sca modules), and these libraries checks for
> > > annotations
> > > > on classes located at the android app project
> (CalculatorService.java,
> > > > AddService.java, etc). When you get it working on the simpler
> scenario,
> > > > then
> > > > you are ready to test it on the complexer sceneario
> > (calculator-android).
> > > >
> > > > Please, if you get the retrotranslator working in the simpler
> scenario,
> > > > send
> > > > us a patch with it. You can create a JIRA and attach it. If you need
> > any
> > > > help, just ask ; )
> > > >
> > > > "code that checks for @Remotable you force to true, otherwise force
> to
> > > > false."
> > > >
> > > > Sorry for the not-well-detailed info here. I meant you to do:
> > > >
> > > > Search in every sca code for the usage of Class.isAnnotationPresent
> or
> > > > getAnnotations or getAnnotation methods. If it checks for a the
> > > @Remotable
> > > > annotations force it to true, for example:
> > > >
> > > > Annotation isRemotable = class.isAnnotationPresent(Remotable.class);
> =>
> > > > Annotation isRemotable = true;
> > > >
> > > > otherwise, which means, when it's not checking for the @Remotable
> > > > annnotation, force to false. For example:
> > > >
> > > > Annotation isReference = class.isAnnotationPresent(Reference.class);
> =>
> > > > Annotation isReference = false;
> > > >
> > > > [1] -
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > >
> > > > Kind Regards,
> > > > Adriano Crestani
> > > >
> > > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > > > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >
> > > > > Hi Adriano,
> > > > >
> > > > > I continued testing retrotranslator. Here's what I've done up to
> now.
> > > > >
> > > > > 1. Downloaded the modified code from [1].
> > > > >
> > > > > 2. Downloaded SCA modules from [2] and installed as shown below:
> > > > >
> > > > > svn checkout --revision 643746
> > > > >
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > > > >
> > > > > cd modules
> > > > >
> > > > > mvn clean install -Dtest=no
> > > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > > > >
> > > > >  3. Created a new eclipse workspace and set the M2_REPO variable as
> > > shown
> > > > > below:
> > > > >
> > > > > mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo
> > > > >
> > > > >  4. Adjusted buildpath to eliminate build errors, added Android
> > library
> > > > to
> > > > > required modules, fixed references to jar files and other
> libraries.
> > > > >
> > > > > 5. Uncommented lines in
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >
> > > > > 6. Ran retrotranslator as instructed on the project site [3] and
> > shown
> > > > > below:
> > > > >
> > > > > Voyager-2:30May ocastaneda$ java -jar
> > > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > > /../retrotranslator-android-1.2.6.jar -verbose
> > > > >
> > > > >  The output can be found in [4].
> > > > > 7. Rebuilt project after uncommenting lines in
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >
> > > > > and then re-ran retrotranslator.
> > > > > 8. Debugging in Eclipse shows errors shown in [5] and Android
> errors
> > in
> > > > > [6].
> > > > >
> > > > >
> > > > >
> > > > > As always, I'm documenting my progress on the project log. I
> haven't
> > > > fully
> > > > > tested out Luciano's suggestions. I guess I'm puzzled by what you
> > mean
> > > by
> > > > > this:
> > > > >
> > > > > "code that checks for @Remotable you force to true, otherwise force
> > to
> > > > > false."
> > > > >
> > > > > I'll continue looking into it and hopefully get retrotranslator to
> > > work.
> > > > I
> > > > > also think it's a simpler option.
> > > > >
> > > > > Luciano: Thanks for your suggestions.
> > > > >
> > > > > [1]
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > >
> > > > > [2]
> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > > > >
> > > > > [3] http://retrotranslator.sourceforge.net/#android
> > > > >
> > > > > [4] http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > > > >
> > > > > [5]
> http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > > > >
> > > > >
> > > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > > > adrianocrestani@apache.org> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I tried what Luciano suggested. It really works. To get it
> working
> > > you
> > > > > > simply need to search on all modules where the code checks for
> > > > @Remotable
> > > > > > annotation and force it to true:
> > > > > >
> > > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > > > > >
> > > > > > It works fine on the sca revision we are testing on Android and
> the
> > > > most
> > > > > > recent revision. I only tested it as a java application, not as
> an
> > > > > android
> > > > > > application.
> > > > > >
> > > > > > Unfortunatelly, I still think retrotranslator is a faster and
> > simpler
> > > > > > solution. Because the Luciano's suggestion only forces the SCA to
> > > > > recognize
> > > > > > the services with no annotations declared on their interfaces,
> but
> > it
> > > > > does
> > > > > > not avoid the Exceptions we are getting when the SCA invokes
> > methods
> > > > that
> > > > > > read annotations. So, our current problem is that we are not
> being
> > > able
> > > > > to
> > > > > > use these methods and not only because we are not being able to
> > read
> > > > the
> > > > > > annotations.
> > > > > >
> > > > > > Oscar, if you want to try the Luciano's suggestion, you will need
> > to
> > > > > > comment/adapt every sca code that tries to read the class
> > > annotations.
> > > > It
> > > > > > is
> > > > > > not necessary to comment/adapt the methods that read Method
> > > > annotations,
> > > > > > they are not throwning any exception. So, every code that checks
> > for
> > > > > > @Remotable you force to true, otherwise force to false.
> > > > > >
> > > > > > Any doubt about what I have said, just let me know ; )
> > > > > >
> > > > > > Suggestions are welcome : )
> > > > > >
> > > > > > Adriano Crestani
> > > > > >
> > > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > > > luckbr1975@gmail.com>
> > > > > > wrote:
> > > > > >
> > > > > > > FYI, if you comment out the code that checks if a interface is
> > > > > > > remoteble, you could have a version of the calculator without
> any
> > > > > > > annotations, and the runtime would introspect the references
> for
> > > the
> > > > > > > multiple services. But note that, the introspection code will
> > only
> > > be
> > > > > > > activated if there is no SCA annotations on the class.
> > > > > > >
> > > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > > > > <ad...@apache.org> wrote:
> > > > > > > > Ah, the expected exception should look like this on android
> > > > emulator:
> > > > > > > >
> http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > <
> http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > > >
> > > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > > > > adrianocrestani@apache.org> wrote:
> > > > > > > >
> > > > > > > >> Hi Oscar,
> > > > > > > >>
> > > > > > > >> I was indeed using the sca modules not from the sandbox. As
> > you
> > > > > > > suggested,
> > > > > > > >> I
> > > > > > > >> removed the tuscany-contribution-impl from my workspace and
> > > added
> > > > > the
> > > > > > > >> version you uploaded to the sandbox. Then, I uncommented the
> > > lines
> > > > > in
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > >>
> > > > > > > >> following the comments pointing out why those lines had been
> > > > > > commented.
> > > > > > > I'm
> > > > > > > >> no longer getting the ClassNotFoundException. However, it's
> > > > getting
> > > > > > > stuck
> > > > > > > >> somewhere else (before getting there I guess)...I think this
> > is
> > > > the
> > > > > > case
> > > > > > > >> because before and after commenting the code I get the same
> > > error
> > > > in
> > > > > > the
> > > > > > > >> Android emulator, an InstantiationException [1].
> > > > > > > >>
> > > > > > > >> Have you debugged to check exactly where this exception is
> > being
> > > > > > thrown?
> > > > > > > I
> > > > > > > >> have done the procedure I previously described  again and I
> > got
> > > it
> > > > > > > "running"
> > > > > > > >> as expected, which means, running till the expected
> exception
> > is
> > > > > > thrown.
> > > > > > > >>
> > > > > > > >> I also started tinkering with retrotranslator. First I tried
> > > doing
> > > > > it
> > > > > > > with
> > > > > > > >> Ant, but it seems that in order to build I have to include
> the
> > > > whole
> > > > > > > >> tuscany
> > > > > > > >> projects in a way similar to how I now have in Eclipse. I
> also
> > > > tried
> > > > > > > making
> > > > > > > >> a jar out of
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > >>
> > > > > > > >> and then feeding it to retrotranslator but unfortunately
> it's
> > > not
> > > > > > > >> translating anything, as shown below.
> > > > > > > >>
> > > > > > > >> Voyager-2:Retrotranslator-1.2
> > > > > > > >> .6-bin ocastaneda$ java -jar
> > > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > >> JavaRuntimeModuleActivator.jar
> > > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > >> retrotranslator-android-1.2.6.jar
> > > > > > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > > >> Transformed 0 file(s).
> > > > > > > >>
> > > > > > > >> There's also a maven plugin, so I might try that...but first
> > > I'll
> > > > > give
> > > > > > > Ant
> > > > > > > >> another go. Hopefully Google will release a new SDK soon,
> > > > otherwise
> > > > > as
> > > > > > > you
> > > > > > > >> say...retrotranslator will have to be the workaround to
> > proceed
> > > > with
> > > > > > our
> > > > > > > >> project ;-)
> > > > > > > >>
> > > > > > > >> Unfortunately the rumors say the new SDK version will not be
> > > > > released
> > > > > > > until
> > > > > > > >> july 28th :S. So, it's really good you have already started
> > > > working
> > > > > on
> > > > > > > the
> > > > > > > >> retrotranslator, it will probably be the best workaround for
> > the
> > > > > > > annotations
> > > > > > > >> problem till the next SDK release.
> > > > > > > >>
> > > > > > > >> I suggest you to forget about the build process right now,
> > > before,
> > > > > > check
> > > > > > > if
> > > > > > > >> this retrotranslator works and if it really works on android
> > > > > platform.
> > > > > > > I´m
> > > > > > > >> really getting upset with Android, even its API methods does
> > not
> > > > > work
> > > > > > as
> > > > > > > >> expected :@. Anyway, try initially to compile a simple class
> > > > (coded
> > > > > by
> > > > > > > you),
> > > > > > > >> which contains annotations, and access these annotations. If
> > it
> > > > > works,
> > > > > > > make
> > > > > > > >> it more complex and test again, do it until you reach a
> > scenario
> > > > as
> > > > > > > complex
> > > > > > > >> as the SCA (a lot of external jars with annotated classes
> > > accessed
> > > > > by
> > > > > > > the
> > > > > > > >> other external jars and the Android app). Got it? : )
> > > > > > > >>
> > > > > > > >> Regards,
> > > > > > > >> Adriano Crestani
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > >>
> > > > > > > >>> Hi Adriano,
> > > > > > > >>>
> > > > > > > >>> I was indeed using the sca modules not from the sandbox. As
> > you
> > > > > > > suggested,
> > > > > > > >>> I
> > > > > > > >>> removed the tuscany-contribution-impl from my workspace and
> > > added
> > > > > the
> > > > > > > >>> version you uploaded to the sandbox. Then, I uncommented
> the
> > > > lines
> > > > > in
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > >>>
> > > > > > > >>> following the comments pointing out why those lines had
> been
> > > > > > commented.
> > > > > > > >>> I'm
> > > > > > > >>> no longer getting the ClassNotFoundException. However, it's
> > > > getting
> > > > > > > stuck
> > > > > > > >>> somewhere else (before getting there I guess)...I think
> this
> > is
> > > > the
> > > > > > > case
> > > > > > > >>> because before and after commenting the code I get the same
> > > error
> > > > > in
> > > > > > > the
> > > > > > > >>> Android emulator, an InstantiationException [1].
> > > > > > > >>>
> > > > > > > >>> I also started tinkering with retrotranslator. First I
> tried
> > > > doing
> > > > > it
> > > > > > > with
> > > > > > > >>> Ant, but it seems that in order to build I have to include
> > the
> > > > > whole
> > > > > > > >>> tuscany
> > > > > > > >>> projects in a way similar to how I now have in Eclipse. I
> > also
> > > > > tried
> > > > > > > >>> making
> > > > > > > >>> a jar out of
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > >>>
> > > > > > > >>> and then feeding it to retrotranslator but unfortunately
> it's
> > > not
> > > > > > > >>> translating anything, as shown below.
> > > > > > > >>>
> > > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > > >>> JavaRuntimeModuleActivator.jar
> > > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > > >>> retrotranslator-android-1.2.6.jar
> > > > > > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > > >>> Transformed 0 file(s).
> > > > > > > >>>
> > > > > > > >>> There's also a maven plugin, so I might try that...but
> first
> > > I'll
> > > > > > give
> > > > > > > Ant
> > > > > > > >>> another go. Hopefully Google will release a new SDK soon,
> > > > otherwise
> > > > > > as
> > > > > > > you
> > > > > > > >>> say...retrotranslator will have to be the workaround to
> > proceed
> > > > > with
> > > > > > > our
> > > > > > > >>> project ;-)
> > > > > > > >>>
> > > > > > > >>> Thanks again for all your help...I'm getting ready for the
> > > > official
> > > > > > > start
> > > > > > > >>> :-)
> > > > > > > >>>
> > > > > > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > > > > >>> adrianocrestani@apache.org> wrote:
> > > > > > > >>>
> > > > > > > >>> > Hi Oscar,
> > > > > > > >>> >
> > > > > > > >>> > My mistake again, the eclipse project files of
> > > > contribution-impl
> > > > > > > module
> > > > > > > >>> > were
> > > > > > > >>> > not uploaded, so you are probably using the modules you
> > have
> > > > > > > downloaded
> > > > > > > >>> > from
> > > > > > > >>> > the sca modules. If you remove the
> > tuscany-contribution-impl
> > > > from
> > > > > > > your
> > > > > > > >>> > workspace and add this module from the sandbox it will
> > > probably
> > > > > > work.
> > > > > > > >>> > Anyway, you will need to update your trunk again to get
> the
> > > > > project
> > > > > > > >>> files
> > > > > > > >>> > I'm uploading right now ; )
> > > > > > > >>> >
> > > > > > > >>> > OK, if you wanna try the retrotranslator as a solution
> here
> > > is
> > > > a
> > > > > > tip:
> > > > > > > >>> most
> > > > > > > >>> > of the code that were using the Reflection API was
> > commented
> > > on
> > > > > > > >>> >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > > >>> > class, you just need to edit this class and remove the
> > > > commented
> > > > > > code
> > > > > > > >>> (it's
> > > > > > > >>> > described there).
> > > > > > > >>> >
> > > > > > > >>> > So, if you uncomment the code and the retrotranslador
> > > > successfuly
> > > > > > > work,
> > > > > > > >>> and
> > > > > > > >>> > I hope it will, you will reach the
> > > > > > > >>> >
> > > > > > >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > >>> > constructor and it should run OK. Exactly on this
> > constructor
> > > > I'm
> > > > > > > >>> getting a
> > > > > > > >>> > NPE when the code described above is commented.
> > > > > > > >>> >
> > > > > > > >>> > About the ant, go on and use it. Further we can evaluate
> > > better
> > > > > > where
> > > > > > > we
> > > > > > > >>> > place it in the entire SCA build process. BTW, we even
> dont
> > > > know
> > > > > if
> > > > > > > we
> > > > > > > >>> will
> > > > > > > >>> > still be using the retrotranslator in future, right?! : )
> > > > > > > >>> >
> > > > > > > >>> > Use the retrotranslator may help us a lot to workaround
> > this
> > > > > > problem
> > > > > > > for
> > > > > > > >>> > now
> > > > > > > >>> > and go on with our project ; )
> > > > > > > >>> >
> > > > > > > >>> > Kind Regards,
> > > > > > > >>> > Adriano Crestani
> > > > > > > >>> >
> > > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > > >>> >
> > > > > > > >>> > > Hi Adriano,
> > > > > > > >>> > >
> > > > > > > >>> > > Thanks alot for your answers. I was able to build the
> > > entire
> > > > > > > workspace
> > > > > > > >>> > from
> > > > > > > >>> > > your instructions. When running calculator-android as
> an
> > > > > "Android
> > > > > > > >>> > > application" I'm getting a ClassNotFoundException [1]
> for
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > > > > >>> > > Is the exception you referred to in your original
> email?
> > > > > > > >>> > >
> > > > > > > >>> > > ...when
> > > > > > > >>> > > > you run the calculator-android project as an "Android
> > > > > > > application"
> > > > > > > >>> you
> > > > > > > >>> > > > should get an exception, that was generated initially
> > by
> > > a
> > > > > NPE
> > > > > > > >>> thrown
> > > > > > > >>> > by
> > > > > > > >>> > > >
> > > > > > > >>> >
> > > > > > >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > > >>> > > > constructor. This is caused because the latest
> Android
> > > SDK
> > > > > does
> > > > > > > not
> > > > > > > >>> > > support
> > > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check the
> > > > > @Reference
> > > > > > > >>> > > annotations
> > > > > > > >>> > > > (I commented the code which tries to read the
> > > annotations,
> > > > so
> > > > > > > when
> > > > > > > >>> the
> > > > > > > >>> > > > execution reach this constructor it throws the NPE).
> > > > > > > >>> > > >
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > > Searching for the class in the exception I'm getting I
> > > found
> > > > > > > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery.
> In
> > > > > > > >>> > getServiceClasses
> > > > > > > >>> > > it loads the service class I'm getting problems with
> when
> > > > > running
> > > > > > > >>> > > calculator-android as an "Android application":
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > > I couldn't find the corresponding java file in my
> > imported
> > > > > > > workspace
> > > > > > > >>> and
> > > > > > > >>> > > found that there is no package like
> > > > > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > > > > >>> > >
> > > > > > > >>> > > Am I missing something? Or are these the errors you
> would
> > > > > expect?
> > > > > > > >>> > >
> > > > > > > >>> > > I would like to get to the point where I get the
> > exception
> > > > you
> > > > > > > >>> described
> > > > > > > >>> > > and
> > > > > > > >>> > > try to run retrotranslator from there. However, as I'm
> > > using
> > > > > the
> > > > > > > ADT
> > > > > > > >>> > plugin
> > > > > > > >>> > > in eclipse I would need to extract code that "declares
> or
> > > > > > analyzes
> > > > > > > >>> > > annotations you may extract it into a separate library
> > that
> > > > can
> > > > > > be
> > > > > > > >>> > > processed
> > > > > > > >>> > > with Retrotranslator and added to the main project."
> That
> > > is,
> > > > > > > unless I
> > > > > > > >>> > use
> > > > > > > >>> > > Ant, in which case I would only need to add a few lines
> > to
> > > > > > > build.xml.
> > > > > > > >>> I'm
> > > > > > > >>> > > continuing to look into this, any thoughts are more
> than
> > > > > welcome
> > > > > > > :-)
> > > > > > > >>> > >
> > > > > > > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > > > > >>> > >
> > > > > > > >>> > > > Hi,
> > > > > > > >>> > > >
> > > > > > > >>> > > > Thanks all for the feedback ; )
> > > > > > > >>> > > >
> > > > > > > >>> > > > At first, I want to correct one mistake, on the first
> > > step
> > > > I
> > > > > > > >>> described
> > > > > > > >>> > on
> > > > > > > >>> > > > my
> > > > > > > >>> > > > previous email, I should not have added the word
> > > "install",
> > > > > it
> > > > > > > >>> probably
> > > > > > > >>> > > > would lead the reader to run the "mvn clean install"
> in
> > > the
> > > > > > > >>> downloaded
> > > > > > > >>> > > > files, as Oscar did. Also, on this same step, the
> code
> > > > should
> > > > > > not
> > > > > > > be
> > > > > > > >>> > > > downloaded from [1], but from [2].
> > > > > > > >>> > > >
> > > > > > > >>> > > > Simon:
> > > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source codes
> > are
> > > > > under
> > > > > > > CDDL
> > > > > > > >>> > 1.0
> > > > > > > >>> > > > license, it's only needed to include the CDDL license
> > > > header
> > > > > on
> > > > > > > each
> > > > > > > >>> > > file,
> > > > > > > >>> > > > and it's already done : )
> > > > > > > >>> > > >
> > > > > > > >>> > > > Jean:
> > > > > > > >>> > > > I think it is better to keep the code in the sandbox
> > for
> > > > now.
> > > > > > At
> > > > > > > >>> first,
> > > > > > > >>> > > > it's
> > > > > > > >>> > > > not working on the current SCA modules revision yet.
> > And
> > > > > also,
> > > > > > > I'm
> > > > > > > >>> > > > commenting many lines at some modules just to get a
> > > "first
> > > > > run"
> > > > > > > of
> > > > > > > >>> > > > calculator-sample to further evaluate why and how
> this
> > > > > > commented
> > > > > > > >>> lines
> > > > > > > >>> > > will
> > > > > > > >>> > > > be adapted to be compatible with both: SCA Java and
> SCA
> > > > > > Android.
> > > > > > > >>> > > >
> > > > > > > >>> > > > Oscar:
> > > > > > > >>> > > >
> > > > > > > >>> > > > - Are host-android and core-android a part of
> > > > > > calculator-android?
> > > > > > > >>> > > >
> > > > > > > >>> > > > What do you mean when you say "part"? They are used
> by
> > > > > > > >>> > > calculator-android,
> > > > > > > >>> > > > and will prabably be added to tuscany sca modules in
> > > future
> > > > > > > >>> > > >
> > > > > > > >>> > > > - Should the calculator-android included in [1] have
> > > > included
> > > > > > an
> > > > > > > >>> > > > "AndroidManifest.xml" file?
> > > > > > > >>> > > >
> > > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse
> > > > project
> > > > > > > files
> > > > > > > >>> of
> > > > > > > >>> > > > these
> > > > > > > >>> > > > projects. I have already commited these files and if
> > you
> > > > > update
> > > > > > > your
> > > > > > > >>> > > trunk
> > > > > > > >>> > > > you will get them ; ). So, delete the ones you have
> > > > created.
> > > > > > > >>> > > >
> > > > > > > >>> > > > - How can I fix the build errors? Is there something
> > else
> > > > > > needed
> > > > > > > in
> > > > > > > >>> > > > addition
> > > > > > > >>> > > > to including the Android Library?
> > > > > > > >>> > > >
> > > > > > > >>> > > > No, the Android library is really simples, it only
> > > contains
> > > > > the
> > > > > > > >>> > > android.jar
> > > > > > > >>> > > > file located in your Android SDK.
> > > > > > > >>> > > >
> > > > > > > >>> > > > Please, do not run the "mvn clean build" and "mvn
> > > -Peclipse
> > > > > > > >>> > > > eclipse:eclipse"
> > > > > > > >>> > > > commands on the sandbox files, the eclipse project
> > files
> > > > are
> > > > > > > already
> > > > > > > >>> in
> > > > > > > >>> > > > modules and you should build the modules using the
> > > eclipse
> > > > > for
> > > > > > > now.
> > > > > > > >>> The
> > > > > > > >>> > > > maven config files are not updated yet with the
> > > > modifications
> > > > > I
> > > > > > > have
> > > > > > > >>> > done
> > > > > > > >>> > > > on
> > > > > > > >>> > > > these modules, so they will not generate the correct
> > > > project
> > > > > > > files,
> > > > > > > >>> > > worse,
> > > > > > > >>> > > > they will override the ones I have created.
> > > > > > > >>> > > >
> > > > > > > >>> > > > Then, clean and build your entire workspace, if you
> > still
> > > > get
> > > > > > any
> > > > > > > >>> > errors,
> > > > > > > >>> > > > let me know ; )
> > > > > > > >>> > > >
> > > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or,
> why
> > > > should
> > > > > > > this
> > > > > > > >>> not
> > > > > > > >>> > be
> > > > > > > >>> > > > imported?
> > > > > > > >>> > > >
> > > > > > > >>> > > > It seems the revision I suggested already had the
> saxon
> > > > > module
> > > > > > > >>> removed
> > > > > > > >>> > > from
> > > > > > > >>> > > > repo. So, you mistakenly removed another one that
> > > > shouldn´t.
> > > > > > > Please,
> > > > > > > >>> > > import
> > > > > > > >>> > > > the databinding-saxon module again into your
> workspace.
> > > > > > > >>> > > >
> > > > > > > >>> > > >
> > > > > > > >>> > > > Regards,
> > > > > > > >>> > > > Adriano Crestani
> > > > > > > >>> > > >
> > > > > > > >>> > > >
> > > > > > > >>> > > > [1] -
> > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > > > > >>> > > >
> > > > > > > >>> > >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > > > > >>> > > > >
> > > > > > > >>> > > > [2] -
> > > > > > > >>> > > >
> > > > > > > >>> > >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > > > >>> > > >
> > > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
> > Delfino
> > > <
> > > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > > > > >>> > > >
> > > > > > > >>> > > > > Mike Edwards wrote:
> > > > > > > >>> > > > >
> > > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > > > > >>> > > > > > >
> > > > > > > >>> > > > > > >  1. Downloaded the modified code from [1] and
> > > > installed
> > > > > > as
> > > > > > > >>> shown
> > > > > > > >>> > > > > > > > below:
> > > > > > > >>> > > > > > > >
> > > > > > > >>> > > > > > > > svn checkout
> > > > > > > >>> > > > > > > >
> > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > > >>> > > > > > > >
> > > > > > > >>> > > > > > > > cd mobile-android
> > > > > > > >>> > > > > > > >
> > > > > > > >>> > > > > > > >
> > > > > > > >>> > > > > > > If there's no objection from others, I'd be
> happy
> > > to
> > > > > see
> > > > > > > this
> > > > > > > >>> > code
> > > > > > > >>> > > > > > > move from sandbox to trunk as we now have
> several
> > > > > people
> > > > > > > doing
> > > > > > > >>> > > > development
> > > > > > > >>> > > > > > > on this android integration.
> > > > > > > >>> > > > > > >
> > > > > > > >>> > > > > > > Adriano, you could start with something like
> > > > > > > >>> > trunk/java/sca/android
> > > > > > > >>> > > > > > > and later progressively try to converge the
> code
> > > with
> > > > > the
> > > > > > > code
> > > > > > > >>> in
> > > > > > > >>> > > > trunk,
> > > > > > > >>> > > > > > > with architected plug points for the android
> > > specific
> > > > > > code
> > > > > > > >>> etc.
> > > > > > > >>> > > > > > >
> > > > > > > >>> > > > > > > Thoughts?
> > > > > > > >>> > > > > > >
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > > > I assume that moving to trunk does not also imply
> > > > "making
> > > > > > > part
> > > > > > > >>> of
> > > > > > > >>> > the
> > > > > > > >>> > > > > > main build"?
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > > > I'd be a bit concerned at experimental code
> > entering
> > > > the
> > > > > > > build
> > > > > > > >>> at
> > > > > > > >>> > > this
> > > > > > > >>> > > > > > stage.
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > > > Yours,  Mike.
> > > > > > > >>> > > > > >
> > > > > > > >>> > > > >
> > > > > > > >>> > > > > I think it's business as usual, code that doesn't
> > work
> > > > does
> > > > > > not
> > > > > > > go
> > > > > > > >>> in
> > > > > > > >>> > > the
> > > > > > > >>> > > > > main build, code that's getting stable can go in
> the
> > > main
> > > > > > build
> > > > > > > at
> > > > > > > >>> > some
> > > > > > > >>> > > > > point when people have no specific objections, and
> > > > > different
> > > > > > > >>> profiles
> > > > > > > >>> > > can
> > > > > > > >>> > > > be
> > > > > > > >>> > > > > used to subset particular builds.
> > > > > > > >>> > > > >
> > > > > > > >>> > > > > --
> > > > > > > >>> > > > > Jean-Sebastien
> > > > > > > >>> > > > >
> > > > > > > >>> > > >
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > >
> > > > > > > >>> > > --
> > > > > > > >>> > > best,
> > > > > > > >>> > > -oscar
> > > > > > > >>> > >
> > > > > > > >>> > > Oscar Castañeda
> > > > > > > >>> > >
> > > > > > > >>> >
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>>
> > > > > > > >>> --
> > > > > > > >>> best,
> > > > > > > >>> -oscar
> > > > > > > >>>
> > > > > > > >>> Oscar Castañeda
> > > > > > > >>>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Luciano Resende
> > > > > > > Apache Tuscany Committer
> > > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende>
> > > > <http://people.apache.org/%7Elresende>
> > > > > <http://people.apache.org/%7Elresende><
> > > > > > http://people.apache.org/%7Elresende>
> > > > > > > http://lresende.blogspot.com/
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > best,
> > > > > -oscar
> > > > >
> > > > > Oscar Castañeda
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > best,
> > > -oscar
> > >
> > > Oscar Castañeda
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,


> Yep, they should be imported, if you check inside its folders, there are
> the
> eclipse project files, so they should be identified by the eclipse import
> tool as an eclipse project.


Yup, you're right - there are indeed Eclipse files inside the folders. I
guess I was confused by the different names in [1] than those that result
[2] from importing to an Eclipse workspace - after which I see 13 projects
in both cases. So please ignore my previous remark.

I don't think introspection is a good solution, hence you will need to
> change how the sca reads the info about each service and also services
> implemented for JVM would need to be adapted to run on Android. Let's avoid
> to modify so much the SCA code, and lets try to keep retrotranslator in
> mind
> as a temporary workaround for annotations till next SDK release :S


>  Also, if you get the retrotranslator working, forget the Luciano's
> suggestion and vice-versa...do not try both at the same time ; )
>

Will do. Thanks for the advice it helps me to focus in the right direction
:-)

Now, a summary of what I've done up to now:

Per the reply I received on the Android Developers list [3] I started using
retrotranslator on JAR's instead of class files. For this I created a big
JAR file with all the Tuscany modules (including those you modified for
Android). I translated this big JAR (around 15MB) with retrotranslator [4].
Then I created a new workspace with only calculator-android and
android-jdk-classes as projects and added the translated JAR as an external
library for both projects. This resulted in errors [4] from the Android
build process.

To work around these errors I decided to take a different approach and copy
all the jar files contained in the individual modules to a separate folder
and then run retrotranslator on each JAR. The jars are found inside the
target folder of each module and are named as shown below:

tuscany-<NAME>-incubating-SNAPSHOT.jar

>From this I found that only the SCA modules have these JAR files inside
their respective target folders, whereas the Android modules I downloaded
from [1] don't have these files at all. So I decided to keep the Android
modules [2] and add the translated JARs as libraries where needed to have
the workspace build with no problems. If I get this running I would look
into creating JAR files from the Android modules and then return to only
having calculator-android and android-jdk-classes as projects and the rest
as JAR's added as external libraries. If this works out I could then look
into seeing which JAR's are important and which are not, in this way
reducing the total memory footprint and coming up with a "lightweight mobile
SCA core/runtime." Please let me know your thoughts on these efforts.


[1]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
[2] http://androidindelft.googlepages.com/6Jun1.jpg
[3] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/4Jun2008
[4] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/5Jun2008


On Wed, Jun 4, 2008 at 6:05 PM, Adriano Crestani <ad...@apache.org>
wrote:

> Hi Oscar,
>
>
> When I imported the projects from [3] the following projects were not
> imported:
>
> core-android
> host-android
> extensibility
>
> Is this normal? Should they be imported?
>
> Yep, they should be imported, if you check inside its folders, there are
> the
> eclipse project files, so they should be identified by the eclipse import
> tool as an eclipse project.
>
> Thanks for the detailed explanation. I'm going to give this a try as I
> found
> an introspection related comment [2] as a workaround to another annotations
> problem with the current SDK.
>
> I don't think introspection is a good solution, hence you will need to
> change how the sca reads the info about each service and also services
> implemented for JVM would need to be adapted to run on Android. Let's avoid
> to modify so much the SCA code, and lets try to keep retrotranslator in
> mind
> as a temporary workaround for annotations till next SDK release :S
>
> Also, if you get the retrotranslator working, forget the Luciano's
> suggestion and vice-versa...do not try both at the same time ; )
>
> Any progress testing retrotranslator on a simpler scenario, just let us
> know
> ; )
>
> Kind Regards,
> Adriano Crestani
>
>
> On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
> > Hi Adriano,
> >
> > At first, build a simple, but equivalent scenario, and test it.
> >
> >
> > I think this is a great idea, especially because I found that the "native
> > method not implemented" errors I'm getting [1] are still related to the
> > annotations problem. I'm getting the same errors when converting the code
> > to
> > java 1.4. This makes me think that retrotranslator is actually not
> working.
> > Hopefully, testing with a simpler scenario will help me to understand the
> > problem better.
> >
> > Sorry for the not-well-detailed info here. I meant you to do:
> > >
> > > Search in every sca code for the usage of Class.isAnnotationPresent or
> > > getAnnotations or getAnnotation methods. If it checks for a the
> > @Remotable
> > > annotations force it to true, for example:
> > >
> > > Annotation isRemotable = class.isAnnotationPresent
> > >>
> > >> (Remotable.class); =>
> > >> Annotation isRemotable = true;
> > >>
> > >> otherwise, which means, when it's not checking for the @Remotable
> > >> annnotation, force to false. For example:
> > >>
> > >> Annotation isReference = class.isAnnotationPresent(Reference.class);
> =>
> > >> Annotation isReference = false;
> > >
> > >
> >
> > Thanks for the detailed explanation. I'm going to give this a try as I
> > found
> > an introspection related comment [2] as a workaround to another
> annotations
> > problem with the current SDK.
> >
> > Also, I have another question for you...
> >
> > When I imported the projects from [3] the following projects were not
> > imported:
> >
> > core-android
> > host-android
> > extensibility
> >
> > Is this normal? Should they be imported?
> >
> >
> > [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > [2]
> >
> >
> >
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> > [3]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >
> >
> > On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> > adrianocrestani@apache.org>
> > wrote:
> >
> > > Well detailed Oscar ; )
> > >
> > > It is one thing I learnt after playing hours with Android, you need to
> > > rebuild every modified project which is imported in the android
> project,
> > > the
> > > android project itself does not check for modifications on its
> > dependencies
> > > :S...so, when you rebuilt the imported project it recompiled the
> > > uncommented
> > > code at JavaRuntimeModuleActivator and the SCA started to check for
> > > annotations once again, so you got the errors on [1], which means
> > > retrotranslator is still not working. Have you tested it on a simpler
> > > application as I previously suggested? Did it work? What was the most
> > > critical scenario you tested it and it worked?
> > >
> > > " Voyager-2:30May ocastaneda$ java -jar
> > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > -target 1.5 -reflection safe -stripannot -classpath
> > > /../retrotranslator-android-1.2.6.jar -verbose"
> > >
> > > You should also check if it's is working as expected, as I already
> said,
> > > does not go directly testing complex solutions on complex things like
> > SCA.
> > > At first, build a simple, but equivalent scenario, and test it. For
> > > example,
> > > a simple android app project that uses an java library project which
> > access
> > > annotations on classes placed on the android project. Like our android
> > > calculator, it's an android app project (calculator-android) which uses
> > > java
> > > library projects (sca modules), and these libraries checks for
> > annotations
> > > on classes located at the android app project (CalculatorService.java,
> > > AddService.java, etc). When you get it working on the simpler scenario,
> > > then
> > > you are ready to test it on the complexer sceneario
> (calculator-android).
> > >
> > > Please, if you get the retrotranslator working in the simpler scenario,
> > > send
> > > us a patch with it. You can create a JIRA and attach it. If you need
> any
> > > help, just ask ; )
> > >
> > > "code that checks for @Remotable you force to true, otherwise force to
> > > false."
> > >
> > > Sorry for the not-well-detailed info here. I meant you to do:
> > >
> > > Search in every sca code for the usage of Class.isAnnotationPresent or
> > > getAnnotations or getAnnotation methods. If it checks for a the
> > @Remotable
> > > annotations force it to true, for example:
> > >
> > > Annotation isRemotable = class.isAnnotationPresent(Remotable.class); =>
> > > Annotation isRemotable = true;
> > >
> > > otherwise, which means, when it's not checking for the @Remotable
> > > annnotation, force to false. For example:
> > >
> > > Annotation isReference = class.isAnnotationPresent(Reference.class); =>
> > > Annotation isReference = false;
> > >
> > > [1] - http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > >
> > > Kind Regards,
> > > Adriano Crestani
> > >
> > > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > > oscar.castaneda.gsoc@gmail.com> wrote:
> > >
> > > > Hi Adriano,
> > > >
> > > > I continued testing retrotranslator. Here's what I've done up to now.
> > > >
> > > > 1. Downloaded the modified code from [1].
> > > >
> > > > 2. Downloaded SCA modules from [2] and installed as shown below:
> > > >
> > > > svn checkout --revision 643746
> > > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > > >
> > > > cd modules
> > > >
> > > > mvn clean install -Dtest=no
> > > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > > >
> > > >  3. Created a new eclipse workspace and set the M2_REPO variable as
> > shown
> > > > below:
> > > >
> > > > mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo
> > > >
> > > >  4. Adjusted buildpath to eliminate build errors, added Android
> library
> > > to
> > > > required modules, fixed references to jar files and other libraries.
> > > >
> > > > 5. Uncommented lines in
> > > >
> > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >
> > > > 6. Ran retrotranslator as instructed on the project site [3] and
> shown
> > > > below:
> > > >
> > > > Voyager-2:30May ocastaneda$ java -jar
> > > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > > -target 1.5 -reflection safe -stripannot -classpath
> > > > /../retrotranslator-android-1.2.6.jar -verbose
> > > >
> > > >  The output can be found in [4].
> > > > 7. Rebuilt project after uncommenting lines in
> > > >
> > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >
> > > > and then re-ran retrotranslator.
> > > > 8. Debugging in Eclipse shows errors shown in [5] and Android errors
> in
> > > > [6].
> > > >
> > > >
> > > >
> > > > As always, I'm documenting my progress on the project log. I haven't
> > > fully
> > > > tested out Luciano's suggestions. I guess I'm puzzled by what you
> mean
> > by
> > > > this:
> > > >
> > > > "code that checks for @Remotable you force to true, otherwise force
> to
> > > > false."
> > > >
> > > > I'll continue looking into it and hopefully get retrotranslator to
> > work.
> > > I
> > > > also think it's a simpler option.
> > > >
> > > > Luciano: Thanks for your suggestions.
> > > >
> > > > [1]
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >
> > > > [2]
> > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > > >
> > > > [3] http://retrotranslator.sourceforge.net/#android
> > > >
> > > > [4] http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > > >
> > > > [5] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > > >
> > > >
> > > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > > adrianocrestani@apache.org> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I tried what Luciano suggested. It really works. To get it working
> > you
> > > > > simply need to search on all modules where the code checks for
> > > @Remotable
> > > > > annotation and force it to true:
> > > > >
> > > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > > > >
> > > > > It works fine on the sca revision we are testing on Android and the
> > > most
> > > > > recent revision. I only tested it as a java application, not as an
> > > > android
> > > > > application.
> > > > >
> > > > > Unfortunatelly, I still think retrotranslator is a faster and
> simpler
> > > > > solution. Because the Luciano's suggestion only forces the SCA to
> > > > recognize
> > > > > the services with no annotations declared on their interfaces, but
> it
> > > > does
> > > > > not avoid the Exceptions we are getting when the SCA invokes
> methods
> > > that
> > > > > read annotations. So, our current problem is that we are not being
> > able
> > > > to
> > > > > use these methods and not only because we are not being able to
> read
> > > the
> > > > > annotations.
> > > > >
> > > > > Oscar, if you want to try the Luciano's suggestion, you will need
> to
> > > > > comment/adapt every sca code that tries to read the class
> > annotations.
> > > It
> > > > > is
> > > > > not necessary to comment/adapt the methods that read Method
> > > annotations,
> > > > > they are not throwning any exception. So, every code that checks
> for
> > > > > @Remotable you force to true, otherwise force to false.
> > > > >
> > > > > Any doubt about what I have said, just let me know ; )
> > > > >
> > > > > Suggestions are welcome : )
> > > > >
> > > > > Adriano Crestani
> > > > >
> > > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > > luckbr1975@gmail.com>
> > > > > wrote:
> > > > >
> > > > > > FYI, if you comment out the code that checks if a interface is
> > > > > > remoteble, you could have a version of the calculator without any
> > > > > > annotations, and the runtime would introspect the references for
> > the
> > > > > > multiple services. But note that, the introspection code will
> only
> > be
> > > > > > activated if there is no SCA annotations on the class.
> > > > > >
> > > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > > > <ad...@apache.org> wrote:
> > > > > > > Ah, the expected exception should look like this on android
> > > emulator:
> > > > > > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > > >
> > > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > > > adrianocrestani@apache.org> wrote:
> > > > > > >
> > > > > > >> Hi Oscar,
> > > > > > >>
> > > > > > >> I was indeed using the sca modules not from the sandbox. As
> you
> > > > > > suggested,
> > > > > > >> I
> > > > > > >> removed the tuscany-contribution-impl from my workspace and
> > added
> > > > the
> > > > > > >> version you uploaded to the sandbox. Then, I uncommented the
> > lines
> > > > in
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >>
> > > > > > >> following the comments pointing out why those lines had been
> > > > > commented.
> > > > > > I'm
> > > > > > >> no longer getting the ClassNotFoundException. However, it's
> > > getting
> > > > > > stuck
> > > > > > >> somewhere else (before getting there I guess)...I think this
> is
> > > the
> > > > > case
> > > > > > >> because before and after commenting the code I get the same
> > error
> > > in
> > > > > the
> > > > > > >> Android emulator, an InstantiationException [1].
> > > > > > >>
> > > > > > >> Have you debugged to check exactly where this exception is
> being
> > > > > thrown?
> > > > > > I
> > > > > > >> have done the procedure I previously described  again and I
> got
> > it
> > > > > > "running"
> > > > > > >> as expected, which means, running till the expected exception
> is
> > > > > thrown.
> > > > > > >>
> > > > > > >> I also started tinkering with retrotranslator. First I tried
> > doing
> > > > it
> > > > > > with
> > > > > > >> Ant, but it seems that in order to build I have to include the
> > > whole
> > > > > > >> tuscany
> > > > > > >> projects in a way similar to how I now have in Eclipse. I also
> > > tried
> > > > > > making
> > > > > > >> a jar out of
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >>
> > > > > > >> and then feeding it to retrotranslator but unfortunately it's
> > not
> > > > > > >> translating anything, as shown below.
> > > > > > >>
> > > > > > >> Voyager-2:Retrotranslator-1.2
> > > > > > >> .6-bin ocastaneda$ java -jar
> > > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > >> JavaRuntimeModuleActivator.jar
> > > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > >> retrotranslator-android-1.2.6.jar
> > > > > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > >> Transformed 0 file(s).
> > > > > > >>
> > > > > > >> There's also a maven plugin, so I might try that...but first
> > I'll
> > > > give
> > > > > > Ant
> > > > > > >> another go. Hopefully Google will release a new SDK soon,
> > > otherwise
> > > > as
> > > > > > you
> > > > > > >> say...retrotranslator will have to be the workaround to
> proceed
> > > with
> > > > > our
> > > > > > >> project ;-)
> > > > > > >>
> > > > > > >> Unfortunately the rumors say the new SDK version will not be
> > > > released
> > > > > > until
> > > > > > >> july 28th :S. So, it's really good you have already started
> > > working
> > > > on
> > > > > > the
> > > > > > >> retrotranslator, it will probably be the best workaround for
> the
> > > > > > annotations
> > > > > > >> problem till the next SDK release.
> > > > > > >>
> > > > > > >> I suggest you to forget about the build process right now,
> > before,
> > > > > check
> > > > > > if
> > > > > > >> this retrotranslator works and if it really works on android
> > > > platform.
> > > > > > I´m
> > > > > > >> really getting upset with Android, even its API methods does
> not
> > > > work
> > > > > as
> > > > > > >> expected :@. Anyway, try initially to compile a simple class
> > > (coded
> > > > by
> > > > > > you),
> > > > > > >> which contains annotations, and access these annotations. If
> it
> > > > works,
> > > > > > make
> > > > > > >> it more complex and test again, do it until you reach a
> scenario
> > > as
> > > > > > complex
> > > > > > >> as the SCA (a lot of external jars with annotated classes
> > accessed
> > > > by
> > > > > > the
> > > > > > >> other external jars and the Android app). Got it? : )
> > > > > > >>
> > > > > > >> Regards,
> > > > > > >> Adriano Crestani
> > > > > > >>
> > > > > > >>
> > > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > >>
> > > > > > >>> Hi Adriano,
> > > > > > >>>
> > > > > > >>> I was indeed using the sca modules not from the sandbox. As
> you
> > > > > > suggested,
> > > > > > >>> I
> > > > > > >>> removed the tuscany-contribution-impl from my workspace and
> > added
> > > > the
> > > > > > >>> version you uploaded to the sandbox. Then, I uncommented the
> > > lines
> > > > in
> > > > > > >>>
> > > > > > >>>
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >>>
> > > > > > >>> following the comments pointing out why those lines had been
> > > > > commented.
> > > > > > >>> I'm
> > > > > > >>> no longer getting the ClassNotFoundException. However, it's
> > > getting
> > > > > > stuck
> > > > > > >>> somewhere else (before getting there I guess)...I think this
> is
> > > the
> > > > > > case
> > > > > > >>> because before and after commenting the code I get the same
> > error
> > > > in
> > > > > > the
> > > > > > >>> Android emulator, an InstantiationException [1].
> > > > > > >>>
> > > > > > >>> I also started tinkering with retrotranslator. First I tried
> > > doing
> > > > it
> > > > > > with
> > > > > > >>> Ant, but it seems that in order to build I have to include
> the
> > > > whole
> > > > > > >>> tuscany
> > > > > > >>> projects in a way similar to how I now have in Eclipse. I
> also
> > > > tried
> > > > > > >>> making
> > > > > > >>> a jar out of
> > > > > > >>>
> > > > > > >>>
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >>>
> > > > > > >>> and then feeding it to retrotranslator but unfortunately it's
> > not
> > > > > > >>> translating anything, as shown below.
> > > > > > >>>
> > > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > > >>> JavaRuntimeModuleActivator.jar
> > > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > > > >>> retrotranslator-android-1.2.6.jar
> > > > > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > > >>> Transformed 0 file(s).
> > > > > > >>>
> > > > > > >>> There's also a maven plugin, so I might try that...but first
> > I'll
> > > > > give
> > > > > > Ant
> > > > > > >>> another go. Hopefully Google will release a new SDK soon,
> > > otherwise
> > > > > as
> > > > > > you
> > > > > > >>> say...retrotranslator will have to be the workaround to
> proceed
> > > > with
> > > > > > our
> > > > > > >>> project ;-)
> > > > > > >>>
> > > > > > >>> Thanks again for all your help...I'm getting ready for the
> > > official
> > > > > > start
> > > > > > >>> :-)
> > > > > > >>>
> > > > > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > > > > >>>
> > > > > > >>>
> > > > > > >>>
> > > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > > > >>> adrianocrestani@apache.org> wrote:
> > > > > > >>>
> > > > > > >>> > Hi Oscar,
> > > > > > >>> >
> > > > > > >>> > My mistake again, the eclipse project files of
> > > contribution-impl
> > > > > > module
> > > > > > >>> > were
> > > > > > >>> > not uploaded, so you are probably using the modules you
> have
> > > > > > downloaded
> > > > > > >>> > from
> > > > > > >>> > the sca modules. If you remove the
> tuscany-contribution-impl
> > > from
> > > > > > your
> > > > > > >>> > workspace and add this module from the sandbox it will
> > probably
> > > > > work.
> > > > > > >>> > Anyway, you will need to update your trunk again to get the
> > > > project
> > > > > > >>> files
> > > > > > >>> > I'm uploading right now ; )
> > > > > > >>> >
> > > > > > >>> > OK, if you wanna try the retrotranslator as a solution here
> > is
> > > a
> > > > > tip:
> > > > > > >>> most
> > > > > > >>> > of the code that were using the Reflection API was
> commented
> > on
> > > > > > >>> >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > > >>> > class, you just need to edit this class and remove the
> > > commented
> > > > > code
> > > > > > >>> (it's
> > > > > > >>> > described there).
> > > > > > >>> >
> > > > > > >>> > So, if you uncomment the code and the retrotranslador
> > > successfuly
> > > > > > work,
> > > > > > >>> and
> > > > > > >>> > I hope it will, you will reach the
> > > > > > >>> >
> > > > > >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > >>> > constructor and it should run OK. Exactly on this
> constructor
> > > I'm
> > > > > > >>> getting a
> > > > > > >>> > NPE when the code described above is commented.
> > > > > > >>> >
> > > > > > >>> > About the ant, go on and use it. Further we can evaluate
> > better
> > > > > where
> > > > > > we
> > > > > > >>> > place it in the entire SCA build process. BTW, we even dont
> > > know
> > > > if
> > > > > > we
> > > > > > >>> will
> > > > > > >>> > still be using the retrotranslator in future, right?! : )
> > > > > > >>> >
> > > > > > >>> > Use the retrotranslator may help us a lot to workaround
> this
> > > > > problem
> > > > > > for
> > > > > > >>> > now
> > > > > > >>> > and go on with our project ; )
> > > > > > >>> >
> > > > > > >>> > Kind Regards,
> > > > > > >>> > Adriano Crestani
> > > > > > >>> >
> > > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > > >>> >
> > > > > > >>> > > Hi Adriano,
> > > > > > >>> > >
> > > > > > >>> > > Thanks alot for your answers. I was able to build the
> > entire
> > > > > > workspace
> > > > > > >>> > from
> > > > > > >>> > > your instructions. When running calculator-android as an
> > > > "Android
> > > > > > >>> > > application" I'm getting a ClassNotFoundException [1] for
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > > > >>> > > Is the exception you referred to in your original email?
> > > > > > >>> > >
> > > > > > >>> > > ...when
> > > > > > >>> > > > you run the calculator-android project as an "Android
> > > > > > application"
> > > > > > >>> you
> > > > > > >>> > > > should get an exception, that was generated initially
> by
> > a
> > > > NPE
> > > > > > >>> thrown
> > > > > > >>> > by
> > > > > > >>> > > >
> > > > > > >>> >
> > > > > >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > > >>> > > > constructor. This is caused because the latest Android
> > SDK
> > > > does
> > > > > > not
> > > > > > >>> > > support
> > > > > > >>> > > > the Reflection API yet. So, the SCA cannot check the
> > > > @Reference
> > > > > > >>> > > annotations
> > > > > > >>> > > > (I commented the code which tries to read the
> > annotations,
> > > so
> > > > > > when
> > > > > > >>> the
> > > > > > >>> > > > execution reach this constructor it throws the NPE).
> > > > > > >>> > > >
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > > Searching for the class in the exception I'm getting I
> > found
> > > > > > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > > > > > >>> > getServiceClasses
> > > > > > >>> > > it loads the service class I'm getting problems with when
> > > > running
> > > > > > >>> > > calculator-android as an "Android application":
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > > I couldn't find the corresponding java file in my
> imported
> > > > > > workspace
> > > > > > >>> and
> > > > > > >>> > > found that there is no package like
> > > > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > > > >>> > >
> > > > > > >>> > > Am I missing something? Or are these the errors you would
> > > > expect?
> > > > > > >>> > >
> > > > > > >>> > > I would like to get to the point where I get the
> exception
> > > you
> > > > > > >>> described
> > > > > > >>> > > and
> > > > > > >>> > > try to run retrotranslator from there. However, as I'm
> > using
> > > > the
> > > > > > ADT
> > > > > > >>> > plugin
> > > > > > >>> > > in eclipse I would need to extract code that "declares or
> > > > > analyzes
> > > > > > >>> > > annotations you may extract it into a separate library
> that
> > > can
> > > > > be
> > > > > > >>> > > processed
> > > > > > >>> > > with Retrotranslator and added to the main project." That
> > is,
> > > > > > unless I
> > > > > > >>> > use
> > > > > > >>> > > Ant, in which case I would only need to add a few lines
> to
> > > > > > build.xml.
> > > > > > >>> I'm
> > > > > > >>> > > continuing to look into this, any thoughts are more than
> > > > welcome
> > > > > > :-)
> > > > > > >>> > >
> > > > > > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > > > >>> > >
> > > > > > >>> > > > Hi,
> > > > > > >>> > > >
> > > > > > >>> > > > Thanks all for the feedback ; )
> > > > > > >>> > > >
> > > > > > >>> > > > At first, I want to correct one mistake, on the first
> > step
> > > I
> > > > > > >>> described
> > > > > > >>> > on
> > > > > > >>> > > > my
> > > > > > >>> > > > previous email, I should not have added the word
> > "install",
> > > > it
> > > > > > >>> probably
> > > > > > >>> > > > would lead the reader to run the "mvn clean install" in
> > the
> > > > > > >>> downloaded
> > > > > > >>> > > > files, as Oscar did. Also, on this same step, the code
> > > should
> > > > > not
> > > > > > be
> > > > > > >>> > > > downloaded from [1], but from [2].
> > > > > > >>> > > >
> > > > > > >>> > > > Simon:
> > > > > > >>> > > > Thanks for the link ; ). As the Sun Java source codes
> are
> > > > under
> > > > > > CDDL
> > > > > > >>> > 1.0
> > > > > > >>> > > > license, it's only needed to include the CDDL license
> > > header
> > > > on
> > > > > > each
> > > > > > >>> > > file,
> > > > > > >>> > > > and it's already done : )
> > > > > > >>> > > >
> > > > > > >>> > > > Jean:
> > > > > > >>> > > > I think it is better to keep the code in the sandbox
> for
> > > now.
> > > > > At
> > > > > > >>> first,
> > > > > > >>> > > > it's
> > > > > > >>> > > > not working on the current SCA modules revision yet.
> And
> > > > also,
> > > > > > I'm
> > > > > > >>> > > > commenting many lines at some modules just to get a
> > "first
> > > > run"
> > > > > > of
> > > > > > >>> > > > calculator-sample to further evaluate why and how this
> > > > > commented
> > > > > > >>> lines
> > > > > > >>> > > will
> > > > > > >>> > > > be adapted to be compatible with both: SCA Java and SCA
> > > > > Android.
> > > > > > >>> > > >
> > > > > > >>> > > > Oscar:
> > > > > > >>> > > >
> > > > > > >>> > > > - Are host-android and core-android a part of
> > > > > calculator-android?
> > > > > > >>> > > >
> > > > > > >>> > > > What do you mean when you say "part"? They are used by
> > > > > > >>> > > calculator-android,
> > > > > > >>> > > > and will prabably be added to tuscany sca modules in
> > future
> > > > > > >>> > > >
> > > > > > >>> > > > - Should the calculator-android included in [1] have
> > > included
> > > > > an
> > > > > > >>> > > > "AndroidManifest.xml" file?
> > > > > > >>> > > >
> > > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse
> > > project
> > > > > > files
> > > > > > >>> of
> > > > > > >>> > > > these
> > > > > > >>> > > > projects. I have already commited these files and if
> you
> > > > update
> > > > > > your
> > > > > > >>> > > trunk
> > > > > > >>> > > > you will get them ; ). So, delete the ones you have
> > > created.
> > > > > > >>> > > >
> > > > > > >>> > > > - How can I fix the build errors? Is there something
> else
> > > > > needed
> > > > > > in
> > > > > > >>> > > > addition
> > > > > > >>> > > > to including the Android Library?
> > > > > > >>> > > >
> > > > > > >>> > > > No, the Android library is really simples, it only
> > contains
> > > > the
> > > > > > >>> > > android.jar
> > > > > > >>> > > > file located in your Android SDK.
> > > > > > >>> > > >
> > > > > > >>> > > > Please, do not run the "mvn clean build" and "mvn
> > -Peclipse
> > > > > > >>> > > > eclipse:eclipse"
> > > > > > >>> > > > commands on the sandbox files, the eclipse project
> files
> > > are
> > > > > > already
> > > > > > >>> in
> > > > > > >>> > > > modules and you should build the modules using the
> > eclipse
> > > > for
> > > > > > now.
> > > > > > >>> The
> > > > > > >>> > > > maven config files are not updated yet with the
> > > modifications
> > > > I
> > > > > > have
> > > > > > >>> > done
> > > > > > >>> > > > on
> > > > > > >>> > > > these modules, so they will not generate the correct
> > > project
> > > > > > files,
> > > > > > >>> > > worse,
> > > > > > >>> > > > they will override the ones I have created.
> > > > > > >>> > > >
> > > > > > >>> > > > Then, clean and build your entire workspace, if you
> still
> > > get
> > > > > any
> > > > > > >>> > errors,
> > > > > > >>> > > > let me know ; )
> > > > > > >>> > > >
> > > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why
> > > should
> > > > > > this
> > > > > > >>> not
> > > > > > >>> > be
> > > > > > >>> > > > imported?
> > > > > > >>> > > >
> > > > > > >>> > > > It seems the revision I suggested already had the saxon
> > > > module
> > > > > > >>> removed
> > > > > > >>> > > from
> > > > > > >>> > > > repo. So, you mistakenly removed another one that
> > > shouldn´t.
> > > > > > Please,
> > > > > > >>> > > import
> > > > > > >>> > > > the databinding-saxon module again into your workspace.
> > > > > > >>> > > >
> > > > > > >>> > > >
> > > > > > >>> > > > Regards,
> > > > > > >>> > > > Adriano Crestani
> > > > > > >>> > > >
> > > > > > >>> > > >
> > > > > > >>> > > > [1] -
> > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > > > >>> > > >
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > > > >>> > > > >
> > > > > > >>> > > > [2] -
> > > > > > >>> > > >
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > >
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > > >>> > > >
> > > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien
> Delfino
> > <
> > > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > > > >>> > > >
> > > > > > >>> > > > > Mike Edwards wrote:
> > > > > > >>> > > > >
> > > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > > > >>> > > > > >
> > > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > > > >>> > > > > > >
> > > > > > >>> > > > > > >  1. Downloaded the modified code from [1] and
> > > installed
> > > > > as
> > > > > > >>> shown
> > > > > > >>> > > > > > > > below:
> > > > > > >>> > > > > > > >
> > > > > > >>> > > > > > > > svn checkout
> > > > > > >>> > > > > > > >
> > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > >>> > > > > > > >
> > > > > > >>> > > > > > > > cd mobile-android
> > > > > > >>> > > > > > > >
> > > > > > >>> > > > > > > >
> > > > > > >>> > > > > > > If there's no objection from others, I'd be happy
> > to
> > > > see
> > > > > > this
> > > > > > >>> > code
> > > > > > >>> > > > > > > move from sandbox to trunk as we now have several
> > > > people
> > > > > > doing
> > > > > > >>> > > > development
> > > > > > >>> > > > > > > on this android integration.
> > > > > > >>> > > > > > >
> > > > > > >>> > > > > > > Adriano, you could start with something like
> > > > > > >>> > trunk/java/sca/android
> > > > > > >>> > > > > > > and later progressively try to converge the code
> > with
> > > > the
> > > > > > code
> > > > > > >>> in
> > > > > > >>> > > > trunk,
> > > > > > >>> > > > > > > with architected plug points for the android
> > specific
> > > > > code
> > > > > > >>> etc.
> > > > > > >>> > > > > > >
> > > > > > >>> > > > > > > Thoughts?
> > > > > > >>> > > > > > >
> > > > > > >>> > > > > >
> > > > > > >>> > > > > > I assume that moving to trunk does not also imply
> > > "making
> > > > > > part
> > > > > > >>> of
> > > > > > >>> > the
> > > > > > >>> > > > > > main build"?
> > > > > > >>> > > > > >
> > > > > > >>> > > > > > I'd be a bit concerned at experimental code
> entering
> > > the
> > > > > > build
> > > > > > >>> at
> > > > > > >>> > > this
> > > > > > >>> > > > > > stage.
> > > > > > >>> > > > > >
> > > > > > >>> > > > > >
> > > > > > >>> > > > > > Yours,  Mike.
> > > > > > >>> > > > > >
> > > > > > >>> > > > >
> > > > > > >>> > > > > I think it's business as usual, code that doesn't
> work
> > > does
> > > > > not
> > > > > > go
> > > > > > >>> in
> > > > > > >>> > > the
> > > > > > >>> > > > > main build, code that's getting stable can go in the
> > main
> > > > > build
> > > > > > at
> > > > > > >>> > some
> > > > > > >>> > > > > point when people have no specific objections, and
> > > > different
> > > > > > >>> profiles
> > > > > > >>> > > can
> > > > > > >>> > > > be
> > > > > > >>> > > > > used to subset particular builds.
> > > > > > >>> > > > >
> > > > > > >>> > > > > --
> > > > > > >>> > > > > Jean-Sebastien
> > > > > > >>> > > > >
> > > > > > >>> > > >
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > >
> > > > > > >>> > > --
> > > > > > >>> > > best,
> > > > > > >>> > > -oscar
> > > > > > >>> > >
> > > > > > >>> > > Oscar Castañeda
> > > > > > >>> > >
> > > > > > >>> >
> > > > > > >>>
> > > > > > >>>
> > > > > > >>>
> > > > > > >>> --
> > > > > > >>> best,
> > > > > > >>> -oscar
> > > > > > >>>
> > > > > > >>> Oscar Castañeda
> > > > > > >>>
> > > > > > >>
> > > > > > >>
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Luciano Resende
> > > > > > Apache Tuscany Committer
> > > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende>
> > > > <http://people.apache.org/%7Elresende><
> > > > > http://people.apache.org/%7Elresende>
> > > > > > http://lresende.blogspot.com/
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > best,
> > > > -oscar
> > > >
> > > > Oscar Castañeda
> > > >
> > >
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,


When I imported the projects from [3] the following projects were not
imported:

core-android
host-android
extensibility

Is this normal? Should they be imported?

Yep, they should be imported, if you check inside its folders, there are the
eclipse project files, so they should be identified by the eclipse import
tool as an eclipse project.

Thanks for the detailed explanation. I'm going to give this a try as I found
an introspection related comment [2] as a workaround to another annotations
problem with the current SDK.

I don't think introspection is a good solution, hence you will need to
change how the sca reads the info about each service and also services
implemented for JVM would need to be adapted to run on Android. Let's avoid
to modify so much the SCA code, and lets try to keep retrotranslator in mind
as a temporary workaround for annotations till next SDK release :S

Also, if you get the retrotranslator working, forget the Luciano's
suggestion and vice-versa...do not try both at the same time ; )

Any progress testing retrotranslator on a simpler scenario, just let us know
; )

Kind Regards,
Adriano Crestani


On Wed, Jun 4, 2008 at 3:27 AM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> At first, build a simple, but equivalent scenario, and test it.
>
>
> I think this is a great idea, especially because I found that the "native
> method not implemented" errors I'm getting [1] are still related to the
> annotations problem. I'm getting the same errors when converting the code
> to
> java 1.4. This makes me think that retrotranslator is actually not working.
> Hopefully, testing with a simpler scenario will help me to understand the
> problem better.
>
> Sorry for the not-well-detailed info here. I meant you to do:
> >
> > Search in every sca code for the usage of Class.isAnnotationPresent or
> > getAnnotations or getAnnotation methods. If it checks for a the
> @Remotable
> > annotations force it to true, for example:
> >
> > Annotation isRemotable = class.isAnnotationPresent
> >>
> >> (Remotable.class); =>
> >> Annotation isRemotable = true;
> >>
> >> otherwise, which means, when it's not checking for the @Remotable
> >> annnotation, force to false. For example:
> >>
> >> Annotation isReference = class.isAnnotationPresent(Reference.class); =>
> >> Annotation isReference = false;
> >
> >
>
> Thanks for the detailed explanation. I'm going to give this a try as I
> found
> an introspection related comment [2] as a workaround to another annotations
> problem with the current SDK.
>
> Also, I have another question for you...
>
> When I imported the projects from [3] the following projects were not
> imported:
>
> core-android
> host-android
> extensibility
>
> Is this normal? Should they be imported?
>
>
> [1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> [2]
>
>
> http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
> [3]
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>
>
> On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <
> adrianocrestani@apache.org>
> wrote:
>
> > Well detailed Oscar ; )
> >
> > It is one thing I learnt after playing hours with Android, you need to
> > rebuild every modified project which is imported in the android project,
> > the
> > android project itself does not check for modifications on its
> dependencies
> > :S...so, when you rebuilt the imported project it recompiled the
> > uncommented
> > code at JavaRuntimeModuleActivator and the SCA started to check for
> > annotations once again, so you got the errors on [1], which means
> > retrotranslator is still not working. Have you tested it on a simpler
> > application as I previously suggested? Did it work? What was the most
> > critical scenario you tested it and it worked?
> >
> > " Voyager-2:30May ocastaneda$ java -jar
> > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > -target 1.5 -reflection safe -stripannot -classpath
> > /../retrotranslator-android-1.2.6.jar -verbose"
> >
> > You should also check if it's is working as expected, as I already said,
> > does not go directly testing complex solutions on complex things like
> SCA.
> > At first, build a simple, but equivalent scenario, and test it. For
> > example,
> > a simple android app project that uses an java library project which
> access
> > annotations on classes placed on the android project. Like our android
> > calculator, it's an android app project (calculator-android) which uses
> > java
> > library projects (sca modules), and these libraries checks for
> annotations
> > on classes located at the android app project (CalculatorService.java,
> > AddService.java, etc). When you get it working on the simpler scenario,
> > then
> > you are ready to test it on the complexer sceneario (calculator-android).
> >
> > Please, if you get the retrotranslator working in the simpler scenario,
> > send
> > us a patch with it. You can create a JIRA and attach it. If you need any
> > help, just ask ; )
> >
> > "code that checks for @Remotable you force to true, otherwise force to
> > false."
> >
> > Sorry for the not-well-detailed info here. I meant you to do:
> >
> > Search in every sca code for the usage of Class.isAnnotationPresent or
> > getAnnotations or getAnnotation methods. If it checks for a the
> @Remotable
> > annotations force it to true, for example:
> >
> > Annotation isRemotable = class.isAnnotationPresent(Remotable.class); =>
> > Annotation isRemotable = true;
> >
> > otherwise, which means, when it's not checking for the @Remotable
> > annnotation, force to false. For example:
> >
> > Annotation isReference = class.isAnnotationPresent(Reference.class); =>
> > Annotation isReference = false;
> >
> > [1] - http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> >
> > Kind Regards,
> > Adriano Crestani
> >
> > On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> > oscar.castaneda.gsoc@gmail.com> wrote:
> >
> > > Hi Adriano,
> > >
> > > I continued testing retrotranslator. Here's what I've done up to now.
> > >
> > > 1. Downloaded the modified code from [1].
> > >
> > > 2. Downloaded SCA modules from [2] and installed as shown below:
> > >
> > > svn checkout --revision 643746
> > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> > >
> > > cd modules
> > >
> > > mvn clean install -Dtest=no
> > > mvn -Peclipse eclipse:eclipse -Dtest=no
> > >
> > >  3. Created a new eclipse workspace and set the M2_REPO variable as
> shown
> > > below:
> > >
> > > mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo
> > >
> > >  4. Adjusted buildpath to eliminate build errors, added Android library
> > to
> > > required modules, fixed references to jar files and other libraries.
> > >
> > > 5. Uncommented lines in
> > >
> > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >
> > > 6. Ran retrotranslator as instructed on the project site [3] and shown
> > > below:
> > >
> > > Voyager-2:30May ocastaneda$ java -jar
> > > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > > -target 1.5 -reflection safe -stripannot -classpath
> > > /../retrotranslator-android-1.2.6.jar -verbose
> > >
> > >  The output can be found in [4].
> > > 7. Rebuilt project after uncommenting lines in
> > >
> > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >
> > > and then re-ran retrotranslator.
> > > 8. Debugging in Eclipse shows errors shown in [5] and Android errors in
> > > [6].
> > >
> > >
> > >
> > > As always, I'm documenting my progress on the project log. I haven't
> > fully
> > > tested out Luciano's suggestions. I guess I'm puzzled by what you mean
> by
> > > this:
> > >
> > > "code that checks for @Remotable you force to true, otherwise force to
> > > false."
> > >
> > > I'll continue looking into it and hopefully get retrotranslator to
> work.
> > I
> > > also think it's a simpler option.
> > >
> > > Luciano: Thanks for your suggestions.
> > >
> > > [1]
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >
> > > [2]
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> > >
> > > [3] http://retrotranslator.sourceforge.net/#android
> > >
> > > [4] http://androidindelft.googlepages.com/rt_output_30may2008.txt
> > >
> > > [5] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> > >
> > >
> > > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > > adrianocrestani@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > I tried what Luciano suggested. It really works. To get it working
> you
> > > > simply need to search on all modules where the code checks for
> > @Remotable
> > > > annotation and force it to true:
> > > >
> > > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > > >
> > > > It works fine on the sca revision we are testing on Android and the
> > most
> > > > recent revision. I only tested it as a java application, not as an
> > > android
> > > > application.
> > > >
> > > > Unfortunatelly, I still think retrotranslator is a faster and simpler
> > > > solution. Because the Luciano's suggestion only forces the SCA to
> > > recognize
> > > > the services with no annotations declared on their interfaces, but it
> > > does
> > > > not avoid the Exceptions we are getting when the SCA invokes methods
> > that
> > > > read annotations. So, our current problem is that we are not being
> able
> > > to
> > > > use these methods and not only because we are not being able to read
> > the
> > > > annotations.
> > > >
> > > > Oscar, if you want to try the Luciano's suggestion, you will need to
> > > > comment/adapt every sca code that tries to read the class
> annotations.
> > It
> > > > is
> > > > not necessary to comment/adapt the methods that read Method
> > annotations,
> > > > they are not throwning any exception. So, every code that checks for
> > > > @Remotable you force to true, otherwise force to false.
> > > >
> > > > Any doubt about what I have said, just let me know ; )
> > > >
> > > > Suggestions are welcome : )
> > > >
> > > > Adriano Crestani
> > > >
> > > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> > luckbr1975@gmail.com>
> > > > wrote:
> > > >
> > > > > FYI, if you comment out the code that checks if a interface is
> > > > > remoteble, you could have a version of the calculator without any
> > > > > annotations, and the runtime would introspect the references for
> the
> > > > > multiple services. But note that, the introspection code will only
> be
> > > > > activated if there is no SCA annotations on the class.
> > > > >
> > > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > > <ad...@apache.org> wrote:
> > > > > > Ah, the expected exception should look like this on android
> > emulator:
> > > > > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > > >
> > > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > > adrianocrestani@apache.org> wrote:
> > > > > >
> > > > > >> Hi Oscar,
> > > > > >>
> > > > > >> I was indeed using the sca modules not from the sandbox. As you
> > > > > suggested,
> > > > > >> I
> > > > > >> removed the tuscany-contribution-impl from my workspace and
> added
> > > the
> > > > > >> version you uploaded to the sandbox. Then, I uncommented the
> lines
> > > in
> > > > > >>
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >>
> > > > > >> following the comments pointing out why those lines had been
> > > > commented.
> > > > > I'm
> > > > > >> no longer getting the ClassNotFoundException. However, it's
> > getting
> > > > > stuck
> > > > > >> somewhere else (before getting there I guess)...I think this is
> > the
> > > > case
> > > > > >> because before and after commenting the code I get the same
> error
> > in
> > > > the
> > > > > >> Android emulator, an InstantiationException [1].
> > > > > >>
> > > > > >> Have you debugged to check exactly where this exception is being
> > > > thrown?
> > > > > I
> > > > > >> have done the procedure I previously described  again and I got
> it
> > > > > "running"
> > > > > >> as expected, which means, running till the expected exception is
> > > > thrown.
> > > > > >>
> > > > > >> I also started tinkering with retrotranslator. First I tried
> doing
> > > it
> > > > > with
> > > > > >> Ant, but it seems that in order to build I have to include the
> > whole
> > > > > >> tuscany
> > > > > >> projects in a way similar to how I now have in Eclipse. I also
> > tried
> > > > > making
> > > > > >> a jar out of
> > > > > >>
> > > > > >>
> > > > > >>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >>
> > > > > >> and then feeding it to retrotranslator but unfortunately it's
> not
> > > > > >> translating anything, as shown below.
> > > > > >>
> > > > > >> Voyager-2:Retrotranslator-1.2
> > > > > >> .6-bin ocastaneda$ java -jar
> > > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > >> JavaRuntimeModuleActivator.jar
> > > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > > >> retrotranslator-android-1.2.6.jar
> > > > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > >> Transformed 0 file(s).
> > > > > >>
> > > > > >> There's also a maven plugin, so I might try that...but first
> I'll
> > > give
> > > > > Ant
> > > > > >> another go. Hopefully Google will release a new SDK soon,
> > otherwise
> > > as
> > > > > you
> > > > > >> say...retrotranslator will have to be the workaround to proceed
> > with
> > > > our
> > > > > >> project ;-)
> > > > > >>
> > > > > >> Unfortunately the rumors say the new SDK version will not be
> > > released
> > > > > until
> > > > > >> july 28th :S. So, it's really good you have already started
> > working
> > > on
> > > > > the
> > > > > >> retrotranslator, it will probably be the best workaround for the
> > > > > annotations
> > > > > >> problem till the next SDK release.
> > > > > >>
> > > > > >> I suggest you to forget about the build process right now,
> before,
> > > > check
> > > > > if
> > > > > >> this retrotranslator works and if it really works on android
> > > platform.
> > > > > I´m
> > > > > >> really getting upset with Android, even its API methods does not
> > > work
> > > > as
> > > > > >> expected :@. Anyway, try initially to compile a simple class
> > (coded
> > > by
> > > > > you),
> > > > > >> which contains annotations, and access these annotations. If it
> > > works,
> > > > > make
> > > > > >> it more complex and test again, do it until you reach a scenario
> > as
> > > > > complex
> > > > > >> as the SCA (a lot of external jars with annotated classes
> accessed
> > > by
> > > > > the
> > > > > >> other external jars and the Android app). Got it? : )
> > > > > >>
> > > > > >> Regards,
> > > > > >> Adriano Crestani
> > > > > >>
> > > > > >>
> > > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > >>
> > > > > >>> Hi Adriano,
> > > > > >>>
> > > > > >>> I was indeed using the sca modules not from the sandbox. As you
> > > > > suggested,
> > > > > >>> I
> > > > > >>> removed the tuscany-contribution-impl from my workspace and
> added
> > > the
> > > > > >>> version you uploaded to the sandbox. Then, I uncommented the
> > lines
> > > in
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >>>
> > > > > >>> following the comments pointing out why those lines had been
> > > > commented.
> > > > > >>> I'm
> > > > > >>> no longer getting the ClassNotFoundException. However, it's
> > getting
> > > > > stuck
> > > > > >>> somewhere else (before getting there I guess)...I think this is
> > the
> > > > > case
> > > > > >>> because before and after commenting the code I get the same
> error
> > > in
> > > > > the
> > > > > >>> Android emulator, an InstantiationException [1].
> > > > > >>>
> > > > > >>> I also started tinkering with retrotranslator. First I tried
> > doing
> > > it
> > > > > with
> > > > > >>> Ant, but it seems that in order to build I have to include the
> > > whole
> > > > > >>> tuscany
> > > > > >>> projects in a way similar to how I now have in Eclipse. I also
> > > tried
> > > > > >>> making
> > > > > >>> a jar out of
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >>>
> > > > > >>> and then feeding it to retrotranslator but unfortunately it's
> not
> > > > > >>> translating anything, as shown below.
> > > > > >>>
> > > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > > >>> JavaRuntimeModuleActivator.jar
> > > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > > >>> retrotranslator-android-1.2.6.jar
> > > > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > > >>> Transformed 0 file(s).
> > > > > >>>
> > > > > >>> There's also a maven plugin, so I might try that...but first
> I'll
> > > > give
> > > > > Ant
> > > > > >>> another go. Hopefully Google will release a new SDK soon,
> > otherwise
> > > > as
> > > > > you
> > > > > >>> say...retrotranslator will have to be the workaround to proceed
> > > with
> > > > > our
> > > > > >>> project ;-)
> > > > > >>>
> > > > > >>> Thanks again for all your help...I'm getting ready for the
> > official
> > > > > start
> > > > > >>> :-)
> > > > > >>>
> > > > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > > >>> adrianocrestani@apache.org> wrote:
> > > > > >>>
> > > > > >>> > Hi Oscar,
> > > > > >>> >
> > > > > >>> > My mistake again, the eclipse project files of
> > contribution-impl
> > > > > module
> > > > > >>> > were
> > > > > >>> > not uploaded, so you are probably using the modules you have
> > > > > downloaded
> > > > > >>> > from
> > > > > >>> > the sca modules. If you remove the tuscany-contribution-impl
> > from
> > > > > your
> > > > > >>> > workspace and add this module from the sandbox it will
> probably
> > > > work.
> > > > > >>> > Anyway, you will need to update your trunk again to get the
> > > project
> > > > > >>> files
> > > > > >>> > I'm uploading right now ; )
> > > > > >>> >
> > > > > >>> > OK, if you wanna try the retrotranslator as a solution here
> is
> > a
> > > > tip:
> > > > > >>> most
> > > > > >>> > of the code that were using the Reflection API was commented
> on
> > > > > >>> >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > > >>> > class, you just need to edit this class and remove the
> > commented
> > > > code
> > > > > >>> (it's
> > > > > >>> > described there).
> > > > > >>> >
> > > > > >>> > So, if you uncomment the code and the retrotranslador
> > successfuly
> > > > > work,
> > > > > >>> and
> > > > > >>> > I hope it will, you will reach the
> > > > > >>> >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > >>> > constructor and it should run OK. Exactly on this constructor
> > I'm
> > > > > >>> getting a
> > > > > >>> > NPE when the code described above is commented.
> > > > > >>> >
> > > > > >>> > About the ant, go on and use it. Further we can evaluate
> better
> > > > where
> > > > > we
> > > > > >>> > place it in the entire SCA build process. BTW, we even dont
> > know
> > > if
> > > > > we
> > > > > >>> will
> > > > > >>> > still be using the retrotranslator in future, right?! : )
> > > > > >>> >
> > > > > >>> > Use the retrotranslator may help us a lot to workaround this
> > > > problem
> > > > > for
> > > > > >>> > now
> > > > > >>> > and go on with our project ; )
> > > > > >>> >
> > > > > >>> > Kind Regards,
> > > > > >>> > Adriano Crestani
> > > > > >>> >
> > > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > > >>> >
> > > > > >>> > > Hi Adriano,
> > > > > >>> > >
> > > > > >>> > > Thanks alot for your answers. I was able to build the
> entire
> > > > > workspace
> > > > > >>> > from
> > > > > >>> > > your instructions. When running calculator-android as an
> > > "Android
> > > > > >>> > > application" I'm getting a ClassNotFoundException [1] for
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > > >>> > > Is the exception you referred to in your original email?
> > > > > >>> > >
> > > > > >>> > > ...when
> > > > > >>> > > > you run the calculator-android project as an "Android
> > > > > application"
> > > > > >>> you
> > > > > >>> > > > should get an exception, that was generated initially by
> a
> > > NPE
> > > > > >>> thrown
> > > > > >>> > by
> > > > > >>> > > >
> > > > > >>> >
> > > > >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > > >>> > > > constructor. This is caused because the latest Android
> SDK
> > > does
> > > > > not
> > > > > >>> > > support
> > > > > >>> > > > the Reflection API yet. So, the SCA cannot check the
> > > @Reference
> > > > > >>> > > annotations
> > > > > >>> > > > (I commented the code which tries to read the
> annotations,
> > so
> > > > > when
> > > > > >>> the
> > > > > >>> > > > execution reach this constructor it throws the NPE).
> > > > > >>> > > >
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > > Searching for the class in the exception I'm getting I
> found
> > > > > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > > > > >>> > getServiceClasses
> > > > > >>> > > it loads the service class I'm getting problems with when
> > > running
> > > > > >>> > > calculator-android as an "Android application":
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > > I couldn't find the corresponding java file in my imported
> > > > > workspace
> > > > > >>> and
> > > > > >>> > > found that there is no package like
> > > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > > >>> > >
> > > > > >>> > > Am I missing something? Or are these the errors you would
> > > expect?
> > > > > >>> > >
> > > > > >>> > > I would like to get to the point where I get the exception
> > you
> > > > > >>> described
> > > > > >>> > > and
> > > > > >>> > > try to run retrotranslator from there. However, as I'm
> using
> > > the
> > > > > ADT
> > > > > >>> > plugin
> > > > > >>> > > in eclipse I would need to extract code that "declares or
> > > > analyzes
> > > > > >>> > > annotations you may extract it into a separate library that
> > can
> > > > be
> > > > > >>> > > processed
> > > > > >>> > > with Retrotranslator and added to the main project." That
> is,
> > > > > unless I
> > > > > >>> > use
> > > > > >>> > > Ant, in which case I would only need to add a few lines to
> > > > > build.xml.
> > > > > >>> I'm
> > > > > >>> > > continuing to look into this, any thoughts are more than
> > > welcome
> > > > > :-)
> > > > > >>> > >
> > > > > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > > >>> > >
> > > > > >>> > > > Hi,
> > > > > >>> > > >
> > > > > >>> > > > Thanks all for the feedback ; )
> > > > > >>> > > >
> > > > > >>> > > > At first, I want to correct one mistake, on the first
> step
> > I
> > > > > >>> described
> > > > > >>> > on
> > > > > >>> > > > my
> > > > > >>> > > > previous email, I should not have added the word
> "install",
> > > it
> > > > > >>> probably
> > > > > >>> > > > would lead the reader to run the "mvn clean install" in
> the
> > > > > >>> downloaded
> > > > > >>> > > > files, as Oscar did. Also, on this same step, the code
> > should
> > > > not
> > > > > be
> > > > > >>> > > > downloaded from [1], but from [2].
> > > > > >>> > > >
> > > > > >>> > > > Simon:
> > > > > >>> > > > Thanks for the link ; ). As the Sun Java source codes are
> > > under
> > > > > CDDL
> > > > > >>> > 1.0
> > > > > >>> > > > license, it's only needed to include the CDDL license
> > header
> > > on
> > > > > each
> > > > > >>> > > file,
> > > > > >>> > > > and it's already done : )
> > > > > >>> > > >
> > > > > >>> > > > Jean:
> > > > > >>> > > > I think it is better to keep the code in the sandbox for
> > now.
> > > > At
> > > > > >>> first,
> > > > > >>> > > > it's
> > > > > >>> > > > not working on the current SCA modules revision yet. And
> > > also,
> > > > > I'm
> > > > > >>> > > > commenting many lines at some modules just to get a
> "first
> > > run"
> > > > > of
> > > > > >>> > > > calculator-sample to further evaluate why and how this
> > > > commented
> > > > > >>> lines
> > > > > >>> > > will
> > > > > >>> > > > be adapted to be compatible with both: SCA Java and SCA
> > > > Android.
> > > > > >>> > > >
> > > > > >>> > > > Oscar:
> > > > > >>> > > >
> > > > > >>> > > > - Are host-android and core-android a part of
> > > > calculator-android?
> > > > > >>> > > >
> > > > > >>> > > > What do you mean when you say "part"? They are used by
> > > > > >>> > > calculator-android,
> > > > > >>> > > > and will prabably be added to tuscany sca modules in
> future
> > > > > >>> > > >
> > > > > >>> > > > - Should the calculator-android included in [1] have
> > included
> > > > an
> > > > > >>> > > > "AndroidManifest.xml" file?
> > > > > >>> > > >
> > > > > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse
> > project
> > > > > files
> > > > > >>> of
> > > > > >>> > > > these
> > > > > >>> > > > projects. I have already commited these files and if you
> > > update
> > > > > your
> > > > > >>> > > trunk
> > > > > >>> > > > you will get them ; ). So, delete the ones you have
> > created.
> > > > > >>> > > >
> > > > > >>> > > > - How can I fix the build errors? Is there something else
> > > > needed
> > > > > in
> > > > > >>> > > > addition
> > > > > >>> > > > to including the Android Library?
> > > > > >>> > > >
> > > > > >>> > > > No, the Android library is really simples, it only
> contains
> > > the
> > > > > >>> > > android.jar
> > > > > >>> > > > file located in your Android SDK.
> > > > > >>> > > >
> > > > > >>> > > > Please, do not run the "mvn clean build" and "mvn
> -Peclipse
> > > > > >>> > > > eclipse:eclipse"
> > > > > >>> > > > commands on the sandbox files, the eclipse project files
> > are
> > > > > already
> > > > > >>> in
> > > > > >>> > > > modules and you should build the modules using the
> eclipse
> > > for
> > > > > now.
> > > > > >>> The
> > > > > >>> > > > maven config files are not updated yet with the
> > modifications
> > > I
> > > > > have
> > > > > >>> > done
> > > > > >>> > > > on
> > > > > >>> > > > these modules, so they will not generate the correct
> > project
> > > > > files,
> > > > > >>> > > worse,
> > > > > >>> > > > they will override the ones I have created.
> > > > > >>> > > >
> > > > > >>> > > > Then, clean and build your entire workspace, if you still
> > get
> > > > any
> > > > > >>> > errors,
> > > > > >>> > > > let me know ; )
> > > > > >>> > > >
> > > > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why
> > should
> > > > > this
> > > > > >>> not
> > > > > >>> > be
> > > > > >>> > > > imported?
> > > > > >>> > > >
> > > > > >>> > > > It seems the revision I suggested already had the saxon
> > > module
> > > > > >>> removed
> > > > > >>> > > from
> > > > > >>> > > > repo. So, you mistakenly removed another one that
> > shouldn´t.
> > > > > Please,
> > > > > >>> > > import
> > > > > >>> > > > the databinding-saxon module again into your workspace.
> > > > > >>> > > >
> > > > > >>> > > >
> > > > > >>> > > > Regards,
> > > > > >>> > > > Adriano Crestani
> > > > > >>> > > >
> > > > > >>> > > >
> > > > > >>> > > > [1] -
> > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > > >>> > > >
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > > >>> > > > >
> > > > > >>> > > > [2] -
> > > > > >>> > > >
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > >
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > > >>> > > >
> > > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino
> <
> > > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > > >>> > > >
> > > > > >>> > > > > Mike Edwards wrote:
> > > > > >>> > > > >
> > > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > > >>> > > > > >
> > > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > > >>> > > > > > >
> > > > > >>> > > > > > >  1. Downloaded the modified code from [1] and
> > installed
> > > > as
> > > > > >>> shown
> > > > > >>> > > > > > > > below:
> > > > > >>> > > > > > > >
> > > > > >>> > > > > > > > svn checkout
> > > > > >>> > > > > > > >
> > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > >>> > > > > > > >
> > > > > >>> > > > > > > > cd mobile-android
> > > > > >>> > > > > > > >
> > > > > >>> > > > > > > >
> > > > > >>> > > > > > > If there's no objection from others, I'd be happy
> to
> > > see
> > > > > this
> > > > > >>> > code
> > > > > >>> > > > > > > move from sandbox to trunk as we now have several
> > > people
> > > > > doing
> > > > > >>> > > > development
> > > > > >>> > > > > > > on this android integration.
> > > > > >>> > > > > > >
> > > > > >>> > > > > > > Adriano, you could start with something like
> > > > > >>> > trunk/java/sca/android
> > > > > >>> > > > > > > and later progressively try to converge the code
> with
> > > the
> > > > > code
> > > > > >>> in
> > > > > >>> > > > trunk,
> > > > > >>> > > > > > > with architected plug points for the android
> specific
> > > > code
> > > > > >>> etc.
> > > > > >>> > > > > > >
> > > > > >>> > > > > > > Thoughts?
> > > > > >>> > > > > > >
> > > > > >>> > > > > >
> > > > > >>> > > > > > I assume that moving to trunk does not also imply
> > "making
> > > > > part
> > > > > >>> of
> > > > > >>> > the
> > > > > >>> > > > > > main build"?
> > > > > >>> > > > > >
> > > > > >>> > > > > > I'd be a bit concerned at experimental code entering
> > the
> > > > > build
> > > > > >>> at
> > > > > >>> > > this
> > > > > >>> > > > > > stage.
> > > > > >>> > > > > >
> > > > > >>> > > > > >
> > > > > >>> > > > > > Yours,  Mike.
> > > > > >>> > > > > >
> > > > > >>> > > > >
> > > > > >>> > > > > I think it's business as usual, code that doesn't work
> > does
> > > > not
> > > > > go
> > > > > >>> in
> > > > > >>> > > the
> > > > > >>> > > > > main build, code that's getting stable can go in the
> main
> > > > build
> > > > > at
> > > > > >>> > some
> > > > > >>> > > > > point when people have no specific objections, and
> > > different
> > > > > >>> profiles
> > > > > >>> > > can
> > > > > >>> > > > be
> > > > > >>> > > > > used to subset particular builds.
> > > > > >>> > > > >
> > > > > >>> > > > > --
> > > > > >>> > > > > Jean-Sebastien
> > > > > >>> > > > >
> > > > > >>> > > >
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > >
> > > > > >>> > > --
> > > > > >>> > > best,
> > > > > >>> > > -oscar
> > > > > >>> > >
> > > > > >>> > > Oscar Castañeda
> > > > > >>> > >
> > > > > >>> >
> > > > > >>>
> > > > > >>>
> > > > > >>>
> > > > > >>> --
> > > > > >>> best,
> > > > > >>> -oscar
> > > > > >>>
> > > > > >>> Oscar Castañeda
> > > > > >>>
> > > > > >>
> > > > > >>
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Luciano Resende
> > > > > Apache Tuscany Committer
> > > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende>
> > > <http://people.apache.org/%7Elresende><
> > > > http://people.apache.org/%7Elresende>
> > > > > http://lresende.blogspot.com/
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > best,
> > > -oscar
> > >
> > > Oscar Castañeda
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

At first, build a simple, but equivalent scenario, and test it.


I think this is a great idea, especially because I found that the "native
method not implemented" errors I'm getting [1] are still related to the
annotations problem. I'm getting the same errors when converting the code to
java 1.4. This makes me think that retrotranslator is actually not working.
Hopefully, testing with a simpler scenario will help me to understand the
problem better.

Sorry for the not-well-detailed info here. I meant you to do:
>
> Search in every sca code for the usage of Class.isAnnotationPresent or
> getAnnotations or getAnnotation methods. If it checks for a the @Remotable
> annotations force it to true, for example:
>
> Annotation isRemotable = class.isAnnotationPresent
>>
>> (Remotable.class); =>
>> Annotation isRemotable = true;
>>
>> otherwise, which means, when it's not checking for the @Remotable
>> annnotation, force to false. For example:
>>
>> Annotation isReference = class.isAnnotationPresent(Reference.class); =>
>> Annotation isReference = false;
>
>

Thanks for the detailed explanation. I'm going to give this a try as I found
an introspection related comment [2] as a workaround to another annotations
problem with the current SDK.

Also, I have another question for you...

When I imported the projects from [3] the following projects were not
imported:

core-android
host-android
extensibility

Is this normal? Should they be imported?


[1] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
[2]

http://code.google.com/p/android/issues/detail?id=268&can=1&q=annotations&colspec=ID%20Type%20Version%20Security%20Status%20Owner%20Summary#c3
[3]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android


On Tue, Jun 3, 2008 at 4:32 AM, Adriano Crestani <ad...@apache.org>
wrote:

> Well detailed Oscar ; )
>
> It is one thing I learnt after playing hours with Android, you need to
> rebuild every modified project which is imported in the android project,
> the
> android project itself does not check for modifications on its dependencies
> :S...so, when you rebuilt the imported project it recompiled the
> uncommented
> code at JavaRuntimeModuleActivator and the SCA started to check for
> annotations once again, so you got the errors on [1], which means
> retrotranslator is still not working. Have you tested it on a simpler
> application as I previously suggested? Did it work? What was the most
> critical scenario you tested it and it worked?
>
> " Voyager-2:30May ocastaneda$ java -jar
> /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> -target 1.5 -reflection safe -stripannot -classpath
> /../retrotranslator-android-1.2.6.jar -verbose"
>
> You should also check if it's is working as expected, as I already said,
> does not go directly testing complex solutions on complex things like SCA.
> At first, build a simple, but equivalent scenario, and test it. For
> example,
> a simple android app project that uses an java library project which access
> annotations on classes placed on the android project. Like our android
> calculator, it's an android app project (calculator-android) which uses
> java
> library projects (sca modules), and these libraries checks for annotations
> on classes located at the android app project (CalculatorService.java,
> AddService.java, etc). When you get it working on the simpler scenario,
> then
> you are ready to test it on the complexer sceneario (calculator-android).
>
> Please, if you get the retrotranslator working in the simpler scenario,
> send
> us a patch with it. You can create a JIRA and attach it. If you need any
> help, just ask ; )
>
> "code that checks for @Remotable you force to true, otherwise force to
> false."
>
> Sorry for the not-well-detailed info here. I meant you to do:
>
> Search in every sca code for the usage of Class.isAnnotationPresent or
> getAnnotations or getAnnotation methods. If it checks for a the @Remotable
> annotations force it to true, for example:
>
> Annotation isRemotable = class.isAnnotationPresent(Remotable.class); =>
> Annotation isRemotable = true;
>
> otherwise, which means, when it's not checking for the @Remotable
> annnotation, force to false. For example:
>
> Annotation isReference = class.isAnnotationPresent(Reference.class); =>
> Annotation isReference = false;
>
> [1] - http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
>
> Kind Regards,
> Adriano Crestani
>
> On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
> > Hi Adriano,
> >
> > I continued testing retrotranslator. Here's what I've done up to now.
> >
> > 1. Downloaded the modified code from [1].
> >
> > 2. Downloaded SCA modules from [2] and installed as shown below:
> >
> > svn checkout --revision 643746
> > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> >
> > cd modules
> >
> > mvn clean install -Dtest=no
> > mvn -Peclipse eclipse:eclipse -Dtest=no
> >
> >  3. Created a new eclipse workspace and set the M2_REPO variable as shown
> > below:
> >
> > mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo
> >
> >  4. Adjusted buildpath to eliminate build errors, added Android library
> to
> > required modules, fixed references to jar files and other libraries.
> >
> > 5. Uncommented lines in
> >
> >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >
> > 6. Ran retrotranslator as instructed on the project site [3] and shown
> > below:
> >
> > Voyager-2:30May ocastaneda$ java -jar
> > /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> > -target 1.5 -reflection safe -stripannot -classpath
> > /../retrotranslator-android-1.2.6.jar -verbose
> >
> >  The output can be found in [4].
> > 7. Rebuilt project after uncommenting lines in
> >
> >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >
> > and then re-ran retrotranslator.
> > 8. Debugging in Eclipse shows errors shown in [5] and Android errors in
> > [6].
> >
> >
> >
> > As always, I'm documenting my progress on the project log. I haven't
> fully
> > tested out Luciano's suggestions. I guess I'm puzzled by what you mean by
> > this:
> >
> > "code that checks for @Remotable you force to true, otherwise force to
> > false."
> >
> > I'll continue looking into it and hopefully get retrotranslator to work.
> I
> > also think it's a simpler option.
> >
> > Luciano: Thanks for your suggestions.
> >
> > [1]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >
> > [2] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
> >
> > [3] http://retrotranslator.sourceforge.net/#android
> >
> > [4] http://androidindelft.googlepages.com/rt_output_30may2008.txt
> >
> > [5] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> > [6] http://androidindelft.googlepages.com/2Jun1.jpg
> >
> >
> > On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> > adrianocrestani@apache.org> wrote:
> >
> > > Hi,
> > >
> > > I tried what Luciano suggested. It really works. To get it working you
> > > simply need to search on all modules where the code checks for
> @Remotable
> > > annotation and force it to true:
> > >
> > > "clazz.getAnnotation(Remotable.class) != null"   => true
> > > "clazz.isAnnotationPresent(Remotable.class)" => true
> > >
> > > It works fine on the sca revision we are testing on Android and the
> most
> > > recent revision. I only tested it as a java application, not as an
> > android
> > > application.
> > >
> > > Unfortunatelly, I still think retrotranslator is a faster and simpler
> > > solution. Because the Luciano's suggestion only forces the SCA to
> > recognize
> > > the services with no annotations declared on their interfaces, but it
> > does
> > > not avoid the Exceptions we are getting when the SCA invokes methods
> that
> > > read annotations. So, our current problem is that we are not being able
> > to
> > > use these methods and not only because we are not being able to read
> the
> > > annotations.
> > >
> > > Oscar, if you want to try the Luciano's suggestion, you will need to
> > > comment/adapt every sca code that tries to read the class annotations.
> It
> > > is
> > > not necessary to comment/adapt the methods that read Method
> annotations,
> > > they are not throwning any exception. So, every code that checks for
> > > @Remotable you force to true, otherwise force to false.
> > >
> > > Any doubt about what I have said, just let me know ; )
> > >
> > > Suggestions are welcome : )
> > >
> > > Adriano Crestani
> > >
> > > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <
> luckbr1975@gmail.com>
> > > wrote:
> > >
> > > > FYI, if you comment out the code that checks if a interface is
> > > > remoteble, you could have a version of the calculator without any
> > > > annotations, and the runtime would introspect the references for the
> > > > multiple services. But note that, the introspection code will only be
> > > > activated if there is no SCA annotations on the class.
> > > >
> > > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > > <ad...@apache.org> wrote:
> > > > > Ah, the expected exception should look like this on android
> emulator:
> > > > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > > >
> > > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > > adrianocrestani@apache.org> wrote:
> > > > >
> > > > >> Hi Oscar,
> > > > >>
> > > > >> I was indeed using the sca modules not from the sandbox. As you
> > > > suggested,
> > > > >> I
> > > > >> removed the tuscany-contribution-impl from my workspace and added
> > the
> > > > >> version you uploaded to the sandbox. Then, I uncommented the lines
> > in
> > > > >>
> > > > >>
> > > > >>
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >>
> > > > >> following the comments pointing out why those lines had been
> > > commented.
> > > > I'm
> > > > >> no longer getting the ClassNotFoundException. However, it's
> getting
> > > > stuck
> > > > >> somewhere else (before getting there I guess)...I think this is
> the
> > > case
> > > > >> because before and after commenting the code I get the same error
> in
> > > the
> > > > >> Android emulator, an InstantiationException [1].
> > > > >>
> > > > >> Have you debugged to check exactly where this exception is being
> > > thrown?
> > > > I
> > > > >> have done the procedure I previously described  again and I got it
> > > > "running"
> > > > >> as expected, which means, running till the expected exception is
> > > thrown.
> > > > >>
> > > > >> I also started tinkering with retrotranslator. First I tried doing
> > it
> > > > with
> > > > >> Ant, but it seems that in order to build I have to include the
> whole
> > > > >> tuscany
> > > > >> projects in a way similar to how I now have in Eclipse. I also
> tried
> > > > making
> > > > >> a jar out of
> > > > >>
> > > > >>
> > > > >>
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >>
> > > > >> and then feeding it to retrotranslator but unfortunately it's not
> > > > >> translating anything, as shown below.
> > > > >>
> > > > >> Voyager-2:Retrotranslator-1.2
> > > > >> .6-bin ocastaneda$ java -jar
> > > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > >> JavaRuntimeModuleActivator.jar
> > > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > > >> retrotranslator-android-1.2.6.jar
> > > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > >> Transformed 0 file(s).
> > > > >>
> > > > >> There's also a maven plugin, so I might try that...but first I'll
> > give
> > > > Ant
> > > > >> another go. Hopefully Google will release a new SDK soon,
> otherwise
> > as
> > > > you
> > > > >> say...retrotranslator will have to be the workaround to proceed
> with
> > > our
> > > > >> project ;-)
> > > > >>
> > > > >> Unfortunately the rumors say the new SDK version will not be
> > released
> > > > until
> > > > >> july 28th :S. So, it's really good you have already started
> working
> > on
> > > > the
> > > > >> retrotranslator, it will probably be the best workaround for the
> > > > annotations
> > > > >> problem till the next SDK release.
> > > > >>
> > > > >> I suggest you to forget about the build process right now, before,
> > > check
> > > > if
> > > > >> this retrotranslator works and if it really works on android
> > platform.
> > > > I´m
> > > > >> really getting upset with Android, even its API methods does not
> > work
> > > as
> > > > >> expected :@. Anyway, try initially to compile a simple class
> (coded
> > by
> > > > you),
> > > > >> which contains annotations, and access these annotations. If it
> > works,
> > > > make
> > > > >> it more complex and test again, do it until you reach a scenario
> as
> > > > complex
> > > > >> as the SCA (a lot of external jars with annotated classes accessed
> > by
> > > > the
> > > > >> other external jars and the Android app). Got it? : )
> > > > >>
> > > > >> Regards,
> > > > >> Adriano Crestani
> > > > >>
> > > > >>
> > > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > > >>
> > > > >>> Hi Adriano,
> > > > >>>
> > > > >>> I was indeed using the sca modules not from the sandbox. As you
> > > > suggested,
> > > > >>> I
> > > > >>> removed the tuscany-contribution-impl from my workspace and added
> > the
> > > > >>> version you uploaded to the sandbox. Then, I uncommented the
> lines
> > in
> > > > >>>
> > > > >>>
> > > > >>>
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >>>
> > > > >>> following the comments pointing out why those lines had been
> > > commented.
> > > > >>> I'm
> > > > >>> no longer getting the ClassNotFoundException. However, it's
> getting
> > > > stuck
> > > > >>> somewhere else (before getting there I guess)...I think this is
> the
> > > > case
> > > > >>> because before and after commenting the code I get the same error
> > in
> > > > the
> > > > >>> Android emulator, an InstantiationException [1].
> > > > >>>
> > > > >>> I also started tinkering with retrotranslator. First I tried
> doing
> > it
> > > > with
> > > > >>> Ant, but it seems that in order to build I have to include the
> > whole
> > > > >>> tuscany
> > > > >>> projects in a way similar to how I now have in Eclipse. I also
> > tried
> > > > >>> making
> > > > >>> a jar out of
> > > > >>>
> > > > >>>
> > > > >>>
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >>>
> > > > >>> and then feeding it to retrotranslator but unfortunately it's not
> > > > >>> translating anything, as shown below.
> > > > >>>
> > > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > > >>> JavaRuntimeModuleActivator.jar
> > > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > > >>> retrotranslator-android-1.2.6.jar
> > > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > > >>> Transformed 0 file(s).
> > > > >>>
> > > > >>> There's also a maven plugin, so I might try that...but first I'll
> > > give
> > > > Ant
> > > > >>> another go. Hopefully Google will release a new SDK soon,
> otherwise
> > > as
> > > > you
> > > > >>> say...retrotranslator will have to be the workaround to proceed
> > with
> > > > our
> > > > >>> project ;-)
> > > > >>>
> > > > >>> Thanks again for all your help...I'm getting ready for the
> official
> > > > start
> > > > >>> :-)
> > > > >>>
> > > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > > >>> adrianocrestani@apache.org> wrote:
> > > > >>>
> > > > >>> > Hi Oscar,
> > > > >>> >
> > > > >>> > My mistake again, the eclipse project files of
> contribution-impl
> > > > module
> > > > >>> > were
> > > > >>> > not uploaded, so you are probably using the modules you have
> > > > downloaded
> > > > >>> > from
> > > > >>> > the sca modules. If you remove the tuscany-contribution-impl
> from
> > > > your
> > > > >>> > workspace and add this module from the sandbox it will probably
> > > work.
> > > > >>> > Anyway, you will need to update your trunk again to get the
> > project
> > > > >>> files
> > > > >>> > I'm uploading right now ; )
> > > > >>> >
> > > > >>> > OK, if you wanna try the retrotranslator as a solution here is
> a
> > > tip:
> > > > >>> most
> > > > >>> > of the code that were using the Reflection API was commented on
> > > > >>> >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > > >>> > class, you just need to edit this class and remove the
> commented
> > > code
> > > > >>> (it's
> > > > >>> > described there).
> > > > >>> >
> > > > >>> > So, if you uncomment the code and the retrotranslador
> successfuly
> > > > work,
> > > > >>> and
> > > > >>> > I hope it will, you will reach the
> > > > >>> >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > >>> > constructor and it should run OK. Exactly on this constructor
> I'm
> > > > >>> getting a
> > > > >>> > NPE when the code described above is commented.
> > > > >>> >
> > > > >>> > About the ant, go on and use it. Further we can evaluate better
> > > where
> > > > we
> > > > >>> > place it in the entire SCA build process. BTW, we even dont
> know
> > if
> > > > we
> > > > >>> will
> > > > >>> > still be using the retrotranslator in future, right?! : )
> > > > >>> >
> > > > >>> > Use the retrotranslator may help us a lot to workaround this
> > > problem
> > > > for
> > > > >>> > now
> > > > >>> > and go on with our project ; )
> > > > >>> >
> > > > >>> > Kind Regards,
> > > > >>> > Adriano Crestani
> > > > >>> >
> > > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > > >>> >
> > > > >>> > > Hi Adriano,
> > > > >>> > >
> > > > >>> > > Thanks alot for your answers. I was able to build the entire
> > > > workspace
> > > > >>> > from
> > > > >>> > > your instructions. When running calculator-android as an
> > "Android
> > > > >>> > > application" I'm getting a ClassNotFoundException [1] for
> > > > >>> > >
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > > >>> > > Is the exception you referred to in your original email?
> > > > >>> > >
> > > > >>> > > ...when
> > > > >>> > > > you run the calculator-android project as an "Android
> > > > application"
> > > > >>> you
> > > > >>> > > > should get an exception, that was generated initially by a
> > NPE
> > > > >>> thrown
> > > > >>> > by
> > > > >>> > > >
> > > > >>> >
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > >>> > > > constructor. This is caused because the latest Android SDK
> > does
> > > > not
> > > > >>> > > support
> > > > >>> > > > the Reflection API yet. So, the SCA cannot check the
> > @Reference
> > > > >>> > > annotations
> > > > >>> > > > (I commented the code which tries to read the annotations,
> so
> > > > when
> > > > >>> the
> > > > >>> > > > execution reach this constructor it throws the NPE).
> > > > >>> > > >
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > Searching for the class in the exception I'm getting I found
> > > > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > > > >>> > getServiceClasses
> > > > >>> > > it loads the service class I'm getting problems with when
> > running
> > > > >>> > > calculator-android as an "Android application":
> > > > >>> > >
> > > > >>> > >
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > I couldn't find the corresponding java file in my imported
> > > > workspace
> > > > >>> and
> > > > >>> > > found that there is no package like
> > > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > > >>> > >
> > > > >>> > > Am I missing something? Or are these the errors you would
> > expect?
> > > > >>> > >
> > > > >>> > > I would like to get to the point where I get the exception
> you
> > > > >>> described
> > > > >>> > > and
> > > > >>> > > try to run retrotranslator from there. However, as I'm using
> > the
> > > > ADT
> > > > >>> > plugin
> > > > >>> > > in eclipse I would need to extract code that "declares or
> > > analyzes
> > > > >>> > > annotations you may extract it into a separate library that
> can
> > > be
> > > > >>> > > processed
> > > > >>> > > with Retrotranslator and added to the main project." That is,
> > > > unless I
> > > > >>> > use
> > > > >>> > > Ant, in which case I would only need to add a few lines to
> > > > build.xml.
> > > > >>> I'm
> > > > >>> > > continuing to look into this, any thoughts are more than
> > welcome
> > > > :-)
> > > > >>> > >
> > > > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > > >>> > > adrianocrestani@apache.org> wrote:
> > > > >>> > >
> > > > >>> > > > Hi,
> > > > >>> > > >
> > > > >>> > > > Thanks all for the feedback ; )
> > > > >>> > > >
> > > > >>> > > > At first, I want to correct one mistake, on the first step
> I
> > > > >>> described
> > > > >>> > on
> > > > >>> > > > my
> > > > >>> > > > previous email, I should not have added the word "install",
> > it
> > > > >>> probably
> > > > >>> > > > would lead the reader to run the "mvn clean install" in the
> > > > >>> downloaded
> > > > >>> > > > files, as Oscar did. Also, on this same step, the code
> should
> > > not
> > > > be
> > > > >>> > > > downloaded from [1], but from [2].
> > > > >>> > > >
> > > > >>> > > > Simon:
> > > > >>> > > > Thanks for the link ; ). As the Sun Java source codes are
> > under
> > > > CDDL
> > > > >>> > 1.0
> > > > >>> > > > license, it's only needed to include the CDDL license
> header
> > on
> > > > each
> > > > >>> > > file,
> > > > >>> > > > and it's already done : )
> > > > >>> > > >
> > > > >>> > > > Jean:
> > > > >>> > > > I think it is better to keep the code in the sandbox for
> now.
> > > At
> > > > >>> first,
> > > > >>> > > > it's
> > > > >>> > > > not working on the current SCA modules revision yet. And
> > also,
> > > > I'm
> > > > >>> > > > commenting many lines at some modules just to get a "first
> > run"
> > > > of
> > > > >>> > > > calculator-sample to further evaluate why and how this
> > > commented
> > > > >>> lines
> > > > >>> > > will
> > > > >>> > > > be adapted to be compatible with both: SCA Java and SCA
> > > Android.
> > > > >>> > > >
> > > > >>> > > > Oscar:
> > > > >>> > > >
> > > > >>> > > > - Are host-android and core-android a part of
> > > calculator-android?
> > > > >>> > > >
> > > > >>> > > > What do you mean when you say "part"? They are used by
> > > > >>> > > calculator-android,
> > > > >>> > > > and will prabably be added to tuscany sca modules in future
> > > > >>> > > >
> > > > >>> > > > - Should the calculator-android included in [1] have
> included
> > > an
> > > > >>> > > > "AndroidManifest.xml" file?
> > > > >>> > > >
> > > > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse
> project
> > > > files
> > > > >>> of
> > > > >>> > > > these
> > > > >>> > > > projects. I have already commited these files and if you
> > update
> > > > your
> > > > >>> > > trunk
> > > > >>> > > > you will get them ; ). So, delete the ones you have
> created.
> > > > >>> > > >
> > > > >>> > > > - How can I fix the build errors? Is there something else
> > > needed
> > > > in
> > > > >>> > > > addition
> > > > >>> > > > to including the Android Library?
> > > > >>> > > >
> > > > >>> > > > No, the Android library is really simples, it only contains
> > the
> > > > >>> > > android.jar
> > > > >>> > > > file located in your Android SDK.
> > > > >>> > > >
> > > > >>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > > > >>> > > > eclipse:eclipse"
> > > > >>> > > > commands on the sandbox files, the eclipse project files
> are
> > > > already
> > > > >>> in
> > > > >>> > > > modules and you should build the modules using the eclipse
> > for
> > > > now.
> > > > >>> The
> > > > >>> > > > maven config files are not updated yet with the
> modifications
> > I
> > > > have
> > > > >>> > done
> > > > >>> > > > on
> > > > >>> > > > these modules, so they will not generate the correct
> project
> > > > files,
> > > > >>> > > worse,
> > > > >>> > > > they will override the ones I have created.
> > > > >>> > > >
> > > > >>> > > > Then, clean and build your entire workspace, if you still
> get
> > > any
> > > > >>> > errors,
> > > > >>> > > > let me know ; )
> > > > >>> > > >
> > > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why
> should
> > > > this
> > > > >>> not
> > > > >>> > be
> > > > >>> > > > imported?
> > > > >>> > > >
> > > > >>> > > > It seems the revision I suggested already had the saxon
> > module
> > > > >>> removed
> > > > >>> > > from
> > > > >>> > > > repo. So, you mistakenly removed another one that
> shouldn´t.
> > > > Please,
> > > > >>> > > import
> > > > >>> > > > the databinding-saxon module again into your workspace.
> > > > >>> > > >
> > > > >>> > > >
> > > > >>> > > > Regards,
> > > > >>> > > > Adriano Crestani
> > > > >>> > > >
> > > > >>> > > >
> > > > >>> > > > [1] -
> > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > > >>> > > >
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > >>> > > > >
> > > > >>> > > > [2] -
> > > > >>> > > >
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > > >>> > > >
> > > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > > > >>> > > > jsdelfino@apache.org> wrote:
> > > > >>> > > >
> > > > >>> > > > > Mike Edwards wrote:
> > > > >>> > > > >
> > > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > > >>> > > > > >
> > > > >>> > > > > > > Oscar Castaneda wrote:
> > > > >>> > > > > > >
> > > > >>> > > > > > >  1. Downloaded the modified code from [1] and
> installed
> > > as
> > > > >>> shown
> > > > >>> > > > > > > > below:
> > > > >>> > > > > > > >
> > > > >>> > > > > > > > svn checkout
> > > > >>> > > > > > > >
> > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > >>> > > > > > > >
> > > > >>> > > > > > > > cd mobile-android
> > > > >>> > > > > > > >
> > > > >>> > > > > > > >
> > > > >>> > > > > > > If there's no objection from others, I'd be happy to
> > see
> > > > this
> > > > >>> > code
> > > > >>> > > > > > > move from sandbox to trunk as we now have several
> > people
> > > > doing
> > > > >>> > > > development
> > > > >>> > > > > > > on this android integration.
> > > > >>> > > > > > >
> > > > >>> > > > > > > Adriano, you could start with something like
> > > > >>> > trunk/java/sca/android
> > > > >>> > > > > > > and later progressively try to converge the code with
> > the
> > > > code
> > > > >>> in
> > > > >>> > > > trunk,
> > > > >>> > > > > > > with architected plug points for the android specific
> > > code
> > > > >>> etc.
> > > > >>> > > > > > >
> > > > >>> > > > > > > Thoughts?
> > > > >>> > > > > > >
> > > > >>> > > > > >
> > > > >>> > > > > > I assume that moving to trunk does not also imply
> "making
> > > > part
> > > > >>> of
> > > > >>> > the
> > > > >>> > > > > > main build"?
> > > > >>> > > > > >
> > > > >>> > > > > > I'd be a bit concerned at experimental code entering
> the
> > > > build
> > > > >>> at
> > > > >>> > > this
> > > > >>> > > > > > stage.
> > > > >>> > > > > >
> > > > >>> > > > > >
> > > > >>> > > > > > Yours,  Mike.
> > > > >>> > > > > >
> > > > >>> > > > >
> > > > >>> > > > > I think it's business as usual, code that doesn't work
> does
> > > not
> > > > go
> > > > >>> in
> > > > >>> > > the
> > > > >>> > > > > main build, code that's getting stable can go in the main
> > > build
> > > > at
> > > > >>> > some
> > > > >>> > > > > point when people have no specific objections, and
> > different
> > > > >>> profiles
> > > > >>> > > can
> > > > >>> > > > be
> > > > >>> > > > > used to subset particular builds.
> > > > >>> > > > >
> > > > >>> > > > > --
> > > > >>> > > > > Jean-Sebastien
> > > > >>> > > > >
> > > > >>> > > >
> > > > >>> > >
> > > > >>> > >
> > > > >>> > >
> > > > >>> > > --
> > > > >>> > > best,
> > > > >>> > > -oscar
> > > > >>> > >
> > > > >>> > > Oscar Castañeda
> > > > >>> > >
> > > > >>> >
> > > > >>>
> > > > >>>
> > > > >>>
> > > > >>> --
> > > > >>> best,
> > > > >>> -oscar
> > > > >>>
> > > > >>> Oscar Castañeda
> > > > >>>
> > > > >>
> > > > >>
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Luciano Resende
> > > > Apache Tuscany Committer
> > > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > <http://people.apache.org/%7Elresende><
> > > http://people.apache.org/%7Elresende>
> > > > http://lresende.blogspot.com/
> > > >
> > >
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Well detailed Oscar ; )

It is one thing I learnt after playing hours with Android, you need to
rebuild every modified project which is imported in the android project, the
android project itself does not check for modifications on its dependencies
:S...so, when you rebuilt the imported project it recompiled the uncommented
code at JavaRuntimeModuleActivator and the SCA started to check for
annotations once again, so you got the errors on [1], which means
retrotranslator is still not working. Have you tested it on a simpler
application as I previously suggested? Did it work? What was the most
critical scenario you tested it and it worked?

" Voyager-2:30May ocastaneda$ java -jar
/../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
-target 1.5 -reflection safe -stripannot -classpath
/../retrotranslator-android-1.2.6.jar -verbose"

You should also check if it's is working as expected, as I already said,
does not go directly testing complex solutions on complex things like SCA.
At first, build a simple, but equivalent scenario, and test it. For example,
a simple android app project that uses an java library project which access
annotations on classes placed on the android project. Like our android
calculator, it's an android app project (calculator-android) which uses java
library projects (sca modules), and these libraries checks for annotations
on classes located at the android app project (CalculatorService.java,
AddService.java, etc). When you get it working on the simpler scenario, then
you are ready to test it on the complexer sceneario (calculator-android).

Please, if you get the retrotranslator working in the simpler scenario, send
us a patch with it. You can create a JIRA and attach it. If you need any
help, just ask ; )

"code that checks for @Remotable you force to true, otherwise force to
false."

Sorry for the not-well-detailed info here. I meant you to do:

Search in every sca code for the usage of Class.isAnnotationPresent or
getAnnotations or getAnnotation methods. If it checks for a the @Remotable
annotations force it to true, for example:

Annotation isRemotable = class.isAnnotationPresent(Remotable.class); =>
Annotation isRemotable = true;

otherwise, which means, when it's not checking for the @Remotable
annnotation, force to false. For example:

Annotation isReference = class.isAnnotationPresent(Reference.class); =>
Annotation isReference = false;

[1] - http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008

Kind Regards,
Adriano Crestani

On Mon, Jun 2, 2008 at 4:19 PM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> I continued testing retrotranslator. Here's what I've done up to now.
>
> 1. Downloaded the modified code from [1].
>
> 2. Downloaded SCA modules from [2] and installed as shown below:
>
> svn checkout --revision 643746
> https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
>
> cd modules
>
> mvn clean install -Dtest=no
> mvn -Peclipse eclipse:eclipse -Dtest=no
>
>  3. Created a new eclipse workspace and set the M2_REPO variable as shown
> below:
>
> mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo
>
>  4. Adjusted buildpath to eliminate build errors, added Android library to
> required modules, fixed references to jar files and other libraries.
>
> 5. Uncommented lines in
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> 6. Ran retrotranslator as instructed on the project site [3] and shown
> below:
>
> Voyager-2:30May ocastaneda$ java -jar
> /../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
> -target 1.5 -reflection safe -stripannot -classpath
> /../retrotranslator-android-1.2.6.jar -verbose
>
>  The output can be found in [4].
> 7. Rebuilt project after uncommenting lines in
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> and then re-ran retrotranslator.
> 8. Debugging in Eclipse shows errors shown in [5] and Android errors in
> [6].
>
>
>
> As always, I'm documenting my progress on the project log. I haven't fully
> tested out Luciano's suggestions. I guess I'm puzzled by what you mean by
> this:
>
> "code that checks for @Remotable you force to true, otherwise force to
> false."
>
> I'll continue looking into it and hopefully get retrotranslator to work. I
> also think it's a simpler option.
>
> Luciano: Thanks for your suggestions.
>
> [1]
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>
> [2] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/
>
> [3] http://retrotranslator.sourceforge.net/#android
>
> [4] http://androidindelft.googlepages.com/rt_output_30may2008.txt
>
> [5] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
> [6] http://androidindelft.googlepages.com/2Jun1.jpg
>
>
> On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
> > Hi,
> >
> > I tried what Luciano suggested. It really works. To get it working you
> > simply need to search on all modules where the code checks for @Remotable
> > annotation and force it to true:
> >
> > "clazz.getAnnotation(Remotable.class) != null"   => true
> > "clazz.isAnnotationPresent(Remotable.class)" => true
> >
> > It works fine on the sca revision we are testing on Android and the most
> > recent revision. I only tested it as a java application, not as an
> android
> > application.
> >
> > Unfortunatelly, I still think retrotranslator is a faster and simpler
> > solution. Because the Luciano's suggestion only forces the SCA to
> recognize
> > the services with no annotations declared on their interfaces, but it
> does
> > not avoid the Exceptions we are getting when the SCA invokes methods that
> > read annotations. So, our current problem is that we are not being able
> to
> > use these methods and not only because we are not being able to read the
> > annotations.
> >
> > Oscar, if you want to try the Luciano's suggestion, you will need to
> > comment/adapt every sca code that tries to read the class annotations. It
> > is
> > not necessary to comment/adapt the methods that read Method annotations,
> > they are not throwning any exception. So, every code that checks for
> > @Remotable you force to true, otherwise force to false.
> >
> > Any doubt about what I have said, just let me know ; )
> >
> > Suggestions are welcome : )
> >
> > Adriano Crestani
> >
> > On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> > > FYI, if you comment out the code that checks if a interface is
> > > remoteble, you could have a version of the calculator without any
> > > annotations, and the runtime would introspect the references for the
> > > multiple services. But note that, the introspection code will only be
> > > activated if there is no SCA annotations on the class.
> > >
> > > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > > <ad...@apache.org> wrote:
> > > > Ah, the expected exception should look like this on android emulator:
> > > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > > >
> > > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > > adrianocrestani@apache.org> wrote:
> > > >
> > > >> Hi Oscar,
> > > >>
> > > >> I was indeed using the sca modules not from the sandbox. As you
> > > suggested,
> > > >> I
> > > >> removed the tuscany-contribution-impl from my workspace and added
> the
> > > >> version you uploaded to the sandbox. Then, I uncommented the lines
> in
> > > >>
> > > >>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >>
> > > >> following the comments pointing out why those lines had been
> > commented.
> > > I'm
> > > >> no longer getting the ClassNotFoundException. However, it's getting
> > > stuck
> > > >> somewhere else (before getting there I guess)...I think this is the
> > case
> > > >> because before and after commenting the code I get the same error in
> > the
> > > >> Android emulator, an InstantiationException [1].
> > > >>
> > > >> Have you debugged to check exactly where this exception is being
> > thrown?
> > > I
> > > >> have done the procedure I previously described  again and I got it
> > > "running"
> > > >> as expected, which means, running till the expected exception is
> > thrown.
> > > >>
> > > >> I also started tinkering with retrotranslator. First I tried doing
> it
> > > with
> > > >> Ant, but it seems that in order to build I have to include the whole
> > > >> tuscany
> > > >> projects in a way similar to how I now have in Eclipse. I also tried
> > > making
> > > >> a jar out of
> > > >>
> > > >>
> > > >>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >>
> > > >> and then feeding it to retrotranslator but unfortunately it's not
> > > >> translating anything, as shown below.
> > > >>
> > > >> Voyager-2:Retrotranslator-1.2
> > > >> .6-bin ocastaneda$ java -jar
> > > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > > >> JavaRuntimeModuleActivator.jar
> > > >> -target 1.5 -reflection safe -stripannot -classpath
> > > >> retrotranslator-android-1.2.6.jar
> > > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > >> Transformed 0 file(s).
> > > >>
> > > >> There's also a maven plugin, so I might try that...but first I'll
> give
> > > Ant
> > > >> another go. Hopefully Google will release a new SDK soon, otherwise
> as
> > > you
> > > >> say...retrotranslator will have to be the workaround to proceed with
> > our
> > > >> project ;-)
> > > >>
> > > >> Unfortunately the rumors say the new SDK version will not be
> released
> > > until
> > > >> july 28th :S. So, it's really good you have already started working
> on
> > > the
> > > >> retrotranslator, it will probably be the best workaround for the
> > > annotations
> > > >> problem till the next SDK release.
> > > >>
> > > >> I suggest you to forget about the build process right now, before,
> > check
> > > if
> > > >> this retrotranslator works and if it really works on android
> platform.
> > > I´m
> > > >> really getting upset with Android, even its API methods does not
> work
> > as
> > > >> expected :@. Anyway, try initially to compile a simple class (coded
> by
> > > you),
> > > >> which contains annotations, and access these annotations. If it
> works,
> > > make
> > > >> it more complex and test again, do it until you reach a scenario as
> > > complex
> > > >> as the SCA (a lot of external jars with annotated classes accessed
> by
> > > the
> > > >> other external jars and the Android app). Got it? : )
> > > >>
> > > >> Regards,
> > > >> Adriano Crestani
> > > >>
> > > >>
> > > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > > >>
> > > >>> Hi Adriano,
> > > >>>
> > > >>> I was indeed using the sca modules not from the sandbox. As you
> > > suggested,
> > > >>> I
> > > >>> removed the tuscany-contribution-impl from my workspace and added
> the
> > > >>> version you uploaded to the sandbox. Then, I uncommented the lines
> in
> > > >>>
> > > >>>
> > > >>>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >>>
> > > >>> following the comments pointing out why those lines had been
> > commented.
> > > >>> I'm
> > > >>> no longer getting the ClassNotFoundException. However, it's getting
> > > stuck
> > > >>> somewhere else (before getting there I guess)...I think this is the
> > > case
> > > >>> because before and after commenting the code I get the same error
> in
> > > the
> > > >>> Android emulator, an InstantiationException [1].
> > > >>>
> > > >>> I also started tinkering with retrotranslator. First I tried doing
> it
> > > with
> > > >>> Ant, but it seems that in order to build I have to include the
> whole
> > > >>> tuscany
> > > >>> projects in a way similar to how I now have in Eclipse. I also
> tried
> > > >>> making
> > > >>> a jar out of
> > > >>>
> > > >>>
> > > >>>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >>>
> > > >>> and then feeding it to retrotranslator but unfortunately it's not
> > > >>> translating anything, as shown below.
> > > >>>
> > > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > > >>> JavaRuntimeModuleActivator.jar
> > > >>> -target 1.5 -reflection safe -stripannot -classpath
> > > >>> retrotranslator-android-1.2.6.jar
> > > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > > >>> Transformed 0 file(s).
> > > >>>
> > > >>> There's also a maven plugin, so I might try that...but first I'll
> > give
> > > Ant
> > > >>> another go. Hopefully Google will release a new SDK soon, otherwise
> > as
> > > you
> > > >>> say...retrotranslator will have to be the workaround to proceed
> with
> > > our
> > > >>> project ;-)
> > > >>>
> > > >>> Thanks again for all your help...I'm getting ready for the official
> > > start
> > > >>> :-)
> > > >>>
> > > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > > >>>
> > > >>>
> > > >>>
> > > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > > >>> adrianocrestani@apache.org> wrote:
> > > >>>
> > > >>> > Hi Oscar,
> > > >>> >
> > > >>> > My mistake again, the eclipse project files of contribution-impl
> > > module
> > > >>> > were
> > > >>> > not uploaded, so you are probably using the modules you have
> > > downloaded
> > > >>> > from
> > > >>> > the sca modules. If you remove the tuscany-contribution-impl from
> > > your
> > > >>> > workspace and add this module from the sandbox it will probably
> > work.
> > > >>> > Anyway, you will need to update your trunk again to get the
> project
> > > >>> files
> > > >>> > I'm uploading right now ; )
> > > >>> >
> > > >>> > OK, if you wanna try the retrotranslator as a solution here is a
> > tip:
> > > >>> most
> > > >>> > of the code that were using the Reflection API was commented on
> > > >>> >
> > > >>> >
> > > >>>
> > >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > > >>> > class, you just need to edit this class and remove the commented
> > code
> > > >>> (it's
> > > >>> > described there).
> > > >>> >
> > > >>> > So, if you uncomment the code and the retrotranslador successfuly
> > > work,
> > > >>> and
> > > >>> > I hope it will, you will reach the
> > > >>> >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > >>> > constructor and it should run OK. Exactly on this constructor I'm
> > > >>> getting a
> > > >>> > NPE when the code described above is commented.
> > > >>> >
> > > >>> > About the ant, go on and use it. Further we can evaluate better
> > where
> > > we
> > > >>> > place it in the entire SCA build process. BTW, we even dont know
> if
> > > we
> > > >>> will
> > > >>> > still be using the retrotranslator in future, right?! : )
> > > >>> >
> > > >>> > Use the retrotranslator may help us a lot to workaround this
> > problem
> > > for
> > > >>> > now
> > > >>> > and go on with our project ; )
> > > >>> >
> > > >>> > Kind Regards,
> > > >>> > Adriano Crestani
> > > >>> >
> > > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > > >>> >
> > > >>> > > Hi Adriano,
> > > >>> > >
> > > >>> > > Thanks alot for your answers. I was able to build the entire
> > > workspace
> > > >>> > from
> > > >>> > > your instructions. When running calculator-android as an
> "Android
> > > >>> > > application" I'm getting a ClassNotFoundException [1] for
> > > >>> > >
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > >>> > > Is the exception you referred to in your original email?
> > > >>> > >
> > > >>> > > ...when
> > > >>> > > > you run the calculator-android project as an "Android
> > > application"
> > > >>> you
> > > >>> > > > should get an exception, that was generated initially by a
> NPE
> > > >>> thrown
> > > >>> > by
> > > >>> > > >
> > > >>> >
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > >>> > > > constructor. This is caused because the latest Android SDK
> does
> > > not
> > > >>> > > support
> > > >>> > > > the Reflection API yet. So, the SCA cannot check the
> @Reference
> > > >>> > > annotations
> > > >>> > > > (I commented the code which tries to read the annotations, so
> > > when
> > > >>> the
> > > >>> > > > execution reach this constructor it throws the NPE).
> > > >>> > > >
> > > >>> > >
> > > >>> > >
> > > >>> > > Searching for the class in the exception I'm getting I found
> > > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > > >>> > getServiceClasses
> > > >>> > > it loads the service class I'm getting problems with when
> running
> > > >>> > > calculator-android as an "Android application":
> > > >>> > >
> > > >>> > >
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > > >>> > >
> > > >>> > >
> > > >>> > > I couldn't find the corresponding java file in my imported
> > > workspace
> > > >>> and
> > > >>> > > found that there is no package like
> > > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > > >>> > >
> > > >>> > > Am I missing something? Or are these the errors you would
> expect?
> > > >>> > >
> > > >>> > > I would like to get to the point where I get the exception you
> > > >>> described
> > > >>> > > and
> > > >>> > > try to run retrotranslator from there. However, as I'm using
> the
> > > ADT
> > > >>> > plugin
> > > >>> > > in eclipse I would need to extract code that "declares or
> > analyzes
> > > >>> > > annotations you may extract it into a separate library that can
> > be
> > > >>> > > processed
> > > >>> > > with Retrotranslator and added to the main project." That is,
> > > unless I
> > > >>> > use
> > > >>> > > Ant, in which case I would only need to add a few lines to
> > > build.xml.
> > > >>> I'm
> > > >>> > > continuing to look into this, any thoughts are more than
> welcome
> > > :-)
> > > >>> > >
> > > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > > >>> > >
> > > >>> > >
> > > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > >>> > > adrianocrestani@apache.org> wrote:
> > > >>> > >
> > > >>> > > > Hi,
> > > >>> > > >
> > > >>> > > > Thanks all for the feedback ; )
> > > >>> > > >
> > > >>> > > > At first, I want to correct one mistake, on the first step I
> > > >>> described
> > > >>> > on
> > > >>> > > > my
> > > >>> > > > previous email, I should not have added the word "install",
> it
> > > >>> probably
> > > >>> > > > would lead the reader to run the "mvn clean install" in the
> > > >>> downloaded
> > > >>> > > > files, as Oscar did. Also, on this same step, the code should
> > not
> > > be
> > > >>> > > > downloaded from [1], but from [2].
> > > >>> > > >
> > > >>> > > > Simon:
> > > >>> > > > Thanks for the link ; ). As the Sun Java source codes are
> under
> > > CDDL
> > > >>> > 1.0
> > > >>> > > > license, it's only needed to include the CDDL license header
> on
> > > each
> > > >>> > > file,
> > > >>> > > > and it's already done : )
> > > >>> > > >
> > > >>> > > > Jean:
> > > >>> > > > I think it is better to keep the code in the sandbox for now.
> > At
> > > >>> first,
> > > >>> > > > it's
> > > >>> > > > not working on the current SCA modules revision yet. And
> also,
> > > I'm
> > > >>> > > > commenting many lines at some modules just to get a "first
> run"
> > > of
> > > >>> > > > calculator-sample to further evaluate why and how this
> > commented
> > > >>> lines
> > > >>> > > will
> > > >>> > > > be adapted to be compatible with both: SCA Java and SCA
> > Android.
> > > >>> > > >
> > > >>> > > > Oscar:
> > > >>> > > >
> > > >>> > > > - Are host-android and core-android a part of
> > calculator-android?
> > > >>> > > >
> > > >>> > > > What do you mean when you say "part"? They are used by
> > > >>> > > calculator-android,
> > > >>> > > > and will prabably be added to tuscany sca modules in future
> > > >>> > > >
> > > >>> > > > - Should the calculator-android included in [1] have included
> > an
> > > >>> > > > "AndroidManifest.xml" file?
> > > >>> > > >
> > > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse project
> > > files
> > > >>> of
> > > >>> > > > these
> > > >>> > > > projects. I have already commited these files and if you
> update
> > > your
> > > >>> > > trunk
> > > >>> > > > you will get them ; ). So, delete the ones you have created.
> > > >>> > > >
> > > >>> > > > - How can I fix the build errors? Is there something else
> > needed
> > > in
> > > >>> > > > addition
> > > >>> > > > to including the Android Library?
> > > >>> > > >
> > > >>> > > > No, the Android library is really simples, it only contains
> the
> > > >>> > > android.jar
> > > >>> > > > file located in your Android SDK.
> > > >>> > > >
> > > >>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > > >>> > > > eclipse:eclipse"
> > > >>> > > > commands on the sandbox files, the eclipse project files are
> > > already
> > > >>> in
> > > >>> > > > modules and you should build the modules using the eclipse
> for
> > > now.
> > > >>> The
> > > >>> > > > maven config files are not updated yet with the modifications
> I
> > > have
> > > >>> > done
> > > >>> > > > on
> > > >>> > > > these modules, so they will not generate the correct project
> > > files,
> > > >>> > > worse,
> > > >>> > > > they will override the ones I have created.
> > > >>> > > >
> > > >>> > > > Then, clean and build your entire workspace, if you still get
> > any
> > > >>> > errors,
> > > >>> > > > let me know ; )
> > > >>> > > >
> > > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should
> > > this
> > > >>> not
> > > >>> > be
> > > >>> > > > imported?
> > > >>> > > >
> > > >>> > > > It seems the revision I suggested already had the saxon
> module
> > > >>> removed
> > > >>> > > from
> > > >>> > > > repo. So, you mistakenly removed another one that shouldn´t.
> > > Please,
> > > >>> > > import
> > > >>> > > > the databinding-saxon module again into your workspace.
> > > >>> > > >
> > > >>> > > >
> > > >>> > > > Regards,
> > > >>> > > > Adriano Crestani
> > > >>> > > >
> > > >>> > > >
> > > >>> > > > [1] -
> > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > >>> > > >
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > >>> > > > >
> > > >>> > > > [2] -
> > > >>> > > >
> > > >>> > >
> > > >>> >
> > > >>>
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >>> > > >
> > > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > > >>> > > > jsdelfino@apache.org> wrote:
> > > >>> > > >
> > > >>> > > > > Mike Edwards wrote:
> > > >>> > > > >
> > > >>> > > > > > Jean-Sebastien Delfino wrote:
> > > >>> > > > > >
> > > >>> > > > > > > Oscar Castaneda wrote:
> > > >>> > > > > > >
> > > >>> > > > > > >  1. Downloaded the modified code from [1] and installed
> > as
> > > >>> shown
> > > >>> > > > > > > > below:
> > > >>> > > > > > > >
> > > >>> > > > > > > > svn checkout
> > > >>> > > > > > > >
> > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > >>> > > > > > > >
> > > >>> > > > > > > > cd mobile-android
> > > >>> > > > > > > >
> > > >>> > > > > > > >
> > > >>> > > > > > > If there's no objection from others, I'd be happy to
> see
> > > this
> > > >>> > code
> > > >>> > > > > > > move from sandbox to trunk as we now have several
> people
> > > doing
> > > >>> > > > development
> > > >>> > > > > > > on this android integration.
> > > >>> > > > > > >
> > > >>> > > > > > > Adriano, you could start with something like
> > > >>> > trunk/java/sca/android
> > > >>> > > > > > > and later progressively try to converge the code with
> the
> > > code
> > > >>> in
> > > >>> > > > trunk,
> > > >>> > > > > > > with architected plug points for the android specific
> > code
> > > >>> etc.
> > > >>> > > > > > >
> > > >>> > > > > > > Thoughts?
> > > >>> > > > > > >
> > > >>> > > > > >
> > > >>> > > > > > I assume that moving to trunk does not also imply "making
> > > part
> > > >>> of
> > > >>> > the
> > > >>> > > > > > main build"?
> > > >>> > > > > >
> > > >>> > > > > > I'd be a bit concerned at experimental code entering the
> > > build
> > > >>> at
> > > >>> > > this
> > > >>> > > > > > stage.
> > > >>> > > > > >
> > > >>> > > > > >
> > > >>> > > > > > Yours,  Mike.
> > > >>> > > > > >
> > > >>> > > > >
> > > >>> > > > > I think it's business as usual, code that doesn't work does
> > not
> > > go
> > > >>> in
> > > >>> > > the
> > > >>> > > > > main build, code that's getting stable can go in the main
> > build
> > > at
> > > >>> > some
> > > >>> > > > > point when people have no specific objections, and
> different
> > > >>> profiles
> > > >>> > > can
> > > >>> > > > be
> > > >>> > > > > used to subset particular builds.
> > > >>> > > > >
> > > >>> > > > > --
> > > >>> > > > > Jean-Sebastien
> > > >>> > > > >
> > > >>> > > >
> > > >>> > >
> > > >>> > >
> > > >>> > >
> > > >>> > > --
> > > >>> > > best,
> > > >>> > > -oscar
> > > >>> > >
> > > >>> > > Oscar Castañeda
> > > >>> > >
> > > >>> >
> > > >>>
> > > >>>
> > > >>>
> > > >>> --
> > > >>> best,
> > > >>> -oscar
> > > >>>
> > > >>> Oscar Castañeda
> > > >>>
> > > >>
> > > >>
> > > >
> > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende><
> > http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

I continued testing retrotranslator. Here's what I've done up to now.

1. Downloaded the modified code from [1].

2. Downloaded SCA modules from [2] and installed as shown below:

svn checkout --revision 643746
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules

cd modules

mvn clean install -Dtest=no
mvn -Peclipse eclipse:eclipse -Dtest=no

 3. Created a new eclipse workspace and set the M2_REPO variable as shown
below:

mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo

 4. Adjusted buildpath to eliminate build errors, added Android library to
required modules, fixed references to jar files and other libraries.

5. Uncommented lines in

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

6. Ran retrotranslator as instructed on the project site [3] and shown
below:

Voyager-2:30May ocastaneda$ java -jar
/../retrotranslator-transformer-1.2.6.jar -srcdir /../workspace
-target 1.5 -reflection safe -stripannot -classpath
/../retrotranslator-android-1.2.6.jar -verbose

 The output can be found in [4].
7. Rebuilt project after uncommenting lines in

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

and then re-ran retrotranslator.
8. Debugging in Eclipse shows errors shown in [5] and Android errors in [6].



As always, I'm documenting my progress on the project log. I haven't fully
tested out Luciano's suggestions. I guess I'm puzzled by what you mean by
this:

"code that checks for @Remotable you force to true, otherwise force to
false."

I'll continue looking into it and hopefully get retrotranslator to work. I
also think it's a simpler option.

Luciano: Thanks for your suggestions.

[1]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android

[2] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/

[3] http://retrotranslator.sourceforge.net/#android

[4] http://androidindelft.googlepages.com/rt_output_30may2008.txt

[5] http://cwiki.apache.org/confluence/display/TUSCANYWIKI/2Jun2008
[6] http://androidindelft.googlepages.com/2Jun1.jpg


On Tue, May 27, 2008 at 6:33 PM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi,
>
> I tried what Luciano suggested. It really works. To get it working you
> simply need to search on all modules where the code checks for @Remotable
> annotation and force it to true:
>
> "clazz.getAnnotation(Remotable.class) != null"   => true
> "clazz.isAnnotationPresent(Remotable.class)" => true
>
> It works fine on the sca revision we are testing on Android and the most
> recent revision. I only tested it as a java application, not as an android
> application.
>
> Unfortunatelly, I still think retrotranslator is a faster and simpler
> solution. Because the Luciano's suggestion only forces the SCA to recognize
> the services with no annotations declared on their interfaces, but it does
> not avoid the Exceptions we are getting when the SCA invokes methods that
> read annotations. So, our current problem is that we are not being able to
> use these methods and not only because we are not being able to read the
> annotations.
>
> Oscar, if you want to try the Luciano's suggestion, you will need to
> comment/adapt every sca code that tries to read the class annotations. It
> is
> not necessary to comment/adapt the methods that read Method annotations,
> they are not throwning any exception. So, every code that checks for
> @Remotable you force to true, otherwise force to false.
>
> Any doubt about what I have said, just let me know ; )
>
> Suggestions are welcome : )
>
> Adriano Crestani
>
> On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <lu...@gmail.com>
> wrote:
>
> > FYI, if you comment out the code that checks if a interface is
> > remoteble, you could have a version of the calculator without any
> > annotations, and the runtime would introspect the references for the
> > multiple services. But note that, the introspection code will only be
> > activated if there is no SCA annotations on the class.
> >
> > On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> > <ad...@apache.org> wrote:
> > > Ah, the expected exception should look like this on android emulator:
> > > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> <http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> > >
> > > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > > adrianocrestani@apache.org> wrote:
> > >
> > >> Hi Oscar,
> > >>
> > >> I was indeed using the sca modules not from the sandbox. As you
> > suggested,
> > >> I
> > >> removed the tuscany-contribution-impl from my workspace and added the
> > >> version you uploaded to the sandbox. Then, I uncommented the lines in
> > >>
> > >>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >>
> > >> following the comments pointing out why those lines had been
> commented.
> > I'm
> > >> no longer getting the ClassNotFoundException. However, it's getting
> > stuck
> > >> somewhere else (before getting there I guess)...I think this is the
> case
> > >> because before and after commenting the code I get the same error in
> the
> > >> Android emulator, an InstantiationException [1].
> > >>
> > >> Have you debugged to check exactly where this exception is being
> thrown?
> > I
> > >> have done the procedure I previously described  again and I got it
> > "running"
> > >> as expected, which means, running till the expected exception is
> thrown.
> > >>
> > >> I also started tinkering with retrotranslator. First I tried doing it
> > with
> > >> Ant, but it seems that in order to build I have to include the whole
> > >> tuscany
> > >> projects in a way similar to how I now have in Eclipse. I also tried
> > making
> > >> a jar out of
> > >>
> > >>
> > >>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >>
> > >> and then feeding it to retrotranslator but unfortunately it's not
> > >> translating anything, as shown below.
> > >>
> > >> Voyager-2:Retrotranslator-1.2
> > >> .6-bin ocastaneda$ java -jar
> > >> retrotranslator-transformer-1.2.6.jar -srcjar
> > >> JavaRuntimeModuleActivator.jar
> > >> -target 1.5 -reflection safe -stripannot -classpath
> > >> retrotranslator-android-1.2.6.jar
> > >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > >> Transformed 0 file(s).
> > >>
> > >> There's also a maven plugin, so I might try that...but first I'll give
> > Ant
> > >> another go. Hopefully Google will release a new SDK soon, otherwise as
> > you
> > >> say...retrotranslator will have to be the workaround to proceed with
> our
> > >> project ;-)
> > >>
> > >> Unfortunately the rumors say the new SDK version will not be released
> > until
> > >> july 28th :S. So, it's really good you have already started working on
> > the
> > >> retrotranslator, it will probably be the best workaround for the
> > annotations
> > >> problem till the next SDK release.
> > >>
> > >> I suggest you to forget about the build process right now, before,
> check
> > if
> > >> this retrotranslator works and if it really works on android platform.
> > I´m
> > >> really getting upset with Android, even its API methods does not work
> as
> > >> expected :@. Anyway, try initially to compile a simple class (coded by
> > you),
> > >> which contains annotations, and access these annotations. If it works,
> > make
> > >> it more complex and test again, do it until you reach a scenario as
> > complex
> > >> as the SCA (a lot of external jars with annotated classes accessed by
> > the
> > >> other external jars and the Android app). Got it? : )
> > >>
> > >> Regards,
> > >> Adriano Crestani
> > >>
> > >>
> > >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> > >> oscar.castaneda.gsoc@gmail.com> wrote:
> > >>
> > >>> Hi Adriano,
> > >>>
> > >>> I was indeed using the sca modules not from the sandbox. As you
> > suggested,
> > >>> I
> > >>> removed the tuscany-contribution-impl from my workspace and added the
> > >>> version you uploaded to the sandbox. Then, I uncommented the lines in
> > >>>
> > >>>
> > >>>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >>>
> > >>> following the comments pointing out why those lines had been
> commented.
> > >>> I'm
> > >>> no longer getting the ClassNotFoundException. However, it's getting
> > stuck
> > >>> somewhere else (before getting there I guess)...I think this is the
> > case
> > >>> because before and after commenting the code I get the same error in
> > the
> > >>> Android emulator, an InstantiationException [1].
> > >>>
> > >>> I also started tinkering with retrotranslator. First I tried doing it
> > with
> > >>> Ant, but it seems that in order to build I have to include the whole
> > >>> tuscany
> > >>> projects in a way similar to how I now have in Eclipse. I also tried
> > >>> making
> > >>> a jar out of
> > >>>
> > >>>
> > >>>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >>>
> > >>> and then feeding it to retrotranslator but unfortunately it's not
> > >>> translating anything, as shown below.
> > >>>
> > >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> > >>> retrotranslator-transformer-1.2.6.jar -srcjar
> > >>> JavaRuntimeModuleActivator.jar
> > >>> -target 1.5 -reflection safe -stripannot -classpath
> > >>> retrotranslator-android-1.2.6.jar
> > >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> > >>> Transformed 0 file(s).
> > >>>
> > >>> There's also a maven plugin, so I might try that...but first I'll
> give
> > Ant
> > >>> another go. Hopefully Google will release a new SDK soon, otherwise
> as
> > you
> > >>> say...retrotranslator will have to be the workaround to proceed with
> > our
> > >>> project ;-)
> > >>>
> > >>> Thanks again for all your help...I'm getting ready for the official
> > start
> > >>> :-)
> > >>>
> > >>> [1] http://androidindelft.googlepages.com/20may2008.html
> > >>>
> > >>>
> > >>>
> > >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> > >>> adrianocrestani@apache.org> wrote:
> > >>>
> > >>> > Hi Oscar,
> > >>> >
> > >>> > My mistake again, the eclipse project files of contribution-impl
> > module
> > >>> > were
> > >>> > not uploaded, so you are probably using the modules you have
> > downloaded
> > >>> > from
> > >>> > the sca modules. If you remove the tuscany-contribution-impl from
> > your
> > >>> > workspace and add this module from the sandbox it will probably
> work.
> > >>> > Anyway, you will need to update your trunk again to get the project
> > >>> files
> > >>> > I'm uploading right now ; )
> > >>> >
> > >>> > OK, if you wanna try the retrotranslator as a solution here is a
> tip:
> > >>> most
> > >>> > of the code that were using the Reflection API was commented on
> > >>> >
> > >>> >
> > >>>
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > >>> > class, you just need to edit this class and remove the commented
> code
> > >>> (it's
> > >>> > described there).
> > >>> >
> > >>> > So, if you uncomment the code and the retrotranslador successfuly
> > work,
> > >>> and
> > >>> > I hope it will, you will reach the
> > >>> >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > >>> > constructor and it should run OK. Exactly on this constructor I'm
> > >>> getting a
> > >>> > NPE when the code described above is commented.
> > >>> >
> > >>> > About the ant, go on and use it. Further we can evaluate better
> where
> > we
> > >>> > place it in the entire SCA build process. BTW, we even dont know if
> > we
> > >>> will
> > >>> > still be using the retrotranslator in future, right?! : )
> > >>> >
> > >>> > Use the retrotranslator may help us a lot to workaround this
> problem
> > for
> > >>> > now
> > >>> > and go on with our project ; )
> > >>> >
> > >>> > Kind Regards,
> > >>> > Adriano Crestani
> > >>> >
> > >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> > >>> >
> > >>> > > Hi Adriano,
> > >>> > >
> > >>> > > Thanks alot for your answers. I was able to build the entire
> > workspace
> > >>> > from
> > >>> > > your instructions. When running calculator-android as an "Android
> > >>> > > application" I'm getting a ClassNotFoundException [1] for
> > >>> > >
> > >>> > >
> > >>> >
> > >>>
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > >>> > > Is the exception you referred to in your original email?
> > >>> > >
> > >>> > > ...when
> > >>> > > > you run the calculator-android project as an "Android
> > application"
> > >>> you
> > >>> > > > should get an exception, that was generated initially by a NPE
> > >>> thrown
> > >>> > by
> > >>> > > >
> > >>> >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > >>> > > > constructor. This is caused because the latest Android SDK does
> > not
> > >>> > > support
> > >>> > > > the Reflection API yet. So, the SCA cannot check the @Reference
> > >>> > > annotations
> > >>> > > > (I commented the code which tries to read the annotations, so
> > when
> > >>> the
> > >>> > > > execution reach this constructor it throws the NPE).
> > >>> > > >
> > >>> > >
> > >>> > >
> > >>> > > Searching for the class in the exception I'm getting I found
> > >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > >>> > getServiceClasses
> > >>> > > it loads the service class I'm getting problems with when running
> > >>> > > calculator-android as an "Android application":
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> >
> > >>>
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > >>> > >
> > >>> > >
> > >>> > > I couldn't find the corresponding java file in my imported
> > workspace
> > >>> and
> > >>> > > found that there is no package like
> > >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> > >>> > >
> > >>> > > Am I missing something? Or are these the errors you would expect?
> > >>> > >
> > >>> > > I would like to get to the point where I get the exception you
> > >>> described
> > >>> > > and
> > >>> > > try to run retrotranslator from there. However, as I'm using the
> > ADT
> > >>> > plugin
> > >>> > > in eclipse I would need to extract code that "declares or
> analyzes
> > >>> > > annotations you may extract it into a separate library that can
> be
> > >>> > > processed
> > >>> > > with Retrotranslator and added to the main project." That is,
> > unless I
> > >>> > use
> > >>> > > Ant, in which case I would only need to add a few lines to
> > build.xml.
> > >>> I'm
> > >>> > > continuing to look into this, any thoughts are more than welcome
> > :-)
> > >>> > >
> > >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > >>> > >
> > >>> > >
> > >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > >>> > > adrianocrestani@apache.org> wrote:
> > >>> > >
> > >>> > > > Hi,
> > >>> > > >
> > >>> > > > Thanks all for the feedback ; )
> > >>> > > >
> > >>> > > > At first, I want to correct one mistake, on the first step I
> > >>> described
> > >>> > on
> > >>> > > > my
> > >>> > > > previous email, I should not have added the word "install", it
> > >>> probably
> > >>> > > > would lead the reader to run the "mvn clean install" in the
> > >>> downloaded
> > >>> > > > files, as Oscar did. Also, on this same step, the code should
> not
> > be
> > >>> > > > downloaded from [1], but from [2].
> > >>> > > >
> > >>> > > > Simon:
> > >>> > > > Thanks for the link ; ). As the Sun Java source codes are under
> > CDDL
> > >>> > 1.0
> > >>> > > > license, it's only needed to include the CDDL license header on
> > each
> > >>> > > file,
> > >>> > > > and it's already done : )
> > >>> > > >
> > >>> > > > Jean:
> > >>> > > > I think it is better to keep the code in the sandbox for now.
> At
> > >>> first,
> > >>> > > > it's
> > >>> > > > not working on the current SCA modules revision yet. And also,
> > I'm
> > >>> > > > commenting many lines at some modules just to get a "first run"
> > of
> > >>> > > > calculator-sample to further evaluate why and how this
> commented
> > >>> lines
> > >>> > > will
> > >>> > > > be adapted to be compatible with both: SCA Java and SCA
> Android.
> > >>> > > >
> > >>> > > > Oscar:
> > >>> > > >
> > >>> > > > - Are host-android and core-android a part of
> calculator-android?
> > >>> > > >
> > >>> > > > What do you mean when you say "part"? They are used by
> > >>> > > calculator-android,
> > >>> > > > and will prabably be added to tuscany sca modules in future
> > >>> > > >
> > >>> > > > - Should the calculator-android included in [1] have included
> an
> > >>> > > > "AndroidManifest.xml" file?
> > >>> > > >
> > >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse project
> > files
> > >>> of
> > >>> > > > these
> > >>> > > > projects. I have already commited these files and if you update
> > your
> > >>> > > trunk
> > >>> > > > you will get them ; ). So, delete the ones you have created.
> > >>> > > >
> > >>> > > > - How can I fix the build errors? Is there something else
> needed
> > in
> > >>> > > > addition
> > >>> > > > to including the Android Library?
> > >>> > > >
> > >>> > > > No, the Android library is really simples, it only contains the
> > >>> > > android.jar
> > >>> > > > file located in your Android SDK.
> > >>> > > >
> > >>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > >>> > > > eclipse:eclipse"
> > >>> > > > commands on the sandbox files, the eclipse project files are
> > already
> > >>> in
> > >>> > > > modules and you should build the modules using the eclipse for
> > now.
> > >>> The
> > >>> > > > maven config files are not updated yet with the modifications I
> > have
> > >>> > done
> > >>> > > > on
> > >>> > > > these modules, so they will not generate the correct project
> > files,
> > >>> > > worse,
> > >>> > > > they will override the ones I have created.
> > >>> > > >
> > >>> > > > Then, clean and build your entire workspace, if you still get
> any
> > >>> > errors,
> > >>> > > > let me know ; )
> > >>> > > >
> > >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should
> > this
> > >>> not
> > >>> > be
> > >>> > > > imported?
> > >>> > > >
> > >>> > > > It seems the revision I suggested already had the saxon module
> > >>> removed
> > >>> > > from
> > >>> > > > repo. So, you mistakenly removed another one that shouldn´t.
> > Please,
> > >>> > > import
> > >>> > > > the databinding-saxon module again into your workspace.
> > >>> > > >
> > >>> > > >
> > >>> > > > Regards,
> > >>> > > > Adriano Crestani
> > >>> > > >
> > >>> > > >
> > >>> > > > [1] -
> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > >>> > > >
> > >>> > >
> > >>> >
> > >>>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > >>> > > > >
> > >>> > > > [2] -
> > >>> > > >
> > >>> > >
> > >>> >
> > >>>
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >>> > > >
> > >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > >>> > > > jsdelfino@apache.org> wrote:
> > >>> > > >
> > >>> > > > > Mike Edwards wrote:
> > >>> > > > >
> > >>> > > > > > Jean-Sebastien Delfino wrote:
> > >>> > > > > >
> > >>> > > > > > > Oscar Castaneda wrote:
> > >>> > > > > > >
> > >>> > > > > > >  1. Downloaded the modified code from [1] and installed
> as
> > >>> shown
> > >>> > > > > > > > below:
> > >>> > > > > > > >
> > >>> > > > > > > > svn checkout
> > >>> > > > > > > >
> > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > >>> > > > > > > >
> > >>> > > > > > > > cd mobile-android
> > >>> > > > > > > >
> > >>> > > > > > > >
> > >>> > > > > > > If there's no objection from others, I'd be happy to see
> > this
> > >>> > code
> > >>> > > > > > > move from sandbox to trunk as we now have several people
> > doing
> > >>> > > > development
> > >>> > > > > > > on this android integration.
> > >>> > > > > > >
> > >>> > > > > > > Adriano, you could start with something like
> > >>> > trunk/java/sca/android
> > >>> > > > > > > and later progressively try to converge the code with the
> > code
> > >>> in
> > >>> > > > trunk,
> > >>> > > > > > > with architected plug points for the android specific
> code
> > >>> etc.
> > >>> > > > > > >
> > >>> > > > > > > Thoughts?
> > >>> > > > > > >
> > >>> > > > > >
> > >>> > > > > > I assume that moving to trunk does not also imply "making
> > part
> > >>> of
> > >>> > the
> > >>> > > > > > main build"?
> > >>> > > > > >
> > >>> > > > > > I'd be a bit concerned at experimental code entering the
> > build
> > >>> at
> > >>> > > this
> > >>> > > > > > stage.
> > >>> > > > > >
> > >>> > > > > >
> > >>> > > > > > Yours,  Mike.
> > >>> > > > > >
> > >>> > > > >
> > >>> > > > > I think it's business as usual, code that doesn't work does
> not
> > go
> > >>> in
> > >>> > > the
> > >>> > > > > main build, code that's getting stable can go in the main
> build
> > at
> > >>> > some
> > >>> > > > > point when people have no specific objections, and different
> > >>> profiles
> > >>> > > can
> > >>> > > > be
> > >>> > > > > used to subset particular builds.
> > >>> > > > >
> > >>> > > > > --
> > >>> > > > > Jean-Sebastien
> > >>> > > > >
> > >>> > > >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > --
> > >>> > > best,
> > >>> > > -oscar
> > >>> > >
> > >>> > > Oscar Castañeda
> > >>> > >
> > >>> >
> > >>>
> > >>>
> > >>>
> > >>> --
> > >>> best,
> > >>> -oscar
> > >>>
> > >>> Oscar Castañeda
> > >>>
> > >>
> > >>
> > >
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> > http://lresende.blogspot.com/
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi,

I tried what Luciano suggested. It really works. To get it working you
simply need to search on all modules where the code checks for @Remotable
annotation and force it to true:

"clazz.getAnnotation(Remotable.class) != null"   => true
"clazz.isAnnotationPresent(Remotable.class)" => true

It works fine on the sca revision we are testing on Android and the most
recent revision. I only tested it as a java application, not as an android
application.

Unfortunatelly, I still think retrotranslator is a faster and simpler
solution. Because the Luciano's suggestion only forces the SCA to recognize
the services with no annotations declared on their interfaces, but it does
not avoid the Exceptions we are getting when the SCA invokes methods that
read annotations. So, our current problem is that we are not being able to
use these methods and not only because we are not being able to read the
annotations.

Oscar, if you want to try the Luciano's suggestion, you will need to
comment/adapt every sca code that tries to read the class annotations. It is
not necessary to comment/adapt the methods that read Method annotations,
they are not throwning any exception. So, every code that checks for
@Remotable you force to true, otherwise force to false.

Any doubt about what I have said, just let me know ; )

Suggestions are welcome : )

Adriano Crestani

On Wed, May 21, 2008 at 12:57 PM, Luciano Resende <lu...@gmail.com>
wrote:

> FYI, if you comment out the code that checks if a interface is
> remoteble, you could have a version of the calculator without any
> annotations, and the runtime would introspect the references for the
> multiple services. But note that, the introspection code will only be
> activated if there is no SCA annotations on the class.
>
> On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Ah, the expected exception should look like this on android emulator:
> > http://people.apache.org/~adrianocrestani/android_emulator.jpg<http://people.apache.org/%7Eadrianocrestani/android_emulator.jpg>
> >
> > On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> > adrianocrestani@apache.org> wrote:
> >
> >> Hi Oscar,
> >>
> >> I was indeed using the sca modules not from the sandbox. As you
> suggested,
> >> I
> >> removed the tuscany-contribution-impl from my workspace and added the
> >> version you uploaded to the sandbox. Then, I uncommented the lines in
> >>
> >>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>
> >> following the comments pointing out why those lines had been commented.
> I'm
> >> no longer getting the ClassNotFoundException. However, it's getting
> stuck
> >> somewhere else (before getting there I guess)...I think this is the case
> >> because before and after commenting the code I get the same error in the
> >> Android emulator, an InstantiationException [1].
> >>
> >> Have you debugged to check exactly where this exception is being thrown?
> I
> >> have done the procedure I previously described  again and I got it
> "running"
> >> as expected, which means, running till the expected exception is thrown.
> >>
> >> I also started tinkering with retrotranslator. First I tried doing it
> with
> >> Ant, but it seems that in order to build I have to include the whole
> >> tuscany
> >> projects in a way similar to how I now have in Eclipse. I also tried
> making
> >> a jar out of
> >>
> >>
> >>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>
> >> and then feeding it to retrotranslator but unfortunately it's not
> >> translating anything, as shown below.
> >>
> >> Voyager-2:Retrotranslator-1.2
> >> .6-bin ocastaneda$ java -jar
> >> retrotranslator-transformer-1.2.6.jar -srcjar
> >> JavaRuntimeModuleActivator.jar
> >> -target 1.5 -reflection safe -stripannot -classpath
> >> retrotranslator-android-1.2.6.jar
> >> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> >> Transformed 0 file(s).
> >>
> >> There's also a maven plugin, so I might try that...but first I'll give
> Ant
> >> another go. Hopefully Google will release a new SDK soon, otherwise as
> you
> >> say...retrotranslator will have to be the workaround to proceed with our
> >> project ;-)
> >>
> >> Unfortunately the rumors say the new SDK version will not be released
> until
> >> july 28th :S. So, it's really good you have already started working on
> the
> >> retrotranslator, it will probably be the best workaround for the
> annotations
> >> problem till the next SDK release.
> >>
> >> I suggest you to forget about the build process right now, before, check
> if
> >> this retrotranslator works and if it really works on android platform.
> I´m
> >> really getting upset with Android, even its API methods does not work as
> >> expected :@. Anyway, try initially to compile a simple class (coded by
> you),
> >> which contains annotations, and access these annotations. If it works,
> make
> >> it more complex and test again, do it until you reach a scenario as
> complex
> >> as the SCA (a lot of external jars with annotated classes accessed by
> the
> >> other external jars and the Android app). Got it? : )
> >>
> >> Regards,
> >> Adriano Crestani
> >>
> >>
> >> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> >> oscar.castaneda.gsoc@gmail.com> wrote:
> >>
> >>> Hi Adriano,
> >>>
> >>> I was indeed using the sca modules not from the sandbox. As you
> suggested,
> >>> I
> >>> removed the tuscany-contribution-impl from my workspace and added the
> >>> version you uploaded to the sandbox. Then, I uncommented the lines in
> >>>
> >>>
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>>
> >>> following the comments pointing out why those lines had been commented.
> >>> I'm
> >>> no longer getting the ClassNotFoundException. However, it's getting
> stuck
> >>> somewhere else (before getting there I guess)...I think this is the
> case
> >>> because before and after commenting the code I get the same error in
> the
> >>> Android emulator, an InstantiationException [1].
> >>>
> >>> I also started tinkering with retrotranslator. First I tried doing it
> with
> >>> Ant, but it seems that in order to build I have to include the whole
> >>> tuscany
> >>> projects in a way similar to how I now have in Eclipse. I also tried
> >>> making
> >>> a jar out of
> >>>
> >>>
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>>
> >>> and then feeding it to retrotranslator but unfortunately it's not
> >>> translating anything, as shown below.
> >>>
> >>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> >>> retrotranslator-transformer-1.2.6.jar -srcjar
> >>> JavaRuntimeModuleActivator.jar
> >>> -target 1.5 -reflection safe -stripannot -classpath
> >>> retrotranslator-android-1.2.6.jar
> >>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> >>> Transformed 0 file(s).
> >>>
> >>> There's also a maven plugin, so I might try that...but first I'll give
> Ant
> >>> another go. Hopefully Google will release a new SDK soon, otherwise as
> you
> >>> say...retrotranslator will have to be the workaround to proceed with
> our
> >>> project ;-)
> >>>
> >>> Thanks again for all your help...I'm getting ready for the official
> start
> >>> :-)
> >>>
> >>> [1] http://androidindelft.googlepages.com/20may2008.html
> >>>
> >>>
> >>>
> >>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> >>> adrianocrestani@apache.org> wrote:
> >>>
> >>> > Hi Oscar,
> >>> >
> >>> > My mistake again, the eclipse project files of contribution-impl
> module
> >>> > were
> >>> > not uploaded, so you are probably using the modules you have
> downloaded
> >>> > from
> >>> > the sca modules. If you remove the tuscany-contribution-impl from
> your
> >>> > workspace and add this module from the sandbox it will probably work.
> >>> > Anyway, you will need to update your trunk again to get the project
> >>> files
> >>> > I'm uploading right now ; )
> >>> >
> >>> > OK, if you wanna try the retrotranslator as a solution here is a tip:
> >>> most
> >>> > of the code that were using the Reflection API was commented on
> >>> >
> >>> >
> >>>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> >>> > class, you just need to edit this class and remove the commented code
> >>> (it's
> >>> > described there).
> >>> >
> >>> > So, if you uncomment the code and the retrotranslador successfuly
> work,
> >>> and
> >>> > I hope it will, you will reach the
> >>> >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > constructor and it should run OK. Exactly on this constructor I'm
> >>> getting a
> >>> > NPE when the code described above is commented.
> >>> >
> >>> > About the ant, go on and use it. Further we can evaluate better where
> we
> >>> > place it in the entire SCA build process. BTW, we even dont know if
> we
> >>> will
> >>> > still be using the retrotranslator in future, right?! : )
> >>> >
> >>> > Use the retrotranslator may help us a lot to workaround this problem
> for
> >>> > now
> >>> > and go on with our project ; )
> >>> >
> >>> > Kind Regards,
> >>> > Adriano Crestani
> >>> >
> >>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> >>> > oscar.castaneda.gsoc@gmail.com> wrote:
> >>> >
> >>> > > Hi Adriano,
> >>> > >
> >>> > > Thanks alot for your answers. I was able to build the entire
> workspace
> >>> > from
> >>> > > your instructions. When running calculator-android as an "Android
> >>> > > application" I'm getting a ClassNotFoundException [1] for
> >>> > >
> >>> > >
> >>> >
> >>>
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> >>> > > Is the exception you referred to in your original email?
> >>> > >
> >>> > > ...when
> >>> > > > you run the calculator-android project as an "Android
> application"
> >>> you
> >>> > > > should get an exception, that was generated initially by a NPE
> >>> thrown
> >>> > by
> >>> > > >
> >>> >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> >>> > > > constructor. This is caused because the latest Android SDK does
> not
> >>> > > support
> >>> > > > the Reflection API yet. So, the SCA cannot check the @Reference
> >>> > > annotations
> >>> > > > (I commented the code which tries to read the annotations, so
> when
> >>> the
> >>> > > > execution reach this constructor it throws the NPE).
> >>> > > >
> >>> > >
> >>> > >
> >>> > > Searching for the class in the exception I'm getting I found
> >>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> >>> > getServiceClasses
> >>> > > it loads the service class I'm getting problems with when running
> >>> > > calculator-android as an "Android application":
> >>> > >
> >>> > >
> >>> > >
> >>> >
> >>>
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> >>> > >
> >>> > >
> >>> > > I couldn't find the corresponding java file in my imported
> workspace
> >>> and
> >>> > > found that there is no package like
> >>> > > org.apache.tuscany.sca.contribution.processor.impl.
> >>> > >
> >>> > > Am I missing something? Or are these the errors you would expect?
> >>> > >
> >>> > > I would like to get to the point where I get the exception you
> >>> described
> >>> > > and
> >>> > > try to run retrotranslator from there. However, as I'm using the
> ADT
> >>> > plugin
> >>> > > in eclipse I would need to extract code that "declares or analyzes
> >>> > > annotations you may extract it into a separate library that can be
> >>> > > processed
> >>> > > with Retrotranslator and added to the main project." That is,
> unless I
> >>> > use
> >>> > > Ant, in which case I would only need to add a few lines to
> build.xml.
> >>> I'm
> >>> > > continuing to look into this, any thoughts are more than welcome
> :-)
> >>> > >
> >>> > > [1] http://delftandroid.googlepages.com/14may2008.html
> >>> > >
> >>> > >
> >>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> >>> > > adrianocrestani@apache.org> wrote:
> >>> > >
> >>> > > > Hi,
> >>> > > >
> >>> > > > Thanks all for the feedback ; )
> >>> > > >
> >>> > > > At first, I want to correct one mistake, on the first step I
> >>> described
> >>> > on
> >>> > > > my
> >>> > > > previous email, I should not have added the word "install", it
> >>> probably
> >>> > > > would lead the reader to run the "mvn clean install" in the
> >>> downloaded
> >>> > > > files, as Oscar did. Also, on this same step, the code should not
> be
> >>> > > > downloaded from [1], but from [2].
> >>> > > >
> >>> > > > Simon:
> >>> > > > Thanks for the link ; ). As the Sun Java source codes are under
> CDDL
> >>> > 1.0
> >>> > > > license, it's only needed to include the CDDL license header on
> each
> >>> > > file,
> >>> > > > and it's already done : )
> >>> > > >
> >>> > > > Jean:
> >>> > > > I think it is better to keep the code in the sandbox for now. At
> >>> first,
> >>> > > > it's
> >>> > > > not working on the current SCA modules revision yet. And also,
> I'm
> >>> > > > commenting many lines at some modules just to get a "first run"
> of
> >>> > > > calculator-sample to further evaluate why and how this commented
> >>> lines
> >>> > > will
> >>> > > > be adapted to be compatible with both: SCA Java and SCA Android.
> >>> > > >
> >>> > > > Oscar:
> >>> > > >
> >>> > > > - Are host-android and core-android a part of calculator-android?
> >>> > > >
> >>> > > > What do you mean when you say "part"? They are used by
> >>> > > calculator-android,
> >>> > > > and will prabably be added to tuscany sca modules in future
> >>> > > >
> >>> > > > - Should the calculator-android included in [1] have included an
> >>> > > > "AndroidManifest.xml" file?
> >>> > > >
> >>> > > > Sorry, my mistake, I forgot to add to svn the eclipse project
> files
> >>> of
> >>> > > > these
> >>> > > > projects. I have already commited these files and if you update
> your
> >>> > > trunk
> >>> > > > you will get them ; ). So, delete the ones you have created.
> >>> > > >
> >>> > > > - How can I fix the build errors? Is there something else needed
> in
> >>> > > > addition
> >>> > > > to including the Android Library?
> >>> > > >
> >>> > > > No, the Android library is really simples, it only contains the
> >>> > > android.jar
> >>> > > > file located in your Android SDK.
> >>> > > >
> >>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> >>> > > > eclipse:eclipse"
> >>> > > > commands on the sandbox files, the eclipse project files are
> already
> >>> in
> >>> > > > modules and you should build the modules using the eclipse for
> now.
> >>> The
> >>> > > > maven config files are not updated yet with the modifications I
> have
> >>> > done
> >>> > > > on
> >>> > > > these modules, so they will not generate the correct project
> files,
> >>> > > worse,
> >>> > > > they will override the ones I have created.
> >>> > > >
> >>> > > > Then, clean and build your entire workspace, if you still get any
> >>> > errors,
> >>> > > > let me know ; )
> >>> > > >
> >>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should
> this
> >>> not
> >>> > be
> >>> > > > imported?
> >>> > > >
> >>> > > > It seems the revision I suggested already had the saxon module
> >>> removed
> >>> > > from
> >>> > > > repo. So, you mistakenly removed another one that shouldn´t.
> Please,
> >>> > > import
> >>> > > > the databinding-saxon module again into your workspace.
> >>> > > >
> >>> > > >
> >>> > > > Regards,
> >>> > > > Adriano Crestani
> >>> > > >
> >>> > > >
> >>> > > > [1] -
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >>> > > > >
> >>> > > > [2] -
> >>> > > >
> >>> > >
> >>> >
> >>>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >>> > > >
> >>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> >>> > > > jsdelfino@apache.org> wrote:
> >>> > > >
> >>> > > > > Mike Edwards wrote:
> >>> > > > >
> >>> > > > > > Jean-Sebastien Delfino wrote:
> >>> > > > > >
> >>> > > > > > > Oscar Castaneda wrote:
> >>> > > > > > >
> >>> > > > > > >  1. Downloaded the modified code from [1] and installed as
> >>> shown
> >>> > > > > > > > below:
> >>> > > > > > > >
> >>> > > > > > > > svn checkout
> >>> > > > > > > >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> >>> > > > > > > >
> >>> > > > > > > > cd mobile-android
> >>> > > > > > > >
> >>> > > > > > > >
> >>> > > > > > > If there's no objection from others, I'd be happy to see
> this
> >>> > code
> >>> > > > > > > move from sandbox to trunk as we now have several people
> doing
> >>> > > > development
> >>> > > > > > > on this android integration.
> >>> > > > > > >
> >>> > > > > > > Adriano, you could start with something like
> >>> > trunk/java/sca/android
> >>> > > > > > > and later progressively try to converge the code with the
> code
> >>> in
> >>> > > > trunk,
> >>> > > > > > > with architected plug points for the android specific code
> >>> etc.
> >>> > > > > > >
> >>> > > > > > > Thoughts?
> >>> > > > > > >
> >>> > > > > >
> >>> > > > > > I assume that moving to trunk does not also imply "making
> part
> >>> of
> >>> > the
> >>> > > > > > main build"?
> >>> > > > > >
> >>> > > > > > I'd be a bit concerned at experimental code entering the
> build
> >>> at
> >>> > > this
> >>> > > > > > stage.
> >>> > > > > >
> >>> > > > > >
> >>> > > > > > Yours,  Mike.
> >>> > > > > >
> >>> > > > >
> >>> > > > > I think it's business as usual, code that doesn't work does not
> go
> >>> in
> >>> > > the
> >>> > > > > main build, code that's getting stable can go in the main build
> at
> >>> > some
> >>> > > > > point when people have no specific objections, and different
> >>> profiles
> >>> > > can
> >>> > > > be
> >>> > > > > used to subset particular builds.
> >>> > > > >
> >>> > > > > --
> >>> > > > > Jean-Sebastien
> >>> > > > >
> >>> > > >
> >>> > >
> >>> > >
> >>> > >
> >>> > > --
> >>> > > best,
> >>> > > -oscar
> >>> > >
> >>> > > Oscar Castañeda
> >>> > >
> >>> >
> >>>
> >>>
> >>>
> >>> --
> >>> best,
> >>> -oscar
> >>>
> >>> Oscar Castañeda
> >>>
> >>
> >>
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
FYI, if you comment out the code that checks if a interface is
remoteble, you could have a version of the calculator without any
annotations, and the runtime would introspect the references for the
multiple services. But note that, the introspection code will only be
activated if there is no SCA annotations on the class.

On Wed, May 21, 2008 at 1:21 AM, Adriano Crestani
<ad...@apache.org> wrote:
> Ah, the expected exception should look like this on android emulator:
> http://people.apache.org/~adrianocrestani/android_emulator.jpg
>
> On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
>> Hi Oscar,
>>
>> I was indeed using the sca modules not from the sandbox. As you suggested,
>> I
>> removed the tuscany-contribution-impl from my workspace and added the
>> version you uploaded to the sandbox. Then, I uncommented the lines in
>>
>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>
>> following the comments pointing out why those lines had been commented. I'm
>> no longer getting the ClassNotFoundException. However, it's getting stuck
>> somewhere else (before getting there I guess)...I think this is the case
>> because before and after commenting the code I get the same error in the
>> Android emulator, an InstantiationException [1].
>>
>> Have you debugged to check exactly where this exception is being thrown? I
>> have done the procedure I previously described  again and I got it "running"
>> as expected, which means, running till the expected exception is thrown.
>>
>> I also started tinkering with retrotranslator. First I tried doing it with
>> Ant, but it seems that in order to build I have to include the whole
>> tuscany
>> projects in a way similar to how I now have in Eclipse. I also tried making
>> a jar out of
>>
>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>
>> and then feeding it to retrotranslator but unfortunately it's not
>> translating anything, as shown below.
>>
>> Voyager-2:Retrotranslator-1.2
>> .6-bin ocastaneda$ java -jar
>> retrotranslator-transformer-1.2.6.jar -srcjar
>> JavaRuntimeModuleActivator.jar
>> -target 1.5 -reflection safe -stripannot -classpath
>> retrotranslator-android-1.2.6.jar
>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
>> Transformed 0 file(s).
>>
>> There's also a maven plugin, so I might try that...but first I'll give Ant
>> another go. Hopefully Google will release a new SDK soon, otherwise as you
>> say...retrotranslator will have to be the workaround to proceed with our
>> project ;-)
>>
>> Unfortunately the rumors say the new SDK version will not be released until
>> july 28th :S. So, it's really good you have already started working on the
>> retrotranslator, it will probably be the best workaround for the annotations
>> problem till the next SDK release.
>>
>> I suggest you to forget about the build process right now, before, check if
>> this retrotranslator works and if it really works on android platform. I´m
>> really getting upset with Android, even its API methods does not work as
>> expected :@. Anyway, try initially to compile a simple class (coded by you),
>> which contains annotations, and access these annotations. If it works, make
>> it more complex and test again, do it until you reach a scenario as complex
>> as the SCA (a lot of external jars with annotated classes accessed by the
>> other external jars and the Android app). Got it? : )
>>
>> Regards,
>> Adriano Crestani
>>
>>
>> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
>> oscar.castaneda.gsoc@gmail.com> wrote:
>>
>>> Hi Adriano,
>>>
>>> I was indeed using the sca modules not from the sandbox. As you suggested,
>>> I
>>> removed the tuscany-contribution-impl from my workspace and added the
>>> version you uploaded to the sandbox. Then, I uncommented the lines in
>>>
>>>
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>
>>> following the comments pointing out why those lines had been commented.
>>> I'm
>>> no longer getting the ClassNotFoundException. However, it's getting stuck
>>> somewhere else (before getting there I guess)...I think this is the case
>>> because before and after commenting the code I get the same error in the
>>> Android emulator, an InstantiationException [1].
>>>
>>> I also started tinkering with retrotranslator. First I tried doing it with
>>> Ant, but it seems that in order to build I have to include the whole
>>> tuscany
>>> projects in a way similar to how I now have in Eclipse. I also tried
>>> making
>>> a jar out of
>>>
>>>
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>>
>>> and then feeding it to retrotranslator but unfortunately it's not
>>> translating anything, as shown below.
>>>
>>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
>>> retrotranslator-transformer-1.2.6.jar -srcjar
>>> JavaRuntimeModuleActivator.jar
>>> -target 1.5 -reflection safe -stripannot -classpath
>>> retrotranslator-android-1.2.6.jar
>>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
>>> Transformed 0 file(s).
>>>
>>> There's also a maven plugin, so I might try that...but first I'll give Ant
>>> another go. Hopefully Google will release a new SDK soon, otherwise as you
>>> say...retrotranslator will have to be the workaround to proceed with our
>>> project ;-)
>>>
>>> Thanks again for all your help...I'm getting ready for the official start
>>> :-)
>>>
>>> [1] http://androidindelft.googlepages.com/20may2008.html
>>>
>>>
>>>
>>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
>>> adrianocrestani@apache.org> wrote:
>>>
>>> > Hi Oscar,
>>> >
>>> > My mistake again, the eclipse project files of contribution-impl module
>>> > were
>>> > not uploaded, so you are probably using the modules you have downloaded
>>> > from
>>> > the sca modules. If you remove the tuscany-contribution-impl from your
>>> > workspace and add this module from the sandbox it will probably work.
>>> > Anyway, you will need to update your trunk again to get the project
>>> files
>>> > I'm uploading right now ; )
>>> >
>>> > OK, if you wanna try the retrotranslator as a solution here is a tip:
>>> most
>>> > of the code that were using the Reflection API was commented on
>>> >
>>> >
>>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>> > class, you just need to edit this class and remove the commented code
>>> (it's
>>> > described there).
>>> >
>>> > So, if you uncomment the code and the retrotranslador successfuly work,
>>> and
>>> > I hope it will, you will reach the
>>> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>>> > constructor and it should run OK. Exactly on this constructor I'm
>>> getting a
>>> > NPE when the code described above is commented.
>>> >
>>> > About the ant, go on and use it. Further we can evaluate better where we
>>> > place it in the entire SCA build process. BTW, we even dont know if we
>>> will
>>> > still be using the retrotranslator in future, right?! : )
>>> >
>>> > Use the retrotranslator may help us a lot to workaround this problem for
>>> > now
>>> > and go on with our project ; )
>>> >
>>> > Kind Regards,
>>> > Adriano Crestani
>>> >
>>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
>>> > oscar.castaneda.gsoc@gmail.com> wrote:
>>> >
>>> > > Hi Adriano,
>>> > >
>>> > > Thanks alot for your answers. I was able to build the entire workspace
>>> > from
>>> > > your instructions. When running calculator-android as an "Android
>>> > > application" I'm getting a ClassNotFoundException [1] for
>>> > >
>>> > >
>>> >
>>> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
>>> > > Is the exception you referred to in your original email?
>>> > >
>>> > > ...when
>>> > > > you run the calculator-android project as an "Android application"
>>> you
>>> > > > should get an exception, that was generated initially by a NPE
>>> thrown
>>> > by
>>> > > >
>>> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>>> > > > constructor. This is caused because the latest Android SDK does not
>>> > > support
>>> > > > the Reflection API yet. So, the SCA cannot check the @Reference
>>> > > annotations
>>> > > > (I commented the code which tries to read the annotations, so when
>>> the
>>> > > > execution reach this constructor it throws the NPE).
>>> > > >
>>> > >
>>> > >
>>> > > Searching for the class in the exception I'm getting I found
>>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
>>> > getServiceClasses
>>> > > it loads the service class I'm getting problems with when running
>>> > > calculator-android as an "Android application":
>>> > >
>>> > >
>>> > >
>>> >
>>> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>>> > >
>>> > >
>>> > > I couldn't find the corresponding java file in my imported workspace
>>> and
>>> > > found that there is no package like
>>> > > org.apache.tuscany.sca.contribution.processor.impl.
>>> > >
>>> > > Am I missing something? Or are these the errors you would expect?
>>> > >
>>> > > I would like to get to the point where I get the exception you
>>> described
>>> > > and
>>> > > try to run retrotranslator from there. However, as I'm using the ADT
>>> > plugin
>>> > > in eclipse I would need to extract code that "declares or analyzes
>>> > > annotations you may extract it into a separate library that can be
>>> > > processed
>>> > > with Retrotranslator and added to the main project." That is, unless I
>>> > use
>>> > > Ant, in which case I would only need to add a few lines to build.xml.
>>> I'm
>>> > > continuing to look into this, any thoughts are more than welcome :-)
>>> > >
>>> > > [1] http://delftandroid.googlepages.com/14may2008.html
>>> > >
>>> > >
>>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
>>> > > adrianocrestani@apache.org> wrote:
>>> > >
>>> > > > Hi,
>>> > > >
>>> > > > Thanks all for the feedback ; )
>>> > > >
>>> > > > At first, I want to correct one mistake, on the first step I
>>> described
>>> > on
>>> > > > my
>>> > > > previous email, I should not have added the word "install", it
>>> probably
>>> > > > would lead the reader to run the "mvn clean install" in the
>>> downloaded
>>> > > > files, as Oscar did. Also, on this same step, the code should not be
>>> > > > downloaded from [1], but from [2].
>>> > > >
>>> > > > Simon:
>>> > > > Thanks for the link ; ). As the Sun Java source codes are under CDDL
>>> > 1.0
>>> > > > license, it's only needed to include the CDDL license header on each
>>> > > file,
>>> > > > and it's already done : )
>>> > > >
>>> > > > Jean:
>>> > > > I think it is better to keep the code in the sandbox for now. At
>>> first,
>>> > > > it's
>>> > > > not working on the current SCA modules revision yet. And also, I'm
>>> > > > commenting many lines at some modules just to get a "first run" of
>>> > > > calculator-sample to further evaluate why and how this commented
>>> lines
>>> > > will
>>> > > > be adapted to be compatible with both: SCA Java and SCA Android.
>>> > > >
>>> > > > Oscar:
>>> > > >
>>> > > > - Are host-android and core-android a part of calculator-android?
>>> > > >
>>> > > > What do you mean when you say "part"? They are used by
>>> > > calculator-android,
>>> > > > and will prabably be added to tuscany sca modules in future
>>> > > >
>>> > > > - Should the calculator-android included in [1] have included an
>>> > > > "AndroidManifest.xml" file?
>>> > > >
>>> > > > Sorry, my mistake, I forgot to add to svn the eclipse project files
>>> of
>>> > > > these
>>> > > > projects. I have already commited these files and if you update your
>>> > > trunk
>>> > > > you will get them ; ). So, delete the ones you have created.
>>> > > >
>>> > > > - How can I fix the build errors? Is there something else needed in
>>> > > > addition
>>> > > > to including the Android Library?
>>> > > >
>>> > > > No, the Android library is really simples, it only contains the
>>> > > android.jar
>>> > > > file located in your Android SDK.
>>> > > >
>>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
>>> > > > eclipse:eclipse"
>>> > > > commands on the sandbox files, the eclipse project files are already
>>> in
>>> > > > modules and you should build the modules using the eclipse for now.
>>> The
>>> > > > maven config files are not updated yet with the modifications I have
>>> > done
>>> > > > on
>>> > > > these modules, so they will not generate the correct project files,
>>> > > worse,
>>> > > > they will override the ones I have created.
>>> > > >
>>> > > > Then, clean and build your entire workspace, if you still get any
>>> > errors,
>>> > > > let me know ; )
>>> > > >
>>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should this
>>> not
>>> > be
>>> > > > imported?
>>> > > >
>>> > > > It seems the revision I suggested already had the saxon module
>>> removed
>>> > > from
>>> > > > repo. So, you mistakenly removed another one that shouldn´t. Please,
>>> > > import
>>> > > > the databinding-saxon module again into your workspace.
>>> > > >
>>> > > >
>>> > > > Regards,
>>> > > > Adriano Crestani
>>> > > >
>>> > > >
>>> > > > [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
>>> > > > >
>>> > > > [2] -
>>> > > >
>>> > >
>>> >
>>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>>> > > >
>>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
>>> > > > jsdelfino@apache.org> wrote:
>>> > > >
>>> > > > > Mike Edwards wrote:
>>> > > > >
>>> > > > > > Jean-Sebastien Delfino wrote:
>>> > > > > >
>>> > > > > > > Oscar Castaneda wrote:
>>> > > > > > >
>>> > > > > > >  1. Downloaded the modified code from [1] and installed as
>>> shown
>>> > > > > > > > below:
>>> > > > > > > >
>>> > > > > > > > svn checkout
>>> > > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>>> > > > > > > >
>>> > > > > > > > cd mobile-android
>>> > > > > > > >
>>> > > > > > > >
>>> > > > > > > If there's no objection from others, I'd be happy to see this
>>> > code
>>> > > > > > > move from sandbox to trunk as we now have several people doing
>>> > > > development
>>> > > > > > > on this android integration.
>>> > > > > > >
>>> > > > > > > Adriano, you could start with something like
>>> > trunk/java/sca/android
>>> > > > > > > and later progressively try to converge the code with the code
>>> in
>>> > > > trunk,
>>> > > > > > > with architected plug points for the android specific code
>>> etc.
>>> > > > > > >
>>> > > > > > > Thoughts?
>>> > > > > > >
>>> > > > > >
>>> > > > > > I assume that moving to trunk does not also imply "making part
>>> of
>>> > the
>>> > > > > > main build"?
>>> > > > > >
>>> > > > > > I'd be a bit concerned at experimental code entering the build
>>> at
>>> > > this
>>> > > > > > stage.
>>> > > > > >
>>> > > > > >
>>> > > > > > Yours,  Mike.
>>> > > > > >
>>> > > > >
>>> > > > > I think it's business as usual, code that doesn't work does not go
>>> in
>>> > > the
>>> > > > > main build, code that's getting stable can go in the main build at
>>> > some
>>> > > > > point when people have no specific objections, and different
>>> profiles
>>> > > can
>>> > > > be
>>> > > > > used to subset particular builds.
>>> > > > >
>>> > > > > --
>>> > > > > Jean-Sebastien
>>> > > > >
>>> > > >
>>> > >
>>> > >
>>> > >
>>> > > --
>>> > > best,
>>> > > -oscar
>>> > >
>>> > > Oscar Castañeda
>>> > >
>>> >
>>>
>>>
>>>
>>> --
>>> best,
>>> -oscar
>>>
>>> Oscar Castañeda
>>>
>>
>>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Ah, the expected exception should look like this on android emulator:
http://people.apache.org/~adrianocrestani/android_emulator.jpg

On Tue, May 20, 2008 at 11:54 PM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi Oscar,
>
> I was indeed using the sca modules not from the sandbox. As you suggested,
> I
> removed the tuscany-contribution-impl from my workspace and added the
> version you uploaded to the sandbox. Then, I uncommented the lines in
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> following the comments pointing out why those lines had been commented. I'm
> no longer getting the ClassNotFoundException. However, it's getting stuck
> somewhere else (before getting there I guess)...I think this is the case
> because before and after commenting the code I get the same error in the
> Android emulator, an InstantiationException [1].
>
> Have you debugged to check exactly where this exception is being thrown? I
> have done the procedure I previously described  again and I got it "running"
> as expected, which means, running till the expected exception is thrown.
>
> I also started tinkering with retrotranslator. First I tried doing it with
> Ant, but it seems that in order to build I have to include the whole
> tuscany
> projects in a way similar to how I now have in Eclipse. I also tried making
> a jar out of
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> and then feeding it to retrotranslator but unfortunately it's not
> translating anything, as shown below.
>
> Voyager-2:Retrotranslator-1.2
> .6-bin ocastaneda$ java -jar
> retrotranslator-transformer-1.2.6.jar -srcjar
> JavaRuntimeModuleActivator.jar
> -target 1.5 -reflection safe -stripannot -classpath
> retrotranslator-android-1.2.6.jar
> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> Transformed 0 file(s).
>
> There's also a maven plugin, so I might try that...but first I'll give Ant
> another go. Hopefully Google will release a new SDK soon, otherwise as you
> say...retrotranslator will have to be the workaround to proceed with our
> project ;-)
>
> Unfortunately the rumors say the new SDK version will not be released until
> july 28th :S. So, it's really good you have already started working on the
> retrotranslator, it will probably be the best workaround for the annotations
> problem till the next SDK release.
>
> I suggest you to forget about the build process right now, before, check if
> this retrotranslator works and if it really works on android platform. I´m
> really getting upset with Android, even its API methods does not work as
> expected :@. Anyway, try initially to compile a simple class (coded by you),
> which contains annotations, and access these annotations. If it works, make
> it more complex and test again, do it until you reach a scenario as complex
> as the SCA (a lot of external jars with annotated classes accessed by the
> other external jars and the Android app). Got it? : )
>
> Regards,
> Adriano Crestani
>
>
> On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
>> Hi Adriano,
>>
>> I was indeed using the sca modules not from the sandbox. As you suggested,
>> I
>> removed the tuscany-contribution-impl from my workspace and added the
>> version you uploaded to the sandbox. Then, I uncommented the lines in
>>
>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>
>> following the comments pointing out why those lines had been commented.
>> I'm
>> no longer getting the ClassNotFoundException. However, it's getting stuck
>> somewhere else (before getting there I guess)...I think this is the case
>> because before and after commenting the code I get the same error in the
>> Android emulator, an InstantiationException [1].
>>
>> I also started tinkering with retrotranslator. First I tried doing it with
>> Ant, but it seems that in order to build I have to include the whole
>> tuscany
>> projects in a way similar to how I now have in Eclipse. I also tried
>> making
>> a jar out of
>>
>>
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>>
>> and then feeding it to retrotranslator but unfortunately it's not
>> translating anything, as shown below.
>>
>> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
>> retrotranslator-transformer-1.2.6.jar -srcjar
>> JavaRuntimeModuleActivator.jar
>> -target 1.5 -reflection safe -stripannot -classpath
>> retrotranslator-android-1.2.6.jar
>> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
>> Transformed 0 file(s).
>>
>> There's also a maven plugin, so I might try that...but first I'll give Ant
>> another go. Hopefully Google will release a new SDK soon, otherwise as you
>> say...retrotranslator will have to be the workaround to proceed with our
>> project ;-)
>>
>> Thanks again for all your help...I'm getting ready for the official start
>> :-)
>>
>> [1] http://androidindelft.googlepages.com/20may2008.html
>>
>>
>>
>> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
>> adrianocrestani@apache.org> wrote:
>>
>> > Hi Oscar,
>> >
>> > My mistake again, the eclipse project files of contribution-impl module
>> > were
>> > not uploaded, so you are probably using the modules you have downloaded
>> > from
>> > the sca modules. If you remove the tuscany-contribution-impl from your
>> > workspace and add this module from the sandbox it will probably work.
>> > Anyway, you will need to update your trunk again to get the project
>> files
>> > I'm uploading right now ; )
>> >
>> > OK, if you wanna try the retrotranslator as a solution here is a tip:
>> most
>> > of the code that were using the Reflection API was commented on
>> >
>> >
>> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>> > class, you just need to edit this class and remove the commented code
>> (it's
>> > described there).
>> >
>> > So, if you uncomment the code and the retrotranslador successfuly work,
>> and
>> > I hope it will, you will reach the
>> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> > constructor and it should run OK. Exactly on this constructor I'm
>> getting a
>> > NPE when the code described above is commented.
>> >
>> > About the ant, go on and use it. Further we can evaluate better where we
>> > place it in the entire SCA build process. BTW, we even dont know if we
>> will
>> > still be using the retrotranslator in future, right?! : )
>> >
>> > Use the retrotranslator may help us a lot to workaround this problem for
>> > now
>> > and go on with our project ; )
>> >
>> > Kind Regards,
>> > Adriano Crestani
>> >
>> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
>> > oscar.castaneda.gsoc@gmail.com> wrote:
>> >
>> > > Hi Adriano,
>> > >
>> > > Thanks alot for your answers. I was able to build the entire workspace
>> > from
>> > > your instructions. When running calculator-android as an "Android
>> > > application" I'm getting a ClassNotFoundException [1] for
>> > >
>> > >
>> >
>> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
>> > > Is the exception you referred to in your original email?
>> > >
>> > > ...when
>> > > > you run the calculator-android project as an "Android application"
>> you
>> > > > should get an exception, that was generated initially by a NPE
>> thrown
>> > by
>> > > >
>> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
>> > > > constructor. This is caused because the latest Android SDK does not
>> > > support
>> > > > the Reflection API yet. So, the SCA cannot check the @Reference
>> > > annotations
>> > > > (I commented the code which tries to read the annotations, so when
>> the
>> > > > execution reach this constructor it throws the NPE).
>> > > >
>> > >
>> > >
>> > > Searching for the class in the exception I'm getting I found
>> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
>> > getServiceClasses
>> > > it loads the service class I'm getting problems with when running
>> > > calculator-android as an "Android application":
>> > >
>> > >
>> > >
>> >
>> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>> > >
>> > >
>> > > I couldn't find the corresponding java file in my imported workspace
>> and
>> > > found that there is no package like
>> > > org.apache.tuscany.sca.contribution.processor.impl.
>> > >
>> > > Am I missing something? Or are these the errors you would expect?
>> > >
>> > > I would like to get to the point where I get the exception you
>> described
>> > > and
>> > > try to run retrotranslator from there. However, as I'm using the ADT
>> > plugin
>> > > in eclipse I would need to extract code that "declares or analyzes
>> > > annotations you may extract it into a separate library that can be
>> > > processed
>> > > with Retrotranslator and added to the main project." That is, unless I
>> > use
>> > > Ant, in which case I would only need to add a few lines to build.xml.
>> I'm
>> > > continuing to look into this, any thoughts are more than welcome :-)
>> > >
>> > > [1] http://delftandroid.googlepages.com/14may2008.html
>> > >
>> > >
>> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
>> > > adrianocrestani@apache.org> wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > Thanks all for the feedback ; )
>> > > >
>> > > > At first, I want to correct one mistake, on the first step I
>> described
>> > on
>> > > > my
>> > > > previous email, I should not have added the word "install", it
>> probably
>> > > > would lead the reader to run the "mvn clean install" in the
>> downloaded
>> > > > files, as Oscar did. Also, on this same step, the code should not be
>> > > > downloaded from [1], but from [2].
>> > > >
>> > > > Simon:
>> > > > Thanks for the link ; ). As the Sun Java source codes are under CDDL
>> > 1.0
>> > > > license, it's only needed to include the CDDL license header on each
>> > > file,
>> > > > and it's already done : )
>> > > >
>> > > > Jean:
>> > > > I think it is better to keep the code in the sandbox for now. At
>> first,
>> > > > it's
>> > > > not working on the current SCA modules revision yet. And also, I'm
>> > > > commenting many lines at some modules just to get a "first run" of
>> > > > calculator-sample to further evaluate why and how this commented
>> lines
>> > > will
>> > > > be adapted to be compatible with both: SCA Java and SCA Android.
>> > > >
>> > > > Oscar:
>> > > >
>> > > > - Are host-android and core-android a part of calculator-android?
>> > > >
>> > > > What do you mean when you say "part"? They are used by
>> > > calculator-android,
>> > > > and will prabably be added to tuscany sca modules in future
>> > > >
>> > > > - Should the calculator-android included in [1] have included an
>> > > > "AndroidManifest.xml" file?
>> > > >
>> > > > Sorry, my mistake, I forgot to add to svn the eclipse project files
>> of
>> > > > these
>> > > > projects. I have already commited these files and if you update your
>> > > trunk
>> > > > you will get them ; ). So, delete the ones you have created.
>> > > >
>> > > > - How can I fix the build errors? Is there something else needed in
>> > > > addition
>> > > > to including the Android Library?
>> > > >
>> > > > No, the Android library is really simples, it only contains the
>> > > android.jar
>> > > > file located in your Android SDK.
>> > > >
>> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
>> > > > eclipse:eclipse"
>> > > > commands on the sandbox files, the eclipse project files are already
>> in
>> > > > modules and you should build the modules using the eclipse for now.
>> The
>> > > > maven config files are not updated yet with the modifications I have
>> > done
>> > > > on
>> > > > these modules, so they will not generate the correct project files,
>> > > worse,
>> > > > they will override the ones I have created.
>> > > >
>> > > > Then, clean and build your entire workspace, if you still get any
>> > errors,
>> > > > let me know ; )
>> > > >
>> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should this
>> not
>> > be
>> > > > imported?
>> > > >
>> > > > It seems the revision I suggested already had the saxon module
>> removed
>> > > from
>> > > > repo. So, you mistakenly removed another one that shouldn´t. Please,
>> > > import
>> > > > the databinding-saxon module again into your workspace.
>> > > >
>> > > >
>> > > > Regards,
>> > > > Adriano Crestani
>> > > >
>> > > >
>> > > > [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
>> > > > >
>> > > > [2] -
>> > > >
>> > >
>> >
>> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>> > > >
>> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
>> > > > jsdelfino@apache.org> wrote:
>> > > >
>> > > > > Mike Edwards wrote:
>> > > > >
>> > > > > > Jean-Sebastien Delfino wrote:
>> > > > > >
>> > > > > > > Oscar Castaneda wrote:
>> > > > > > >
>> > > > > > >  1. Downloaded the modified code from [1] and installed as
>> shown
>> > > > > > > > below:
>> > > > > > > >
>> > > > > > > > svn checkout
>> > > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>> > > > > > > >
>> > > > > > > > cd mobile-android
>> > > > > > > >
>> > > > > > > >
>> > > > > > > If there's no objection from others, I'd be happy to see this
>> > code
>> > > > > > > move from sandbox to trunk as we now have several people doing
>> > > > development
>> > > > > > > on this android integration.
>> > > > > > >
>> > > > > > > Adriano, you could start with something like
>> > trunk/java/sca/android
>> > > > > > > and later progressively try to converge the code with the code
>> in
>> > > > trunk,
>> > > > > > > with architected plug points for the android specific code
>> etc.
>> > > > > > >
>> > > > > > > Thoughts?
>> > > > > > >
>> > > > > >
>> > > > > > I assume that moving to trunk does not also imply "making part
>> of
>> > the
>> > > > > > main build"?
>> > > > > >
>> > > > > > I'd be a bit concerned at experimental code entering the build
>> at
>> > > this
>> > > > > > stage.
>> > > > > >
>> > > > > >
>> > > > > > Yours,  Mike.
>> > > > > >
>> > > > >
>> > > > > I think it's business as usual, code that doesn't work does not go
>> in
>> > > the
>> > > > > main build, code that's getting stable can go in the main build at
>> > some
>> > > > > point when people have no specific objections, and different
>> profiles
>> > > can
>> > > > be
>> > > > > used to subset particular builds.
>> > > > >
>> > > > > --
>> > > > > Jean-Sebastien
>> > > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > best,
>> > > -oscar
>> > >
>> > > Oscar Castañeda
>> > >
>> >
>>
>>
>>
>> --
>> best,
>> -oscar
>>
>> Oscar Castañeda
>>
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,

I was indeed using the sca modules not from the sandbox. As you suggested, I
removed the tuscany-contribution-impl from my workspace and added the
version you uploaded to the sandbox. Then, I uncommented the lines in

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

following the comments pointing out why those lines had been commented. I'm
no longer getting the ClassNotFoundException. However, it's getting stuck
somewhere else (before getting there I guess)...I think this is the case
because before and after commenting the code I get the same error in the
Android emulator, an InstantiationException [1].

Have you debugged to check exactly where this exception is being thrown? I
have done the procedure I previously described  again and I got it "running"
as expected, which means, running till the expected exception is thrown.

I also started tinkering with retrotranslator. First I tried doing it with
Ant, but it seems that in order to build I have to include the whole tuscany
projects in a way similar to how I now have in Eclipse. I also tried making
a jar out of

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

and then feeding it to retrotranslator but unfortunately it's not
translating anything, as shown below.

Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
retrotranslator-transformer-1.2.6.jar -srcjar JavaRuntimeModuleActivator.jar
-target 1.5 -reflection safe -stripannot -classpath
retrotranslator-android-1.2.6.jar
Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
Transformed 0 file(s).

There's also a maven plugin, so I might try that...but first I'll give Ant
another go. Hopefully Google will release a new SDK soon, otherwise as you
say...retrotranslator will have to be the workaround to proceed with our
project ;-)

Unfortunately the rumors say the new SDK version will not be released until
july 28th :S. So, it's really good you have already started working on the
retrotranslator, it will probably be the best workaround for the annotations
problem till the next SDK release.

I suggest you to forget about the build process right now, before, check if
this retrotranslator works and if it really works on android platform. I´m
really getting upset with Android, even its API methods does not work as
expected :@. Anyway, try initially to compile a simple class (coded by you),
which contains annotations, and access these annotations. If it works, make
it more complex and test again, do it until you reach a scenario as complex
as the SCA (a lot of external jars with annotated classes accessed by the
other external jars and the Android app). Got it? : )

Regards,
Adriano Crestani


On Tue, May 20, 2008 at 1:53 PM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> I was indeed using the sca modules not from the sandbox. As you suggested,
> I
> removed the tuscany-contribution-impl from my workspace and added the
> version you uploaded to the sandbox. Then, I uncommented the lines in
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> following the comments pointing out why those lines had been commented. I'm
> no longer getting the ClassNotFoundException. However, it's getting stuck
> somewhere else (before getting there I guess)...I think this is the case
> because before and after commenting the code I get the same error in the
> Android emulator, an InstantiationException [1].
>
> I also started tinkering with retrotranslator. First I tried doing it with
> Ant, but it seems that in order to build I have to include the whole
> tuscany
> projects in a way similar to how I now have in Eclipse. I also tried making
> a jar out of
>
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
>
> and then feeding it to retrotranslator but unfortunately it's not
> translating anything, as shown below.
>
> Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
> retrotranslator-transformer-1.2.6.jar -srcjar
> JavaRuntimeModuleActivator.jar
> -target 1.5 -reflection safe -stripannot -classpath
> retrotranslator-android-1.2.6.jar
> Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
> Transformed 0 file(s).
>
> There's also a maven plugin, so I might try that...but first I'll give Ant
> another go. Hopefully Google will release a new SDK soon, otherwise as you
> say...retrotranslator will have to be the workaround to proceed with our
> project ;-)
>
> Thanks again for all your help...I'm getting ready for the official start
> :-)
>
> [1] http://androidindelft.googlepages.com/20may2008.html
>
>
>
> On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
> > Hi Oscar,
> >
> > My mistake again, the eclipse project files of contribution-impl module
> > were
> > not uploaded, so you are probably using the modules you have downloaded
> > from
> > the sca modules. If you remove the tuscany-contribution-impl from your
> > workspace and add this module from the sandbox it will probably work.
> > Anyway, you will need to update your trunk again to get the project files
> > I'm uploading right now ; )
> >
> > OK, if you wanna try the retrotranslator as a solution here is a tip:
> most
> > of the code that were using the Reflection API was commented on
> >
> >
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> > class, you just need to edit this class and remove the commented code
> (it's
> > described there).
> >
> > So, if you uncomment the code and the retrotranslador successfuly work,
> and
> > I hope it will, you will reach the
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > constructor and it should run OK. Exactly on this constructor I'm getting
> a
> > NPE when the code described above is commented.
> >
> > About the ant, go on and use it. Further we can evaluate better where we
> > place it in the entire SCA build process. BTW, we even dont know if we
> will
> > still be using the retrotranslator in future, right?! : )
> >
> > Use the retrotranslator may help us a lot to workaround this problem for
> > now
> > and go on with our project ; )
> >
> > Kind Regards,
> > Adriano Crestani
> >
> > On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> > oscar.castaneda.gsoc@gmail.com> wrote:
> >
> > > Hi Adriano,
> > >
> > > Thanks alot for your answers. I was able to build the entire workspace
> > from
> > > your instructions. When running calculator-android as an "Android
> > > application" I'm getting a ClassNotFoundException [1] for
> > >
> > >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > > Is the exception you referred to in your original email?
> > >
> > > ...when
> > > > you run the calculator-android project as an "Android application"
> you
> > > > should get an exception, that was generated initially by a NPE thrown
> > by
> > > >
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > > constructor. This is caused because the latest Android SDK does not
> > > support
> > > > the Reflection API yet. So, the SCA cannot check the @Reference
> > > annotations
> > > > (I commented the code which tries to read the annotations, so when
> the
> > > > execution reach this constructor it throws the NPE).
> > > >
> > >
> > >
> > > Searching for the class in the exception I'm getting I found
> > > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> > getServiceClasses
> > > it loads the service class I'm getting problems with when running
> > > calculator-android as an "Android application":
> > >
> > >
> > >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> > >
> > >
> > > I couldn't find the corresponding java file in my imported workspace
> and
> > > found that there is no package like
> > > org.apache.tuscany.sca.contribution.processor.impl.
> > >
> > > Am I missing something? Or are these the errors you would expect?
> > >
> > > I would like to get to the point where I get the exception you
> described
> > > and
> > > try to run retrotranslator from there. However, as I'm using the ADT
> > plugin
> > > in eclipse I would need to extract code that "declares or analyzes
> > > annotations you may extract it into a separate library that can be
> > > processed
> > > with Retrotranslator and added to the main project." That is, unless I
> > use
> > > Ant, in which case I would only need to add a few lines to build.xml.
> I'm
> > > continuing to look into this, any thoughts are more than welcome :-)
> > >
> > > [1] http://delftandroid.googlepages.com/14may2008.html
> > >
> > >
> > > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > > adrianocrestani@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > Thanks all for the feedback ; )
> > > >
> > > > At first, I want to correct one mistake, on the first step I
> described
> > on
> > > > my
> > > > previous email, I should not have added the word "install", it
> probably
> > > > would lead the reader to run the "mvn clean install" in the
> downloaded
> > > > files, as Oscar did. Also, on this same step, the code should not be
> > > > downloaded from [1], but from [2].
> > > >
> > > > Simon:
> > > > Thanks for the link ; ). As the Sun Java source codes are under CDDL
> > 1.0
> > > > license, it's only needed to include the CDDL license header on each
> > > file,
> > > > and it's already done : )
> > > >
> > > > Jean:
> > > > I think it is better to keep the code in the sandbox for now. At
> first,
> > > > it's
> > > > not working on the current SCA modules revision yet. And also, I'm
> > > > commenting many lines at some modules just to get a "first run" of
> > > > calculator-sample to further evaluate why and how this commented
> lines
> > > will
> > > > be adapted to be compatible with both: SCA Java and SCA Android.
> > > >
> > > > Oscar:
> > > >
> > > > - Are host-android and core-android a part of calculator-android?
> > > >
> > > > What do you mean when you say "part"? They are used by
> > > calculator-android,
> > > > and will prabably be added to tuscany sca modules in future
> > > >
> > > > - Should the calculator-android included in [1] have included an
> > > > "AndroidManifest.xml" file?
> > > >
> > > > Sorry, my mistake, I forgot to add to svn the eclipse project files
> of
> > > > these
> > > > projects. I have already commited these files and if you update your
> > > trunk
> > > > you will get them ; ). So, delete the ones you have created.
> > > >
> > > > - How can I fix the build errors? Is there something else needed in
> > > > addition
> > > > to including the Android Library?
> > > >
> > > > No, the Android library is really simples, it only contains the
> > > android.jar
> > > > file located in your Android SDK.
> > > >
> > > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > > > eclipse:eclipse"
> > > > commands on the sandbox files, the eclipse project files are already
> in
> > > > modules and you should build the modules using the eclipse for now.
> The
> > > > maven config files are not updated yet with the modifications I have
> > done
> > > > on
> > > > these modules, so they will not generate the correct project files,
> > > worse,
> > > > they will override the ones I have created.
> > > >
> > > > Then, clean and build your entire workspace, if you still get any
> > errors,
> > > > let me know ; )
> > > >
> > > > - Should I import 'tuscany-databinding-saxon'? Or, why should this
> not
> > be
> > > > imported?
> > > >
> > > > It seems the revision I suggested already had the saxon module
> removed
> > > from
> > > > repo. So, you mistakenly removed another one that shouldn´t. Please,
> > > import
> > > > the databinding-saxon module again into your workspace.
> > > >
> > > >
> > > > Regards,
> > > > Adriano Crestani
> > > >
> > > >
> > > > [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > > >
> > > > [2] -
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > > >
> > > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > > > jsdelfino@apache.org> wrote:
> > > >
> > > > > Mike Edwards wrote:
> > > > >
> > > > > > Jean-Sebastien Delfino wrote:
> > > > > >
> > > > > > > Oscar Castaneda wrote:
> > > > > > >
> > > > > > >  1. Downloaded the modified code from [1] and installed as
> shown
> > > > > > > > below:
> > > > > > > >
> > > > > > > > svn checkout
> > > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > > >
> > > > > > > > cd mobile-android
> > > > > > > >
> > > > > > > >
> > > > > > > If there's no objection from others, I'd be happy to see this
> > code
> > > > > > > move from sandbox to trunk as we now have several people doing
> > > > development
> > > > > > > on this android integration.
> > > > > > >
> > > > > > > Adriano, you could start with something like
> > trunk/java/sca/android
> > > > > > > and later progressively try to converge the code with the code
> in
> > > > trunk,
> > > > > > > with architected plug points for the android specific code etc.
> > > > > > >
> > > > > > > Thoughts?
> > > > > > >
> > > > > >
> > > > > > I assume that moving to trunk does not also imply "making part of
> > the
> > > > > > main build"?
> > > > > >
> > > > > > I'd be a bit concerned at experimental code entering the build at
> > > this
> > > > > > stage.
> > > > > >
> > > > > >
> > > > > > Yours,  Mike.
> > > > > >
> > > > >
> > > > > I think it's business as usual, code that doesn't work does not go
> in
> > > the
> > > > > main build, code that's getting stable can go in the main build at
> > some
> > > > > point when people have no specific objections, and different
> profiles
> > > can
> > > > be
> > > > > used to subset particular builds.
> > > > >
> > > > > --
> > > > > Jean-Sebastien
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > best,
> > > -oscar
> > >
> > > Oscar Castañeda
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

I was indeed using the sca modules not from the sandbox. As you suggested, I
removed the tuscany-contribution-impl from my workspace and added the
version you uploaded to the sandbox. Then, I uncommented the lines in

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

following the comments pointing out why those lines had been commented. I'm
no longer getting the ClassNotFoundException. However, it's getting stuck
somewhere else (before getting there I guess)...I think this is the case
because before and after commenting the code I get the same error in the
Android emulator, an InstantiationException [1].

I also started tinkering with retrotranslator. First I tried doing it with
Ant, but it seems that in order to build I have to include the whole tuscany
projects in a way similar to how I now have in Eclipse. I also tried making
a jar out of

org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator

and then feeding it to retrotranslator but unfortunately it's not
translating anything, as shown below.

Voyager-2:Retrotranslator-1.2.6-bin ocastaneda$ java -jar
retrotranslator-transformer-1.2.6.jar -srcjar JavaRuntimeModuleActivator.jar
-target 1.5 -reflection safe -stripannot -classpath
retrotranslator-android-1.2.6.jar
Processing 136 file(s) in JavaRuntimeModuleActivator.jar.
Transformed 0 file(s).

There's also a maven plugin, so I might try that...but first I'll give Ant
another go. Hopefully Google will release a new SDK soon, otherwise as you
say...retrotranslator will have to be the workaround to proceed with our
project ;-)

Thanks again for all your help...I'm getting ready for the official start
:-)

[1] http://androidindelft.googlepages.com/20may2008.html



On Fri, May 16, 2008 at 12:20 PM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi Oscar,
>
> My mistake again, the eclipse project files of contribution-impl module
> were
> not uploaded, so you are probably using the modules you have downloaded
> from
> the sca modules. If you remove the tuscany-contribution-impl from your
> workspace and add this module from the sandbox it will probably work.
> Anyway, you will need to update your trunk again to get the project files
> I'm uploading right now ; )
>
> OK, if you wanna try the retrotranslator as a solution here is a tip: most
> of the code that were using the Reflection API was commented on
>
> org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
> class, you just need to edit this class and remove the commented code (it's
> described there).
>
> So, if you uncomment the code and the retrotranslador successfuly work, and
> I hope it will, you will reach the
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> constructor and it should run OK. Exactly on this constructor I'm getting a
> NPE when the code described above is commented.
>
> About the ant, go on and use it. Further we can evaluate better where we
> place it in the entire SCA build process. BTW, we even dont know if we will
> still be using the retrotranslator in future, right?! : )
>
> Use the retrotranslator may help us a lot to workaround this problem for
> now
> and go on with our project ; )
>
> Kind Regards,
> Adriano Crestani
>
> On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
> oscar.castaneda.gsoc@gmail.com> wrote:
>
> > Hi Adriano,
> >
> > Thanks alot for your answers. I was able to build the entire workspace
> from
> > your instructions. When running calculator-android as an "Android
> > application" I'm getting a ClassNotFoundException [1] for
> >
> >
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> > Is the exception you referred to in your original email?
> >
> > ...when
> > > you run the calculator-android project as an "Android application" you
> > > should get an exception, that was generated initially by a NPE thrown
> by
> > >
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > > constructor. This is caused because the latest Android SDK does not
> > support
> > > the Reflection API yet. So, the SCA cannot check the @Reference
> > annotations
> > > (I commented the code which tries to read the annotations, so when the
> > > execution reach this constructor it throws the NPE).
> > >
> >
> >
> > Searching for the class in the exception I'm getting I found
> > org.apache.tuscany.sca.extensibility.ServiceDiscovery. In
> getServiceClasses
> > it loads the service class I'm getting problems with when running
> > calculator-android as an "Android application":
> >
> >
> >
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
> >
> >
> > I couldn't find the corresponding java file in my imported workspace and
> > found that there is no package like
> > org.apache.tuscany.sca.contribution.processor.impl.
> >
> > Am I missing something? Or are these the errors you would expect?
> >
> > I would like to get to the point where I get the exception you described
> > and
> > try to run retrotranslator from there. However, as I'm using the ADT
> plugin
> > in eclipse I would need to extract code that "declares or analyzes
> > annotations you may extract it into a separate library that can be
> > processed
> > with Retrotranslator and added to the main project." That is, unless I
> use
> > Ant, in which case I would only need to add a few lines to build.xml. I'm
> > continuing to look into this, any thoughts are more than welcome :-)
> >
> > [1] http://delftandroid.googlepages.com/14may2008.html
> >
> >
> > On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> > adrianocrestani@apache.org> wrote:
> >
> > > Hi,
> > >
> > > Thanks all for the feedback ; )
> > >
> > > At first, I want to correct one mistake, on the first step I described
> on
> > > my
> > > previous email, I should not have added the word "install", it probably
> > > would lead the reader to run the "mvn clean install" in the downloaded
> > > files, as Oscar did. Also, on this same step, the code should not be
> > > downloaded from [1], but from [2].
> > >
> > > Simon:
> > > Thanks for the link ; ). As the Sun Java source codes are under CDDL
> 1.0
> > > license, it's only needed to include the CDDL license header on each
> > file,
> > > and it's already done : )
> > >
> > > Jean:
> > > I think it is better to keep the code in the sandbox for now. At first,
> > > it's
> > > not working on the current SCA modules revision yet. And also, I'm
> > > commenting many lines at some modules just to get a "first run" of
> > > calculator-sample to further evaluate why and how this commented lines
> > will
> > > be adapted to be compatible with both: SCA Java and SCA Android.
> > >
> > > Oscar:
> > >
> > > - Are host-android and core-android a part of calculator-android?
> > >
> > > What do you mean when you say "part"? They are used by
> > calculator-android,
> > > and will prabably be added to tuscany sca modules in future
> > >
> > > - Should the calculator-android included in [1] have included an
> > > "AndroidManifest.xml" file?
> > >
> > > Sorry, my mistake, I forgot to add to svn the eclipse project files of
> > > these
> > > projects. I have already commited these files and if you update your
> > trunk
> > > you will get them ; ). So, delete the ones you have created.
> > >
> > > - How can I fix the build errors? Is there something else needed in
> > > addition
> > > to including the Android Library?
> > >
> > > No, the Android library is really simples, it only contains the
> > android.jar
> > > file located in your Android SDK.
> > >
> > > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > > eclipse:eclipse"
> > > commands on the sandbox files, the eclipse project files are already in
> > > modules and you should build the modules using the eclipse for now. The
> > > maven config files are not updated yet with the modifications I have
> done
> > > on
> > > these modules, so they will not generate the correct project files,
> > worse,
> > > they will override the ones I have created.
> > >
> > > Then, clean and build your entire workspace, if you still get any
> errors,
> > > let me know ; )
> > >
> > > - Should I import 'tuscany-databinding-saxon'? Or, why should this not
> be
> > > imported?
> > >
> > > It seems the revision I suggested already had the saxon module removed
> > from
> > > repo. So, you mistakenly removed another one that shouldn´t. Please,
> > import
> > > the databinding-saxon module again into your workspace.
> > >
> > >
> > > Regards,
> > > Adriano Crestani
> > >
> > >
> > > [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > > >
> > > [2] -
> > >
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> > >
> > > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > > jsdelfino@apache.org> wrote:
> > >
> > > > Mike Edwards wrote:
> > > >
> > > > > Jean-Sebastien Delfino wrote:
> > > > >
> > > > > > Oscar Castaneda wrote:
> > > > > >
> > > > > >  1. Downloaded the modified code from [1] and installed as shown
> > > > > > > below:
> > > > > > >
> > > > > > > svn checkout
> > > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > > >
> > > > > > > cd mobile-android
> > > > > > >
> > > > > > >
> > > > > > If there's no objection from others, I'd be happy to see this
> code
> > > > > > move from sandbox to trunk as we now have several people doing
> > > development
> > > > > > on this android integration.
> > > > > >
> > > > > > Adriano, you could start with something like
> trunk/java/sca/android
> > > > > > and later progressively try to converge the code with the code in
> > > trunk,
> > > > > > with architected plug points for the android specific code etc.
> > > > > >
> > > > > > Thoughts?
> > > > > >
> > > > >
> > > > > I assume that moving to trunk does not also imply "making part of
> the
> > > > > main build"?
> > > > >
> > > > > I'd be a bit concerned at experimental code entering the build at
> > this
> > > > > stage.
> > > > >
> > > > >
> > > > > Yours,  Mike.
> > > > >
> > > >
> > > > I think it's business as usual, code that doesn't work does not go in
> > the
> > > > main build, code that's getting stable can go in the main build at
> some
> > > > point when people have no specific objections, and different profiles
> > can
> > > be
> > > > used to subset particular builds.
> > > >
> > > > --
> > > > Jean-Sebastien
> > > >
> > >
> >
> >
> >
> > --
> > best,
> > -oscar
> >
> > Oscar Castañeda
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi Oscar,

My mistake again, the eclipse project files of contribution-impl module were
not uploaded, so you are probably using the modules you have downloaded from
the sca modules. If you remove the tuscany-contribution-impl from your
workspace and add this module from the sandbox it will probably work.
Anyway, you will need to update your trunk again to get the project files
I'm uploading right now ; )

OK, if you wanna try the retrotranslator as a solution here is a tip: most
of the code that were using the Reflection API was commented on
org.apache.tuscany.sca.implementation.java.module.JavaRuntimeModuleActivator
class, you just need to edit this class and remove the commented code (it's
described there).

So, if you uncomment the code and the retrotranslador successfuly work, and
I hope it will, you will reach the
org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
constructor and it should run OK. Exactly on this constructor I'm getting a
NPE when the code described above is commented.

About the ant, go on and use it. Further we can evaluate better where we
place it in the entire SCA build process. BTW, we even dont know if we will
still be using the retrotranslator in future, right?! : )

Use the retrotranslator may help us a lot to workaround this problem for now
and go on with our project ; )

Kind Regards,
Adriano Crestani

On Wed, May 14, 2008 at 2:57 PM, Oscar Castaneda <
oscar.castaneda.gsoc@gmail.com> wrote:

> Hi Adriano,
>
> Thanks alot for your answers. I was able to build the entire workspace from
> your instructions. When running calculator-android as an "Android
> application" I'm getting a ClassNotFoundException [1] for
>
> org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
> Is the exception you referred to in your original email?
>
> ...when
> > you run the calculator-android project as an "Android application" you
> > should get an exception, that was generated initially by a NPE thrown by
> > org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> > constructor. This is caused because the latest Android SDK does not
> support
> > the Reflection API yet. So, the SCA cannot check the @Reference
> annotations
> > (I commented the code which tries to read the annotations, so when the
> > execution reach this constructor it throws the NPE).
> >
>
>
> Searching for the class in the exception I'm getting I found
> org.apache.tuscany.sca.extensibility.ServiceDiscovery. In getServiceClasses
> it loads the service class I'm getting problems with when running
> calculator-android as an "Android application":
>
>
> "org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"
>
>
> I couldn't find the corresponding java file in my imported workspace and
> found that there is no package like
> org.apache.tuscany.sca.contribution.processor.impl.
>
> Am I missing something? Or are these the errors you would expect?
>
> I would like to get to the point where I get the exception you described
> and
> try to run retrotranslator from there. However, as I'm using the ADT plugin
> in eclipse I would need to extract code that "declares or analyzes
> annotations you may extract it into a separate library that can be
> processed
> with Retrotranslator and added to the main project." That is, unless I use
> Ant, in which case I would only need to add a few lines to build.xml. I'm
> continuing to look into this, any thoughts are more than welcome :-)
>
> [1] http://delftandroid.googlepages.com/14may2008.html
>
>
> On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
> > Hi,
> >
> > Thanks all for the feedback ; )
> >
> > At first, I want to correct one mistake, on the first step I described on
> > my
> > previous email, I should not have added the word "install", it probably
> > would lead the reader to run the "mvn clean install" in the downloaded
> > files, as Oscar did. Also, on this same step, the code should not be
> > downloaded from [1], but from [2].
> >
> > Simon:
> > Thanks for the link ; ). As the Sun Java source codes are under CDDL 1.0
> > license, it's only needed to include the CDDL license header on each
> file,
> > and it's already done : )
> >
> > Jean:
> > I think it is better to keep the code in the sandbox for now. At first,
> > it's
> > not working on the current SCA modules revision yet. And also, I'm
> > commenting many lines at some modules just to get a "first run" of
> > calculator-sample to further evaluate why and how this commented lines
> will
> > be adapted to be compatible with both: SCA Java and SCA Android.
> >
> > Oscar:
> >
> > - Are host-android and core-android a part of calculator-android?
> >
> > What do you mean when you say "part"? They are used by
> calculator-android,
> > and will prabably be added to tuscany sca modules in future
> >
> > - Should the calculator-android included in [1] have included an
> > "AndroidManifest.xml" file?
> >
> > Sorry, my mistake, I forgot to add to svn the eclipse project files of
> > these
> > projects. I have already commited these files and if you update your
> trunk
> > you will get them ; ). So, delete the ones you have created.
> >
> > - How can I fix the build errors? Is there something else needed in
> > addition
> > to including the Android Library?
> >
> > No, the Android library is really simples, it only contains the
> android.jar
> > file located in your Android SDK.
> >
> > Please, do not run the "mvn clean build" and "mvn -Peclipse
> > eclipse:eclipse"
> > commands on the sandbox files, the eclipse project files are already in
> > modules and you should build the modules using the eclipse for now. The
> > maven config files are not updated yet with the modifications I have done
> > on
> > these modules, so they will not generate the correct project files,
> worse,
> > they will override the ones I have created.
> >
> > Then, clean and build your entire workspace, if you still get any errors,
> > let me know ; )
> >
> > - Should I import 'tuscany-databinding-saxon'? Or, why should this not be
> > imported?
> >
> > It seems the revision I suggested already had the saxon module removed
> from
> > repo. So, you mistakenly removed another one that shouldn´t. Please,
> import
> > the databinding-saxon module again into your workspace.
> >
> >
> > Regards,
> > Adriano Crestani
> >
> >
> > [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> > >
> > [2] -
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
> >
> > On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> > jsdelfino@apache.org> wrote:
> >
> > > Mike Edwards wrote:
> > >
> > > > Jean-Sebastien Delfino wrote:
> > > >
> > > > > Oscar Castaneda wrote:
> > > > >
> > > > >  1. Downloaded the modified code from [1] and installed as shown
> > > > > > below:
> > > > > >
> > > > > > svn checkout
> > > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > > >
> > > > > > cd mobile-android
> > > > > >
> > > > > >
> > > > > If there's no objection from others, I'd be happy to see this code
> > > > > move from sandbox to trunk as we now have several people doing
> > development
> > > > > on this android integration.
> > > > >
> > > > > Adriano, you could start with something like trunk/java/sca/android
> > > > > and later progressively try to converge the code with the code in
> > trunk,
> > > > > with architected plug points for the android specific code etc.
> > > > >
> > > > > Thoughts?
> > > > >
> > > >
> > > > I assume that moving to trunk does not also imply "making part of the
> > > > main build"?
> > > >
> > > > I'd be a bit concerned at experimental code entering the build at
> this
> > > > stage.
> > > >
> > > >
> > > > Yours,  Mike.
> > > >
> > >
> > > I think it's business as usual, code that doesn't work does not go in
> the
> > > main build, code that's getting stable can go in the main build at some
> > > point when people have no specific objections, and different profiles
> can
> > be
> > > used to subset particular builds.
> > >
> > > --
> > > Jean-Sebastien
> > >
> >
>
>
>
> --
> best,
> -oscar
>
> Oscar Castañeda
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

Thanks alot for your answers. I was able to build the entire workspace from
your instructions. When running calculator-android as an "Android
application" I'm getting a ClassNotFoundException [1] for
org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor.
Is the exception you referred to in your original email?

...when
> you run the calculator-android project as an "Android application" you
> should get an exception, that was generated initially by a NPE thrown by
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> constructor. This is caused because the latest Android SDK does not support
> the Reflection API yet. So, the SCA cannot check the @Reference annotations
> (I commented the code which tries to read the annotations, so when the
> execution reach this constructor it throws the NPE).
>


Searching for the class in the exception I'm getting I found
org.apache.tuscany.sca.extensibility.ServiceDiscovery. In getServiceClasses
it loads the service class I'm getting problems with when running
calculator-android as an "Android application":

"org.apache.tuscany.sca.contribution.processor.impl.DexContributionProcessor;type=application/x-dex"


I couldn't find the corresponding java file in my imported workspace and
found that there is no package like
org.apache.tuscany.sca.contribution.processor.impl.

Am I missing something? Or are these the errors you would expect?

I would like to get to the point where I get the exception you described and
try to run retrotranslator from there. However, as I'm using the ADT plugin
in eclipse I would need to extract code that "declares or analyzes
annotations you may extract it into a separate library that can be processed
with Retrotranslator and added to the main project." That is, unless I use
Ant, in which case I would only need to add a few lines to build.xml. I'm
continuing to look into this, any thoughts are more than welcome :-)

[1] http://delftandroid.googlepages.com/14may2008.html


On Mon, May 12, 2008 at 9:13 AM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi,
>
> Thanks all for the feedback ; )
>
> At first, I want to correct one mistake, on the first step I described on
> my
> previous email, I should not have added the word "install", it probably
> would lead the reader to run the "mvn clean install" in the downloaded
> files, as Oscar did. Also, on this same step, the code should not be
> downloaded from [1], but from [2].
>
> Simon:
> Thanks for the link ; ). As the Sun Java source codes are under CDDL 1.0
> license, it's only needed to include the CDDL license header on each file,
> and it's already done : )
>
> Jean:
> I think it is better to keep the code in the sandbox for now. At first,
> it's
> not working on the current SCA modules revision yet. And also, I'm
> commenting many lines at some modules just to get a "first run" of
> calculator-sample to further evaluate why and how this commented lines will
> be adapted to be compatible with both: SCA Java and SCA Android.
>
> Oscar:
>
> - Are host-android and core-android a part of calculator-android?
>
> What do you mean when you say "part"? They are used by calculator-android,
> and will prabably be added to tuscany sca modules in future
>
> - Should the calculator-android included in [1] have included an
> "AndroidManifest.xml" file?
>
> Sorry, my mistake, I forgot to add to svn the eclipse project files of
> these
> projects. I have already commited these files and if you update your trunk
> you will get them ; ). So, delete the ones you have created.
>
> - How can I fix the build errors? Is there something else needed in
> addition
> to including the Android Library?
>
> No, the Android library is really simples, it only contains the android.jar
> file located in your Android SDK.
>
> Please, do not run the "mvn clean build" and "mvn -Peclipse
> eclipse:eclipse"
> commands on the sandbox files, the eclipse project files are already in
> modules and you should build the modules using the eclipse for now. The
> maven config files are not updated yet with the modifications I have done
> on
> these modules, so they will not generate the correct project files, worse,
> they will override the ones I have created.
>
> Then, clean and build your entire workspace, if you still get any errors,
> let me know ; )
>
> - Should I import 'tuscany-databinding-saxon'? Or, why should this not be
> imported?
>
> It seems the revision I suggested already had the saxon module removed from
> repo. So, you mistakenly removed another one that shouldn´t. Please, import
> the databinding-saxon module again into your workspace.
>
>
> Regards,
> Adriano Crestani
>
>
> [1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >
> [2] -
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android
>
> On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
> jsdelfino@apache.org> wrote:
>
> > Mike Edwards wrote:
> >
> > > Jean-Sebastien Delfino wrote:
> > >
> > > > Oscar Castaneda wrote:
> > > >
> > > >  1. Downloaded the modified code from [1] and installed as shown
> > > > > below:
> > > > >
> > > > > svn checkout
> > > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > > >
> > > > > cd mobile-android
> > > > >
> > > > >
> > > > If there's no objection from others, I'd be happy to see this code
> > > > move from sandbox to trunk as we now have several people doing
> development
> > > > on this android integration.
> > > >
> > > > Adriano, you could start with something like trunk/java/sca/android
> > > > and later progressively try to converge the code with the code in
> trunk,
> > > > with architected plug points for the android specific code etc.
> > > >
> > > > Thoughts?
> > > >
> > >
> > > I assume that moving to trunk does not also imply "making part of the
> > > main build"?
> > >
> > > I'd be a bit concerned at experimental code entering the build at this
> > > stage.
> > >
> > >
> > > Yours,  Mike.
> > >
> >
> > I think it's business as usual, code that doesn't work does not go in the
> > main build, code that's getting stable can go in the main build at some
> > point when people have no specific objections, and different profiles can
> be
> > used to subset particular builds.
> >
> > --
> > Jean-Sebastien
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Adriano Crestani wrote:
> I think it is better to keep the code in the sandbox for now. At first, it's
> not working on the current SCA modules revision yet. And also, I'm
> commenting many lines at some modules just to get a "first run" of
> calculator-sample to further evaluate why and how this commented lines will
> be adapted to be compatible with both: SCA Java and SCA Android.
> 


I didn't mean 'merge the SCA Android code with the SCA Java code right 
away', I was just saying I'd be happy to see it move to trunk / java / 
sca / android, as trunk is where development normally happens, it makes 
that good work more visible and accessible to all, is more likely to 
attract others to come and help and puts you on a better path to 
converge later.

If you don't want to, that's fine with me too.

>>> Jean-Sebastien Delfino wrote:
>>>> If there's no objection from others, I'd be happy to see this code
>>>> move from sandbox to trunk as we now have several people doing development
>>>> on this android integration.
>>>>
>>>> Adriano, you could start with something like trunk/java/sca/android
>>>> and later progressively try to converge the code with the code in trunk,
>>>> with architected plug points for the android specific code etc.
>>>>
-- 
Jean-Sebastien

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi,

Thanks all for the feedback ; )

At first, I want to correct one mistake, on the first step I described on my
previous email, I should not have added the word "install", it probably
would lead the reader to run the "mvn clean install" in the downloaded
files, as Oscar did. Also, on this same step, the code should not be
downloaded from [1], but from [2].

Simon:
Thanks for the link ; ). As the Sun Java source codes are under CDDL 1.0
license, it's only needed to include the CDDL license header on each file,
and it's already done : )

Jean:
I think it is better to keep the code in the sandbox for now. At first, it's
not working on the current SCA modules revision yet. And also, I'm
commenting many lines at some modules just to get a "first run" of
calculator-sample to further evaluate why and how this commented lines will
be adapted to be compatible with both: SCA Java and SCA Android.

Oscar:

- Are host-android and core-android a part of calculator-android?

What do you mean when you say "part"? They are used by calculator-android,
and will prabably be added to tuscany sca modules in future

- Should the calculator-android included in [1] have included an
"AndroidManifest.xml" file?

Sorry, my mistake, I forgot to add to svn the eclipse project files of these
projects. I have already commited these files and if you update your trunk
you will get them ; ). So, delete the ones you have created.

- How can I fix the build errors? Is there something else needed in addition
to including the Android Library?

No, the Android library is really simples, it only contains the android.jar
file located in your Android SDK.

Please, do not run the "mvn clean build" and "mvn -Peclipse eclipse:eclipse"
commands on the sandbox files, the eclipse project files are already in
modules and you should build the modules using the eclipse for now. The
maven config files are not updated yet with the modifications I have done on
these modules, so they will not generate the correct project files, worse,
they will override the ones I have created.

Then, clean and build your entire workspace, if you still get any errors,
let me know ; )

- Should I import 'tuscany-databinding-saxon'? Or, why should this not be
imported?

It seems the revision I suggested already had the saxon module removed from
repo. So, you mistakenly removed another one that shouldn´t. Please, import
the databinding-saxon module again into your workspace.


Regards,
Adriano Crestani


[1] - https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/>
[2] -
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android

On Sun, May 11, 2008 at 11:05 AM, Jean-Sebastien Delfino <
jsdelfino@apache.org> wrote:

> Mike Edwards wrote:
>
> > Jean-Sebastien Delfino wrote:
> >
> > > Oscar Castaneda wrote:
> > >
> > >  1. Downloaded the modified code from [1] and installed as shown
> > > > below:
> > > >
> > > > svn checkout
> > > > https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> > > >
> > > > cd mobile-android
> > > >
> > > >
> > > If there's no objection from others, I'd be happy to see this code
> > > move from sandbox to trunk as we now have several people doing development
> > > on this android integration.
> > >
> > > Adriano, you could start with something like trunk/java/sca/android
> > > and later progressively try to converge the code with the code in trunk,
> > > with architected plug points for the android specific code etc.
> > >
> > > Thoughts?
> > >
> >
> > I assume that moving to trunk does not also imply "making part of the
> > main build"?
> >
> > I'd be a bit concerned at experimental code entering the build at this
> > stage.
> >
> >
> > Yours,  Mike.
> >
>
> I think it's business as usual, code that doesn't work does not go in the
> main build, code that's getting stable can go in the main build at some
> point when people have no specific objections, and different profiles can be
> used to subset particular builds.
>
> --
> Jean-Sebastien
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Mike Edwards wrote:
> Jean-Sebastien Delfino wrote:
>> Oscar Castaneda wrote:
>>
>>> 1. Downloaded the modified code from [1] and installed as shown below:
>>>
>>> svn checkout https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>>>
>>> cd mobile-android
>>>
>>
>> If there's no objection from others, I'd be happy to see this code 
>> move from sandbox to trunk as we now have several people doing 
>> development on this android integration.
>>
>> Adriano, you could start with something like trunk/java/sca/android 
>> and later progressively try to converge the code with the code in 
>> trunk, with architected plug points for the android specific code etc.
>>
>> Thoughts?
> 
> I assume that moving to trunk does not also imply "making part of the 
> main build"?
> 
> I'd be a bit concerned at experimental code entering the build at this 
> stage.
> 
> 
> Yours,  Mike.

I think it's business as usual, code that doesn't work does not go in 
the main build, code that's getting stable can go in the main build at 
some point when people have no specific objections, and different 
profiles can be used to subset particular builds.

-- 
Jean-Sebastien

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Mike Edwards <mi...@gmail.com>.
Jean-Sebastien Delfino wrote:
> Oscar Castaneda wrote:
> 
>> 1. Downloaded the modified code from [1] and installed as shown below:
>>
>> svn checkout https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
>>
>> cd mobile-android
>>
> 
> If there's no objection from others, I'd be happy to see this code move 
> from sandbox to trunk as we now have several people doing development on 
> this android integration.
> 
> Adriano, you could start with something like trunk/java/sca/android and 
> later progressively try to converge the code with the code in trunk, 
> with architected plug points for the android specific code etc.
> 
> Thoughts?

I assume that moving to trunk does not also imply "making part of the main build"?

I'd be a bit concerned at experimental code entering the build at this stage.


Yours,  Mike.

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Oscar Castaneda wrote:

> 1. Downloaded the modified code from [1] and installed as shown below:
> 
> svn checkout https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
> 
> cd mobile-android
> 

If there's no objection from others, I'd be happy to see this code move 
from sandbox to trunk as we now have several people doing development on 
this android integration.

Adriano, you could start with something like trunk/java/sca/android and 
later progressively try to converge the code with the code in trunk, 
with architected plug points for the android specific code etc.

Thoughts?
-- 
Jean-Sebastien

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Oscar Castaneda <os...@gmail.com>.
Hi Adriano,

Thanks for the detailed summary of your modifications and how to get them
running. These past few days I've been trying to get the calculator-android
project running as an "Android application." Below is a description of what
I've done, it is based on the steps you detailed for getting it to run. Then
there are a few questions, any help would be greatly appreciated.

1. Downloaded the modified code from [1] and installed as shown below:

svn checkout https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/

cd mobile-android

mvn clean install -Dtest=no
mvn -Peclipse eclipse:eclipse -Dtest=no

2. Downloaded SCA modules from [2] and installed as shown below:

svn checkout --revision 643746
https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules

cd modules

mvn clean install -Dtest=no
mvn -Peclipse eclipse:eclipse -Dtest=no

3. Created a new eclipse workspace and set the M2_REPO variable as shown
below:

mvn -Declipse.workspace=/Users/.../workspace eclipse:add-maven-repo

4. Imported projects from step 1, this resulted in 12 imported module
projects. The remaining 3 projects I think are Android projects and not
"normal" eclipse projects, since they don't have a ".project" file. These
are:

calculator-android
host-android
core-android

To import them I created an "AndroidManifest.xml" file and imported them as
documented in [3]. This worked for calculator-android but not for
host-android or core-android. Looking into the directory structure and files
for the last two, I take it they're not Android projects. I'm trying to
figure out if they're part of the calculator-android project.

5. Imported projects from step 2. After importing, all module projects have
errors. I tried including the Android Library on a few module projects to
fix the errors but they're still showing up. These errors state the
following:

The project cannot be built until the build errors are resolved.

I also have errors on the "AndroidManifest.xml" in "android-jdk-classes"
stating that 'calculator.android' does not exist (even though I imported
it).

Additionally, I have an error caused as a result of not importing the
'tuscany-databinding-saxon' module project. It states the following:

Project 'tuscany-implementation-xquery' is missing required Java project:
'tuscany-databinding-saxon'


Some questions...

- Are host-android and core-android a part of calculator-android?
- Should the calculator-android included in [1] have included an
"AndroidManifest.xml" file?
- How can I fix the build errors? Is there something else needed in addition
to including the Android Library?
- Should I import 'tuscany-databinding-saxon'? Or, why should this not be
imported?

I also went through the licensing page Simon pointed you to. Please let me
know if I can help.


[1] https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/
[2] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
[3]
http://code.google.com/android/intro/installing.html#developingwitheclipse


On Tue, May 6, 2008 at 12:45 PM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi,
>
> I will try to summarize the modifications I've done on SCA to run on
> Android
> so far.
>
> As I aforementioned, most dynamic instantiations were being done on
> host-embedded module. However, there was another modules which were also
> using the dynamic instantiation and I had to modify too. For example, the
> extensibility module, where I had to add the string lines directly on the
> code as they couldn't be read from the file.
>
> OK, so far so good.
>
> But I have found another limitations. But before to explain it, let me
> explain how android deals with the app resources:
>
> On the android app project, there is a folder called res, which can only
> contain certain folders: xml, raw, strings, etc (I don´t remember the
> other,
> but they are predefined). And these folders can only contain files that are
> named only with letters, digits and the '_' character.
>
> Yes, the resource structure is very limited, but there is a reason. Each
> file is packed and compressed into a single file, then when the android app
> is compiled it auto generates a class named R, which has static subclasses
> named with the name of each folder contained on the res folder. Each
> subclass has static int fields that points to the beginning of each file in
> the compressed file.
>
> Example: res/raw/filename is converted to R.raw.filename
>
> So, as each int field has the name of each file, the file names should only
> be composed of those characters described above. Then, no ".xml",
> ".composite", ".xsd" is supported, as they all contains the '.' character
> on
> their names.
>
> Each folder name describes how the android converter will compress the
> files
> contained in it, for example, the files contained in the "xml" folder are
> compressed to a special binary xml format and etc. The only folder that do
> not have the files compressed is the "raw" folder.
>
> Every running app on Android is called context, which is an instance of a
> class that extends the Context class. In the same package this class is
> defined, the R class is also defined.
>
> To access the files that are pointed by the R class, the context instance
> is
> needed: contextInstance.getRescources().openRawResource(R.raw.filename)
>
> SCA works with resources practically only using the  URI/URL. However,
> there
> is no way to access this resources using an URL object, because there is no
> defined protocol to access this files.
>
> Trying to get the calculator sample running on Android, I placed the
> calculator.composite file in the raw folder. I had also to remove the '.'
> character  from the file name, so I renamed it to "calculator_composite".
>
> So, to access the files pointed by the R class, I "implemented" a new
> protocol, called "dex" (how the Android app file is called, equivalent to
> Java jar files ). The dex protocol is defined as:
>
> dex://<context_package>/<resource_folder>/<file_name>
>
> <context_package> = package where the app context and R class are located
> <resource_folder> = folder where the file is located
> <file_name> = the file name
>
> Valid example1: dex://calculator.android/raw/calculator.composite
> Valid example2: dex://calculator.android/raw/
> Valid example3: dex://calculator.android/
>
> PS: the implemented protocol replaces the last '.' character when trying to
> access the file...the '.' character is accepted, though the SCA Android
> version would be compatible with the SCA Java version that searches for
> files which ends with ".composite" and not with "_composite"
>
> I implemented some classes to support this protocol, they are located at
> [1]:
>
> DexURLStreamHandlerFactory.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandlerFactory.java
> >:
> the instance of this class is set as the app URLStreamHandlerFactory when
> the SCADomain is loaded. This class creates the DEXURLStreamHandler and
> allows the dex protocol to be a valid protocol.
>
> DexURLStreamHandler.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandler.java
> >:
> Create a DEXURLConnection from a dex URL object.
>
> DexURLConnection.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLConnection.java
> >:
> Provides the access to a file described on the dex URL.
>
> DexResource.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexResource.java
> >:
> Provides some util methods for dex resources. For example, from a dex URL,
> which describes a folder,  it is possible to retrieve all the files in this
> folder.
>
> ContextRegistry.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/ContextRegistry.java
> >:
> as a context reference is needed to access the resources, when invoking
> SCADomain.newInstance(Context, String), the SCADomain register the Context
> object in the ContextRegistry and unregister when the SCADomain.close() is
> involked. This way, when URLConnection tries to access the file stream, it
> uses the context object registered in the ContextRegistry. Each context is
> registered in a map by its package name.
>
> With the dex protocol implemented, I could access the
> "calculator.composite"
> file in my app resource: SCADomain.newInstance(contextReference,
> "dex://calculator.android/raw/calculator.composite")
>
> I was getting another exceptions when the SCA tries to access the STAX
> classes. It was happening because the Android SDK do not include some
> standard java classes. So, as the missing classes were not so complex
> classes, I copied them from JDK source to [2]. This classes have CDDL
> license, does anybody know if it is compatible with ASL license?
>
> =================================
>
> Getting it "running"
>
> It is not really running(I will explain below), but I will describe how to
> config the eclipse workspace to work with the code I have uploaded on [3].
>
> 1- download the modified code from [3] and install them
>
> 2- download the SCA modules from [4]. I'm working with an old revision, the
> 643746, I recommend to checkout this revision too, I haven´t tested the
> modified code with earlier revisions.
>
> 3- on the folder you download the SCA modules, run:
>
> mvn clean install -Dtest=no
> mvn -Peclipse eclipse:eclipse -Dtest=no
>
> 4- download the Android SDK and the eclipse plugin at [5]
>
> 5- open the eclipse and create a new workspace, do not forget to set the
> M2_REPO variable on it.
>
> 6- import the projects included in the files you've download from [3]
>
> 7- import the SCA module projects (exclude the saxon module)
>
> 8- There should be a lot of errors some modules, include the Android
> library
> on them, it should fix the problem
>
> If everything goes fine (and if I have described everything correctly),
> when
> you run the calculator-android project as an "Android application" you
> should get an exception, that was generated initially by a NPE thrown by
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> constructor. This is caused because the latest Android SDK does not support
> the Reflection API yet. So, the SCA cannot check the @Reference annotations
> (I commented the code which tries to read the annotations, so when the
> execution reach this constructor it throws the NPE). However, the Android
> developers say the next SDK release will support the Reflection api, they
> do
> not tell when it will be released, they just say it will be soon :S
>
> This is the summarize what I have done on running SCA on Android so far.
> Suggestions/contributions will be appreciated : )
>
> I expect I have explained everything correctly. Sorry for my bad english,
> I'm almost sleeping on the keyboard :o
>
> Any questions/doubts about what I have written here, just let know ; )
>
> Kind Regards,
> Adriano Crestani
>
> [1]
>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/
> [2]
>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> [3] https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >
> [4] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> [5] http://code.google.com/android/download_list.html
>
> On Thu, Mar 20, 2008 at 9:43 PM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
> > I have started to change the SCA code.
> >
> > Initially, the objects instantiated dynamically were not being
> > instantiated, because info about which class to instantiate is extract
> from
> > some text files contained in SCA modules' jars. Unfortunately, when
> Android
> > converter converts the SCA modules' jars to .dex files, it ignores the
> > non-class files, and they are not included. It happens because Android
> has a
> > very specific way to store the app resources, which is completely
> different
> > from Java.
> >
> > Though, as Luciano suggested, I started to modify these dynamic
> > instantiation for static. It's working for now : ). All these
> modifications
> > were made only on host-embedded module code, which I have copied into [1]
> > and renamed to host-android.
> >
> > Also, one of those static instantiated classes was trying to access the
> > javax.naming.InitialContext in its constructor, but it's not supported by
> > Android and I commented the code. As this class belonged to SCA core
> module,
> > I also copied this module into the mobile-android sandbox and renamed the
> > module to core-android.
> >
> > So, all the modifications made so far are in the [2].
> >
> > Now, as I was expecting, I got some ClassNotFoundExceptions on SCA code
> > when it tries to use the Java XML API. It happens because Android
> implements
> > only a small part of this API. So, next step is try to adapt the SCA XML
> > access into Android way to access XML. Does anybody know some other XML
> API
> > that is javax.xml independent I could use instead of Android one?
> >
> > Suggestions? : )
> >
> > Adriano Crestani
> >
> > [1]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
> > [2]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> <
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
> >
> >
> >
> >
> >
> > On Mon, Mar 17, 2008 at 1:41 PM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> > > I'd probably categorize the experiment we are doing now, as a learning
> > > experience to familiarize with the Mobile environment available in
> > > Google Android. For this, we have choosen to try running one of the
> > > simplest samples we had (calculator) in the Android JVM
> > > environment.... In the long run, the idea is to have a more
> > > light-weight "sca mobile core/runtime" available, similar to what we
> > > did for Web 2.0 (implementation-widget) and described by Mike below.
> > >
> > > But it's indeed good to discuss these items with the community, would
> > > be also good to have the community contributing requirements/scenarios
> > > for a Tuscany mobile story. And we are all open and welcoming any
> > > help.
> > >
> > >
> > > On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
> > > <mi...@gmail.com> wrote:
> > > > Brandon Werner wrote:
> > > >  > Can you explain the benefit of moving SCA/SDO over to the Android
> > > platform?
> > > >  > I can understand wanting to have the ability to consume simple XML
> > > services
> > > >  > and perhaps consume disconnected datagraphs, but I don't
> understand
> > > why the
> > > >  > world wouldn't want a more light-weight way of doing that than
> > > ripping out
> > > >  > something that was meant for the JEE / JSE.
> > > >  >
> > > >  > <snip>
> > > >  Brandon,
> > > >
> > > >  So you think that a device using the Andriod platform is likely to
> > > want
> > > >  to use services and a service-oriented approach to building
> > > >  applications.  But you think that SCA is too "heavyweight"?  Is that
> > > >  simply a question of the size of the code involved (I note that the
> > > core
> > > >  of Tuscany is quite small) or is the SCA approach too "heavyweight"
> > > in
> > > >  some other sense?
> > > >
> > > >  I wonder if you've taken a look a the implementation.widget
> > > exemplified
> > > >  in the Tutorial demo code?  This applies SCA principles to AJAX
> > > widgets
> > > >  running in the browser - simplifying the connectivity a great deal
> > > (in
> > > >  my opinion) and yet adding little overhead.
> > > >
> > > >  In the longer run, we may want to look to do something similar for
> > > the
> > > >  Android platforms, perhaps with Java rather than the more limited
> > > >  JavaScript components.  Starting with the current SCA package seems
> > > >  reasonable to me - once we have experience with how that works, we
> > > will
> > > >  have a better idea what needs to be changed and tailored for the
> > > Android
> > > >  platform.
> > > >
> > > >
> > > >  Yours,  Mike.
> > > >
> > > >
> > > >
> > > >
>  ---------------------------------------------------------------------
> > > >  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > > >  For additional commands, e-mail: tuscany-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
>



-- 
best,
-oscar

Oscar Castañeda

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Simon Laws <si...@googlemail.com>.
On Tue, May 6, 2008 at 11:45 AM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> Hi,
>
> I will try to summarize the modifications I've done on SCA to run on
> Android
> so far.
>
> As I aforementioned, most dynamic instantiations were being done on
> host-embedded module. However, there was another modules which were also
> using the dynamic instantiation and I had to modify too. For example, the
> extensibility module, where I had to add the string lines directly on the
> code as they couldn't be read from the file.
>
> OK, so far so good.
>
> But I have found another limitations. But before to explain it, let me
> explain how android deals with the app resources:
>
> On the android app project, there is a folder called res, which can only
> contain certain folders: xml, raw, strings, etc (I don´t remember the
> other,
> but they are predefined). And these folders can only contain files that
> are
> named only with letters, digits and the '_' character.
>
> Yes, the resource structure is very limited, but there is a reason. Each
> file is packed and compressed into a single file, then when the android
> app
> is compiled it auto generates a class named R, which has static subclasses
> named with the name of each folder contained on the res folder. Each
> subclass has static int fields that points to the beginning of each file
> in
> the compressed file.
>
> Example: res/raw/filename is converted to R.raw.filename
>
> So, as each int field has the name of each file, the file names should
> only
> be composed of those characters described above. Then, no ".xml",
> ".composite", ".xsd" is supported, as they all contains the '.' character
> on
> their names.
>
> Each folder name describes how the android converter will compress the
> files
> contained in it, for example, the files contained in the "xml" folder are
> compressed to a special binary xml format and etc. The only folder that do
> not have the files compressed is the "raw" folder.
>
> Every running app on Android is called context, which is an instance of a
> class that extends the Context class. In the same package this class is
> defined, the R class is also defined.
>
> To access the files that are pointed by the R class, the context instance
> is
> needed: contextInstance.getRescources().openRawResource(R.raw.filename)
>
> SCA works with resources practically only using the  URI/URL. However,
> there
> is no way to access this resources using an URL object, because there is
> no
> defined protocol to access this files.
>
> Trying to get the calculator sample running on Android, I placed the
> calculator.composite file in the raw folder. I had also to remove the '.'
> character  from the file name, so I renamed it to "calculator_composite".
>
> So, to access the files pointed by the R class, I "implemented" a new
> protocol, called "dex" (how the Android app file is called, equivalent to
> Java jar files ). The dex protocol is defined as:
>
> dex://<context_package>/<resource_folder>/<file_name>
>
> <context_package> = package where the app context and R class are located
> <resource_folder> = folder where the file is located
> <file_name> = the file name
>
> Valid example1: dex://calculator.android/raw/calculator.composite
> Valid example2: dex://calculator.android/raw/
> Valid example3: dex://calculator.android/
>
> PS: the implemented protocol replaces the last '.' character when trying
> to
> access the file...the '.' character is accepted, though the SCA Android
> version would be compatible with the SCA Java version that searches for
> files which ends with ".composite" and not with "_composite"
>
> I implemented some classes to support this protocol, they are located at
> [1]:
>
> DexURLStreamHandlerFactory.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandlerFactory.java
> >:
> the instance of this class is set as the app URLStreamHandlerFactory when
> the SCADomain is loaded. This class creates the DEXURLStreamHandler and
> allows the dex protocol to be a valid protocol.
>
> DexURLStreamHandler.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandler.java
> >:
> Create a DEXURLConnection from a dex URL object.
>
> DexURLConnection.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLConnection.java
> >:
> Provides the access to a file described on the dex URL.
>
> DexResource.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexResource.java
> >:
> Provides some util methods for dex resources. For example, from a dex URL,
> which describes a folder,  it is possible to retrieve all the files in
> this
> folder.
>
> ContextRegistry.java<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/ContextRegistry.java
> >:
> as a context reference is needed to access the resources, when invoking
> SCADomain.newInstance(Context, String), the SCADomain register the Context
> object in the ContextRegistry and unregister when the SCADomain.close() is
> involked. This way, when URLConnection tries to access the file stream, it
> uses the context object registered in the ContextRegistry. Each context is
> registered in a map by its package name.
>
> With the dex protocol implemented, I could access the
> "calculator.composite"
> file in my app resource: SCADomain.newInstance(contextReference,
> "dex://calculator.android/raw/calculator.composite")
>
> I was getting another exceptions when the SCA tries to access the STAX
> classes. It was happening because the Android SDK do not include some
> standard java classes. So, as the missing classes were not so complex
> classes, I copied them from JDK source to [2]. This classes have CDDL
> license, does anybody know if it is compatible with ASL license?
>
> =================================
>
> Getting it "running"
>
> It is not really running(I will explain below), but I will describe how to
> config the eclipse workspace to work with the code I have uploaded on [3].
>
> 1- download the modified code from [3] and install them
>
> 2- download the SCA modules from [4]. I'm working with an old revision,
> the
> 643746, I recommend to checkout this revision too, I haven´t tested the
> modified code with earlier revisions.
>
> 3- on the folder you download the SCA modules, run:
>
> mvn clean install -Dtest=no
> mvn -Peclipse eclipse:eclipse -Dtest=no
>
> 4- download the Android SDK and the eclipse plugin at [5]
>
> 5- open the eclipse and create a new workspace, do not forget to set the
> M2_REPO variable on it.
>
> 6- import the projects included in the files you've download from [3]
>
> 7- import the SCA module projects (exclude the saxon module)
>
> 8- There should be a lot of errors some modules, include the Android
> library
> on them, it should fix the problem
>
> If everything goes fine (and if I have described everything correctly),
> when
> you run the calculator-android project as an "Android application" you
> should get an exception, that was generated initially by a NPE thrown by
> org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
> constructor. This is caused because the latest Android SDK does not
> support
> the Reflection API yet. So, the SCA cannot check the @Reference
> annotations
> (I commented the code which tries to read the annotations, so when the
> execution reach this constructor it throws the NPE). However, the Android
> developers say the next SDK release will support the Reflection api, they
> do
> not tell when it will be released, they just say it will be soon :S
>
> This is the summarize what I have done on running SCA on Android so far.
> Suggestions/contributions will be appreciated : )
>
> I expect I have explained everything correctly. Sorry for my bad english,
> I'm almost sleeping on the keyboard :o
>
> Any questions/doubts about what I have written here, just let know ; )
>
> Kind Regards,
> Adriano Crestani
>
> [1]
>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/
> [2]
>
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> [3] https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
> >
> [4] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
> [5] http://code.google.com/android/download_list.html
>
> On Thu, Mar 20, 2008 at 9:43 PM, Adriano Crestani <
> adrianocrestani@apache.org> wrote:
>
> > I have started to change the SCA code.
> >
> > Initially, the objects instantiated dynamically were not being
> > instantiated, because info about which class to instantiate is extract
> from
> > some text files contained in SCA modules' jars. Unfortunately, when
> Android
> > converter converts the SCA modules' jars to .dex files, it ignores the
> > non-class files, and they are not included. It happens because Android
> has a
> > very specific way to store the app resources, which is completely
> different
> > from Java.
> >
> > Though, as Luciano suggested, I started to modify these dynamic
> > instantiation for static. It's working for now : ). All these
> modifications
> > were made only on host-embedded module code, which I have copied into
> [1]
> > and renamed to host-android.
> >
> > Also, one of those static instantiated classes was trying to access the
> > javax.naming.InitialContext in its constructor, but it's not supported
> by
> > Android and I commented the code. As this class belonged to SCA core
> module,
> > I also copied this module into the mobile-android sandbox and renamed
> the
> > module to core-android.
> >
> > So, all the modifications made so far are in the [2].
> >
> > Now, as I was expecting, I got some ClassNotFoundExceptions on SCA code
> > when it tries to use the Java XML API. It happens because Android
> implements
> > only a small part of this API. So, next step is try to adapt the SCA XML
> > access into Android way to access XML. Does anybody know some other XML
> API
> > that is javax.xml independent I could use instead of Android one?
> >
> > Suggestions? : )
> >
> > Adriano Crestani
> >
> > [1]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
> > [2]
> >
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/
> <
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
> >
> >
> >
> >
> >
> > On Mon, Mar 17, 2008 at 1:41 PM, Luciano Resende <lu...@gmail.com>
> > wrote:
> >
> > > I'd probably categorize the experiment we are doing now, as a learning
> > > experience to familiarize with the Mobile environment available in
> > > Google Android. For this, we have choosen to try running one of the
> > > simplest samples we had (calculator) in the Android JVM
> > > environment.... In the long run, the idea is to have a more
> > > light-weight "sca mobile core/runtime" available, similar to what we
> > > did for Web 2.0 (implementation-widget) and described by Mike below.
> > >
> > > But it's indeed good to discuss these items with the community, would
> > > be also good to have the community contributing requirements/scenarios
> > > for a Tuscany mobile story. And we are all open and welcoming any
> > > help.
> > >
> > >
> > > On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
> > > <mi...@gmail.com> wrote:
> > > > Brandon Werner wrote:
> > > >  > Can you explain the benefit of moving SCA/SDO over to the Android
> > > platform?
> > > >  > I can understand wanting to have the ability to consume simple
> XML
> > > services
> > > >  > and perhaps consume disconnected datagraphs, but I don't
> understand
> > > why the
> > > >  > world wouldn't want a more light-weight way of doing that than
> > > ripping out
> > > >  > something that was meant for the JEE / JSE.
> > > >  >
> > > >  > <snip>
> > > >  Brandon,
> > > >
> > > >  So you think that a device using the Andriod platform is likely to
> > > want
> > > >  to use services and a service-oriented approach to building
> > > >  applications.  But you think that SCA is too "heavyweight"?  Is
> that
> > > >  simply a question of the size of the code involved (I note that the
> > > core
> > > >  of Tuscany is quite small) or is the SCA approach too "heavyweight"
> > > in
> > > >  some other sense?
> > > >
> > > >  I wonder if you've taken a look a the implementation.widget
> > > exemplified
> > > >  in the Tutorial demo code?  This applies SCA principles to AJAX
> > > widgets
> > > >  running in the browser - simplifying the connectivity a great deal
> > > (in
> > > >  my opinion) and yet adding little overhead.
> > > >
> > > >  In the longer run, we may want to look to do something similar for
> > > the
> > > >  Android platforms, perhaps with Java rather than the more limited
> > > >  JavaScript components.  Starting with the current SCA package seems
> > > >  reasonable to me - once we have experience with how that works, we
> > > will
> > > >  have a better idea what needs to be changed and tailored for the
> > > Android
> > > >  platform.
> > > >
> > > >
> > > >  Yours,  Mike.
> > > >
> > > >
> > > >
> > > >
>  ---------------------------------------------------------------------
> > > >  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > > >  For additional commands, e-mail: tuscany-user-help@ws.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Luciano Resende
> > > Apache Tuscany Committer
> > > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> <http://people.apache.org/%7Elresende>
> > > http://lresende.blogspot.com/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> > >
> > >
> >
>

Hi Adriano

It sounds like you understand the problem in a lot more detail now even if
it's not working yet ;-) Here's the page that tells you about which licenses
are acceptable and what action to take.

http://people.apache.org/~rubys/3party.html

Regards

Simon

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Hi,

I will try to summarize the modifications I've done on SCA to run on Android
so far.

As I aforementioned, most dynamic instantiations were being done on
host-embedded module. However, there was another modules which were also
using the dynamic instantiation and I had to modify too. For example, the
extensibility module, where I had to add the string lines directly on the
code as they couldn't be read from the file.

OK, so far so good.

But I have found another limitations. But before to explain it, let me
explain how android deals with the app resources:

On the android app project, there is a folder called res, which can only
contain certain folders: xml, raw, strings, etc (I don´t remember the other,
but they are predefined). And these folders can only contain files that are
named only with letters, digits and the '_' character.

Yes, the resource structure is very limited, but there is a reason. Each
file is packed and compressed into a single file, then when the android app
is compiled it auto generates a class named R, which has static subclasses
named with the name of each folder contained on the res folder. Each
subclass has static int fields that points to the beginning of each file in
the compressed file.

Example: res/raw/filename is converted to R.raw.filename

So, as each int field has the name of each file, the file names should only
be composed of those characters described above. Then, no ".xml",
".composite", ".xsd" is supported, as they all contains the '.' character on
their names.

Each folder name describes how the android converter will compress the files
contained in it, for example, the files contained in the "xml" folder are
compressed to a special binary xml format and etc. The only folder that do
not have the files compressed is the "raw" folder.

Every running app on Android is called context, which is an instance of a
class that extends the Context class. In the same package this class is
defined, the R class is also defined.

To access the files that are pointed by the R class, the context instance is
needed: contextInstance.getRescources().openRawResource(R.raw.filename)

SCA works with resources practically only using the  URI/URL. However, there
is no way to access this resources using an URL object, because there is no
defined protocol to access this files.

Trying to get the calculator sample running on Android, I placed the
calculator.composite file in the raw folder. I had also to remove the '.'
character  from the file name, so I renamed it to "calculator_composite".

So, to access the files pointed by the R class, I "implemented" a new
protocol, called "dex" (how the Android app file is called, equivalent to
Java jar files ). The dex protocol is defined as:

dex://<context_package>/<resource_folder>/<file_name>

<context_package> = package where the app context and R class are located
<resource_folder> = folder where the file is located
<file_name> = the file name

Valid example1: dex://calculator.android/raw/calculator.composite
Valid example2: dex://calculator.android/raw/
Valid example3: dex://calculator.android/

PS: the implemented protocol replaces the last '.' character when trying to
access the file...the '.' character is accepted, though the SCA Android
version would be compatible with the SCA Java version that searches for
files which ends with ".composite" and not with "_composite"

I implemented some classes to support this protocol, they are located at
[1]:

DexURLStreamHandlerFactory.java<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandlerFactory.java>:
the instance of this class is set as the app URLStreamHandlerFactory when
the SCADomain is loaded. This class creates the DEXURLStreamHandler and
allows the dex protocol to be a valid protocol.

DexURLStreamHandler.java<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLStreamHandler.java>:
Create a DEXURLConnection from a dex URL object.

DexURLConnection.java<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexURLConnection.java>:
Provides the access to a file described on the dex URL.

DexResource.java<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/DexResource.java>:
Provides some util methods for dex resources. For example, from a dex URL,
which describes a folder,  it is possible to retrieve all the files in this
folder.

ContextRegistry.java<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/ContextRegistry.java>:
as a context reference is needed to access the resources, when invoking
SCADomain.newInstance(Context, String), the SCADomain register the Context
object in the ContextRegistry and unregister when the SCADomain.close() is
involked. This way, when URLConnection tries to access the file stream, it
uses the context object registered in the ContextRegistry. Each context is
registered in a map by its package name.

With the dex protocol implemented, I could access the "calculator.composite"
file in my app resource: SCADomain.newInstance(contextReference,
"dex://calculator.android/raw/calculator.composite")

I was getting another exceptions when the SCA tries to access the STAX
classes. It was happening because the Android SDK do not include some
standard java classes. So, as the missing classes were not so complex
classes, I copied them from JDK source to [2]. This classes have CDDL
license, does anybody know if it is compatible with ASL license?

=================================

Getting it "running"

It is not really running(I will explain below), but I will describe how to
config the eclipse workspace to work with the code I have uploaded on [3].

1- download the modified code from [3] and install them

2- download the SCA modules from [4]. I'm working with an old revision, the
643746, I recommend to checkout this revision too, I haven´t tested the
modified code with earlier revisions.

3- on the folder you download the SCA modules, run:

mvn clean install -Dtest=no
mvn -Peclipse eclipse:eclipse -Dtest=no

4- download the Android SDK and the eclipse plugin at [5]

5- open the eclipse and create a new workspace, do not forget to set the
M2_REPO variable on it.

6- import the projects included in the files you've download from [3]

7- import the SCA module projects (exclude the saxon module)

8- There should be a lot of errors some modules, include the Android library
on them, it should fix the problem

If everything goes fine (and if I have described everything correctly), when
you run the calculator-android project as an "Android application" you
should get an exception, that was generated initially by a NPE thrown by
org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAServiceBindingProvider
constructor. This is caused because the latest Android SDK does not support
the Reflection API yet. So, the SCA cannot check the @Reference annotations
(I commented the code which tries to read the annotations, so when the
execution reach this constructor it throws the NPE). However, the Android
developers say the next SDK release will support the Reflection api, they do
not tell when it will be released, they just say it will be soon :S

This is the summarize what I have done on running SCA on Android so far.
Suggestions/contributions will be appreciated : )

I expect I have explained everything correctly. Sorry for my bad english,
I'm almost sleeping on the keyboard :o

Any questions/doubts about what I have written here, just let know ; )

Kind Regards,
Adriano Crestani

[1]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/org/apache/tuscany/sca/android/
[2]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/
[3] https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/android-jdk-classes/src/javax/xml/>
[4] https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules
[5] http://code.google.com/android/download_list.html

On Thu, Mar 20, 2008 at 9:43 PM, Adriano Crestani <
adrianocrestani@apache.org> wrote:

> I have started to change the SCA code.
>
> Initially, the objects instantiated dynamically were not being
> instantiated, because info about which class to instantiate is extract from
> some text files contained in SCA modules' jars. Unfortunately, when Android
> converter converts the SCA modules' jars to .dex files, it ignores the
> non-class files, and they are not included. It happens because Android has a
> very specific way to store the app resources, which is completely different
> from Java.
>
> Though, as Luciano suggested, I started to modify these dynamic
> instantiation for static. It's working for now : ). All these modifications
> were made only on host-embedded module code, which I have copied into [1]
> and renamed to host-android.
>
> Also, one of those static instantiated classes was trying to access the
> javax.naming.InitialContext in its constructor, but it's not supported by
> Android and I commented the code. As this class belonged to SCA core module,
> I also copied this module into the mobile-android sandbox and renamed the
> module to core-android.
>
> So, all the modifications made so far are in the [2].
>
> Now, as I was expecting, I got some ClassNotFoundExceptions on SCA code
> when it tries to use the Java XML API. It happens because Android implements
> only a small part of this API. So, next step is try to adapt the SCA XML
> access into Android way to access XML. Does anybody know some other XML API
> that is javax.xml independent I could use instead of Android one?
>
> Suggestions? : )
>
> Adriano Crestani
>
> [1]
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
> [2]
> https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/>
>
>
>
>
> On Mon, Mar 17, 2008 at 1:41 PM, Luciano Resende <lu...@gmail.com>
> wrote:
>
> > I'd probably categorize the experiment we are doing now, as a learning
> > experience to familiarize with the Mobile environment available in
> > Google Android. For this, we have choosen to try running one of the
> > simplest samples we had (calculator) in the Android JVM
> > environment.... In the long run, the idea is to have a more
> > light-weight "sca mobile core/runtime" available, similar to what we
> > did for Web 2.0 (implementation-widget) and described by Mike below.
> >
> > But it's indeed good to discuss these items with the community, would
> > be also good to have the community contributing requirements/scenarios
> > for a Tuscany mobile story. And we are all open and welcoming any
> > help.
> >
> >
> > On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
> > <mi...@gmail.com> wrote:
> > > Brandon Werner wrote:
> > >  > Can you explain the benefit of moving SCA/SDO over to the Android
> > platform?
> > >  > I can understand wanting to have the ability to consume simple XML
> > services
> > >  > and perhaps consume disconnected datagraphs, but I don't understand
> > why the
> > >  > world wouldn't want a more light-weight way of doing that than
> > ripping out
> > >  > something that was meant for the JEE / JSE.
> > >  >
> > >  > <snip>
> > >  Brandon,
> > >
> > >  So you think that a device using the Andriod platform is likely to
> > want
> > >  to use services and a service-oriented approach to building
> > >  applications.  But you think that SCA is too "heavyweight"?  Is that
> > >  simply a question of the size of the code involved (I note that the
> > core
> > >  of Tuscany is quite small) or is the SCA approach too "heavyweight"
> > in
> > >  some other sense?
> > >
> > >  I wonder if you've taken a look a the implementation.widget
> > exemplified
> > >  in the Tutorial demo code?  This applies SCA principles to AJAX
> > widgets
> > >  running in the browser - simplifying the connectivity a great deal
> > (in
> > >  my opinion) and yet adding little overhead.
> > >
> > >  In the longer run, we may want to look to do something similar for
> > the
> > >  Android platforms, perhaps with Java rather than the more limited
> > >  JavaScript components.  Starting with the current SCA package seems
> > >  reasonable to me - once we have experience with how that works, we
> > will
> > >  have a better idea what needs to be changed and tailored for the
> > Android
> > >  platform.
> > >
> > >
> > >  Yours,  Mike.
> > >
> > >
> > >
> > >  ---------------------------------------------------------------------
> > >  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> > >  For additional commands, e-mail: tuscany-user-help@ws.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Luciano Resende
> > Apache Tuscany Committer
> > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende>
> > http://lresende.blogspot.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >
> >
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
I have started to change the SCA code.

Initially, the objects instantiated dynamically were not being instantiated,
because info about which class to instantiate is extract from some text
files contained in SCA modules' jars. Unfortunately, when Android converter
converts the SCA modules' jars to .dex files, it ignores the non-class
files, and they are not included. It happens because Android has a very
specific way to store the app resources, which is completely different from
Java.

Though, as Luciano suggested, I started to modify these dynamic
instantiation for static. It's working for now : ). All these modifications
were made only on host-embedded module code, which I have copied into [1]
and renamed to host-android.

Also, one of those static instantiated classes was trying to access the
javax.naming.InitialContext in its constructor, but it's not supported by
Android and I commented the code. As this class belonged to SCA core module,
I also copied this module into the mobile-android sandbox and renamed the
module to core-android.

So, all the modifications made so far are in the [2].

Now, as I was expecting, I got some ClassNotFoundExceptions on SCA code when
it tries to use the Java XML API. It happens because Android implements only
a small part of this API. So, next step is try to adapt the SCA XML access
into Android way to access XML. Does anybody know some other XML API that is
javax.xml independent I could use instead of Android one?

Suggestions? : )

Adriano Crestani

[1]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
[2]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/>



On Mon, Mar 17, 2008 at 1:41 PM, Luciano Resende <lu...@gmail.com>
wrote:

> I'd probably categorize the experiment we are doing now, as a learning
> experience to familiarize with the Mobile environment available in
> Google Android. For this, we have choosen to try running one of the
> simplest samples we had (calculator) in the Android JVM
> environment.... In the long run, the idea is to have a more
> light-weight "sca mobile core/runtime" available, similar to what we
> did for Web 2.0 (implementation-widget) and described by Mike below.
>
> But it's indeed good to discuss these items with the community, would
> be also good to have the community contributing requirements/scenarios
> for a Tuscany mobile story. And we are all open and welcoming any
> help.
>
>
> On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
> <mi...@gmail.com> wrote:
> > Brandon Werner wrote:
> >  > Can you explain the benefit of moving SCA/SDO over to the Android
> platform?
> >  > I can understand wanting to have the ability to consume simple XML
> services
> >  > and perhaps consume disconnected datagraphs, but I don't understand
> why the
> >  > world wouldn't want a more light-weight way of doing that than
> ripping out
> >  > something that was meant for the JEE / JSE.
> >  >
> >  > <snip>
> >  Brandon,
> >
> >  So you think that a device using the Andriod platform is likely to want
> >  to use services and a service-oriented approach to building
> >  applications.  But you think that SCA is too "heavyweight"?  Is that
> >  simply a question of the size of the code involved (I note that the
> core
> >  of Tuscany is quite small) or is the SCA approach too "heavyweight" in
> >  some other sense?
> >
> >  I wonder if you've taken a look a the implementation.widget exemplified
> >  in the Tutorial demo code?  This applies SCA principles to AJAX widgets
> >  running in the browser - simplifying the connectivity a great deal (in
> >  my opinion) and yet adding little overhead.
> >
> >  In the longer run, we may want to look to do something similar for the
> >  Android platforms, perhaps with Java rather than the more limited
> >  JavaScript components.  Starting with the current SCA package seems
> >  reasonable to me - once we have experience with how that works, we will
> >  have a better idea what needs to be changed and tailored for the
> Android
> >  platform.
> >
> >
> >  Yours,  Mike.
> >
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> >  For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
I have started to change the SCA code.

Initially, the objects instantiated dynamically were not being instantiated,
because info about which class to instantiate is extract from some text
files contained in SCA modules' jars. Unfortunately, when Android converter
converts the SCA modules' jars to .dex files, it ignores the non-class
files, and they are not included. It happens because Android has a very
specific way to store the app resources, which is completely different from
Java.

Though, as Luciano suggested, I started to modify these dynamic
instantiation for static. It's working for now : ). All these modifications
were made only on host-embedded module code, which I have copied into [1]
and renamed to host-android.

Also, one of those static instantiated classes was trying to access the
javax.naming.InitialContext in its constructor, but it's not supported by
Android and I commented the code. As this class belonged to SCA core module,
I also copied this module into the mobile-android sandbox and renamed the
module to core-android.

So, all the modifications made so far are in the [2].

Now, as I was expecting, I got some ClassNotFoundExceptions on SCA code when
it tries to use the Java XML API. It happens because Android implements only
a small part of this API. So, next step is try to adapt the SCA XML access
into Android way to access XML. Does anybody know some other XML API that is
javax.xml independent I could use instead of Android one?

Suggestions? : )

Adriano Crestani

[1]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/
[2]
https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/<https://svn.apache.org/repos/asf/incubator/tuscany/sandbox/mobile-android/host-android/>



On Mon, Mar 17, 2008 at 1:41 PM, Luciano Resende <lu...@gmail.com>
wrote:

> I'd probably categorize the experiment we are doing now, as a learning
> experience to familiarize with the Mobile environment available in
> Google Android. For this, we have choosen to try running one of the
> simplest samples we had (calculator) in the Android JVM
> environment.... In the long run, the idea is to have a more
> light-weight "sca mobile core/runtime" available, similar to what we
> did for Web 2.0 (implementation-widget) and described by Mike below.
>
> But it's indeed good to discuss these items with the community, would
> be also good to have the community contributing requirements/scenarios
> for a Tuscany mobile story. And we are all open and welcoming any
> help.
>
>
> On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
> <mi...@gmail.com> wrote:
> > Brandon Werner wrote:
> >  > Can you explain the benefit of moving SCA/SDO over to the Android
> platform?
> >  > I can understand wanting to have the ability to consume simple XML
> services
> >  > and perhaps consume disconnected datagraphs, but I don't understand
> why the
> >  > world wouldn't want a more light-weight way of doing that than
> ripping out
> >  > something that was meant for the JEE / JSE.
> >  >
> >  > <snip>
> >  Brandon,
> >
> >  So you think that a device using the Andriod platform is likely to want
> >  to use services and a service-oriented approach to building
> >  applications.  But you think that SCA is too "heavyweight"?  Is that
> >  simply a question of the size of the code involved (I note that the
> core
> >  of Tuscany is quite small) or is the SCA approach too "heavyweight" in
> >  some other sense?
> >
> >  I wonder if you've taken a look a the implementation.widget exemplified
> >  in the Tutorial demo code?  This applies SCA principles to AJAX widgets
> >  running in the browser - simplifying the connectivity a great deal (in
> >  my opinion) and yet adding little overhead.
> >
> >  In the longer run, we may want to look to do something similar for the
> >  Android platforms, perhaps with Java rather than the more limited
> >  JavaScript components.  Starting with the current SCA package seems
> >  reasonable to me - once we have experience with how that works, we will
> >  have a better idea what needs to be changed and tailored for the
> Android
> >  platform.
> >
> >
> >  Yours,  Mike.
> >
> >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> >  For additional commands, e-mail: tuscany-user-help@ws.apache.org
> >
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
I'd probably categorize the experiment we are doing now, as a learning
experience to familiarize with the Mobile environment available in
Google Android. For this, we have choosen to try running one of the
simplest samples we had (calculator) in the Android JVM
environment.... In the long run, the idea is to have a more
light-weight "sca mobile core/runtime" available, similar to what we
did for Web 2.0 (implementation-widget) and described by Mike below.

But it's indeed good to discuss these items with the community, would
be also good to have the community contributing requirements/scenarios
for a Tuscany mobile story. And we are all open and welcoming any
help.


On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
<mi...@gmail.com> wrote:
> Brandon Werner wrote:
>  > Can you explain the benefit of moving SCA/SDO over to the Android platform?
>  > I can understand wanting to have the ability to consume simple XML services
>  > and perhaps consume disconnected datagraphs, but I don't understand why the
>  > world wouldn't want a more light-weight way of doing that than ripping out
>  > something that was meant for the JEE / JSE.
>  >
>  > <snip>
>  Brandon,
>
>  So you think that a device using the Andriod platform is likely to want
>  to use services and a service-oriented approach to building
>  applications.  But you think that SCA is too "heavyweight"?  Is that
>  simply a question of the size of the code involved (I note that the core
>  of Tuscany is quite small) or is the SCA approach too "heavyweight" in
>  some other sense?
>
>  I wonder if you've taken a look a the implementation.widget exemplified
>  in the Tutorial demo code?  This applies SCA principles to AJAX widgets
>  running in the browser - simplifying the connectivity a great deal (in
>  my opinion) and yet adding little overhead.
>
>  In the longer run, we may want to look to do something similar for the
>  Android platforms, perhaps with Java rather than the more limited
>  JavaScript components.  Starting with the current SCA package seems
>  reasonable to me - once we have experience with how that works, we will
>  have a better idea what needs to be changed and tailored for the Android
>  platform.
>
>
>  Yours,  Mike.
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
I'd probably categorize the experiment we are doing now, as a learning
experience to familiarize with the Mobile environment available in
Google Android. For this, we have choosen to try running one of the
simplest samples we had (calculator) in the Android JVM
environment.... In the long run, the idea is to have a more
light-weight "sca mobile core/runtime" available, similar to what we
did for Web 2.0 (implementation-widget) and described by Mike below.

But it's indeed good to discuss these items with the community, would
be also good to have the community contributing requirements/scenarios
for a Tuscany mobile story. And we are all open and welcoming any
help.


On Mon, Mar 17, 2008 at 8:22 AM, Mike Edwards
<mi...@gmail.com> wrote:
> Brandon Werner wrote:
>  > Can you explain the benefit of moving SCA/SDO over to the Android platform?
>  > I can understand wanting to have the ability to consume simple XML services
>  > and perhaps consume disconnected datagraphs, but I don't understand why the
>  > world wouldn't want a more light-weight way of doing that than ripping out
>  > something that was meant for the JEE / JSE.
>  >
>  > <snip>
>  Brandon,
>
>  So you think that a device using the Andriod platform is likely to want
>  to use services and a service-oriented approach to building
>  applications.  But you think that SCA is too "heavyweight"?  Is that
>  simply a question of the size of the code involved (I note that the core
>  of Tuscany is quite small) or is the SCA approach too "heavyweight" in
>  some other sense?
>
>  I wonder if you've taken a look a the implementation.widget exemplified
>  in the Tutorial demo code?  This applies SCA principles to AJAX widgets
>  running in the browser - simplifying the connectivity a great deal (in
>  my opinion) and yet adding little overhead.
>
>  In the longer run, we may want to look to do something similar for the
>  Android platforms, perhaps with Java rather than the more limited
>  JavaScript components.  Starting with the current SCA package seems
>  reasonable to me - once we have experience with how that works, we will
>  have a better idea what needs to be changed and tailored for the Android
>  platform.
>
>
>  Yours,  Mike.
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
>  For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Mike Edwards <mi...@gmail.com>.
Brandon Werner wrote:
> Can you explain the benefit of moving SCA/SDO over to the Android platform?
> I can understand wanting to have the ability to consume simple XML services
> and perhaps consume disconnected datagraphs, but I don't understand why the
> world wouldn't want a more light-weight way of doing that than ripping out
> something that was meant for the JEE / JSE.
>
> <snip>
Brandon,

So you think that a device using the Andriod platform is likely to want 
to use services and a service-oriented approach to building 
applications.  But you think that SCA is too "heavyweight"?  Is that 
simply a question of the size of the code involved (I note that the core 
of Tuscany is quite small) or is the SCA approach too "heavyweight" in 
some other sense?

I wonder if you've taken a look a the implementation.widget exemplified 
in the Tutorial demo code?  This applies SCA principles to AJAX widgets 
running in the browser - simplifying the connectivity a great deal (in 
my opinion) and yet adding little overhead.

In the longer run, we may want to look to do something similar for the 
Android platforms, perhaps with Java rather than the more limited 
JavaScript components.  Starting with the current SCA package seems 
reasonable to me - once we have experience with how that works, we will 
have a better idea what needs to be changed and tailored for the Android 
platform.


Yours,  Mike.

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Brandon Werner <br...@brandonwerner.com>.
Can you explain the benefit of moving SCA/SDO over to the Android platform?
I can understand wanting to have the ability to consume simple XML services
and perhaps consume disconnected datagraphs, but I don't understand why the
world wouldn't want a more light-weight way of doing that than ripping out
something that was meant for the JEE / JSE.

On Sat, Mar 15, 2008 at 9:44 AM, Luciano Resende <lu...@gmail.com>
wrote:

> So, when I said branch, I probably should have said a sandbox. I think
> we could start with a host-android module where I'd like to experiment
> with changing the way we dynamically find extensions and see how
> further we can go on executing calculator in the Android environment.
>
> Thoughts ?
>
> On Sat, Mar 15, 2008 at 2:30 AM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Good idea Luciano : )
> >
> >  What we should copy to this branch? SCA modules and calculator sample?
> I
> >  think it's enough to start experiment SCA on Android
> >
> >  I sent a msg to Android Developers list, lets wait for the response : )
> >
> >  Regards,
> >  Adriano Crestani
> >
> >  On Fri, Mar 14, 2008 at 7:11 PM, Luciano Resende <lu...@gmail.com>
> >  wrote:
> >
> >
> >
> >  > Good summary Adriano, I haven't had success yet trying to run
> >  > Calculator sample application on the Android environment. Below are
> >  > some issues I noted
> >  >
> >  > - Looks like our calculator sample dependency has grown out of
> >  > control, and is now  requiring node, databinding, axiom, etc
> >  > - The service locator pattern we use for our extension mechanism is
> >  > not working correct in Android environment causing various NPE
> >  > - etc
> >  >
> >  > What do you think if create a branch to experiment and try to work on
> >  > these issues together ?
> >  >
> >  >
> >  > On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
> >  > <ad...@apache.org> wrote:
> >  > > Hi,
> >  > >
> >  > >  Luciano and me have been trying to run the SCA calculator sample
> on the
> >  > >  Google Android platform, that is a platform for mobile devices. As
> the
> >  > >  Android platform apps are written in Java language, we tried to
> run the
> >  > Java
> >  > >  SCA calculator sample on it.
> >  > >
> >  > >  Although the apps for Android are coded in Java, it's only coded
> in
> >  > Java
> >  > >  language. When it's compiled, it generates not .class files, but a
> file
> >  > >  called .dex, that is equivalent to .jar files. The .dex files are
> not
> >  > >  compound of Java standard bytecode, but a special bytecode that is
> >  > intended
> >  > >  to run only on Android VM: Dalvik.
> >  > >
> >  > >  So, in our first try to compile the calculator sample, only
> importing
> >  > the
> >  > >  needed SCA jars were not successful, because the SCA jars are
> compiled
> >  > using
> >  > >  JDK compiler and do not have the Android special bytecode format.
> >  > >
> >  > >  Fortunately, when you import the SCA jars into an eclipse Android
> >  > project,
> >  > >  it automatically tries to convert the JDK bytecode to Android
> bytecode
> >  > >  before execute it. But something was not going correctly yet,
> cause
> >  > when it
> >  > >  tries to execute the service I get this exception:
> >  > >
> >  > >  Application Error: com.android.hello An error in com.android.hello
> .
> >  > Unnable
> >  > >  to start activity
> >  > >  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
> >  > >  org.osoa.sca.ServiceRuntimeException:
> java.lang.NullPointerException.
> >  > >
> >  > >  I wasn't sure about what was happening, and then I tried another
> >  > approach:
> >  > >  not import the SCA jars, but place the SCA source code needed by
> the
> >  > >  calculator sample into the Android app src folder. This way the
> SCA
> >  > would be
> >  > >  compiled directly to Android bytecode.
> >  > >
> >  > >  Unfortunately, the Android is not Java and does not have the
> entire set
> >  > of
> >  > >  classes that J2SE provides. It provides only some java classes as
> >  > java.langand
> >  > >  java.util classes which Android developers kept with the same
> >  > package/class
> >  > >  names and method signature for easy portability of Java app codes.
> So,
> >  > the
> >  > >  common Java classes used on Java SCA were compatible. But, the
> Java SCA
> >  > uses
> >  > >  a lot the javax.xml package and Android implements only part of
> this
> >  > package
> >  > >  on its platform, so I was getting a lot of errors because the
> missing
> >  > >  classes that should be contained in this package. I solved it
> >  > downloading
> >  > >  the StAX source code and JDK javax.xml API source code, and
> placing it
> >  > >  directly on my Android app project. Finally I got it compiled.
> >  > >
> >  > >  Then, I got another error. I found out that the Android compiler
> fist
> >  > >  compile the Java code to .class files and then compile the .class
> files
> >  > to a
> >  > >  .dex file. The first process everything goes fine, meaning the
> package
> >  > >  dependencies and code syntax are OK. But on the second process,
> when it
> >  > >  tries convert the .class files to .dex, I get 4 warnings and 1
> error
> >  > that
> >  > >  are lightly described:
> >  > >
> >  > >  *[2008-03-14 14:25:27 - HelloAndroid]
> >  > >  trouble processing:
> >  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation
> attribute
> >  > >  ...while parsing RuntimeVisibleAnnotations attribute at offset
> 00000175
> >  > >  ...while parsing attributes[1]
> >  > >  ...while parsing javax/xml/bind/annotation/XmlNs.class
> >  > >  ...while processing javax/xml/bind/annotation/XmlNs.class
> >  > >  [2008-03-14 14:25:27 - HelloAndroid]
> >  > >  trouble processing:
> >  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation
> attribute
> >  > >  ...while parsing AnnotationDefault attribute at offset 000002b8
> >  > >  ...while parsing attributes[0]
> >  > >  ...while parsing methods[0]
> >  > >  ...while parsing javax/xml/bind/annotation/XmlSchema.class
> >  > >  ...while processing javax/xml/bind/annotation/XmlSchema.class
> >  > >  [2008-03-14 14:25:28 - HelloAndroid]
> >  > >  trouble processing:
> >  > >  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation
> attribute
> >  > >  ...while parsing AnnotationDefault attribute at offset 00000204
> >  > >  ...while parsing attributes[0]
> >  > >  ...while parsing methods[2]
> >  > >  ...while parsing javax/xml/ws/Action.class
> >  > >  ...while processing javax/xml/ws/Action.class
> >  > >  [2008-03-14 14:25:29 - HelloAndroid]
> >  > >  trouble processing:
> >  > >  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation
> attribute
> >  > >  ...while parsing AnnotationDefault attribute at offset 0000020b
> >  > >  ...while parsing attributes[1]
> >  > >  ...while parsing methods[0]
> >  > >  ...while parsing org/osoa/sca/annotations/Service.class
> >  > >  ...while processing org/osoa/sca/annotations/Service.class
> >  > >  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
> >  > >  [2008-03-14 14:25:30 - HelloAndroid]
> >  > >  trouble writing output: not found
> >  > >  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format
> failed
> >  > with
> >  > >  error 2
> >  > >
> >  > >  *
> >  > >  So, I got nothing running so far : ( . Is there anyone with some
> >  > Android
> >  > >  knowledge that could help us with it?
> >  > >
> >  > >  I will probably send this doubts to Android community and see if
> they
> >  > can
> >  > >  help us : )
> >  > >
> >  > >  Thanks in advance ; )
> >  > >
> >  > >  Adriano Crestani
> >  > >
> >  >
> >  >
> >  >
> >  > --
> >  > Luciano Resende
> >  > Apache Tuscany Committer
> >  > http://people.apache.org/~lresende<http://people.apache.org/%7Elresende><
> http://people.apache.org/%7Elresende>
> >  > http://lresende.blogspot.com/
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> >  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> >  >
> >  >
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-user-help@ws.apache.org
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
So, when I said branch, I probably should have said a sandbox. I think
we could start with a host-android module where I'd like to experiment
with changing the way we dynamically find extensions and see how
further we can go on executing calculator in the Android environment.

Thoughts ?

On Sat, Mar 15, 2008 at 2:30 AM, Adriano Crestani
<ad...@apache.org> wrote:
> Good idea Luciano : )
>
>  What we should copy to this branch? SCA modules and calculator sample? I
>  think it's enough to start experiment SCA on Android
>
>  I sent a msg to Android Developers list, lets wait for the response : )
>
>  Regards,
>  Adriano Crestani
>
>  On Fri, Mar 14, 2008 at 7:11 PM, Luciano Resende <lu...@gmail.com>
>  wrote:
>
>
>
>  > Good summary Adriano, I haven't had success yet trying to run
>  > Calculator sample application on the Android environment. Below are
>  > some issues I noted
>  >
>  > - Looks like our calculator sample dependency has grown out of
>  > control, and is now  requiring node, databinding, axiom, etc
>  > - The service locator pattern we use for our extension mechanism is
>  > not working correct in Android environment causing various NPE
>  > - etc
>  >
>  > What do you think if create a branch to experiment and try to work on
>  > these issues together ?
>  >
>  >
>  > On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
>  > <ad...@apache.org> wrote:
>  > > Hi,
>  > >
>  > >  Luciano and me have been trying to run the SCA calculator sample on the
>  > >  Google Android platform, that is a platform for mobile devices. As the
>  > >  Android platform apps are written in Java language, we tried to run the
>  > Java
>  > >  SCA calculator sample on it.
>  > >
>  > >  Although the apps for Android are coded in Java, it's only coded in
>  > Java
>  > >  language. When it's compiled, it generates not .class files, but a file
>  > >  called .dex, that is equivalent to .jar files. The .dex files are not
>  > >  compound of Java standard bytecode, but a special bytecode that is
>  > intended
>  > >  to run only on Android VM: Dalvik.
>  > >
>  > >  So, in our first try to compile the calculator sample, only importing
>  > the
>  > >  needed SCA jars were not successful, because the SCA jars are compiled
>  > using
>  > >  JDK compiler and do not have the Android special bytecode format.
>  > >
>  > >  Fortunately, when you import the SCA jars into an eclipse Android
>  > project,
>  > >  it automatically tries to convert the JDK bytecode to Android bytecode
>  > >  before execute it. But something was not going correctly yet, cause
>  > when it
>  > >  tries to execute the service I get this exception:
>  > >
>  > >  Application Error: com.android.hello An error in com.android.hello.
>  > Unnable
>  > >  to start activity
>  > >  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
>  > >  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
>  > >
>  > >  I wasn't sure about what was happening, and then I tried another
>  > approach:
>  > >  not import the SCA jars, but place the SCA source code needed by the
>  > >  calculator sample into the Android app src folder. This way the SCA
>  > would be
>  > >  compiled directly to Android bytecode.
>  > >
>  > >  Unfortunately, the Android is not Java and does not have the entire set
>  > of
>  > >  classes that J2SE provides. It provides only some java classes as
>  > java.langand
>  > >  java.util classes which Android developers kept with the same
>  > package/class
>  > >  names and method signature for easy portability of Java app codes. So,
>  > the
>  > >  common Java classes used on Java SCA were compatible. But, the Java SCA
>  > uses
>  > >  a lot the javax.xml package and Android implements only part of this
>  > package
>  > >  on its platform, so I was getting a lot of errors because the missing
>  > >  classes that should be contained in this package. I solved it
>  > downloading
>  > >  the StAX source code and JDK javax.xml API source code, and placing it
>  > >  directly on my Android app project. Finally I got it compiled.
>  > >
>  > >  Then, I got another error. I found out that the Android compiler fist
>  > >  compile the Java code to .class files and then compile the .class files
>  > to a
>  > >  .dex file. The first process everything goes fine, meaning the package
>  > >  dependencies and code syntax are OK. But on the second process, when it
>  > >  tries convert the .class files to .dex, I get 4 warnings and 1 error
>  > that
>  > >  are lightly described:
>  > >
>  > >  *[2008-03-14 14:25:27 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
>  > >  ...while parsing attributes[1]
>  > >  ...while parsing javax/xml/bind/annotation/XmlNs.class
>  > >  ...while processing javax/xml/bind/annotation/XmlNs.class
>  > >  [2008-03-14 14:25:27 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 000002b8
>  > >  ...while parsing attributes[0]
>  > >  ...while parsing methods[0]
>  > >  ...while parsing javax/xml/bind/annotation/XmlSchema.class
>  > >  ...while processing javax/xml/bind/annotation/XmlSchema.class
>  > >  [2008-03-14 14:25:28 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 00000204
>  > >  ...while parsing attributes[0]
>  > >  ...while parsing methods[2]
>  > >  ...while parsing javax/xml/ws/Action.class
>  > >  ...while processing javax/xml/ws/Action.class
>  > >  [2008-03-14 14:25:29 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 0000020b
>  > >  ...while parsing attributes[1]
>  > >  ...while parsing methods[0]
>  > >  ...while parsing org/osoa/sca/annotations/Service.class
>  > >  ...while processing org/osoa/sca/annotations/Service.class
>  > >  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
>  > >  [2008-03-14 14:25:30 - HelloAndroid]
>  > >  trouble writing output: not found
>  > >  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed
>  > with
>  > >  error 2
>  > >
>  > >  *
>  > >  So, I got nothing running so far : ( . Is there anyone with some
>  > Android
>  > >  knowledge that could help us with it?
>  > >
>  > >  I will probably send this doubts to Android community and see if they
>  > can
>  > >  help us : )
>  > >
>  > >  Thanks in advance ; )
>  > >
>  > >  Adriano Crestani
>  > >
>  >
>  >
>  >
>  > --
>  > Luciano Resende
>  > Apache Tuscany Committer
>  > http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>  > http://lresende.blogspot.com/
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  >
>  >
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
So, when I said branch, I probably should have said a sandbox. I think
we could start with a host-android module where I'd like to experiment
with changing the way we dynamically find extensions and see how
further we can go on executing calculator in the Android environment.

Thoughts ?

On Sat, Mar 15, 2008 at 2:30 AM, Adriano Crestani
<ad...@apache.org> wrote:
> Good idea Luciano : )
>
>  What we should copy to this branch? SCA modules and calculator sample? I
>  think it's enough to start experiment SCA on Android
>
>  I sent a msg to Android Developers list, lets wait for the response : )
>
>  Regards,
>  Adriano Crestani
>
>  On Fri, Mar 14, 2008 at 7:11 PM, Luciano Resende <lu...@gmail.com>
>  wrote:
>
>
>
>  > Good summary Adriano, I haven't had success yet trying to run
>  > Calculator sample application on the Android environment. Below are
>  > some issues I noted
>  >
>  > - Looks like our calculator sample dependency has grown out of
>  > control, and is now  requiring node, databinding, axiom, etc
>  > - The service locator pattern we use for our extension mechanism is
>  > not working correct in Android environment causing various NPE
>  > - etc
>  >
>  > What do you think if create a branch to experiment and try to work on
>  > these issues together ?
>  >
>  >
>  > On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
>  > <ad...@apache.org> wrote:
>  > > Hi,
>  > >
>  > >  Luciano and me have been trying to run the SCA calculator sample on the
>  > >  Google Android platform, that is a platform for mobile devices. As the
>  > >  Android platform apps are written in Java language, we tried to run the
>  > Java
>  > >  SCA calculator sample on it.
>  > >
>  > >  Although the apps for Android are coded in Java, it's only coded in
>  > Java
>  > >  language. When it's compiled, it generates not .class files, but a file
>  > >  called .dex, that is equivalent to .jar files. The .dex files are not
>  > >  compound of Java standard bytecode, but a special bytecode that is
>  > intended
>  > >  to run only on Android VM: Dalvik.
>  > >
>  > >  So, in our first try to compile the calculator sample, only importing
>  > the
>  > >  needed SCA jars were not successful, because the SCA jars are compiled
>  > using
>  > >  JDK compiler and do not have the Android special bytecode format.
>  > >
>  > >  Fortunately, when you import the SCA jars into an eclipse Android
>  > project,
>  > >  it automatically tries to convert the JDK bytecode to Android bytecode
>  > >  before execute it. But something was not going correctly yet, cause
>  > when it
>  > >  tries to execute the service I get this exception:
>  > >
>  > >  Application Error: com.android.hello An error in com.android.hello.
>  > Unnable
>  > >  to start activity
>  > >  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
>  > >  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
>  > >
>  > >  I wasn't sure about what was happening, and then I tried another
>  > approach:
>  > >  not import the SCA jars, but place the SCA source code needed by the
>  > >  calculator sample into the Android app src folder. This way the SCA
>  > would be
>  > >  compiled directly to Android bytecode.
>  > >
>  > >  Unfortunately, the Android is not Java and does not have the entire set
>  > of
>  > >  classes that J2SE provides. It provides only some java classes as
>  > java.langand
>  > >  java.util classes which Android developers kept with the same
>  > package/class
>  > >  names and method signature for easy portability of Java app codes. So,
>  > the
>  > >  common Java classes used on Java SCA were compatible. But, the Java SCA
>  > uses
>  > >  a lot the javax.xml package and Android implements only part of this
>  > package
>  > >  on its platform, so I was getting a lot of errors because the missing
>  > >  classes that should be contained in this package. I solved it
>  > downloading
>  > >  the StAX source code and JDK javax.xml API source code, and placing it
>  > >  directly on my Android app project. Finally I got it compiled.
>  > >
>  > >  Then, I got another error. I found out that the Android compiler fist
>  > >  compile the Java code to .class files and then compile the .class files
>  > to a
>  > >  .dex file. The first process everything goes fine, meaning the package
>  > >  dependencies and code syntax are OK. But on the second process, when it
>  > >  tries convert the .class files to .dex, I get 4 warnings and 1 error
>  > that
>  > >  are lightly described:
>  > >
>  > >  *[2008-03-14 14:25:27 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
>  > >  ...while parsing attributes[1]
>  > >  ...while parsing javax/xml/bind/annotation/XmlNs.class
>  > >  ...while processing javax/xml/bind/annotation/XmlNs.class
>  > >  [2008-03-14 14:25:27 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 000002b8
>  > >  ...while parsing attributes[0]
>  > >  ...while parsing methods[0]
>  > >  ...while parsing javax/xml/bind/annotation/XmlSchema.class
>  > >  ...while processing javax/xml/bind/annotation/XmlSchema.class
>  > >  [2008-03-14 14:25:28 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 00000204
>  > >  ...while parsing attributes[0]
>  > >  ...while parsing methods[2]
>  > >  ...while parsing javax/xml/ws/Action.class
>  > >  ...while processing javax/xml/ws/Action.class
>  > >  [2008-03-14 14:25:29 - HelloAndroid]
>  > >  trouble processing:
>  > >  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
>  > >  ...while parsing AnnotationDefault attribute at offset 0000020b
>  > >  ...while parsing attributes[1]
>  > >  ...while parsing methods[0]
>  > >  ...while parsing org/osoa/sca/annotations/Service.class
>  > >  ...while processing org/osoa/sca/annotations/Service.class
>  > >  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
>  > >  [2008-03-14 14:25:30 - HelloAndroid]
>  > >  trouble writing output: not found
>  > >  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed
>  > with
>  > >  error 2
>  > >
>  > >  *
>  > >  So, I got nothing running so far : ( . Is there anyone with some
>  > Android
>  > >  knowledge that could help us with it?
>  > >
>  > >  I will probably send this doubts to Android community and see if they
>  > can
>  > >  help us : )
>  > >
>  > >  Thanks in advance ; )
>  > >
>  > >  Adriano Crestani
>  > >
>  >
>  >
>  >
>  > --
>  > Luciano Resende
>  > Apache Tuscany Committer
>  > http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
>  > http://lresende.blogspot.com/
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
>  > For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>  >
>  >
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Good idea Luciano : )

What we should copy to this branch? SCA modules and calculator sample? I
think it's enough to start experiment SCA on Android

I sent a msg to Android Developers list, lets wait for the response : )

Regards,
Adriano Crestani

On Fri, Mar 14, 2008 at 7:11 PM, Luciano Resende <lu...@gmail.com>
wrote:

> Good summary Adriano, I haven't had success yet trying to run
> Calculator sample application on the Android environment. Below are
> some issues I noted
>
> - Looks like our calculator sample dependency has grown out of
> control, and is now  requiring node, databinding, axiom, etc
> - The service locator pattern we use for our extension mechanism is
> not working correct in Android environment causing various NPE
> - etc
>
> What do you think if create a branch to experiment and try to work on
> these issues together ?
>
>
> On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Hi,
> >
> >  Luciano and me have been trying to run the SCA calculator sample on the
> >  Google Android platform, that is a platform for mobile devices. As the
> >  Android platform apps are written in Java language, we tried to run the
> Java
> >  SCA calculator sample on it.
> >
> >  Although the apps for Android are coded in Java, it's only coded in
> Java
> >  language. When it's compiled, it generates not .class files, but a file
> >  called .dex, that is equivalent to .jar files. The .dex files are not
> >  compound of Java standard bytecode, but a special bytecode that is
> intended
> >  to run only on Android VM: Dalvik.
> >
> >  So, in our first try to compile the calculator sample, only importing
> the
> >  needed SCA jars were not successful, because the SCA jars are compiled
> using
> >  JDK compiler and do not have the Android special bytecode format.
> >
> >  Fortunately, when you import the SCA jars into an eclipse Android
> project,
> >  it automatically tries to convert the JDK bytecode to Android bytecode
> >  before execute it. But something was not going correctly yet, cause
> when it
> >  tries to execute the service I get this exception:
> >
> >  Application Error: com.android.hello An error in com.android.hello.
> Unnable
> >  to start activity
> >  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
> >  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
> >
> >  I wasn't sure about what was happening, and then I tried another
> approach:
> >  not import the SCA jars, but place the SCA source code needed by the
> >  calculator sample into the Android app src folder. This way the SCA
> would be
> >  compiled directly to Android bytecode.
> >
> >  Unfortunately, the Android is not Java and does not have the entire set
> of
> >  classes that J2SE provides. It provides only some java classes as
> java.langand
> >  java.util classes which Android developers kept with the same
> package/class
> >  names and method signature for easy portability of Java app codes. So,
> the
> >  common Java classes used on Java SCA were compatible. But, the Java SCA
> uses
> >  a lot the javax.xml package and Android implements only part of this
> package
> >  on its platform, so I was getting a lot of errors because the missing
> >  classes that should be contained in this package. I solved it
> downloading
> >  the StAX source code and JDK javax.xml API source code, and placing it
> >  directly on my Android app project. Finally I got it compiled.
> >
> >  Then, I got another error. I found out that the Android compiler fist
> >  compile the Java code to .class files and then compile the .class files
> to a
> >  .dex file. The first process everything goes fine, meaning the package
> >  dependencies and code syntax are OK. But on the second process, when it
> >  tries convert the .class files to .dex, I get 4 warnings and 1 error
> that
> >  are lightly described:
> >
> >  *[2008-03-14 14:25:27 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
> >  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
> >  ...while parsing attributes[1]
> >  ...while parsing javax/xml/bind/annotation/XmlNs.class
> >  ...while processing javax/xml/bind/annotation/XmlNs.class
> >  [2008-03-14 14:25:27 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 000002b8
> >  ...while parsing attributes[0]
> >  ...while parsing methods[0]
> >  ...while parsing javax/xml/bind/annotation/XmlSchema.class
> >  ...while processing javax/xml/bind/annotation/XmlSchema.class
> >  [2008-03-14 14:25:28 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 00000204
> >  ...while parsing attributes[0]
> >  ...while parsing methods[2]
> >  ...while parsing javax/xml/ws/Action.class
> >  ...while processing javax/xml/ws/Action.class
> >  [2008-03-14 14:25:29 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 0000020b
> >  ...while parsing attributes[1]
> >  ...while parsing methods[0]
> >  ...while parsing org/osoa/sca/annotations/Service.class
> >  ...while processing org/osoa/sca/annotations/Service.class
> >  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
> >  [2008-03-14 14:25:30 - HelloAndroid]
> >  trouble writing output: not found
> >  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed
> with
> >  error 2
> >
> >  *
> >  So, I got nothing running so far : ( . Is there anyone with some
> Android
> >  knowledge that could help us with it?
> >
> >  I will probably send this doubts to Android community and see if they
> can
> >  help us : )
> >
> >  Thanks in advance ; )
> >
> >  Adriano Crestani
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Adriano Crestani <ad...@apache.org>.
Good idea Luciano : )

What we should copy to this branch? SCA modules and calculator sample? I
think it's enough to start experiment SCA on Android

I sent a msg to Android Developers list, lets wait for the response : )

Regards,
Adriano Crestani

On Fri, Mar 14, 2008 at 7:11 PM, Luciano Resende <lu...@gmail.com>
wrote:

> Good summary Adriano, I haven't had success yet trying to run
> Calculator sample application on the Android environment. Below are
> some issues I noted
>
> - Looks like our calculator sample dependency has grown out of
> control, and is now  requiring node, databinding, axiom, etc
> - The service locator pattern we use for our extension mechanism is
> not working correct in Android environment causing various NPE
> - etc
>
> What do you think if create a branch to experiment and try to work on
> these issues together ?
>
>
> On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
> <ad...@apache.org> wrote:
> > Hi,
> >
> >  Luciano and me have been trying to run the SCA calculator sample on the
> >  Google Android platform, that is a platform for mobile devices. As the
> >  Android platform apps are written in Java language, we tried to run the
> Java
> >  SCA calculator sample on it.
> >
> >  Although the apps for Android are coded in Java, it's only coded in
> Java
> >  language. When it's compiled, it generates not .class files, but a file
> >  called .dex, that is equivalent to .jar files. The .dex files are not
> >  compound of Java standard bytecode, but a special bytecode that is
> intended
> >  to run only on Android VM: Dalvik.
> >
> >  So, in our first try to compile the calculator sample, only importing
> the
> >  needed SCA jars were not successful, because the SCA jars are compiled
> using
> >  JDK compiler and do not have the Android special bytecode format.
> >
> >  Fortunately, when you import the SCA jars into an eclipse Android
> project,
> >  it automatically tries to convert the JDK bytecode to Android bytecode
> >  before execute it. But something was not going correctly yet, cause
> when it
> >  tries to execute the service I get this exception:
> >
> >  Application Error: com.android.hello An error in com.android.hello.
> Unnable
> >  to start activity
> >  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
> >  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
> >
> >  I wasn't sure about what was happening, and then I tried another
> approach:
> >  not import the SCA jars, but place the SCA source code needed by the
> >  calculator sample into the Android app src folder. This way the SCA
> would be
> >  compiled directly to Android bytecode.
> >
> >  Unfortunately, the Android is not Java and does not have the entire set
> of
> >  classes that J2SE provides. It provides only some java classes as
> java.langand
> >  java.util classes which Android developers kept with the same
> package/class
> >  names and method signature for easy portability of Java app codes. So,
> the
> >  common Java classes used on Java SCA were compatible. But, the Java SCA
> uses
> >  a lot the javax.xml package and Android implements only part of this
> package
> >  on its platform, so I was getting a lot of errors because the missing
> >  classes that should be contained in this package. I solved it
> downloading
> >  the StAX source code and JDK javax.xml API source code, and placing it
> >  directly on my Android app project. Finally I got it compiled.
> >
> >  Then, I got another error. I found out that the Android compiler fist
> >  compile the Java code to .class files and then compile the .class files
> to a
> >  .dex file. The first process everything goes fine, meaning the package
> >  dependencies and code syntax are OK. But on the second process, when it
> >  tries convert the .class files to .dex, I get 4 warnings and 1 error
> that
> >  are lightly described:
> >
> >  *[2008-03-14 14:25:27 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
> >  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
> >  ...while parsing attributes[1]
> >  ...while parsing javax/xml/bind/annotation/XmlNs.class
> >  ...while processing javax/xml/bind/annotation/XmlNs.class
> >  [2008-03-14 14:25:27 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 000002b8
> >  ...while parsing attributes[0]
> >  ...while parsing methods[0]
> >  ...while parsing javax/xml/bind/annotation/XmlSchema.class
> >  ...while processing javax/xml/bind/annotation/XmlSchema.class
> >  [2008-03-14 14:25:28 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 00000204
> >  ...while parsing attributes[0]
> >  ...while parsing methods[2]
> >  ...while parsing javax/xml/ws/Action.class
> >  ...while processing javax/xml/ws/Action.class
> >  [2008-03-14 14:25:29 - HelloAndroid]
> >  trouble processing:
> >  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
> >  ...while parsing AnnotationDefault attribute at offset 0000020b
> >  ...while parsing attributes[1]
> >  ...while parsing methods[0]
> >  ...while parsing org/osoa/sca/annotations/Service.class
> >  ...while processing org/osoa/sca/annotations/Service.class
> >  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
> >  [2008-03-14 14:25:30 - HelloAndroid]
> >  trouble writing output: not found
> >  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed
> with
> >  error 2
> >
> >  *
> >  So, I got nothing running so far : ( . Is there anyone with some
> Android
> >  knowledge that could help us with it?
> >
> >  I will probably send this doubts to Android community and see if they
> can
> >  help us : )
> >
> >  Thanks in advance ; )
> >
> >  Adriano Crestani
> >
>
>
>
> --
> Luciano Resende
> Apache Tuscany Committer
> http://people.apache.org/~lresende <http://people.apache.org/%7Elresende>
> http://lresende.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
Good summary Adriano, I haven't had success yet trying to run
Calculator sample application on the Android environment. Below are
some issues I noted

- Looks like our calculator sample dependency has grown out of
control, and is now  requiring node, databinding, axiom, etc
- The service locator pattern we use for our extension mechanism is
not working correct in Android environment causing various NPE
- etc

What do you think if create a branch to experiment and try to work on
these issues together ?


On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
<ad...@apache.org> wrote:
> Hi,
>
>  Luciano and me have been trying to run the SCA calculator sample on the
>  Google Android platform, that is a platform for mobile devices. As the
>  Android platform apps are written in Java language, we tried to run the Java
>  SCA calculator sample on it.
>
>  Although the apps for Android are coded in Java, it's only coded in Java
>  language. When it's compiled, it generates not .class files, but a file
>  called .dex, that is equivalent to .jar files. The .dex files are not
>  compound of Java standard bytecode, but a special bytecode that is intended
>  to run only on Android VM: Dalvik.
>
>  So, in our first try to compile the calculator sample, only importing the
>  needed SCA jars were not successful, because the SCA jars are compiled using
>  JDK compiler and do not have the Android special bytecode format.
>
>  Fortunately, when you import the SCA jars into an eclipse Android project,
>  it automatically tries to convert the JDK bytecode to Android bytecode
>  before execute it. But something was not going correctly yet, cause when it
>  tries to execute the service I get this exception:
>
>  Application Error: com.android.hello An error in com.android.hello. Unnable
>  to start activity
>  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
>  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
>
>  I wasn't sure about what was happening, and then I tried another approach:
>  not import the SCA jars, but place the SCA source code needed by the
>  calculator sample into the Android app src folder. This way the SCA would be
>  compiled directly to Android bytecode.
>
>  Unfortunately, the Android is not Java and does not have the entire set of
>  classes that J2SE provides. It provides only some java classes as java.langand
>  java.util classes which Android developers kept with the same package/class
>  names and method signature for easy portability of Java app codes. So, the
>  common Java classes used on Java SCA were compatible. But, the Java SCA uses
>  a lot the javax.xml package and Android implements only part of this package
>  on its platform, so I was getting a lot of errors because the missing
>  classes that should be contained in this package. I solved it downloading
>  the StAX source code and JDK javax.xml API source code, and placing it
>  directly on my Android app project. Finally I got it compiled.
>
>  Then, I got another error. I found out that the Android compiler fist
>  compile the Java code to .class files and then compile the .class files to a
>  .dex file. The first process everything goes fine, meaning the package
>  dependencies and code syntax are OK. But on the second process, when it
>  tries convert the .class files to .dex, I get 4 warnings and 1 error that
>  are lightly described:
>
>  *[2008-03-14 14:25:27 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
>  ...while parsing attributes[1]
>  ...while parsing javax/xml/bind/annotation/XmlNs.class
>  ...while processing javax/xml/bind/annotation/XmlNs.class
>  [2008-03-14 14:25:27 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 000002b8
>  ...while parsing attributes[0]
>  ...while parsing methods[0]
>  ...while parsing javax/xml/bind/annotation/XmlSchema.class
>  ...while processing javax/xml/bind/annotation/XmlSchema.class
>  [2008-03-14 14:25:28 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 00000204
>  ...while parsing attributes[0]
>  ...while parsing methods[2]
>  ...while parsing javax/xml/ws/Action.class
>  ...while processing javax/xml/ws/Action.class
>  [2008-03-14 14:25:29 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 0000020b
>  ...while parsing attributes[1]
>  ...while parsing methods[0]
>  ...while parsing org/osoa/sca/annotations/Service.class
>  ...while processing org/osoa/sca/annotations/Service.class
>  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
>  [2008-03-14 14:25:30 - HelloAndroid]
>  trouble writing output: not found
>  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed with
>  error 2
>
>  *
>  So, I got nothing running so far : ( . Is there anyone with some Android
>  knowledge that could help us with it?
>
>  I will probably send this doubts to Android community and see if they can
>  help us : )
>
>  Thanks in advance ; )
>
>  Adriano Crestani
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Running Tuscany/SCA in Google Android mobile platform

Posted by Luciano Resende <lu...@gmail.com>.
Good summary Adriano, I haven't had success yet trying to run
Calculator sample application on the Android environment. Below are
some issues I noted

- Looks like our calculator sample dependency has grown out of
control, and is now  requiring node, databinding, axiom, etc
- The service locator pattern we use for our extension mechanism is
not working correct in Android environment causing various NPE
- etc

What do you think if create a branch to experiment and try to work on
these issues together ?


On Fri, Mar 14, 2008 at 2:13 PM, Adriano Crestani
<ad...@apache.org> wrote:
> Hi,
>
>  Luciano and me have been trying to run the SCA calculator sample on the
>  Google Android platform, that is a platform for mobile devices. As the
>  Android platform apps are written in Java language, we tried to run the Java
>  SCA calculator sample on it.
>
>  Although the apps for Android are coded in Java, it's only coded in Java
>  language. When it's compiled, it generates not .class files, but a file
>  called .dex, that is equivalent to .jar files. The .dex files are not
>  compound of Java standard bytecode, but a special bytecode that is intended
>  to run only on Android VM: Dalvik.
>
>  So, in our first try to compile the calculator sample, only importing the
>  needed SCA jars were not successful, because the SCA jars are compiled using
>  JDK compiler and do not have the Android special bytecode format.
>
>  Fortunately, when you import the SCA jars into an eclipse Android project,
>  it automatically tries to convert the JDK bytecode to Android bytecode
>  before execute it. But something was not going correctly yet, cause when it
>  tries to execute the service I get this exception:
>
>  Application Error: com.android.hello An error in com.android.hello. Unnable
>  to start activity
>  ComponentInfo{com.android.hello/com.android.hello.HelloAndroid]:
>  org.osoa.sca.ServiceRuntimeException: java.lang.NullPointerException.
>
>  I wasn't sure about what was happening, and then I tried another approach:
>  not import the SCA jars, but place the SCA source code needed by the
>  calculator sample into the Android app src folder. This way the SCA would be
>  compiled directly to Android bytecode.
>
>  Unfortunately, the Android is not Java and does not have the entire set of
>  classes that J2SE provides. It provides only some java classes as java.langand
>  java.util classes which Android developers kept with the same package/class
>  names and method signature for easy portability of Java app codes. So, the
>  common Java classes used on Java SCA were compatible. But, the Java SCA uses
>  a lot the javax.xml package and Android implements only part of this package
>  on its platform, so I was getting a lot of errors because the missing
>  classes that should be contained in this package. I solved it downloading
>  the StAX source code and JDK javax.xml API source code, and placing it
>  directly on my Android app project. Finally I got it compiled.
>
>  Then, I got another error. I found out that the Android compiler fist
>  compile the Java code to .class files and then compile the .class files to a
>  .dex file. The first process everything goes fine, meaning the package
>  dependencies and code syntax are OK. But on the second process, when it
>  tries convert the .class files to .dex, I get 4 warnings and 1 error that
>  are lightly described:
>
>  *[2008-03-14 14:25:27 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  ...while parsing RuntimeVisibleAnnotations attribute at offset 00000175
>  ...while parsing attributes[1]
>  ...while parsing javax/xml/bind/annotation/XmlNs.class
>  ...while processing javax/xml/bind/annotation/XmlNs.class
>  [2008-03-14 14:25:27 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:27 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 000002b8
>  ...while parsing attributes[0]
>  ...while parsing methods[0]
>  ...while parsing javax/xml/bind/annotation/XmlSchema.class
>  ...while processing javax/xml/bind/annotation/XmlSchema.class
>  [2008-03-14 14:25:28 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:28 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 00000204
>  ...while parsing attributes[0]
>  ...while parsing methods[2]
>  ...while parsing javax/xml/ws/Action.class
>  ...while processing javax/xml/ws/Action.class
>  [2008-03-14 14:25:29 - HelloAndroid]
>  trouble processing:
>  [2008-03-14 14:25:29 - HelloAndroid] truncated annotation attribute
>  ...while parsing AnnotationDefault attribute at offset 0000020b
>  ...while parsing attributes[1]
>  ...while parsing methods[0]
>  ...while parsing org/osoa/sca/annotations/Service.class
>  ...while processing org/osoa/sca/annotations/Service.class
>  [2008-03-14 14:25:30 - HelloAndroid] 4 warnings
>  [2008-03-14 14:25:30 - HelloAndroid]
>  trouble writing output: not found
>  [2008-03-14 14:25:30 - HelloAndroid] Conversion to Dalvik format failed with
>  error 2
>
>  *
>  So, I got nothing running so far : ( . Is there anyone with some Android
>  knowledge that could help us with it?
>
>  I will probably send this doubts to Android community and see if they can
>  help us : )
>
>  Thanks in advance ; )
>
>  Adriano Crestani
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-user-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-user-help@ws.apache.org