Error opening region.csv when trying to run example

I’m trying to run the example from Intellij.
After adding the config directory as resource in pom.xml it was able to get far along in the startup.
But I’m getting an error with the RegionFileReader.
Looking at the code it seems to be trying to load a region.csv file which does not exist anywhere.
Here is a part of the exception

Caused by: com.opengamma.OpenGammaRuntimeException: Cannot open region data file (or file I/O problem)
at com.opengamma.master.region.impl.RegionFileReader.parse(RegionFileReader.java:244)
at com.opengamma.master.region.impl.RegionFileReader.parse(RegionFileReader.java:160)
at com.opengamma.master.region.impl.RegionFileReader.createPopulated0(RegionFileReader.java:115)
at com.opengamma.master.region.impl.RegionFileReader.createPopulated(RegionFileReader.java:100)
at com.opengamma.component.factory.master.InMemoryRegionMasterComponentFactory.init(InMemoryRegionMasterComponentFactory.java:86)
at com.opengamma.component.ComponentManager.initFactory(ComponentManager.java:516)
at com.opengamma.component.ComponentManager.initComponent(ComponentManager.java:316)

Thanks in advance for pointing me to the right direction.

The file is contained in a jar file - og-regions-20110908a.jar. For some reason, you haven’t got the jar file on your classpath.

Thanks for your help.
I’ve built the project using mvn install and running inside Intellij by opening the parent pom file.
I did a global search and can’t seem to find the og-regions file anywhere.
Is this file generated as part of the build?

I was able to fix this problem by adding this

  <dependency>
      <groupId>com.opengamma</groupId>
      <artifactId>og-region-data</artifactId>
      <version>1.0.0.v20110908a</version>
      <scope>runtime</scope>
  </dependency>

To the og-master pom file.
Not sure if that’s the best place but it works.

btw that was a Maven dependency but it won’t let me post tags here.

Hi Ming

I would love to achieve an IntelliJ project structure which can build and start OG. I tried hard with Maven but had to put that effort down for a while. Do you have IntelliJ Project and Module files which you would be prepared to share? Are the checked-in ones usable?

Many thanks, Robin.

Hi Robin

The IntelliJ project and module files in the Git repo should build and run the platform as long as you have the IvyIDEA plugin installed. If they don’t work for you please let me know and I’ll look into the problem.

I’m currently working on converting the IntelliJ project to Maven so we can drop the dependency on IvyIDEA. Unfortunately it’s not quite finished yet but it’s fairly close.

Chris