But i realized i the warnings just appear when using the stock felix 2.0.5
(and other bundles like event admin).
Self built stuff works just fine.

So Karl, what do you use to build the released artifacts ?


On Tue, May 4, 2010 at 5:27 PM, Justin Edelson <justinedel...@gmail.com>wrote:

> On 5/4/10 10:25 AM, Richard S. Hall wrote:
> > On 5/4/10 10:19, Jackson, Bruce wrote:
> >> Yes, that's easier said than done!
> >> I seem to remember that the was no single place where you could set the
> >> compiler version to use for building Felix. Is that correct?
> >>
> >
> > You should just be able to edit the Event Admin pom.xml file to include
> > this in its plugins section, no?
> >
> > -> richard
> You can actually do it from the command line:
>
> mvn package -Dmaven.compiler.compilerVersion=1.4
> -Dmaven.compiler.executable=[path to javac] -Dmaven.compiler.fork=true
> -Dmaven.compiler.verbose=true
>
> See
>
> http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#compilerVersion
>
> Justin
>
>
> >
> >>
> >> On 04/05/2010 12:54, "Karl Pauls"<karlpa...@gmail.com>  wrote:
> >>
> >>
> >>> And like before, make sure you don't have other messages like "class
> >>> resolved by unexpected dex" in the log ...
> >>>
> >>> regards,
> >>>
> >>> Karl
> >>>
> >>> On Tue, May 4, 2010 at 1:33 PM, Karl Pauls<karlpa...@gmail.com>
>  wrote:
> >>>
> >>>> Well, this should be easy enough to test, right? Just re-compile the
> >>>> eventadmin and see whether that fixes the issue or not - if it does,
> >>>> that would be really useful to know :-)
> >>>>
> >>>> regards,
> >>>>
> >>>> Karl
> >>>>
> >>>> On Tue, May 4, 2010 at 1:23 PM, Jackson, Bruce<bru...@qualcomm.com>
> >>>> wrote:
> >>>>
> >>>>> Hi All
> >>>>>
> >>>>> Some time back, we had a discussion about the default compiler
> >>>>> version used
> >>>>> to build Felix, and whether this was compatible with the
> >>>>> requirements of
> >>>>> Android.
> >>>>>
> >>>>> I noted that when you dx the bundle jars produced by the regular
> Felix
> >>>>> build, you get a whole collection of warning of the the form:
> >>>>>
> >>>>> $ dx --dex --output=classes.dex org.apache.felix.eventadmin-1.2.2.jar
> >>>>> warning: Ignoring InnerClasses attribute for an anonymous inner
> >>>>> class that
> >>>>> doesn't come with an associated EnclosingMethod attribute. (This
> >>>>> class was
> >>>>> probably produced by a broken compiler.)
> >>>>>
> >>>>> ...for example. We debated this, and decided that these were just
> >>>>> warning
> >>>>> and not a real problem. However, now that I have a working Felix
> >>>>> framework
> >>>>> on Android, I find that when I load and start the EventAdmin
> >>>>> bundle, I find
> >>>>> that it fails to start with the following message in the log:
> >>>>>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):
> >>>>> org.osgi.framework.BundleException: Activator start error in bundle
> >>>>> org.apache.felix.eventadmin [5].
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.framework.Felix.activateBundle(Felix.java:1807)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.framework.Felix.startBundle(Felix.java:1682)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> com.skifta.android.client.SkiftaService.startOSGi(SkiftaService.java:437)
> >>>>>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> com.skifta.android.client.SkiftaService.init(SkiftaService.java:174)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> com.skifta.android.client.SkiftaService.onCreate(SkiftaService.java:166)
> >>>>>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> android.app.ActivityThread.handleCreateService(ActivityThread.java:2894)
> >>>>>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> android.app.ActivityThread.access$3200(ActivityThread.java:126)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1986)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> android.os.Handler.dispatchMessage(Handler.java:99)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> android.os.Looper.loop(Looper.java:123)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> android.app.ActivityThread.main(ActivityThread.java:4595)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> java.lang.reflect.Method.invokeNative(Native Method)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> java.lang.reflect.Method.invoke(Method.java:521)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:8
> >>>>>
> >>>>> 60)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> dalvik.system.NativeStart.main(Native Method)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682): Caused by:
> >>>>> java.lang.NoClassDefFoundError:
> >>>>> org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks$1
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> org.apache.felix.eventadmin.impl.handler.BlacklistingHandlerTasks.<init>(Bla
> >>>>>
> >>>>> cklistingHandlerTasks.java:223)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> org.apache.felix.eventadmin.impl.Configuration.start(Configuration.java:293)
> >>>>>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> >>>>>
> >>
> org.apache.felix.eventadmin.impl.Configuration.<init>(Configuration.java:152>>>
> >>
> >> )
> >>
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.eventadmin.impl.Activator.start(Activator.java:65)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>>
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.jav
> >>>>>
> >>>>> a:661)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     at
> >>>>> org.apache.felix.framework.Felix.activateBundle(Felix.java:1760)
> >>>>> 05-04 12:01:26.853: WARN/System.err(4682):     ... 17 more
> >>>>>
> >>>>> Looking at the class in question (BlacklistingHandlerTasks:223) I
> >>>>> see that
> >>>>> this is a use of an anonymous inner class:
> >>>>>
> >>>>> private final EventHandler m_nullEventHandler = new EventHandler()
> >>>>>     {
> >>>>>         /**
> >>>>>          * This is a null object that is supposed to do nothing at
> >>>>> this
> >>>>> point.
> >>>>>          *
> >>>>>          * @param event an event that is not used
> >>>>>          */
> >>>>>        public void handleEvent(final Event event)
> >>>>>         {
> >>>>>             // This is a null object that is supposed to do nothing
> >>>>> at this
> >>>>>            // point. This is used once a EventHandler is requested
> >>>>> for a
> >>>>>            // servicereference that is either stale (i.e.,
> >>>>> unregistered) or
> >>>>>            // blacklisted.
> >>>>>        }
> >>>>>     };
> >>>>>
> >>>>> Is this an example of the problem we were discussing a couple of
> >>>>> weeks ago,
> >>>>> where dx canšt produce correct copde because the compiler version
> >>>>> that was
> >>>>> used to create the bundle was pre-1.5 do you think?
> >>>>>
> >>>>> Thanks
> >>>>>
> >>>>> Bruce
> >>>>>
> >>>>>
> >>>>
> >>>>
> >>>> --
> >>>> Karl Pauls
> >>>> karlpa...@gmail.com
> >>>>
> >>>>
> >>>
> >>>
> >>
>
>


-- 
Toni Menzel
Independent Software Developer
Professional Profile: http://okidokiteam.com
t...@okidokiteam.com
http://www.ops4j.org     - New Energy for OSS Communities - Open
Participation Software.

Reply via email to