Child pages
  • Building From Source
Skip to end of metadata
Go to start of metadata

when building from source

Step-by-step guide

  1. Install the tools

    1. Maven 3
    2. Java SE JDK 7
    3. Subversion Client (command-line or UI-based, like TortoiseSvn)
    4. Eclipse IDE (Kepler 3.8 or earlier, must be RCP Development Edition)
  2. Set up your directories

    1. Linux

      $ cd ~
      $ mkdir -p marketcetera/workspaces/base/code
    2. Windows
      Create the same directory structure from your root device, like C:\metc\workspaces\base\code. Keep it as short as possible as there's a limitation in Windows on the length of filenames.

  3. Download the source

    $ cd ~/marketcetera/workspaces/base/code
    $ svn co public
  4. Build the source

    $ cd metc
    $ mvn -DskipTests clean install eclipse:eclipse
  5. Start Eclipse

    1. Set your workspace to marketcetera/workspaces/base
    2. Set the target platform (Windows->Preferences->Plug-in Development->Target Platform)
      1. Select Add to create a new target platform
      2.  Start with Nothing and click Next
      3. Name your target Marketcetera and click Add
      4. Choose Directory and click Next
      5. Browse to public/photon/maven/rcptarget/photon-target/eclipse and click OK
      6. Click Finish
      7. Click Finish
      8. Select the Marketcetera platform as the active platform and click OK
    3. Import projects (File->Import->General->Existing Projects into Workspace). Set the root directory to your top level code directory (marketcetera/workspaces/base/code/metc). Check Search for nested projects and select Finish. A popup may appear right away that says "build error". Just close this and ignore it. The code should build cleanly at this point.


