Hi,

On 01.07.2010, at 21:48, Dave Humeniuk wrote:

> That property change seemed to do the trick.  I'm new to the whole iPOJO
> thing, what exactly is a proxy class (a link would be fine, didn't find much
> searching the web) and why did that fix it?

Since iPOJO 1.6, iPOJO injects 'smart' proxies. A proxy is a object wrapping 
the service objects and simplifying the development model (because you don't 
have to manage the dynamism, you can give the service object to other 
objects...) 

By default, iPOJO generates a proxy class dynamically (bytecode generation). 
However some VMs does not support such kind of runtime class definition (like 
Dalvik on Android). The protperty I gave you disabled the proxy generation and 
so use direct object injection. 


> 
> Answers to your questions:
> -A log service is deployed (org.knopflerfish.log).  Not sure what it means
> but I noticed that on my Windows environment I have that same log service
> plus the Felix version.
> -I'm using the PERC Ultra JVM

I will try to see what are the best configuration for this VM. iPOJO proxies 
can be:
- smart proxies (bytecode)
- java dynamic proxies (for some VM that support java dynamic proxies but not 
runtime class definition)
- no proxies

If you're on a constrained platform, I recommend to disable the proxies if 
you're not using them.


Regards,

Clement

> 
> Thanks,
> Dave
> 
> On Thu, Jul 1, 2010 at 1:36 PM, Clement Escoffier <
> [email protected]> wrote:
> 
>> Hi,
>> 
>> 
>> On 01.07.2010, at 17:31, Dave Humeniuk wrote:
>> 
>>> I'm trying to get the iPOJO OSGi Junit Runner to work.  When I start the
>>> bundle I get the following messages to the log:
>>> 
>>> LS: Scheduling task ManagedServiceFactory Update:
>>> factoryPid=org.apache.felix.ipojo.junit4osgi.impl.JunitExtender
>>> LS: Running task ManagedServiceFactory Update:
>>> factoryPid=org.apache.felix.ipojo.junit4osgi.impl.JunitExtender
>>> LS: [ERROR] org.apache.felix.ipojo.junit4osgi.impl.JunitExtender : Cannot
>>> create the proxy object
>>> LS: [ERROR] org.apache.felix.ipojo.junit4osgi.impl.JunitExtender : The
>>> onArrival method onBundleArrival has thrown an exception
>>> LS: ServiceEvent REGISTERED
>>> LS: ServiceEvent MODIFIED
>>> LS: [ERROR] org.apache.felix.ipojo.junit4osgi.impl.JunitExtender :
>>> [org.apache.felix.ipojo.junit4osgi.impl.JunitExtender-0] The callback
>> method
>>> starting has thrown an exception : null
>>> LS: ServiceEvent UNREGISTERING
>>> LS: [ERROR] org.apache.felix.ipojo.junit4osgi.impl.JunitExtender : The
>>> onDeparture method onBundleDeparture has thrown an exception
>>> 
>>> I assume the message means the JunitExtender.onBundleArrival and
>>> JunitExtender.onBundleDeparture have thrown an exception and this is why
>>> things aren't working, but don't know why (what's the exception?).
>>> 
>>> The odd thing is I can get this to work on my Windows environment, but
>> this
>>> problem is happening on my target environment (Linux, ARM)
>> 
>> 
>> It sounds like the log service proxy cannot be created throwing an NPE in
>> the 'validate' method.
>> Can you give me more details:
>> Do you deploy a log service ?
>> Which VM are you using ?
>> Can you try with -Dipojo.proxy=disabled when launching Felix (system
>> property). It will disable the proxy injection.
>> 
>> 
>> Regards,
>> 
>> Clement
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to