I was thinking about that as a possibility, but am trying to avoid that as it will make my build process even worse.
I am going to contact members of the Android team to see if they can suggest anything. I will respond with what they say. On Mon, Nov 19, 2012 at 3:15 AM, Karl Pauls <[email protected]> wrote: > I guess you have to patch the commons-logging jar and remove the classes > already provided by android, no? > > regards, > > Karl > > > On Mon, Nov 19, 2012 at 3:05 AM, Keith Hughes <[email protected] > >wrote: > > > Karl, > > > > I thought I had this sorted, but apparently not. > > > > Part of the problem is that Android only supplies the Commons Logging Log > > interface and nothing else. If I want/need any of the other classes from > > the same package I am kinda doomed. > > > > I tried moving commons logging into the libs folder, but dx complains > that > > it has the same class twice, once from my jar and I guess once from the > > Android runtime. > > > > Argh. Classloader problems are bad enough, but to have this as well. > > > > > > > > On Thu, Nov 1, 2012 at 2:31 AM, Karl Pauls <[email protected]> wrote: > > > > > Part of your problem is that android/davlik is not Java. It doesn't > > > follow normal Java classloading rules. Where that bites us from an > > > OSGi pov is that you can't just substitute providers. In your case, > > > you might be able to get things to work by removing the imports of > > > bundles to commons logging but typically the only way to make things > > > work is to make sure you only have one provider of a given package -- > > > hence, I'd remove commons logging from all bundles and put it in the > > > apk itself and have it bootdelegated. > > > > > > regards, > > > > > > Karl > > > > > > On Wed, Oct 31, 2012 at 11:05 PM, Keith Hughes < > [email protected]> > > > wrote: > > > > Hi folks, > > > > > > > > I have an Android application based on Apache Felix. Everything works > > > fine > > > > when I run things on Linux, but as soon as I try moving to Android I > > run > > > > into a problem. > > > > > > > > My app uses Apache Commons Logging in all of its bundles. I have > > > included a > > > > bundle for Apache Commons Logging as a bundle as well. > > > > > > > > When the container starts up I get the following stack trace which > > seems > > > to > > > > point out that it is accessing the org/apache/commons/logging/Log in > > the > > > > Android system libraries. > > > > < > > > > > > https://mail.google.com/mail/?view=cm&fs=1&tf=1&source=mailto&[email protected] > > > > > > > > 10-31 15:43:53.251: W/dalvikvm(5034): Class resolved by unexpected > DEX: > > > > Linterac > > > > > > > > > > tivespaces/configuration/FileSystemConfigurationStorageManager;(0x41747380):0x64 > > > > d0b000 ref [Lorg/apache/commons/logging/Log;] > > > > Lorg/apache/commons/logging/Log;(0x417498d8):0x64d34000 > > > > 10-31 15:43:53.251: W/dalvikvm(5034): > > > > > > (Linteractivespaces/configuration/FileSystemConfigurationStorageManager; > > > > had used a different Lorg/apache/commons/logging/Log; during > > > > pre-verification) > > > > 10-31 15:43:53.251: W/System.err(5034): Exception > > > > bootstrap/interactivespaces-system-1.2.0.jar > > > > 10-31 15:43:53.251: W/System.err(5034): > > > org.osgi.framework.BundleException: > > > > Activator start error in bundle interactivespaces.system [24]. > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > org.apache.felix.framework.Felix.activateBundle(Felix.java:2027) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > org.apache.felix.framework.Felix.startBundle(Felix.java:1895) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > > > > > > > interactivespaces.android.service.InteractiveSpacesFrameworkAndroidBootstrap.startBundle(InteractiveSpacesFrameworkAndroidBootstrap.java:188) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > > > > > > > interactivespaces.android.service.InteractiveSpacesFrameworkAndroidBootstrap.startBundles(InteractiveSpacesFrameworkAndroidBootstrap.java:173) > > > > 10-31 15:43:53.251: W/System.err(5034): at > > > > > > > > > > interactivespaces.android.service.InteractiveSpacesFrameworkAndroidBootstrap.boot(InteractiveSpacesFrameworkAndroidBootstrap.java:124) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.android.service.InteractiveSpacesService.onStartCommand(InteractiveSpacesService.java:67) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2490) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > android.app.ActivityThread.access$1900(ActivityThread.java:130) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1292) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > android.os.Handler.dispatchMessage(Handler.java:99) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > android.os.Looper.loop(Looper.java:137) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > android.app.ActivityThread.main(ActivityThread.java:4745) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > java.lang.reflect.Method.invokeNative(Native Method) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > java.lang.reflect.Method.invoke(Method.java:511) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > dalvik.system.NativeStart.main(Native Method) > > > > 10-31 15:43:53.261: W/System.err(5034): Caused by: > > > > java.lang.IllegalAccessError: Class ref in pre-verified class > resolved > > to > > > > unexpected implementation > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.configuration.FileSystemConfigurationStorageManager.loadConfigFile(FileSystemConfigurationStorageManager.java:105) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.configuration.FileSystemConfigurationStorageManager.startup(FileSystemConfigurationStorageManager.java:82) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.system.bootstrap.osgi.GeneralInteractiveSpacesSupportActivator.setupSystemConfiguration(GeneralInteractiveSpacesSupportActivator.java:315) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.system.bootstrap.osgi.GeneralInteractiveSpacesSupportActivator.setupSpaceEnvironment(GeneralInteractiveSpacesSupportActivator.java:216) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > interactivespaces.system.bootstrap.osgi.GeneralInteractiveSpacesSupportActivator.start(GeneralInteractiveSpacesSupportActivator.java:143) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > > > > > > > org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645) > > > > 10-31 15:43:53.261: W/System.err(5034): at > > > > org.apache.felix.framework.Felix.activateBundle(Felix.java:1977) > > > > 10-31 15:43:53.261: W/System.err(5034): ... 18 more > > > > > > > > I have tried experimenting with all of the legal values of the Bundle > > > > Parent configuration property to no avail. > > > > > > > > How can I tell Felix to ignore Commons Logging from the system boot > > path > > > > and only use the one from the bundle? > > > > > > > > > > > > -- > > > Karl Pauls > > > [email protected] > > > http://twitter.com/karlpauls > > > http://www.linkedin.com/in/karlpauls > > > https://profiles.google.com/karlpauls > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > > > > > > > > > > -- > Karl Pauls > [email protected] > http://twitter.com/karlpauls > http://www.linkedin.com/in/karlpauls > https://profiles.google.com/karlpauls >

