Java Service -> ext Java library (rabbit MQ client library -> Service.doInvoke fails

Hi,

i’m trying to use the external java library (Rabbit MQ Client jar) in wM Java Service.

while consuming messages from Rabbit MQ’s Queue, i would like to invoke wM flow service from handleDelivery of consumer. But for some reasons, i’m not able to invoke wM built-in or user defined flow services from external library jar’s function

any help is appreciated

below is the exception

jvm 1 | java.lang.NullPointerException
jvm 1 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:427)
jvm 1 | at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383)
jvm 1 | at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:244)
jvm 1 | at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:93)
jvm 1 | at com.wm.app.b2b.server.Service.doInvoke(Service.java:692)
jvm 1 | at com.wm.app.b2b.server.Service.doInvoke(Service.java:580)
jvm 1 | at CustomerUpdates.MsgHandling$1.handleDelivery(MsgHandling.java:95)
jvm 1 | at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:144)
jvm 1 | at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:99)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
jvm 1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
jvm 1 | at java.lang.Thread.run(Thread.java:744)
jvm 1 | error to invoke pub.flow:debugLog

Thanks & Regards
Ajay Kumar Kasam

Hi Ajay,

can you share some parts of the configuration and the place where you have placed the jar-file?

Looks like an incomplete configuration or connectivity issue.

Regards,
Holger

figured out the issue, resolved it.


reply to your query, can you suggest where should rabbit mq client libraries placed. i had placed them in package’s code/jars directory

Ajay – Did you call some method of java class which is expecting some input due to which you got NullPointerException. If this is not the reason, please share fix of this issue which may be helpful to other members.

Thanks,

Sounds good for the first try as long it is a pure Java API.
In this case the Rabbit MQ API will only be available in this package and the packages which have declared to be dependent on this one.

When exchanging the jar for a newer version remember to reload the package to make it active.

I agree with MR that the fix should be shared with the community for other members having the same issue.

Regards,
Holger

same issue and find resolution in empower:
Sometime the Integration Server does not get the invoke state.

Please try adding a new Invoke state before you do the invoke.

InvokeState is = new InvokeState();

          Session session = Service.getSession();
          User olduser = session.getUser();
          InvokeState.setCurrentSession(session);
          InvokeState.setSessionUser(olduser);

           output = Service.doInvoke(nsServiceName, is.getSession(), input);