You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jclouds.apache.org by Pankaj Kharode <pa...@gslab.com> on 2014/04/21 21:14:33 UTC

IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Has anyone come across this issue ?


* ComputeServiceContext context = ContextBuilder.newBuilder(provider)*
* .endpoint(endpoint)*
* .credentials(identity, password)*
* .modules(modules)*
* .buildView(ComputeServiceContext.class);*
* compute = context.getComputeService(); TemplateBuilder tbuilder =
compute.templateBuilder(); images = compute.listImages();*



Exception in thread "main" java.lang.IncompatibleClassChangeError: class
org.jclouds.json.config.GsonModule$DateAdapter has interface
com.google.gson.TypeAdapter as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)

-- 

Regards,
Pankaj

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Andrew Phillips <an...@apache.org>.
> Is "jclouds-all" the only dependency in your project? Are you using old
> code that was compiled with an earlier jclouds version? If so, could you
> remove all .class files (the entire "target" directory) to make sure
> everything is compiled again using the last jclouds version?

Just to follow-up on what Ignasi said: if you find that things indeed  
"worked in a fresh project" old files or something like that in your  
workspace would seem to be the obvious suspicion at present.

ap

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Andrew Phillips <an...@apache.org>.
> If we remove google-gson.jar then our existing functionality does not work
> with gson-2.2.4.jar. and if we remove gson-2.2.4.jar then getting below
> error

I'm afraid you will not be able to run your application using two  
different versions of Gson without resorting to some class-rewriting  
magic. Apache jclouds requires gson-2.2.4 and will not work with a  
different version (as you have seen).

If you are unable to modify your application to work with 2.2.4, you  
will need to think about possible solutions such as using the Maven  
Shade plugin [1] to "relocate" one set of Gson classes to avoid the  
classpath conflict.

Such kind of approaches are usually tricky, so if there's any way to  
get your application to use gson-2.2.4, I would suggest investigating  
that first.

ap

[1] http://maven.apache.org/plugins/maven-shade-plugin/index.html

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Kavita Sanap <ka...@gslab.com>.
Hi Andrew,

If we remove google-gson.jar then our existing functionality does not work
with gson-2.2.4.jar. and if we remove gson-2.2.4.jar then getting below
error

java.lang.IncompatibleClassChangeError: class
org.jclouds.json.config.GsonModule$DateAdapter has interface
com.google.gson.TypeAdapter as super class
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        at
org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
        at
com.google.inject.AbstractModule.configure(AbstractModule.java:59)
        at
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
        at com.google.inject.spi.Elements.getElements(Elements.java:101)
        at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
        at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)


--Kavita

On Tue, Apr 22, 2014 at 5:14 PM, Andrew Phillips <an...@apache.org> wrote:

> Hi Kavita
>
>
>  I tried jclouds-core-1.7.2.jar Jar and getting same error in log.
>> I am using below jars in my classpath.
>>
>> google-gson.jar:jaxrpc.jar:commons-pool-1.6.jar:google-gson.jar:commons-
>>
>
> Looks like you have two versions of Gson on your classpath, which is
> unlikely to help. Could you ensure you are only using one version - the one
> matching your version of jclouds?
>
> Thanks!
>
> ap
>

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Andrew Phillips <an...@apache.org>.
Hi Kavita

> I tried jclouds-core-1.7.2.jar Jar and getting same error in log.
> I am using below jars in my classpath.
>
> google-gson.jar:jaxrpc.jar:commons-pool-1.6.jar:google-gson.jar:commons-

Looks like you have two versions of Gson on your classpath, which is  
unlikely to help. Could you ensure you are only using one version -  
the one matching your version of jclouds?

Thanks!

ap

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Kavita Sanap <ka...@gslab.com>.
Hi Ignasi,

I tried jclouds-core-1.7.2.jar Jar and getting same error in log.
I am using below jars in my classpath.

