VERIFIED SOLUTION i

problems running RMI with eMessaging

Issue

eMessaging 1.4M3 under SQL Server 2008 and Windows 2012 on JBOSS 5.1.

 

For some reason I can’t get eMessaging batch to work – I’ve configured the command.properties and the bat file making sure all the file locations match and the port number for the RMI. Within the Sales Play based VM it would appear to be 11090 or 11098. But neither of these work – the two errors I get are below.

 

C:\EngageOne\e-Messaging\command>e-Messaging.bat Realtime-FEP

Exception in thread "main" org.springframework.remoting.RemoteLookupFailureException: Could not find

RMI service [rmi://localhost:11090/CommandLineService] in RMI registry; nested exception is java.rm

i.NotBoundException: CommandLineService

at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.jav

a:210)

at org.springframework.remoting.rmi.RmiClientInterceptor.getStub(RmiClientInterceptor.java:2

36)

at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:25

6)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo

cation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy0.send(Unknown Source)

at Runner.main(Runner.java:40)

Caused by: java.rmi.NotBoundException: CommandLineService

at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:114)

at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)

at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:390)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:248)

at sun.rmi.transport.Transport$1.run(Transport.java:159)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:155)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)

at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)

at sun.rmi.server.UnicastRef.invoke(Unknown Source)

at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)

at java.rmi.Naming.lookup(Unknown Source)

at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.jav

a:199)

... 6 more

 

C:\EngageOne\e-Messaging\command>e-Messaging.bat Realtime-FEP

Exception in thread "main" org.springframework.remoting.RemoteLookupFailureException: Lookup of RMI

stub failed; nested exception is java.rmi.NoSuchObjectException: no such object in table

at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.jav

a:214)

at org.springframework.remoting.rmi.RmiClientInterceptor.getStub(RmiClientInterceptor.java:2

36)

at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:25

6)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo

cation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at com.sun.proxy.$Proxy0.send(Unknown Source)

at Runner.main(Runner.java:40)

Caused by: java.rmi.NoSuchObjectException: no such object in table

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)

at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)

at sun.rmi.server.UnicastRef.invoke(Unknown Source)

at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)

at java.rmi.Naming.lookup(Unknown Source)

at org.springframework.remoting.rmi.RmiClientInterceptor.lookupStub(RmiClientInterceptor.jav

a:199)

... 6 more

 

e-Messaging controls Generate Applications and Post Process commands

using a small Java application that needs to be installed on the remote server. This Java

application is controlled by e-Messaging using Remote Method Invocation (RMI). When

running on separate servers it is recommended to use Uniform Naming Convention (UNC) to

specify the input and output locations for all files that require processing. This ensures that

there is no confusion between file inputs and outputs on different servers.

Cause

The RMI port number in the command.properties file (within "<emsg install>\command") was incorrect. 

Resolution

UPDATED: October 18, 2017

The RMI port number in the command.properties file (within "<emsg install>\command") was incorrect.

 

The correct RMI port number can be found in the RMIService.properties file within "<emsg core.war location>\WEB-INF\classes"

 

From the documentation:

 

Default RMI port is 1199. This default can be overridden in the file

core.war/WEB-INF/classes/RMIService.properties
 

Configure the e-Messaging RMI port where the Sample Inbound Message Invoker

Application will connect to in core.war/WEB-INF/classes/RMIService.properties

Example:

emessaging.rmi.port=1199

 

remoteservice.properties file

Commands specified for calling Data Flow Plans, Generate and Post Process Commands from

e-Messaging are only executed if they match the patterns specified in the

remoteservice.properties file.

During e-Messaging set-up an administrator can set the acceptable execution parameter(s)

 

Generate example

For Generate, the administrator could enter the following values in the

remoteservice.properties file*:

allowed.command.doc1=doc1gen,doc1gen.exe, C:\\PathTo\\doc1gen.exe,C:\\PathT

o\\doc1gen

e-Messaging parses the command entered in the DOC1 Settings web interface to check that it

starts with one of the items on this list and raises a validation error if there is no match.