Hey Thanks for the update Xander.

On Thu, Aug 7, 2014 at 12:30 AM, Xander Uiterlinden <[email protected]>
wrote:

> Just did some debugging, turns out it was due to running the code in an
> OSGi framework.
> Setting the correct classloader as context classloader before creating the
> builder solves it.
> This snipped works fine.
>
>         ClassLoader currentLoader =
> Thread.currentThread().getContextClassLoader();
>
> Thread.currentThread().setContextClassLoader(User.class.getClassLoader());
>         Builder builder = User.newBuilder(user);
>         Thread.currentThread().setContextClassLoader(currentLoader);
>         User copy = builder.build();
>
>
> Xander
>
>
> On Wed, Aug 6, 2014 at 8:23 PM, Lewis John Mcgibbney <
> [email protected]> wrote:
>
>> Hi Xander,
>>
>>
>> On Wed, Aug 6, 2014 at 9:37 AM, Xander Uiterlinden <[email protected]>
>> wrote:
>>
>>>  Shall I create a JIRA issue for this ?
>>>
>>> Yeah I would.
>> I really don't know what is wrong here.
>> Lewis
>>
>>
>
>


-- 
*Lewis*

Reply via email to