Apoc.load.xls throwing errors (log4j related)

I've created a new project and clean database. I've installed the APOC libraries and created the apoc.conf file. When trying to load an Excel file, I get the following error:

Failed to invoke procedure apoc.load.xls: Caused by: java.lang.ClassNotFoundException: org.apache.logging.log4j.LogManager

This is the Cypher script:

call apoc.load.xls('DR Data.xlsx', 'DRs-All-PhaseB', {header:true})
yield map as row
return count(row)

I've previously used the apoc call before (different project and database) and never encountered this error. Any ideas?

Can you please provide details and specifically

  • what version of Neo4j
  • what version of APOC (i.e. return apoc.version(); )

Neo4j Desktop, v1.4.14, Neo4j database 4.4.4 and APOC

I also just tried it under another database version (4.3.7 and APOC and get the same error using a different Excel spreadsheet (which has imported just fine in the past).

Some additional information. I just tried again on a different laptop (Desktop 1.4.14, Neo4j 4.4.0, APOC and got the same error. The jar files and versions (in the plugins directory are):


Out of curiosity I tried converting the Excel file to a CSV and trying the apoc.load.csv option. It worked as it should. I have a workaround but the Excel option is still problematic in the long run.

I'm not able to reproduce and yet I'm running with 4.4.5 and my plugins has

ls -al ../plugins/
total 37264
drwxr-xrwx  2 neo4j neo4j     4096 Apr  1 21:13  .
drwxr-xrwx 16 neo4j neo4j     4096 Mar 23 19:34  ..
-rw-rw-r-x  1 neo4j neo4j 24184751 Apr  1 21:13  apoc-
-rw-rw-r--  1 neo4j neo4j 13956780 Apr  1 21:11 apoc-xls-dependencies-
-rw-r--rwx  1 neo4j neo4j     2217 Feb  2 05:14  README.txt

and I have a .xls in import/, as evidence

 ls -al import/
total 24
drwxr-xrwx  2 neo4j neo4j  4096 Apr  1 21:23 .
drwxr-xrwx 16 neo4j neo4j  4096 Mar 23 19:34 ..
-rw-rw-r--  1 neo4j neo4j 14848 Apr  1 21:18 c90A.xls

note I have a XLS and you report a DR Data.xlsx, i.e. a XLSX. Further my XLS is not created firstly/natively using Microsoft Office but rather I used OpenOffice to save a Spreadsheet in Microsoft 2000 / XP xls format. Now whether this has anything to do with anything? but I can then run

@neo4j> call apoc.load.xls('c90A.xls','Users', {header:true}) yield map as row return row.Name,row.Active;
| row.Name         | row.Active |
| "Dana Canzano"  | "true"       |
| "Mike Bandor    | "true"       |

2 rows
ready to start consuming query after 4 ms, results consumed after another 30 ms

I've tried it on a different machine with XLS and XLSX and get the same error. The CSV version seems to work okay.

I did some additional experimenting on a different laptop. Using Neo4j 4.4.5, with APOC (including the XLS dependencies v4.4.0.3) and everything seems to work as it did before. I tried an XLSX version and it loaded and returned the rows just fine. I'll have to repeat the experiment on my work laptop tomorrow.

I repeated the experiment on my work laptop and it worked just fine under Neo4j 4.4.4. Now the next issue I need to work around is running out of Java heap space with the spreadsheet.