Re: Java publishing is broken in 6.2.1


Frank Quinn <fquinn.ni@...>
 

Hi Yury,

This was actually part of why I recently introduced CI for jni - we didn't spot this until it was too late.

The short answer is that since its usually a compile time dependency, its so easily fixed, and its unavoidable if publisher events were to work without significant changes, I was letting this one slide. In the maven world this would be a common enough occurrence when bumping version numbers too (I want to add proper maven support soon too) so it was less of a concern.

Going forward though, we will be a little more pro-active about this sort of thing.

Cheers,
Frank


On Tue, 14 Nov 2017, 16:19 Yury Batrakov, <yury.batrakov@...> wrote:
Classification: Public
Hi team,

We found that Java publishing was broken when onSuccess event was introduced. The problem is here - mamapublisherjni.c, function Java_com_wombat_mama_MamaPublisher_initIDs:
    publisherCallbackMethoOnSuccess_g = (*env)->GetMethodID(env, publisherCallbackClass,
        "onSuccess", "(Lcom/wombat/mama/MamaPublisher;SLjava/lang/String;)V");

But com.wombat.mama. MamaPublisherCallback doesn't have this method and we get exception when trying to create MamaPublisher object (reproduced with MamaPublisherJava example):
Exception in thread "main" java.lang.NoSuchMethodError: onSuccess
        at com.wombat.mama.MamaPublisher.initIDs(Native Method)
        at com.wombat.mama.MamaPublisher.<clinit>(MamaPublisher.java:31)
        at com.wombat.mama.examples.MamaPublisherJava.createPublisher(MamaPublisherJava.java:103)
        at com.wombat.mama.examples.MamaPublisherJava.run(MamaPublisherJava.java:313)
        at com.wombat.mama.examples.MamaPublisherJava.main(MamaPublisherJava.java:301)

Obvious fix is to add new method to MamaPublisherCallback but it will break the code for those clients who were using publisher events before. What do you think should be the fix for this?


---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to https://www.db.com/disclosures for additional EU corporate and regulatory disclosures and to http://www.db.com/unitedkingdom/content/privacy.htm for information about privacy.
_______________________________________________
Openmama-dev mailing list
Openmama-dev@...
https://lists.openmama.org/mailman/listinfo/openmama-dev

Join Openmama-dev@lists.openmama.org to automatically receive all group messages.