Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not initialize class com.ecwid.maleorang.util.ClassUtil #9

Open
jammyclanger opened this issue Jan 1, 2017 · 3 comments
Open

Comments

@jammyclanger
Copy link

Hi,

Been trying to use your maven version 3.0-0.9.5 in my Java 8 Spring Boot project but am getting the following error when trying to run it on a AWS Tomcat instance:

java.lang.NoClassDefFoundError: Could not initialize class com.ecwid.maleorang.util.ClassUtil

Any ideas?

@basiliscus
Copy link

Hi @jammyclanger ,
Can you provide the complete stacktrace of the error you get?

@shaunMccloskey
Copy link

Hi

I have had a similar issue as the one mentioned above.
occurs when i make the following call within a service method.
EditMemberMethod.CreateOrUpdate method = new EditMemberMethod.CreateOrUpdate(listId,email);

throws
java.lang.NoClassDefFoundError: Could not initialize class com.ecwid.maleorang.util.ClassUtil

stacktrace appears to be empty.

I suspect its a problem with my integration of the project with maven

i have added

com.ecwid
maleorang
${mailChimpWrapper.verson}

within my maven build file

from the example
https://github.com/Ecwid/maleorang/blob/master/src/test/java/com/ecwid/maleorang/examples/ExistingMethodExample.java

I assumed it was just a matter of importing the correct classes and following the outlined structure.


List<MailchimpMapping> mailMappings = mailchimpMappingDao.findMailchimpMappingByWebhookId(webhookSettingsId);
			if(mailchimpProperties.getApiKey()!="" && mailchimpProperties.getMailChimpListId()!=null){
				final String apiKey = mailchimpProperties.getApiKey();
				MailchimpClient client = new MailchimpClient(apiKey);
				try{
					final String listId =  mailchimpProperties.getMailChimpListId();
					for(Details person: details){
						final String email =  person.getEmail();
						EditMemberMethod.CreateOrUpdate method = new EditMemberMethod.CreateOrUpdate(listId,email);
						method.status = "subscribed";
						method.merge_fields = new MailchimpObject();
						
						for(MailchimpMapping mapping : mailMappings ){
							method.merge_fields.mapping.put(mapping.getMailChimpVarName(), person.getReflectionValue(mapping.getLocalVarName()));
						}
							
				        MemberInfo member = client.execute(method);
					}
				} finally{
					client.close();
				}
				
			}

any help would be greater appreciated.

@basiliscus
Copy link

Hi @shaunMccloskey ,

Can you provide access to a sample project, where the problem can be reproduced?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants