<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi,</p>
<p>I've been following the guide https://github.com/graphhopper/graphhopper/wiki/Developers. I can build a graph by calling this in cygwin:</p>
<p>./graphhopper.sh web europe_germany_berlin.osm</p>
<p>I then try loading it in code using:</p>
<p>GraphHopperAPI gh = new GraphHopper().forServer();<br />gh.load("D:\\Processing\\Graphhopper\\graphhopper\\europe_germany_berlin-gh");</p>
<p>but it gives me this exception:</p>
<p>Exception in thread "main" java.lang.IllegalStateException: Cannot load the graph - it wasn't create via com.graphhopper.storage.GraphStorage! D:\Processing\Graphhopper\graphhopper\europe_germany_berlin-gh/</p>
<p>which happens when it checks the first int from the header of the nodes DataAccess object against the hashcode of the GraphStorage class name.</p>
<p>What am I doing wrong? When you build a graph from the command line does it create it using a different class, not GraphStorage? Or does Maven somehow build GraphStorage into a different namespace?</p>
<p>many thanks</p>
<p>Phil</p>
<div> </div>
</body></html>