If you have trouble compiling, check these items:

  1. Make sure you've built with Maven from the command-line successfully
  2. Make sure you start Eclipse with a Java 7 JRE/JDK
  3. Make sure you've included 'eclipse:eclipse' as one of the Maven goals (along with install)
  4. Make sure you've defined your Maven executable properly in Eclipse. You can double-check this by opening the Navigator view and running the Maven builder under the core project. This should dump Maven output to the Console View.
  5. Make sure you checked the 'search for nested projects' box when importing projects. There should be 45 projects when you're done.
  • No labels


  1. So Eclipse is not optional anymore?

  2. If you're going to build the UI component, Photon, then Eclipse is, more or less, not optional. Theoretically, everything, including Photon, which is based on Eclipse RCP, can be built from the command-line. However, the magnitude of pain involved makes it not worth pursuing, IMO. It's just going to be a lot easier to use Eclipse.

    If you want to skip the Photon projects and just build the strategy engine and other server-side components, then Eclipse is entirely optional.

    1. @Colin

      Can you let me know how to use it compile and run photon from command line?

      For some reasons i dont want to use eclipse.

      1. You cannot build Photon without using Eclipse. It would be possible to build from the command line with P3, but you're still using Eclipse. Photon is literally built on top of Eclipse, so you can't get away from it.

  3. Hi everyone

    Thanks for your great step-by-step guide. I tried to build Marketcetera 2.4.0 on Ubuntu 13.10. My mvn -v is:

    Apache Maven 3.0.4

    Maven home: /usr/share/maven

    Java version: 1.7.0_51, vendor: Oracle Corporation


    Default locale: en_US, platform encoding: UTF-8

    OS name: "linux", version: "3.11.0-18-generic", arch: "i386", family: "unix"

    I passed all the troubleshooting's item but the 4 one! After I run copyTestsToPlugin.launch I get:

    The file does not exist for the external tool named copyTestsToPlugin.

    Also for item 5 I didn't have any "search for nested projects" option and it searched all nested projects(I hope). I think because my eclipse is old(3.8.1).

    My first question is How can I pass this error and the second one is, as long as I'm new in java world, How can I run Marketcetera and Photon?

    1. I think the "search for nested projects" option shows up only if you have m2e installed, which isn't required. As long as you have the right number of projects (45), you're fine. As for the external build thing, this seems to be something glitchy in Eclipse. Open the Navigator View,click on core to expand, click on .externalToolBuilders to expand, right-click on copyTestsToPlugin.launch and select run as copyTestsToPlugin. It should work ok from now on.

      Once that works, run Photon and enjoy. Expand the org.marketcetera.photon.feature project and click on photon.product. Select the Launch an Eclipse application link. Use user/password to login.

      There's an issue in trunk right now we're tracking down. It will take a couple of minutes to complete the login.

  4. Just a quick add to the guide.

    In case you've never used Maven with Eclipse you need to set up the local Maven repository.

    From Eclipse:

        Window -> Preferences

        Java -> Build Path -> Classpath Variables -> New

        name will be "M2_REPO"

        path will be:

            Unix/Mac OS X:        ~/.m2

            Windows:                  C:\Documents and Settings\{your-username}\.m2

        Click the OK button twice



    1. thx for your useful advice, but i think the path should be:

          windows:      C:\Documents and Settings\{your-username}\.m2\repository

  5. I am unable to checkout the code. Seeing the following message. Is the URL still valid?


    C:\>cd metc\workspaces\base\code

    C:\metc\workspaces\base\code>svn co metc
    svn: E175002: OPTIONS request on '/root/trunk' failed: 504 Connection Timed Out

  6. Valid and confirmed. Seems like a transient problem or a firewall issue on your end.

  7. Hi

    Thanks for your hints. I can run copyTestsToPlugin.launch successfully, but photon.product is full of errors right now, I guess because it's under development. So, after learning how to use Subversion, I decided to compile 2.2-bugfix branch. By running:

    mvn -X  -DskipTests clean install eclipse:eclipse

    give me these errors:

    [ERROR] Error fetching link: Ignored it.
    [ERROR] Error fetching link: Ignored it.
    [ERROR] Error fetching link: Ignored it.
    [ERROR] Error fetching link: Ignored it.


    [ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.1:hbm2ddl (default) on project core: Could not get ConfigurationTask. -> [Help 1]

    As I googled, it seems this branch is too old. I tried to find out right versions by comparing pom.xml from this branch and trunk but didn't solve it. How can I fix these?

    1. If you follow the instructions properly, the trunk builds and tests fine. I'm not sure what you mean by "photon.product is full of errors right now". Let's try a little harder to figure out where you've strayed from the path.

      As for 2.2.x, the first batch of issues are because the doc links have changed for those sources. Like Maven, you can can ignore it. The second error is because you're using Maven3. For 2.2.x, you need to use Maven2. It's because of the DDL plugin we used at the time.

  8. Using JAVA_OPTS="-Xms1024m -Xmx2048m -XX:MaxPermSize=2048m" I compiled mvn -DskipTests clean install eclipse:eclipse successfully. Also copyTestsToPlugin.launch runs successfully. But launching photon.product gives me this error:

    !MESSAGE Exception launching the Eclipse Platform:
    java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
        at Method)
        at java.lang.ClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at org.eclipse.equinox.launcher.Main.invokeFramework(
        at org.eclipse.equinox.launcher.Main.basicRun(
        at org.eclipse.equinox.launcher.Main.main(

    revision: 16886

    1. How are you launching Photon? Did you click on the Photon feature, select photon.product, and then click the link, "Launch an Eclipse Application"?

      1. yes, exactly! Is it possible svn cannot copy trunk?  My internet connection is not so fast!! Maybe some information is missing! How can I check that? Is there any other tests that I can run? I have a plan to upgrade Ubuntu soon and reinstall everything! Maybe that solves the problem (big grin) Thanks.

        1. I don't know how to diagnose any internet problems you might be having. From the command line, try saying, "svn up" and see if that helps. Also, try saying, "svn stat". That should show no modified files.

          Here's another thought: the error you're seeing might happen if you deleted some of the Photon workspace. Try recreating it. Select Run->Run Configurations in Eclipse. Delete everything under the "Eclipse Application" category. Rerun from the "org.marketcetera.photon.feature" step.


  9. will the following SVN checkout

    svn co metc

    give the latest code (pertaining to version 2.4) or is it still version 2.2 code that is  available in SVN?



    1. Trunk contains 2.4.0 (right now). Later, it will probably be something else.

  10. Hello Arul Krishnamoorthy, Could you provide me your email...i have few basic doubts to ask to start with Marketcetra...Thanks

    1. Post your questions here. That way, everybody can benefit.

  11. Is MarketCetera 2.2 still available in the SVN repository. I accidentally updated my SVN, and have upgraded to 2.4.Which revision do I need to revert to to return to Marketcetera 2.2? ... Thanks

    1. It sounds like you are opposed to progress! Nonetheless, if you insist, have a look here.

      1. Thanks Colin. Also, would you be able to put in the separate instructions that were there for the mysql setup for the version 2.2 somewhere in the building from source page, so that we can try to build from source older versions if necessary.


  12. [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ photo n-bundle ---
    [INFO] No sources to compile
    [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ photon-bundle ---
    [INFO] No tests to run.
    [INFO] --- maven-bundle-plugin:2.3.5:bundle (default-bundle) @ photon-bundle ---
    [ERROR] Java heap space -> [Help 1]
    java.lang.OutOfMemoryError: Java heap space
    at java.util.Arrays.copyOf(
    at aQute.lib.osgi.EmbeddedResource.copy(
    at aQute.lib.osgi.EmbeddedResource.collect(
    at aQute.lib.osgi.Verifier.getBundleClassPath(
    at aQute.lib.osgi.Verifier.<init>(
    at aQute.lib.osgi.Builder.doVerify(
    at org.apache.felix.bundleplugin.BundlePlugin.buildOSGiBundle(
    at org.apache.felix.bundleplugin.BundlePlugin.execute(
    at org.apache.felix.bundleplugin.BundlePlugin.execute(
    at org.apache.felix.bundleplugin.BundlePlugin.execute(
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(
    at org.apache.maven.DefaultMaven.doExecute(
    at org.apache.maven.DefaultMaven.execute(
    at org.apache.maven.cli.MavenCli.execute(
    at org.apache.maven.cli.MavenCli.doMain(
    at org.apache.maven.cli.MavenCli.main(
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(
    [ERROR] [Help 1]

    1. Hi Guys, When i compiling the photon, always get this OOM, no matter how big memory I set for mvn.bat, does anyone have an idea to solve it? thank you very much.

      this is my config:

      set MAVEN_OPTS=-Xms1024m -Xmx1024m -XX:PermSize=256M -XX:MaxPermSize=512M

      1. When you say, "compiling Photon", I assume you mean that you're running from Eclipse. If so, you need to set the amount of memory Eclipse uses. Try this.

  13. hello friends,


    as a foreign user, i might be expected to appologize about my english.

    but my java is even worse than my english, so please bear with my timid question:

    i could apparently perform the build process, (btw the sting to substitute had to be maven_exec).

    but i have no idea how to run photon, dare and the market data.

    could you please point me to the right documentation?


    thanks in advance for any advice,


    1. DARE is already running for you in the cloud - you just connect to it. Photon and the Strategy Engine (for market data) will run locally.

      If you've just built from source, to run Photon, find the project called "org.marketcetera.photon.feature" in Eclipse. Expand it, click/double-click on the "photon.product" item. Select "Launch an Eclipse application".

      For the Strategy Engine:

      $ cd strategyengine
      $ mvn -Pexecute exec:java
      1. Hi,

        It seems there is no such "strategyengine" directory downloaded from the source( ). Not sure if this is a recent change in the svn repository. Please kindly advise how to get the strategyengine downloaded. thanks.

        1. In the code, it's still called strategyagent but it's the same thing.

          1. Colin,

                It works.

                thank you.


            Best Regards,


  14. Hi,

    When checkout the source as describe above, I ran into problem below

    svn: E155009: Failed to run the WC DB work queue associated with '/media/ubuntu-studio/9771-802B/Recovery-DiskD/Projects/metc/util/src/test/java/org/marketcetera/util/ws/stateless', work item 4194 (file-install util/src/test/sample_data/deleter/templates/unix/dir/dir_link 1 0 1 1)

    svn: E000001: Can't create symbolic link '/media/ubuntu-studio/9771-802B/Recovery-DiskD/Projects/metc/util/src/test/sample_data/deleter/templates/unix/dir/dir_link.tmp': Operation not permitted


    Could someone shed some lights on what was wrong?

    Thanks in advance!


    1. Most likely a toxic combination of FAT/VFAT and Ubuntu. Use a Linux-native filesystem under Ubuntu or a Windows-native filesystem under Windows.

  15. Hi,

    I applied all steps but Eclipse showing a "Plug-in Problem". The main problem is "Bundle 'org.kxml' cannot be resolved" and other related errors. I tried on win and linux but its same. I installed Eclipse Luna (4.4.0) both of them. How can I resolve this problem?

    Thank you,


    1. I've found that the most recent version of Eclipse isn't compatible and we haven't converted yet. Try Kepler, that's what I use.

      1. Hi Colin,

        I built finally. Thank you. But when I run photon project as eclipse application I can't see photon ui, it coming as only empty eclipse welcome screen. How can I run? Thank you for your quick support.



  16. Hi!

    There are some issues with showing images in the build instruction.

    For example in "Define a String Substitution that points to your Maven executable (Window->Preferences->Run/Debug->String Substitution)" images shows as "Unknown Attachment".

    The same problem with Troubleshooting guide at the 4 point.

    Could you please help with it or just tell what name should have this substitution rule?



  17. Not sure what Im doing wrong, but I seem to have 2019 errors and 370 warnings during the build. Im using Kepler, and rest of my versions are below. Im doing this on a windows 8 machine. Is that the wrong platform for this?

    Apache Maven 3.0.4 (r1232337; 2012-01-17 12:44:56+0400)
    Maven home: C:\Program Files\Apache\maven
    Java version: 1.7.0, vendor: Oracle Corporation
    Java home: C:\Program Files\Java\jdk1.7.0\jre
    Default locale: en_GB, platform encoding: Cp1252
    OS name: "windows nt (unknown)", version: "6.2", arch: "amd64", family: "windows"

    1. Make sure you've set your target platform as described in the instructions.

  18. Is Java 7 is mandatory for this setup?

    Latest release is Java 8. 

  19. There is no option called Plug-in-Development under Windows → Preferences 

    Out of available packages for eclipse Kepler which is one has to be installed?

    any help is appreciated.

    1. You need the RCP Development Addition of Kepler. I believe the package is called Eclipse for RCP and RAP Developers. There is a pre-built version in the downloads.

  20. Hello Team,

    I've checked out the latest version and trying to build the source ( Eclipse IDE Version : Oxygen ,  JDK : 1.8 ) but the code under the project ""  is not compiled due to kxml2 library.

    The original plugin dependency, in the checked out  project, is "org.kxml"  which is missing in the photon plugin lists and I've changed the dependency to "org.kxml2" and after this I get this access restriction error :  Access restriction: The type 'KXmlParser' is not API (restriction on required library '/home/kiran/marketcetera/workspaces/base/code/metc/photon/maven/rcptarget/photon-target/eclipse/plugins/org.kxml2_2.1.5.jar')

    To fix the access restriction compilation error , I've added the access rule for " org/kxml2/io/** " under project properties → Java Build Path → Plugin Dependencies.

    But, when I launch the Photon FE , from eclipse IDE , if fails with KXmlParser ClassNotFound error as shown below. Could you please help me fix this issue.

    !ENTRY org.eclipse.ui.workbench 4 0 2017-10-30 11:45:42.328
    !MESSAGE Unable to create view ID org.marketcetera.photon.views.StockOrderTicketView: org/kxml2/io/KXmlParser
    !STACK 0
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
        at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
        at java.lang.ClassLoader.loadClass(
        at org.marketcetera.photon.views.XSWTView.createPartControl(
        at org.eclipse.ui.internal.ViewReference.createPartHelper(
        at org.eclipse.ui.internal.ViewReference.createPart(
        at org.eclipse.ui.internal.WorkbenchPartReference.getPart(
        at org.eclipse.ui.internal.PartPane.setVisible(
        at org.eclipse.ui.internal.ViewPane.setVisible(

    Many Thanks for your help.

    1. Good job on trying to solve the problem, even though it didn't work out.

      The short answer is that Photon is built on the RCP SDK version 3.8, which means that it needs a corresponding version of Eclipse (3.8 or earlier) to build Photon. I use Kepler or Luna.

      The longer answer is that we're in the process of switching over to a web-based client. When that work is complete, in the 4.x Marketcetera version line, you'll be able to use whatever version of Eclipse, indeed, whatever IDE, you wish.

  21. Hi Colin,

    Many Thanks for the response.

    I've guessed there could be an eclipse dependency and I've used Kepler and the issue with org.kxml is resolved. But, when I tried to launch  photon FE in Eclipse, I had OutOfMemory exception which I resolved by setting "-XX:MaxPermSize=1024m" in the run configuration arguments. 

    I did not encounter OutOfMemory issue with latest Eclipse-Oxygen because I was using JDK 1.8 and it appears that this Java version does not have Permanent Generation concept and is replaced by 'metaspace' and is part of over all heap used.

    Thanks again..


    1. Here's what my eclipse.ini looks like:


      I define a MaxPermSize and a larger heap that you are using.

  22. Colin,

    Thanks for sharing and have taken a note of it.