google-gson.jar:jaxrpc.jar:commons-pool-1.6.jar:google-gson.jar:commons-logging-1.0.4.jar:mailapi.jar:stax-api-1.0.jar:iControl.jar:commons-logging.jar:commons-io-2.0.1.jar:vmguest.jar:slf4j-api-1.7.6.jar:rest-api-schemas-5.5.0.jar:axis.jar:commons-lang-2.2.jar:EccpressoAll.jar:java-xmlbuilder-0.6.jar:Vendor_info.jar:geronimo-jms_1.1_spec-1.1.1.jar:guava-15.0.jar:flexlm.jar:junit-4.9b2.jar:httpcore-4.1.jar:bonecp-0.8.0.RELEASE.jar:jruby.jar:mysql-connector-java-5.1.24-bin.jar:jclouds-terremark-1.0-beta-7.jar:json-lib.jar:geronimo-jta_1.0.1B_spec-1.0.1.jar:commons-logging-1.1.jar:velocity-1.6.2-dep.jar:servlet-api.jar:activation-1.1.jar:vcloud-java-sdk-5.5.0.jar:commons-codec-1.3.jar:jclouds-scriptbuilder-1.0-SNAPSHOT.jar:ss_css2.jar:syslog4j-0.9.43-bin.jar:commons-httpclient-3.1.jar::commons-dbcp-1.4.jar:vijava5120121125.jar:cuic-client.jar:jclouds-log4j-1.0-beta-7.jar:activemq-jaas-5.2.0.jar:commons-logging-1.1.jar:datanucleus-api-jdo-3.0.0-release.jar:commons-httpclient-3.0.1.jar:jclouds-vcloud-1.0-beta-7.jar:saaj.jar:commons-pool-1.3.jar:ucsd-rest-api-sdk-v2.jar:jaxb-api-2.0.jar:httpclient-4.1.jar:velocity-1.6.2.jar:smtp.jar:commons-net-3.1.jar:classes12.jar:commons-logging-1.1.jar:wsdl4j-1.5.1.jar:commons-discovery.jar:jcommon-1.0.16.jar:ojdbc14.jar:javassist.jar:pd4ml.jar:aws-java-sdk-1.4.3.jar:joda-time-1.6.jar:manageontap.jar:jclouds-jsch-1.0-beta-7.jar:dom4j-1.6.1.jar:commons-configuration-1.3.jar:xalan.jar:maverick-all.jar:jxl.jar:geronimo-j2ee-management_1.0_spec-1.0.jar:jclouds-core-1.0-beta-7-jar-with-dependencies.jar:commons-discovery-0.2.jar:commons-codec-1.3.jar:mongo-java-driver-2.11.3.jar:slf4j-log4j12-1.7.6.jar:datanucleus-rdbms-3.0.0-release.jar:datanucleus-core-3.0.0-release.jar:log4j-1.2.15.jar:commons-codec-1.7.jar:commons-compress-1.4.1.jar:XmlSchema-1.4.3.jar:jclouds-compute-1.0-beta-7.jar:asm-3.1.jar:commons-collections-3.2.jar:activemq-core-5.2.0.jar:jfreechart-1.0.13.jar:jdo2-api-2.3-eb.jar:aopalliance-1.0.jar:bcprov-jdk16-1.46.jar:byon-1.7.0.jar:gson-2.2.4.jar:guice-3.0.jar:guice-assistedinject-3.0.jar:javax.inject-1.jar:jclouds-bouncycastle-1.7.0.jar:jclouds-compute-1.7.0.jar:jclouds-core-1.7.0.jar:jclouds-enterprise-1.7.0.jar:jclouds-joda-1.7.0.jar:jclouds-netty-1.7.0.jar:jclouds-scriptbuilder-1.7.0.jar:jclouds-slf4j-1.7.0.jar:jclouds-sshj-1.7.0.jar:jetty-continuation-8.1.8.v20121106.jar:jetty-http-8.1.8.v20121106.jar:jetty-io-8.1.8.v20121106.jar:jetty-server-8.1.8.v20121106.jar:jetty-util-8.1.8.v20121106.jar:joda-time-2.1.jar:joyent-cloudapi-1.7.0.jar:joyentcloud-1.7.0.jar:jsr250-api-1.0.jar:jsr311-api-1.1.1.jar:logback-classic-1.0.13.jar:logback-core-1.0.13.jar:netty-3.5.9.Final.jar:openstack-glance-1.8.0-SNAPSHOT.jar:openstack-keystone-1.7.0.jar:openstack-neutron-1.7.0.jar:openstack-nova-1.7.0.jar:rocoto-6.2.jar:snakeyaml-1.11.jar:sshj-0.8.1.jar:vboxjws-4.2.8.jar



--Kavita


On Tue, Apr 22, 2014 at 4:41 PM, Ignasi Barrera <ig...@gmail.com>wrote:

