Yes, you are right. I just do not import a package because the package is
not in the import statements of the java file and hence bnd does not have it
included in the MANIFEST.MF. Thanks.

Rice



On Fri, Jan 21, 2011 at 5:10 PM, [email protected] <[email protected]>wrote:

>  Hello!
>
> Do you have "Export-Package:  xs.personnel" in your bundle?
>
>
> On 21.01.2011 11:46, Rice Yeh wrote:
>
>> Hi,
>>   I meet a problem that looks quite weird for me. I report it here to see
>> whether people have similar experience.
>>
>>   In hibernate, there is a class
>> org.hibernate.property.DirectPropertyAccessor$DirectGetter, which is used
>> to
>> directly access a field's value of a domain class. I find this function
>> fails in osgi environemt because java.lang.reflect.Field.getValue() throws
>> IllegalArgumentException, which never happen in non-osgi environment.  I
>> conjecture that this exception has something to do with classloaders. But
>> I
>> cannot really figure it out.  The following is the exception trace.
>>
>> caused by: java.lang.IllegalArgumentException: Can not set
>> java.lang.Object
>> field as.classifier.Classifier.oid to xs.personnel.Citizen$Identity$Type
>>     at
>>
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
>>     at
>>
>> sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
>>     at
>>
>> sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37)
>>     at
>>
>> sun.reflect.UnsafeObjectFieldAccessorImpl.get(UnsafeObjectFieldAccessorImpl.java:18)
>>     at java.lang.reflect.Field.get(Field.java:358)
>>     at
>>
>> org.hibernate.property.DirectPropertyAccessor$DirectGetter.get(DirectPropertyAccessor.java:55)
>>
>>
>> Rice
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

Reply via email to