Ecwid / ecwid-mailchimp

MailChimp API Wrapper for Java
Apache License 2.0
86 stars 83 forks source link

java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET #9

Closed modinodavid closed 11 years ago

modinodavid commented 11 years ago

Hi,

I'm using the ecwid java api version 1.3, and I'm having this issue when I'm inserting a new subscriber. I'm getting errors from the mailchimp java source, which, i suppose, means I'm not importing the correct libraries or the correct version of that libraries. It's not a compiling error, it's an execution error.

The dependencies of that API are: com.google.code.gson gson 2.2.2 org.apache.httpcomponents httpclient 4.2.1 org.testng testng 6.7

My URI is:

https://us7.api.mailchimp.com/1.3/?method=listSubscribe

And I have this 3 version of that libraries correctly downloaded, imported, and included in the $CLASSPATH, so I don't have any clue of what is causing the error.

The error I get it is in the execute method, when we try to insert a new subscriber from my account:

java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET

Any ideas would be appreciated.

Thanks in advanced.

basiliscus commented 11 years ago

Perhaps, the error occurs because library 'httpcore' is not included in your classpath.

The complete list of compile and runtime dependencies is as follows:

[INFO] +- com.google.code.gson:gson:jar:2.2.2:compile [INFO] +- org.apache.httpcomponents:httpclient:jar:4.2.1:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.2.1:compile [INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | - commons-codec:commons-codec:jar:1.6:compile

Please ensure all of these libs are included in your classpath.

Also, the following libs are required for running tests:

[INFO] - org.testng:testng:jar:6.7:test [INFO] +- org.beanshell:bsh:jar:2.0b4:test [INFO] +- com.beust:jcommander:jar:1.12:test [INFO] - org.yaml:snakeyaml:jar:1.6:test

You don;t have to add those libs unless you want to be able to run the unit and integration tests.

modinodavid commented 11 years ago

Ok. I've solved that problem, as you said there was an incompatibility libraries.

Thanks for all!