> Kavita, could you share which exact libraries you have in the classpath?
> And both, could you try using jclouds 1.7.2 and see if it still
> happens? Just trying to figure out where the issue is.
>
> On 22 April 2014 13:04, Kavita Sanap <ka...@gslab.com> wrote:
> > Hi,
> >
> > I am also getting this error. I copied jclouds-core-1.7.0.jar to my
> > deployment lib and using it. There is no classes folder
> >
> > Below is the error stack trace
> >
> > java.lang.IncompatibleClassChangeError:
> > org/jclouds/json/config/GsonModule$DateAdapter
> >         at
> >
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
> >         at
> > com.google.inject.AbstractModule.configure(AbstractModule.java:59)
> >         at
> > com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
> >         at com.google.inject.spi.Elements.getElements(Elements.java:101)
> >         at
> >
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
> >         at
> >
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
> >         at com.google.inject.Guice.createInjector(Guice.java:95)
> >         at
> org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
> >         at
> org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
> >         at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:654)
> >         at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:646)
> >         at
> > com.cloupia.feature.vcdpController.VcdpCloudTestConnectionHandler.Vc
> >
> > --Kavita
> >
> >
> > On Tue, Apr 22, 2014 at 12:34 PM, Ignasi Barrera <na...@apache.org>
> wrote:
> >>
> >> This is the first time I see this error, but after a quick search I've
> >> found this [1].
> >>
> >> Is "jclouds-all" the only dependency in your project? Are you using old
> >> code that was compiled with an earlier jclouds version? If so, could you
> >> remove all .class files (the entire "target" directory) to make sure
> >> everything is compiled again using the last jclouds version?
> >>
> >> I.
> >>
> >> [1]
> >>
> http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror
> >>
> >> El 21/04/2014 23:21, "Pankaj Kharode" <pa...@gslab.com>
> escribió:
> >>
> >>> Hi Ignasi,
> >>>
> >>> Yes, Please see attached.
> >>>
> >>> -Pankaj
> >>>
> >>>
> >>> On Mon, Apr 21, 2014 at 1:16 PM, Ignasi Barrera
> >>> <ig...@gmail.com> wrote:
> >>>>
> >>>> Are you using Maven? If so, could you paste the output of running a
> >>>> "mvn dependency:tree"?
> >>>>
> >>>> On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com>
> wrote:
> >>>> > Doesn't look like I've other entries linked (some-how my work space
> >>>> > may have
> >>>> > conflicts as things worked in a fresh project)
> >>>> >
> >>>> > <classpathentry kind="lib"
> >>>> > path="/src/target/lib/guice-assistedinject-3.0.jar"/>
> >>>> >         <classpathentry kind="lib"
> >>>> > path="/src/target/lib/gson-2.2.4.jar"/>
> >>>> > <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
> >>>> > <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
> >>>> >
> >>>> >
> >>>> >
> >>>> > Thanks,
> >>>> > Pankaj
> >>>> >
> >>>> >
> >>>> > On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org>
> >>>> > wrote:
> >>>> >>
> >>>> >> Not AFAIK. Could you check your app's classpath and see which exact
> >>>> >> version of guice and gson you have there?
> >>>> >>
> >>>> >> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have
> >>>> >> those
> >>>> >> (and only those) versions of the libs in the classpath.
> >>>> >>
> >>>> >> I.
> >>>> >>
> >>>> >> Has anyone come across this issue ?
> >>>> >>
> >>>> >>
> >>>> >> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
> >>>> >> .endpoint(endpoint)
> >>>> >> .credentials(identity, password)
> >>>> >> .modules(modules)
> >>>> >> .buildView(ComputeServiceContext.class);
> >>>> >> compute = context.getComputeService(); TemplateBuilder tbuilder =
> >>>> >> compute.templateBuilder(); images = compute.listImages();
> >>>> >>
> >>>> >>
> >>>> >>
> >>>> >> Exception in thread "main" java.lang.IncompatibleClassChangeError:
> >>>> >> class
> >>>> >> org.jclouds.json.config.GsonModule$DateAdapter has interface
> >>>> >> com.google.gson.TypeAdapter as super class
> >>>> >> at java.lang.ClassLoader.defineClass1(Native Method)
> >>>> >> at java.lang.ClassLoader.defineClass(Unknown Source)
> >>>> >> at java.security.SecureClassLoader.defineClass(Unknown Source)
> >>>> >> at java.net.URLClassLoader.defineClass(Unknown Source)
> >>>> >> at java.net.URLClassLoader.access$100(Unknown Source)
> >>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
> >>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
> >>>> >> at java.security.AccessController.doPrivileged(Native Method)
> >>>> >> at java.net.URLClassLoader.findClass(Unknown Source)
> >>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
> >>>> >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
> >>>> >> at
> >>>> >>
> >>>> >>
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
> >>>> >> at
> com.google.inject.AbstractModule.configure(AbstractModule.java:59)
> >>>> >> at
> >>>> >>
> >>>> >>
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
> >>>> >> at com.google.inject.spi.Elements.getElements(Elements.java:101)
> >>>> >> at
> >>>> >>
> >>>> >>
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
> >>>> >> at
> >>>> >>
> >>>> >>
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
> >>>> >> at com.google.inject.Guice.createInjector(Guice.java:95)
> >>>> >> at
> org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
> >>>> >> at
> org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
> >>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
> >>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
> >>>> >>
> >>>> >> --
> >>>> >>
> >>>> >> Regards,
> >>>> >> Pankaj
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> >
> >>>> > Regards,
> >>>> > Pankaj
> >>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> Regards,
> >>> Pankaj
> >
> >
>

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Ignasi Barrera <ig...@gmail.com>.
Kavita, could you share which exact libraries you have in the classpath?
And both, could you try using jclouds 1.7.2 and see if it still
happens? Just trying to figure out where the issue is.

