Skip to content

Failed to invoke procedure apoc.import.graphml: Caused by: java.net.MalformedURLException: unknown protocol: d #781

@vga91

Description

@vga91

Original issue: neo4j-contrib/neo4j-apoc-procedures#3475


Expected Behavior (Mandatory)

Neo4j APOC procedures are able to import and export from/to an absolute Window path

Actual Behavior (Mandatory)

I have a GitHub repository with DVC to track and pull data files. When pulling the project and data I need the code to directly import (and export) GML data from the repository's data folder, without having to instruct people to move file to the Neo4j project import folder.

The apoc.conf file is set as follows:

apoc.export.file.enabled=true
apoc.import.file.enabled=true
apoc.import.file.use_neo4j_config=false

Neo4j APOC procedures are unable to export and import from an absolute Windows path, throwing a protocol error on the driver letter.
When running the command
CALL apoc.import.graphml("D:\code\my_repo\data\neo4j\all_members.gml", {})
Neo4j throws the following error:
Failed to invoke procedure apoc.import.graphml: Caused by: java.net.MalformedURLException: unknown protocol: d

The same error is thrown using the apoc.export.graphml procedure.

How to Reproduce the Problem

Steps (Mandatory)

On Windows

  1. Take any GML file and put it somewhere else than the Neo4j project import folder
  2. Set the apoc.conf file as displayed above
  3. create a database CREATE DATABASE mydb
  4. run CALL apoc.import.graphml("<the full path to the GML file>\<gml file name>", {})

Specifications (Mandatory)

Versions

  • OS: Windows 10
  • Neo4j Desktop: 1.5.7
  • Neo4j: 5.4.0
  • Neo4j-Apoc: 5.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions