我在运行时遇到IncompatibleClassChangeError。我还没弄清楚原因。这是日志:
java.lang.IncompatibleClassChangeError
at com.EmailCreator.lambda$null$396(EmailCreator.java:214)
at com.EmailCreator$$Lambda$248/280771231.accept(Unknown Source)
at com.util.Xml$Tag.child(Xml.java:194)
at com.EmailCreator.lambda$sendSoapRequest$397(EmailCreator.java:212)
at com.EmailCreator$$Lambda$246/488301663.accept(Unknown Source)
at com..util.Xml$Tag.child(Xml.java:194)
at com.EmailCreator.sendSoapRequest(EmailCreator.java:202)
at com.EmailCreator.send(EmailCreator.java:175)
at com.exacttarget.EmailSendQueue.accept(EmailSendQueue.java:24)
at com.exacttarget.EmailSendQueue.accept(EmailSendQueue.java:12)
at com.task.queue.AbstractQueue$ConsumerWrapper.consume(AbstractQueue.java:615)
at com.task.queue.AbstractQueue$ConsumerWrapper.consume(AbstractQueue.java:602)
at com.psddev.dari.util.AsyncConsumer.doTask(AsyncConsumer.java:113)
at com.psddev.dari.util.Task.run(Task.java:493)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
代码:
private static class EmailReceiver {
String email;
String key;
String list;
public EmailReceiver(Subscriber subscriber, ExactTargetSubscriberList list) {
this.email = subscriber.getEmail();
this.key = subscriber.getState().getId().toString();
this.list = list.getState().getId().toString();
}
}
EmailCreator中的第214行就像subscriber.child(“EmailAddress”)。text(receiver.email);来自以下代码。
for (EmailReceiver receiver : receivers) {
objects.child("Subscribers", subscribers -> {
ETSoapBuilder.addNilFields(subscribers);
subscribers.child("EmailAddress").text(receiver.email);
subscribers.child("SubscriberKey").text(receiver.key);
subscribers.child("Attributes", attributes -> {
attributes.child("Name").text("ContentID");
attributes.child("Value").text(email.getId().toString());
});
subscribers.child("Attributes", attributes -> {
attributes.child("Name").text("Hash");
attributes.child("Value").text(receiver.list);
});
subscribers.child("Attributes", attributes -> {
attributes.child("Name").text("SubscriberKey");
attributes.child("Value").text(receiver.key);
});
subscribers.child("Attributes", attributes -> {
attributes.child("Name").text("EmailAddress");
attributes.child("Value").text(receiver.email);
});
});
}
});
非常感谢任何帮助!!