On 22 April 2014 13:04, Kavita Sanap <ka...@gslab.com> wrote:
> Hi,
>
> I am also getting this error. I copied jclouds-core-1.7.0.jar to my
> deployment lib and using it. There is no classes folder
>
> Below is the error stack trace
>
> java.lang.IncompatibleClassChangeError:
> org/jclouds/json/config/GsonModule$DateAdapter
>         at
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>         at
> com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>         at
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>         at com.google.inject.spi.Elements.getElements(Elements.java:101)
>         at
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>         at
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>         at com.google.inject.Guice.createInjector(Guice.java:95)
>         at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
>         at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>         at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:654)
>         at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:646)
>         at
> com.cloupia.feature.vcdpController.VcdpCloudTestConnectionHandler.Vc
>
> --Kavita
>
>
> On Tue, Apr 22, 2014 at 12:34 PM, Ignasi Barrera <na...@apache.org> wrote:
>>
>> This is the first time I see this error, but after a quick search I've
>> found this [1].
>>
>> Is "jclouds-all" the only dependency in your project? Are you using old
>> code that was compiled with an earlier jclouds version? If so, could you
>> remove all .class files (the entire "target" directory) to make sure
>> everything is compiled again using the last jclouds version?
>>
>> I.
>>
>> [1]
>> http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror
>>
>> El 21/04/2014 23:21, "Pankaj Kharode" <pa...@gslab.com> escribió:
>>
>>> Hi Ignasi,
>>>
>>> Yes, Please see attached.
>>>
>>> -Pankaj
>>>
>>>
>>> On Mon, Apr 21, 2014 at 1:16 PM, Ignasi Barrera
>>> <ig...@gmail.com> wrote:
>>>>
>>>> Are you using Maven? If so, could you paste the output of running a
>>>> "mvn dependency:tree"?
>>>>
>>>> On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com> wrote:
>>>> > Doesn't look like I've other entries linked (some-how my work space
>>>> > may have
>>>> > conflicts as things worked in a fresh project)
>>>> >
>>>> > <classpathentry kind="lib"
>>>> > path="/src/target/lib/guice-assistedinject-3.0.jar"/>
>>>> >         <classpathentry kind="lib"
>>>> > path="/src/target/lib/gson-2.2.4.jar"/>
>>>> > <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
>>>> > <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
>>>> >
>>>> >
>>>> >
>>>> > Thanks,
>>>> > Pankaj
>>>> >
>>>> >
>>>> > On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org>
>>>> > wrote:
>>>> >>
>>>> >> Not AFAIK. Could you check your app's classpath and see which exact
>>>> >> version of guice and gson you have there?
>>>> >>
>>>> >> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have
>>>> >> those
>>>> >> (and only those) versions of the libs in the classpath.
>>>> >>
>>>> >> I.
>>>> >>
>>>> >> Has anyone come across this issue ?
>>>> >>
>>>> >>
>>>> >> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
>>>> >> .endpoint(endpoint)
>>>> >> .credentials(identity, password)
>>>> >> .modules(modules)
>>>> >> .buildView(ComputeServiceContext.class);
>>>> >> compute = context.getComputeService(); TemplateBuilder tbuilder =
>>>> >> compute.templateBuilder(); images = compute.listImages();
>>>> >>
>>>> >>
>>>> >>
>>>> >> Exception in thread "main" java.lang.IncompatibleClassChangeError:
>>>> >> class
>>>> >> org.jclouds.json.config.GsonModule$DateAdapter has interface
>>>> >> com.google.gson.TypeAdapter as super class
>>>> >> at java.lang.ClassLoader.defineClass1(Native Method)
>>>> >> at java.lang.ClassLoader.defineClass(Unknown Source)
>>>> >> at java.security.SecureClassLoader.defineClass(Unknown Source)
>>>> >> at java.net.URLClassLoader.defineClass(Unknown Source)
>>>> >> at java.net.URLClassLoader.access$100(Unknown Source)
>>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>>>> >> at java.security.AccessController.doPrivileged(Native Method)
>>>> >> at java.net.URLClassLoader.findClass(Unknown Source)
>>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>>>> >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>>>> >> at
>>>> >>
>>>> >> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>>>> >> at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>>>> >> at
>>>> >>
>>>> >> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>>>> >> at com.google.inject.spi.Elements.getElements(Elements.java:101)
>>>> >> at
>>>> >>
>>>> >> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>>>> >> at
>>>> >>
>>>> >> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>>>> >> at com.google.inject.Guice.createInjector(Guice.java:95)
>>>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
>>>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
>>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
>>>> >>
>>>> >> --
>>>> >>
>>>> >> Regards,
>>>> >> Pankaj
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> >
>>>> > Regards,
>>>> > Pankaj
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Regards,
>>> Pankaj
>
>

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Kavita Sanap <ka...@gslab.com>.
Hi,

I am also getting this error. I copied jclouds-core-1.7.0.jar to my
deployment lib and using it. There is no classes folder

Below is the error stack trace

java.lang.IncompatibleClassChangeError:
org/jclouds/json/config/GsonModule$DateAdapter
        at
org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
        at
com.google.inject.AbstractModule.configure(AbstractModule.java:59)
        at
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
        at com.google.inject.spi.Elements.getElements(Elements.java:101)
        at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
        at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
        at com.google.inject.Guice.createInjector(Guice.java:95)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
        at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
        at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:654)
        at org.jclouds.ContextBuilder.buildApi(ContextBuilder.java:646)
        at
com.cloupia.feature.vcdpController.VcdpCloudTestConnectionHandler.Vc

--Kavita


On Tue, Apr 22, 2014 at 12:34 PM, Ignasi Barrera <na...@apache.org> wrote:

> This is the first time I see this error, but after a quick search I've
> found this [1].
>
> Is "jclouds-all" the only dependency in your project? Are you using old
> code that was compiled with an earlier jclouds version? If so, could you
> remove all .class files (the entire "target" directory) to make sure
> everything is compiled again using the last jclouds version?
>
> I.
>
> [1]
> http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror
> El 21/04/2014 23:21, "Pankaj Kharode" <pa...@gslab.com> escribió:
>
> Hi Ignasi,
>>
>> Yes, Please see attached.
>>
>> -Pankaj
>>
>>
>> On Mon, Apr 21, 2014 at 1:16 PM, Ignasi Barrera <ignasi.barrera@gmail.com
>> > wrote:
>>
>>> Are you using Maven? If so, could you paste the output of running a
>>> "mvn dependency:tree"?
>>>
>>> On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com> wrote:
>>> > Doesn't look like I've other entries linked (some-how my work space
>>> may have
>>> > conflicts as things worked in a fresh project)
>>> >
>>> > <classpathentry kind="lib"
>>> > path="/src/target/lib/guice-assistedinject-3.0.jar"/>
>>> >         <classpathentry kind="lib"
>>> path="/src/target/lib/gson-2.2.4.jar"/>
>>> > <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
>>> > <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
>>> >
>>> >
>>> >
>>> > Thanks,
>>> > Pankaj
>>> >
>>> >
>>> > On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org>
>>> wrote:
>>> >>
>>> >> Not AFAIK. Could you check your app's classpath and see which exact
>>> >> version of guice and gson you have there?
>>> >>
>>> >> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those
>>> >> (and only those) versions of the libs in the classpath.
>>> >>
>>> >> I.
>>> >>
>>> >> Has anyone come across this issue ?
>>> >>
>>> >>
>>> >> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
>>> >> .endpoint(endpoint)
>>> >> .credentials(identity, password)
>>> >> .modules(modules)
>>> >> .buildView(ComputeServiceContext.class);
>>> >> compute = context.getComputeService(); TemplateBuilder tbuilder =
>>> >> compute.templateBuilder(); images = compute.listImages();
>>> >>
>>> >>
>>> >>
>>> >> Exception in thread "main" java.lang.IncompatibleClassChangeError:
>>> class
>>> >> org.jclouds.json.config.GsonModule$DateAdapter has interface
>>> >> com.google.gson.TypeAdapter as super class
>>> >> at java.lang.ClassLoader.defineClass1(Native Method)
>>> >> at java.lang.ClassLoader.defineClass(Unknown Source)
>>> >> at java.security.SecureClassLoader.defineClass(Unknown Source)
>>> >> at java.net.URLClassLoader.defineClass(Unknown Source)
>>> >> at java.net.URLClassLoader.access$100(Unknown Source)
>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>>> >> at java.security.AccessController.doPrivileged(Native Method)
>>> >> at java.net.URLClassLoader.findClass(Unknown Source)
>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>>> >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>>> >> at
>>> >>
>>> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>>> >> at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>>> >> at
>>> >>
>>> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>>> >> at com.google.inject.spi.Elements.getElements(Elements.java:101)
>>> >> at
>>> >>
>>> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>>> >> at
>>> >>
>>> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>>> >> at com.google.inject.Guice.createInjector(Guice.java:95)
>>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
>>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
>>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
>>> >>
>>> >> --
>>> >>
>>> >> Regards,
>>> >> Pankaj
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> >
>>> > Regards,
>>> > Pankaj
>>>
>>
>>
>>
>> --
>>
>> Regards,
>> Pankaj
>>
>

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Ignasi Barrera <na...@apache.org>.
This is the first time I see this error, but after a quick search I've
found this [1].

