Go Back   DailyFX Forex Forum | FX Forum > FXCM Products and Services > FXProgrammers > Discussion / Support Forum > Java Trading API Support

Reply
 
Thread Tools Rate Thread
  #1 (permalink)  
Old 12-11-2008, 11:02 PM
Member
 
Join Date: Nov 2008
Posts: 14
7investors is on a distinguished road
No response of Log in at the Linux environment

Hi,

Now, we are developping FXCM API for FX Tranding at the Linux environment.

When we tried to do "log in" at the Linux environment,
we could not get any response from API.

However, we got enormous volume of logs as the attached file.
So, it seemed that some connection could occur internally.

We also tried to do "log in" at the WindowsPC environment,
but we could get response from API successfully.

This issue occurs only at the Linux environment.

Please give me your advice.

Thank you for your corporation.

Best Regards,
Kino----a

************************************************
<Additional Information>
OS version: Red Hat Enterprise Linux 3 update 9
Java: JDK 1.6.0_10
************************************************
Reply With Quote
  #2 (permalink)  
Old 12-15-2008, 03:47 PM
Moderator
 
Join Date: Jan 2006
Posts: 2,005
FXCM Help is on a distinguished road
look alright in the raw logs. Do you have your listeners setup correctly? Have you tried running the ClientTester.java example?
Reply With Quote
  #3 (permalink)  
Old 12-16-2008, 02:29 AM
Member
 
Join Date: Nov 2008
Posts: 14
7investors is on a distinguished road
Thank you for your confirmation.

I attach two log files of result by excuting 'ClientTester.java' at the Linux environment.

When it is run at Windows, following two messages would be exported into log file.

client: start logging in
client: start logginged

However, it is run at Linux , the message 'client: start logginged' is exported into the log file.
And also, the following exception message occurs.
'Exception of xml formed message parsing'

<Attachments>
infolog.txt --> the log file of 'info' as log level
debuglog.txt --> the log file of 'debug' as log level

I hope to get reply soon.

Thank you for your corporation.

Best Regards,
Kino----a
Reply With Quote
  #4 (permalink)  
Old 12-16-2008, 08:57 AM
Moderator
 
Join Date: Jan 2006
Posts: 2,005
FXCM Help is on a distinguished road
Well there are no differences between running on linux,w indows or any java platform at all.

So best advice I can offer is:
1) make sure you don't have something in the middle of your linux box and the FXCM server changing the HTML/XML messages. Parse seems to indicate something like this could be.
2) try running on a different JVM, 1.5 or a different 1.6 installation
3) try running JTS on the linux box, see if it works. enable the java console in your jvm settings.
http://www.fxcorporate.com/JTS/FXTS.jnlp
Reply With Quote
  #5 (permalink)  
Old 12-17-2008, 04:20 AM
Member
 
Join Date: Nov 2008
Posts: 14
7investors is on a distinguished road
Thank you for your reply.

We found the cause of this issue.
I write down the explanation for other people.

< Our Environment Info. >
 OS : Red Hat Enterprise Linux 3 Update 9
java : 1.6.0_10
Lang : ja_JP.eucJP

< The phenomenon >
The process of Log In does not complete at the Linux environment, when ClientTester as sample program in run.

And also, the following message of exception occurs.

Exception of xml formed message parsing:
org.xml.sax.SAXParseException: end tag </g> does not match begin tag <f>
at uk.co.wilson.xml.MinML.fatalError(MinML.java:586)
at uk.co.wilson.xml.MinML.parse(MinML.java:249)
at uk.co.wilson.xml.MinML.parse(MinML.java:487)
at com.fxcm.messaging.util.pdas.xml.PXmlParser.fromXm l(PXmlParser.java:113)
at com.fxcm.messaging.util.pdas.PDasMessageFactory.fr omXml(PDasMessageFactory.java:154)
at com.fxcm.messaging.util.pdas.communicator.Communic ator.request(Communicator.java:490)
at com.fxcm.messaging.util.pdas.communicator.Communic ator.run(Communicator.java:344)
at java.lang.Thread.run(Thread.java:619)


< The cause >
When the program reads data, garbled characters occur as followings.

<f n="9017">BASE_CRNCY_SYMBOL</f><f n="9018">?/f>

This occurs because 'EUC-JP' is applied as dafult character set in encode process.

However, if 'ISO-8859' is applied, the following character string can be got.

<f n="9017">BASE_CRNCY_SYMBOL</f><f n="9018">\</f>

'\' becomes garbled character.

And also, if 'Shift_JIS' is applied, the following character string can be got.

<f n="9017">BASE_CRNCY_SYMBOL</f><f n="9018">・</f>

The following sources would include this issue.

uk.co.wilson.xml.MinML.java (a part of source)

--------------------------------------------------------------------------------------
 public void parse(final InputSource source) throws SAXException, IOException {
if (source.getCharacterStream() != null)
parse(source.getCharacterStream());
else if (source.getByteStream() != null)
parse(new InputStreamReader(source.getByteStream()));
else
parse(new InputStreamReader(new URL(source.getSystemId()).openStream()));
}
----------------------------------------------------------------------------------------

There is no care on parse data to encode.


< Handling >
Changed Lang from 'ja_JP.eucJP' to 'ja_JP.SJIS'.
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with foreign exchange trading, and seek advice from an independent financial advisor if you have any doubts. Any opinions, news, research, analyses, prices, or other information contained on this website is provided as general market commentary and does not constitute investment advice. Forex Capital Markets LLC. will not accept liability for any loss or damage, including without limitation to, any loss of profit, which may arise directly or indirectly from use of or reliance on such information.

All times are GMT -5. The time now is 08:15 AM.
Copyright ©2009 Daily FX. All Rights Reserved.