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 <[EMAIL PROTECTED]>
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 <
> [EMAIL PROTECTED]> 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 <
> > [EMAIL PROTECTED]>
> > 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 <
> > > [EMAIL PROTECTED]> 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 <
> > > > [EMAIL PROTECTED]> 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 <
> > > [EMAIL PROTECTED]>
> > > > > 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
> > > > > > <[EMAIL PROTECTED]> 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 <
> > > > > > > [EMAIL PROTECTED]> 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 <
> > > > > > >> [EMAIL PROTECTED]> 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 <
> > > > > > >>> [EMAIL PROTECTED]> 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 <
> > > > > > >>> > [EMAIL PROTECTED]> 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 <
> > > > > > >>> > > [EMAIL PROTECTED]> 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
> > <
> > > > > > >>> > > > [EMAIL PROTECTED]> 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

Reply via email to