Is "jclouds-all" the only dependency in your project? Are you using old
code that was compiled with an earlier jclouds version? If so, could you
remove all .class files (the entire "target" directory) to make sure
everything is compiled again using the last jclouds version?

I.

[1]
http://stackoverflow.com/questions/1980452/what-causes-java-lang-incompatibleclasschangeerror
El 21/04/2014 23:21, "Pankaj Kharode" <pa...@gslab.com> escribió:

> Hi Ignasi,
>
> Yes, Please see attached.
>
> -Pankaj
>
>
> On Mon, Apr 21, 2014 at 1:16 PM, Ignasi Barrera <ig...@gmail.com>wrote:
>
>> Are you using Maven? If so, could you paste the output of running a
>> "mvn dependency:tree"?
>>
>> On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com> wrote:
>> > Doesn't look like I've other entries linked (some-how my work space may
>> have
>> > conflicts as things worked in a fresh project)
>> >
>> > <classpathentry kind="lib"
>> > path="/src/target/lib/guice-assistedinject-3.0.jar"/>
>> >         <classpathentry kind="lib"
>> path="/src/target/lib/gson-2.2.4.jar"/>
>> > <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
>> > <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
>> >
>> >
>> >
>> > Thanks,
>> > Pankaj
>> >
>> >
>> > On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org>
>> wrote:
>> >>
>> >> Not AFAIK. Could you check your app's classpath and see which exact
>> >> version of guice and gson you have there?
>> >>
>> >> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those
>> >> (and only those) versions of the libs in the classpath.
>> >>
>> >> I.
>> >>
>> >> Has anyone come across this issue ?
>> >>
>> >>
>> >> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
>> >> .endpoint(endpoint)
>> >> .credentials(identity, password)
>> >> .modules(modules)
>> >> .buildView(ComputeServiceContext.class);
>> >> compute = context.getComputeService(); TemplateBuilder tbuilder =
>> >> compute.templateBuilder(); images = compute.listImages();
>> >>
>> >>
>> >>
>> >> Exception in thread "main" java.lang.IncompatibleClassChangeError:
>> class
>> >> org.jclouds.json.config.GsonModule$DateAdapter has interface
>> >> com.google.gson.TypeAdapter as super class
>> >> at java.lang.ClassLoader.defineClass1(Native Method)
>> >> at java.lang.ClassLoader.defineClass(Unknown Source)
>> >> at java.security.SecureClassLoader.defineClass(Unknown Source)
>> >> at java.net.URLClassLoader.defineClass(Unknown Source)
>> >> at java.net.URLClassLoader.access$100(Unknown Source)
>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>> >> at java.net.URLClassLoader$1.run(Unknown Source)
>> >> at java.security.AccessController.doPrivileged(Native Method)
>> >> at java.net.URLClassLoader.findClass(Unknown Source)
>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>> >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> >> at java.lang.ClassLoader.loadClass(Unknown Source)
>> >> at
>> >>
>> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>> >> at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>> >> at
>> >>
>> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>> >> at com.google.inject.spi.Elements.getElements(Elements.java:101)
>> >> at
>> >>
>> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>> >> at
>> >>
>> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>> >> at com.google.inject.Guice.createInjector(Guice.java:95)
>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
>> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
>> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
>> >>
>> >> --
>> >>
>> >> Regards,
>> >> Pankaj
>> >
>> >
>> >
>> >
>> > --
>> >
>> > Regards,
>> > Pankaj
>>
>
>
>
> --
>
> Regards,
> Pankaj
>

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Pankaj Kharode <pa...@gslab.com>.
Hi Ignasi,

