Problem with MamaPublisherJava listening for publisher callbacks


macrux
 

Hi there,

When MamaPublisherJava runs with the argument to listen for publisher callbacks it throws a null pointer exception and stops because it can't get the symbol from the publisher.

I'm using the example that ships with OpenMAMA 2.4.0 release without modifications, just running with

-tport pub -m qpid -v  -v -v -v -s TEST -pubCb

And the exception is:

Exception in thread "main" java.lang.NullPointerException
    at java.lang.String.length(String.java:623)
    at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:414)
    at java.lang.StringBuilder.append(StringBuilder.java:132)
    at com.wombat.mama.examples.MamaPublisherJava.onCreate(MamaPublisherJava.java:213)
    at com.wombat.mama.MamaPublisher._create(Native Method)
    at com.wombat.mama.MamaPublisher.create(MamaPublisher.java:63)
    at com.wombat.mama.examples.MamaPublisherJava.createPublisher(MamaPublisherJava.java:106)
    at com.wombat.mama.examples.MamaPublisherJava.run(MamaPublisherJava.java:313)
    at com.wombat.mama.examples.MamaPublisherJava.main(MamaPublisherJava.java:301)


The line 213 is

System.out.println("onPublishCreate: " + pub.getSymbol());

If I remove the pub.getSymbol() it runs fine. In the C version (mamapublisherc) it doesn't happen.

(The environment is Ubuntu 14.04, Java 1.7 and OpenMAMA 2.4.0)

Thanks for you help.

Kind regards,

Nestor.



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