I got to work here. With this code I could see there are more gson-2.0 and
I took it out

URLClassLoader classLoader = (URLClassLoader) App.class.getClassLoader();
for (URL url : classLoader.getURLs()) {
System.out.println(url);
}

I have other errors now on jscsi <http://jscsi.org/>, but I am gonna work
on this later.

Thanks!
Regards
Felipe



On Fri, May 23, 2014 at 6:31 PM, Andrew Phillips <andr...@apache.org> wrote:

> Quoting felipe gutierrez <fel...@usto.re>:
>
>  The error is on the line
>>
>> mContext = overrides.buildView(BlobStoreContext.class);
>>
>> jclouds is importing gson-2.2.4 and all the other places I put an
>> exclusion
>> on maven:
>>
>
> OK, so now it seems to be complaining that the PropertiesAdapter [1] is
> not an instance of TypeAdapter, even though it clearly is. This would seem
> to point to a classloader conflict.
>
> Are you running this inside a webapp? Do we know which classloader is
> initially loading the Gson library? Could you add some debug statements to
> your code to compare the classloader for com.google.gson.TypeAdapter with
> the classloader for e.g. org.jclouds.json.config.GsonModule?
>
> Regards
>
> ap
>
> [1] https://github.com/jclouds/jclouds/blob/master/core/src/
> main/java/org/jclouds/json/config/GsonModule.java#L244
> [2] https://code.google.com/p/google-gson/source/browse/
> trunk/gson/src/main/java/com/google/gson/GsonBuilder.java line 448
>

Reply via email to