You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Darren Carlson <on...@dcarlson.info> on 2011/08/17 16:15:43 UTC

Cannot load Framework Security on Android

Hi,

I'm having a problem loading the OSGi Framework Security extension on 
Android. I am trying to load Framework Security version 1.4.2 into Felix 
version 3.2.2. The exception I get is: "Unable to add extension bundle 
to FrameworkClassLoader - Maybe not an URLClassLoader?"

The exception comes from the Felix ExtensionManager, which attempts to 
create its private instance by adding a new URL to the system class 
loader, which is obtained from Felix.class.getClassLoader(). However, 
since Android uses the PathClassLoader rather than a URLCLassLoader, 
this fails - rendering the ExtensionManager inoperable.

Because of this, it appears to be impossible to load framework security 
on Android at the moment. Does anyone have any ideas or workarounds?

Reference:
http://svn.apache.org/repos/asf/felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/ExtensionManager.java

Thanks,
Darren

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven iPOJO annotations example

Posted by jo...@exceter.com.
For anyone else looking for annotated maven examples of iPOJO in  
action, they are located here,
https://svn.apache.org/repos/asf/felix/trunk/ipojo/examples/tutorial-maven/

Quoting john.dunlap@exceter.com:

>
> *I've found some example annotations but they have incomplete maven
> configuration to go with them.
>
> Quoting john.dunlap@exceter.com:
>
>> I'm trying to to create OSGI services using iPOJO annotations and
>> maven. Does anyone know if there is an example like this one that uses
>> iPOJO annotations instead of XML? I've found some annotations
>>
>> http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html
>>
>> -John
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Maven iPOJO annotations example

Posted by "Guillaume Sauthier (Objectweb)" <gu...@objectweb.org>.
Hi

You need to add org.apache.felix:org.apache.felix.ipojo.annotations as a
dependency.

All that you need is probably described here :
http://felix.apache.org/site/how-to-use-ipojo-annotations.html

--Guillaume

2011/8/17 <jo...@exceter.com>

>
> *I've found some example annotations but they have incomplete maven
> configuration to go with them.
>
>
> Quoting john.dunlap@exceter.com:
>
>  I'm trying to to create OSGI services using iPOJO annotations and
>> maven. Does anyone know if there is an example like this one that uses
>> iPOJO annotations instead of XML? I've found some annotations
>>
>> http://felix.apache.org/site/**ipojo-hello-word-maven-based-**
>> tutorial.html<http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html>
>>
>> -John
>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@felix.**apache.org<us...@felix.apache.org>
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Maven iPOJO annotations example

Posted by jo...@exceter.com.
*I've found some example annotations but they have incomplete maven  
configuration to go with them.

Quoting john.dunlap@exceter.com:

> I'm trying to to create OSGI services using iPOJO annotations and
> maven. Does anyone know if there is an example like this one that uses
> iPOJO annotations instead of XML? I've found some annotations
>
> http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html
>
> -John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Maven iPOJO annotations example

Posted by jo...@exceter.com.
I'm trying to to create OSGI services using iPOJO annotations and  
maven. Does anyone know if there is an example like this one that uses  
iPOJO annotations instead of XML? I've found some annotations

http://felix.apache.org/site/ipojo-hello-word-maven-based-tutorial.html

-John


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Cannot load Framework Security on Android

Posted by Karl Pauls <ka...@gmail.com>.
There is no real need to install the security provider as an extension
bundle. You could put it on the classpath of the app and pass its
activator as a system bundle activator. That way you should be able to
work around the issue. However, I never tried to use it on android and
Im not sure it will work - if you try it please let us know what the
result was :-)

regards,

Karl

On Wed, Aug 17, 2011 at 4:15 PM, Darren Carlson <on...@dcarlson.info> wrote:
> Hi,
>
> I'm having a problem loading the OSGi Framework Security extension on
> Android. I am trying to load Framework Security version 1.4.2 into Felix
> version 3.2.2. The exception I get is: "Unable to add extension bundle to
> FrameworkClassLoader - Maybe not an URLClassLoader?"
>
> The exception comes from the Felix ExtensionManager, which attempts to
> create its private instance by adding a new URL to the system class loader,
> which is obtained from Felix.class.getClassLoader(). However, since Android
> uses the PathClassLoader rather than a URLCLassLoader, this fails -
> rendering the ExtensionManager inoperable.
>
> Because of this, it appears to be impossible to load framework security on
> Android at the moment. Does anyone have any ideas or workarounds?
>
> Reference:
> http://svn.apache.org/repos/asf/felix/branches/org.apache.felix.framework-3.0.8-RC/src/main/java/org/apache/felix/framework/ExtensionManager.java
>
> Thanks,
> Darren
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>



-- 
Karl Pauls
karlpauls@gmail.com
http://twitter.com/karlpauls
http://www.linkedin.com/in/karlpauls
https://profiles.google.com/karlpauls

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org