Yes, Please see attached.

-Pankaj


On Mon, Apr 21, 2014 at 1:16 PM, Ignasi Barrera <ig...@gmail.com>wrote:

> Are you using Maven? If so, could you paste the output of running a
> "mvn dependency:tree"?
>
> On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com> wrote:
> > Doesn't look like I've other entries linked (some-how my work space may
> have
> > conflicts as things worked in a fresh project)
> >
> > <classpathentry kind="lib"
> > path="/src/target/lib/guice-assistedinject-3.0.jar"/>
> >         <classpathentry kind="lib"
> path="/src/target/lib/gson-2.2.4.jar"/>
> > <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
> > <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
> >
> >
> >
> > Thanks,
> > Pankaj
> >
> >
> > On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org>
> wrote:
> >>
> >> Not AFAIK. Could you check your app's classpath and see which exact
> >> version of guice and gson you have there?
> >>
> >> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those
> >> (and only those) versions of the libs in the classpath.
> >>
> >> I.
> >>
> >> Has anyone come across this issue ?
> >>
> >>
> >> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
> >> .endpoint(endpoint)
> >> .credentials(identity, password)
> >> .modules(modules)
> >> .buildView(ComputeServiceContext.class);
> >> compute = context.getComputeService(); TemplateBuilder tbuilder =
> >> compute.templateBuilder(); images = compute.listImages();
> >>
> >>
> >>
> >> Exception in thread "main" java.lang.IncompatibleClassChangeError: class
> >> org.jclouds.json.config.GsonModule$DateAdapter has interface
> >> com.google.gson.TypeAdapter as super class
> >> at java.lang.ClassLoader.defineClass1(Native Method)
> >> at java.lang.ClassLoader.defineClass(Unknown Source)
> >> at java.security.SecureClassLoader.defineClass(Unknown Source)
> >> at java.net.URLClassLoader.defineClass(Unknown Source)
> >> at java.net.URLClassLoader.access$100(Unknown Source)
> >> at java.net.URLClassLoader$1.run(Unknown Source)
> >> at java.net.URLClassLoader$1.run(Unknown Source)
> >> at java.security.AccessController.doPrivileged(Native Method)
> >> at java.net.URLClassLoader.findClass(Unknown Source)
> >> at java.lang.ClassLoader.loadClass(Unknown Source)
> >> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> >> at java.lang.ClassLoader.loadClass(Unknown Source)
> >> at
> >>
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
> >> at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
> >> at
> >>
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
> >> at com.google.inject.spi.Elements.getElements(Elements.java:101)
> >> at
> >>
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
> >> at
> >>
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
> >> at com.google.inject.Guice.createInjector(Guice.java:95)
> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
> >> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
> >> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
> >>
> >> --
> >>
> >> Regards,
> >> Pankaj
> >
> >
> >
> >
> > --
> >
> > Regards,
> > Pankaj
>



-- 

Regards,
Pankaj

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Ignasi Barrera <ig...@gmail.com>.
Are you using Maven? If so, could you paste the output of running a
"mvn dependency:tree"?

