Marketcetera Community Forums
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
CSV Market Data Adapter in Photon  XML
Forum Index » Marketcetera Open Labs and Contributions
Author Message
serrpa


Joined: 19/05/2009 13:58:16
Messages: 1
Offline

Hi,

I've copied mdata-csv-1.0-SNAPSHOT.jar file into the Photon/plugins directory and restarted all components but still can't see the feed under Preferences -> Market Data. Any ideas on what more I need to do?

Thanks

jbrukh@gmail.com


Joined: 19/03/2009 16:16:22
Messages: 21
Offline

Try going to photon/features/ and playing around with one of the feature.xml files. This is where the photon plugins are specified.

Edit: Also make sure the feed is compiled as an Eclipse plugin.

This message was edited 1 time. Last update was at 08/02/2010 16:52:58

colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

There are a few magic incantations that are necessary. Let me know if you're still having trouble.
m1super90


Joined: 09/11/2009 02:59:58
Messages: 14
Offline

Ref: http://www.marketcetera.org/confluence/display/MOL/CSV+Market+Data+Adapter

With reference to the "Easy Way" set of instructions found under "Documentation", the initial instruction is:
"Place the attached mdata-csv-1.0-SNAPSHOT.jar file in the strategyagent/modules/jar directory."

From the attached screenshot you can see there is no "modules" or "jar" folder under the "strategyagent" folder, as downloaded from source control. Are these to be added manually?

The subsequent instruction is:
"Unzip the attached sample-strategyagent-csv-files.zip file under your <metc>/strategyagent directory to get the configuration and sample scripts to run a strategy with a CSV market data adapter."

However, "strategyagent" is not a subfolder of the project root <metc>. Is the correct path "<metc>/source/strategyagent"?
Also, the zip contains a "modules" subfolder (see second screenshot), which will cause one to be created under "<metc>/source/strategyagent". If this is the intent, the "jar" folder (cited above) will still not be created.

Finally, the instruction:
"Run the following Strategy Agent command to start (you may need to have the ORS running, depending on your SA setup):"
"windows:> bin\strategyagent.bat samples\commands/MarketData-csv.txt"

There appears to be no "strategyagent.bat" in the entire project folder structure, as downloaded from source control.
[Thumb - Missing_folder.PNG]
 Filename Missing_folder.PNG [Disk] Download
 Description
 Filesize 89 Kbytes
 Downloaded:  442 time(s)

[Thumb - zipfile.PNG]
 Filename zipfile.PNG [Disk] Download
 Description
 Filesize 57 Kbytes
 Downloaded:  450 time(s)

This message was edited 7 times. Last update was at 30/05/2010 00:42:47

colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

The instructions are for the installed version of Marketcetera where all these are true. It's rather more complicated to run from source. Use source/strategyagent/src/test/cmd_exec for the root (find modules/jars, etc under that). To execute, from the strategyagent directory say "mvn -Pexecute exec:java".
lanchen


Joined: 31/08/2010 02:54:29
Messages: 2
Offline

After downloading the jar/zip files and unzipping the zip file, I ran into an error, as shown below, when I executed this command:

[marketcetera@linuxPC2 strategyagent]$ bin/strategyagent.sh samples/commands/MarketData-csv.txt
Copyright (c) 2006-2009 Marketcetera, Inc.
Strategy Agent version '2.1.0' (build 'cc.build.6888')
Oct 6, 2010 5:19:11 PM java.util.prefs.FileSystemPreferences$7 run
WARNING: Prefs file removed in background /home/marketcetera/.java/.userPrefs/prefs.xml
Oct 6, 2010 5:19:11 PM java.util.prefs.FileSystemPreferences$7 run
WARNING: Prefs file removed in background /etc/.java/.systemPrefs/prefs.xml
Strategy configured to accept web service requests at host 'localhost', port '9002'.
Running command 'createModule' with parameters 'metc:strategy:system;marketData,MarketData,RUBY,samples/scripts/market_data_csv.rb,,false,metc:sink:system'...
Completed command 'createModule' with result 'metc:strategy:system:marketData'.
Running command 'startModule' with parameters 'metc:mdata:contrib_csv:single'...
Unable to execute command 'startModule' at line number '10' with parameters metc:mdata:contrib_csv:single because of error: 'Unable to find a module with URN 'metc:mdata:contrib_csv:single'. Ensure that the module URN is correct and retry operation'. Continuing...
Running command 'startModule' with parameters 'metc:strategy:system:marketData'...
Data Flow ID '1' generated data 'of type org.marketcetera.event.impl.LogEventImpl and' value '20101006T091916875Z ERROR event Error executing RUBY Strategy MarketData(metc:strategy:system:marketData) in on_start: undefined method `newRequest' for Java::OrgMarketceteraMarketdata::MarketDataRequest:Class <script>:26:in `on_start'<script>:53'
Unable to execute command 'startModule' at line number '12' with parameters metc:strategy:system:marketData because of error: 'The strategy failed to start.'. Continuing...


===
I double-checked the jar file is under modules/jars, and both GOOG.csv and market_data_csv.rb are under samples/scripts, which is refered by ".DataDirectory" variable in modules/conf/mdata_contrib_csv.properties.

If you know what happened here, please let me know. My platform is Redhat 2.6.18 on x86_64 machine.

Thanks.

This message was edited 1 time. Last update was at 06/10/2010 09:36:32

colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

It looks like there are two problems. One is that your strategy invokes a method "newRequest" that doesn't exist. The other is that your strategy agent command file probably has the wrong URN to invoke the CSV module. I don't have the code in front of me for this version of the CSV module. What URN does it assert (in code) in its module factory?
lanchen


Joined: 31/08/2010 02:54:29
Messages: 2
Offline

The instance URN in its module factory code is metc:mdata:contrib_csv:single.

The newRequest() error can be solved by replacing the MarketDataRequest.newRequest() with MarketDataRequestBuilder.newRequest() and related imports ...
jonatas davi paganini


Joined: 25/01/2011 16:17:24
Messages: 103
Offline

colin wrote:There are a few magic incantations that are necessary. Let me know if you're still having trouble.


Hi, I follow every step to implement my own feed. I verify the files and rename everything. I put the jar on plugins and it modify the profiles.xml file under features folder.

What's the magic here?
colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

Difficult question to answer, grasshopper. What problem are you having?
jonatas davi paganini


Joined: 25/01/2011 16:17:24
Messages: 103
Offline

Thanks for answer Colin!

my problem is that I implement, build and package my
custom data feed. Following each advice on this post. But I can't see my custom feed under Preferences -> Market Data
jonatas davi paganini


Joined: 25/01/2011 16:17:24
Messages: 103
Offline

anybody fix this problem?
colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

Are you running from Eclipse or an installed version of Photon?
jonatas davi paganini


Joined: 25/01/2011 16:17:24
Messages: 103
Offline

I'm running from an installed version of Photon.

This message was edited 1 time. Last update was at 05/04/2011 19:16:23

colin


Joined: 23/03/2009 21:35:49
Messages: 406
Offline

Stupid question, then, did you copy your plugin to the installed plugins directory?
 
Forum Index » Marketcetera Open Labs and Contributions
Go to:   
Powered by JForum 2.1.8 © JForum Team