Hi, I am using Java RFA6 with login and receive market data. Please note our app runs only on java 6 thus we must use RFA6.
I am facing a strange issue when I try to login with RFA. And need your help as I am not able to proceed ahead without any direction to investigate.
When I run my application from Intelij IDE with Java 1.6, it works successfully. My app is able to login and receives market data updates successfully.
However when I package my app into a WAR and launch through Jnlp, RFA login fails with below message. I am seeing some unreadable characters and IndexOutOfBound Exception in login response message.
Please note that our ADS server does not receive any login request. It seems that RFA api fails internally and sends response.
MESSAGE
Msg Type: MsgType.STATUS_RESP
Msg Model Type: LOGIN
Indication Flags:
Hint Flags: HAS_ATTRIB_INFO | HAS_STATE
State: OPEN, SUSPECT, NONE, "Ø(
yConnection to tkrmdsdev01.nomura.com:14002 failed in connection Tiger::RFAFeed: java.lang.IndexOutOfBoundsException: nullR&jitkarrF
ApplicationId?215Position?10.199.92.165/MUMWD041460Role"
AttribInfo
Name: jitkarr
NameType: 1 (USER_NAME)
Attrib
ELEMENT_LIST
ELEMENT_ENTRY ApplicationId: Ø(
yConnection to tkrmdsdev01.nomura.com:14002 failed in connection Tiger::RFAFeed: java.lang.IndexOutOfBoundsException: nullR&jitkarrF
ApplicationId?215Position?10.199.92.165/MUMWD041460Role
ELEMENT_ENTRY Position: Ø(
yConnection to tkrmdsdev01.nomura.com:14002 failed in connection Tiger::RFAFeed: java.lang.IndexOutOfBoundsException: nullR&jitkarrF
ApplicationId?215Position?10.199.92.165/MUMWD041460Role
ELEMENT_ENTRY Role: 0
Payload: None
Is it something to do with encoding that fails when runing with a WAR file?
Below is the code snippet that I use while creating login request.
loginRequest.setMsgType(OMMMsg.MsgType.STREAMING_REQ);
loginRequest.setMsgModelType(RDMMsgTypes.LOGIN);
loginRequest.setAttribInfo(null, "jitkarr", RDMUser.NameType.USER_NAME);
String defaultPosition = "1.1.1.1/net";
try { defaultPosition = InetAddress.getLocalHost().getHostAddress() + "/" +
InetAddress.getLocalHost().getHostName(); } catch( Exception e ) {}
OMMEncoder encoder = ommPool.acquireEncoder();
encoder.initialize(OMMTypes.MSG, 50000);
encoder.encodeMsgInit(loginRequest, OMMTypes.ELEMENT_LIST, OMMTypes.NO_DATA);
encoder.encodeElementListInit(OMMElementList.HAS_STANDARD_DATA, (short)0, (short) 0);
encoder.encodeElementEntryInit(RDMUser.Attrib.ApplicationId, OMMTypes.ASCII_STRING);
encoder.encodeString("215", OMMTypes.ASCII_STRING);
encoder.encodeElementEntryInit(RDMUser.Attrib.Position, OMMTypes.ASCII_STRING);
encoder.encodeString(defaultPosition, OMMTypes.ASCII_STRING);
encoder.encodeAggregateComplete();
loginRequest = (OMMMsg)encoder.getEncodedObject();
spec.setMsg(loginRequest);
consumer = (OMMConsumer) rfaSession.createEventSource(EventSource.OMM_CONSUMER, "Consumer", false);
loginHandle = consumer.registerClient(responseQueue, spec, this, null);
MyDispatcher responseDispatcher = new MyDispatcher(this, rfaSession.getName(), responseQueue);
ommPool.releaseEncoder(encoder);