On 21 April 2014 22:04, Pankaj Kharode <pa...@gslab.com> wrote:
> Doesn't look like I've other entries linked (some-how my work space may have
> conflicts as things worked in a fresh project)
>
> <classpathentry kind="lib"
> path="/src/target/lib/guice-assistedinject-3.0.jar"/>
>         <classpathentry kind="lib" path="/src/target/lib/gson-2.2.4.jar"/>
> <classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
> <classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>
>
>
>
> Thanks,
> Pankaj
>
>
> On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org> wrote:
>>
>> Not AFAIK. Could you check your app's classpath and see which exact
>> version of guice and gson you have there?
>>
>> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those
>> (and only those) versions of the libs in the classpath.
>>
>> I.
>>
>> Has anyone come across this issue ?
>>
>>
>> ComputeServiceContext context = ContextBuilder.newBuilder(provider)
>> .endpoint(endpoint)
>> .credentials(identity, password)
>> .modules(modules)
>> .buildView(ComputeServiceContext.class);
>> compute = context.getComputeService(); TemplateBuilder tbuilder =
>> compute.templateBuilder(); images = compute.listImages();
>>
>>
>>
>> Exception in thread "main" java.lang.IncompatibleClassChangeError: class
>> org.jclouds.json.config.GsonModule$DateAdapter has interface
>> com.google.gson.TypeAdapter as super class
>> at java.lang.ClassLoader.defineClass1(Native Method)
>> at java.lang.ClassLoader.defineClass(Unknown Source)
>> at java.security.SecureClassLoader.defineClass(Unknown Source)
>> at java.net.URLClassLoader.defineClass(Unknown Source)
>> at java.net.URLClassLoader.access$100(Unknown Source)
>> at java.net.URLClassLoader$1.run(Unknown Source)
>> at java.net.URLClassLoader$1.run(Unknown Source)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at java.net.URLClassLoader.findClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>> at java.lang.ClassLoader.loadClass(Unknown Source)
>> at
>> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>> at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
>> at
>> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>> at com.google.inject.spi.Elements.getElements(Elements.java:101)
>> at
>> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>> at
>> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
>> at com.google.inject.Guice.createInjector(Guice.java:95)
>> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
>> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
>> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
>>
>> --
>>
>> Regards,
>> Pankaj
>
>
>
>
> --
>
> Regards,
> Pankaj

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Pankaj Kharode <pa...@gslab.com>.
Doesn't look like I've other entries linked (some-how my work space may
have conflicts as things worked in a fresh project)

<classpathentry kind="lib"
path="/src/target/lib/guice-assistedinject-3.0.jar"/>
        <classpathentry kind="lib" path="/src/target/lib/gson-2.2.4.jar"/>
<classpathentry kind="lib" path="/src/target/lib/guava-15.0.jar"/>
<classpathentry kind="lib" path="/src/target/lib/guice-3.0.jar"/>



Thanks,
Pankaj


On Mon, Apr 21, 2014 at 12:43 PM, Ignasi Barrera <na...@apache.org> wrote:

> Not AFAIK. Could you check your app's classpath and see which exact
> version of guice and gson you have there?
>
> Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those
> (and only those) versions of the libs in the classpath.
>
> I.
> Has anyone come across this issue ?
>
>
> * ComputeServiceContext context = ContextBuilder.newBuilder(provider)*
> * .endpoint(endpoint)*
> * .credentials(identity, password)*
> * .modules(modules)*
> * .buildView(ComputeServiceContext.class);*
>  * compute = context.getComputeService(); TemplateBuilder tbuilder =
> compute.templateBuilder(); images = compute.listImages();*
>
>
>
> Exception in thread "main" java.lang.IncompatibleClassChangeError: class
> org.jclouds.json.config.GsonModule$DateAdapter has interface
> com.google.gson.TypeAdapter as super class
>  at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown Source)
>  at java.security.SecureClassLoader.defineClass(Unknown Source)
> at java.net.URLClassLoader.defineClass(Unknown Source)
>  at java.net.URLClassLoader.access$100(Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown Source)
>  at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>  at java.lang.ClassLoader.loadClass(Unknown Source)
> at
> org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
>  at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
> at
> com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
>  at com.google.inject.spi.Elements.getElements(Elements.java:101)
> at
> com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
>  at
> com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
> at com.google.inject.Guice.createInjector(Guice.java:95)
>  at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
> at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
>  at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
> at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)
>
> --
>
> Regards,
> Pankaj
>



-- 

Regards,
Pankaj

Re: IncompatibleClassChangeError with JClouds 1.7.1 connecting to Openstack

Posted by Ignasi Barrera <na...@apache.org>.
Not AFAIK. Could you check your app's classpath and see which exact version
of guice and gson you have there?

Guice should be 3.0 and Gson should be 2.2.4. Make sure you have those (and
only those) versions of the libs in the classpath.

I.
Has anyone come across this issue ?


* ComputeServiceContext context = ContextBuilder.newBuilder(provider)*
* .endpoint(endpoint)*
* .credentials(identity, password)*
* .modules(modules)*
* .buildView(ComputeServiceContext.class);*
 * compute = context.getComputeService(); TemplateBuilder tbuilder =
compute.templateBuilder(); images = compute.listImages();*



Exception in thread "main" java.lang.IncompatibleClassChangeError: class
org.jclouds.json.config.GsonModule$DateAdapter has interface
com.google.gson.TypeAdapter as super class
 at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
 at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
 at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.jclouds.openstack.nova.v2_0.config.NovaParserModule.configure(NovaParserModule.java:71)
 at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
 at com.google.inject.spi.Elements.getElements(Elements.java:101)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
 at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
 at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:403)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:327)
 at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:618)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:598)

-- 

Regards,
Pankaj