tags:

views:

67

answers:

1

I'm using the Felix OSGi iPOJO library, and I'm programmatically accessing Factories to create ComponentInstances. I've read over the code here:

http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/InstanceManager.java?view=markup

to try to figure out why my call to getPojoObject() is returning null.

My question is under what conditions could the getPojoObject() method return null?

EDIT: I think I understand what I'm asking now - as TofuBeer pointed out, it says in the JavaDoc it can return null whenever there is any kind of problem instantiating the object - this is not a helpful value to return, and the way it is handled hides what the real error is. Thanks for the extra set of eyes, TofuBeer, this was driving me crazy.

A: 

Looking at the code, any time

private Object createObject()

returns null then getPojoObject would return null.

The createObject method has reasonable comments/error messages for each case that null gets returned.

Is there more to your question? Are you, for instance, having it return null and are trying to track down why?

TofuBeer