OSM Import plugin generation error

I've been trying to install the newer OSM import plugin for neo4j. using the maven clean intstall (have tried using maven 3.6.1 and 3.6.1/ java jdk 11.0.3 and 12.0.1)running into a build error:

'The code being documented uses modules but the packages defined in Java Platform SE 7 are in the unnamed module.'

Not really neo4j but I'm not a Java developer. Anyone know how to fix this.?

Thanks!

Try it with java 8, that should work.

Thanks for that! That worked fine, using Java 8. However, I'm now trying to import an OSM file... trying to follow the instructions on Git..I take it I just run these through the windows command prompt with my path values for target database and source files replaced...it's not working falls over with first error ...Error: Could not find or load main class \ ??? have no idea how to proceed. Any direction would be most appreciated. Thanks.

Are there more details to the error message?

Hi,I've tried regigging the paths ; the last full error is:

Error: Could not find or load main class \

C:\Users\Kimmo\Development\Graph\Spatial\osm-master\osm-master> "target/osm-0.2.2-neo4j-3.5.1.jar:target/dependency/" org.neo4j.gis.osm.OSMImportTool
'"target/osm-0.2.2-neo4j-3.5.1.jar:target/dependency/
"' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Kimmo\Development\Graph\Spatial\osm-master\osm-master> into target/databases/map2 samples/map2.osm.bz2

Thanks

What was the command line you ran.

exactly as is on git for the sample. looks like at the files etc are there:

  java -Xms1280m -Xmx1280m \
-cp "target/osm-0.2.2-neo4j-3.5.1.jar:target/dependency/*" org.neo4j.gis.osm.OSMImportTool \
--skip-duplicate-nodes --delete --into target/databases/map2 samples/map2.osm.bz2

it worked perfectly fine for me

did you perhaps forget to build the project?

mvn clean installmvn clean install dependency:copy-dependencies

java -Xms1280m -Xmx1280m \
       -cp "target/osm-0.2.2-neo4j-3.5.1.jar:target/dependency/*" org.neo4j.gis.osm.OSMImportTool \
       --skip-duplicate-nodes --delete --into target/databases/map2 samples/map2.osm.bz2
Neo4j version: 3.5.1
Importing the contents of these OSM files into /Users/mh/d/java/neo/osm/target/databases/map2:
  samples/map2.osm.bz2

Available resources:
  Total machine memory: 32.00 GB
  Free machine memory: 688.47 MB
  Max heap memory : 1.20 GB
  Processors: 12
  Configured max memory: 27.72 GB
  High-IO: true

WARNING: 570.51 MB memory may not be sufficient to complete this import. Suggested memory distribution is:
heap size: 1.00 GB
minimum free and available memory excluding heap size: 1020.11 MBImport starting 2019-09-16 08:33:03.252+0200
  Estimated number of nodes: 7.84 k
  Estimated number of node properties: 8.00 
  Estimated number of relationships: 784.00 
  Estimated number of relationship properties: 1.00 
  Estimated disk space usage: 140.91 kB
  Estimated required memory usage: 1020.11 MB

InteractiveReporterInteractions command list (end with ENTER):
  c: Print more detailed information about current stage
  i: Print more detailed information

(1/4) Node import 2019-09-16 08:33:03.330+0200
  Estimated number of nodes: 7.84 k
  Estimated disk space usage: 114.87 kB
  Estimated required memory usage: 1020.11 MB
.......... .......... .......... .......... ..........   5% ∆1s 426ms
.......... .......... .......... .......... .......... 100% ∆1ms

(2/4) Relationship import 2019-09-16 08:33:06.491+0200
  Estimated number of relationships: 784.00 
  Estimated disk space usage: 26.04 kB
  Estimated required memory usage: 1.00 GB
.......... .......... .......... .......... ..........   5% ∆1s 712ms
.......... .......... .......... .......... .......... 100% ∆0ms

(3/4) Relationship linking 2019-09-16 08:33:08.733+0200
  Estimated required memory usage: 1021.16 MB
-......... .......... .......... .......... ..........   5% ∆40ms
.......... .......... .......... .......... ..........  10% ∆0ms
.......... .......... .......... .......... .......... 100% ∆0ms

(4/4) Post processing 2019-09-16 08:33:09.049+0200
  Estimated required memory usage: 1020.01 MB
-......... .......... .......... .......... ..........   5% ∆59ms
.......... .......... .......... .......... .......... 100% ∆0ms


IMPORT DONE in 6s 370ms. 
Imported:
  110269 nodes
  114052 relationships
  460893 properties
Peak memory usage: 1.03 GB
There were bad entries which were skipped and logged into /Users/mh/d/java/neo/osm/target/databases/map2/bad.log

Hi again Michael.
Yeap i definitely built it after installing Java 8 - worked fine. There are 4 jar files in the target folder:

osm-0.2.2-neo4j-3.5.1.jar (91KB)

osm-0.2.2-neo4j-3.5.1.-javadoc.jar (149KB)

osm-0.2.2-neo4j-3.5.1.-procedures.jar (92KB)
osm-0.2.2-neo4j-3.5.1.-sources.jar (25KB)

Do these look right to you?

After the build , I did : mvn dependency:copy-dependencies

This built fine I think. Then the remaining code which is where the error is happening. Thanks

Oh if you are on windows?

Try to put everything in one command line and remove the \

Thanks for that but still not quite working. Yeap, I'm Windows 10 I put:

java -Xms1280m -Xmx1280m -cp "target/osm-0.2.2-neo4j-3.5.1.jar:target/dependency/*" org.neo4j.gis.osm.OSMImportTool --skip-duplicate-nodes --delete --into target/databases/map2 samples/map2.osm.bz2

as one line. It now comes back with 'Error: Could not find or load main class org.neo4j.gis.osm.OSMImportTool"

I can see the OSMImportTool.class file Probably some small other thing..I've tried to search for an answer but no luck to date..is there anything else I need to change?

Thanks

Worked out the issue = need to change colon to semi colon in windows

This works java -Xms1280m -Xmx1280m -cp "target/osm-0.2.2-neo4j-3.5.1.jar;target/dependency/*" org.neo4j.gis.osm.OSMImportTool --skip-duplicate-nodes --delete --into target/databases/map2 samples/map2.osm.bz2

I have the same error.
In the /target folder I have the following 4 jars:
osm-0.2.3-neo4j-4.0.9-javadoc.jar
osm-0.2.3-neo4j-4.0.0-sources.jar
osm-0.2.3-neo4j-4.0.0-procedures.jar
osm-0.2.3-neo4j-4.0.0.jar

I see a OSMImportTool.class at osm/target/classes/org/neo4j/gis/osm/OSMImportTool.class

I am on Mac OS X.

Neither with ":" nor ";" nor "" nor on a single line does it work.

Any suggestions?

Edit: Today it worked. I had since restarted my computer, perhaps that did something? Anyways, I got another error, but as soon as I update Java that went away as well. (on Mac it works with ":". So ";" is not required there.

If anybody else has the problem, I'm sorry I don't know why it suddenly worked. Just make sure you're in the /osm root and use the osm-[version-you-have]-neo4j-[version-you-have] and it should work.