# Neo4j 4.0 problem with apoc

**URL:** <https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073>\
**Category:** Procedures & APOC\
**Created:** [January 27, 2020, 12:23pm UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073 "2020-01-27T12:23:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shayantest2](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shayantest2/32/5901_2.png) [@shayantest2](https://community.neo4j.com/u/shayantest2)\
**Post date:** [January 27, 2020, 12:23pm UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073/1 "2020-01-27T12:23:26Z")

</div>

After upgrading to Neo4j 4.0.0, a problem is occurred when apoc is added to my dependencies. In a maven project with only a Main file with the following content:

```auto
package mypackage;

import org.neo4j.configuration.GraphDatabaseSettings;
import org.neo4j.configuration.connectors.BoltConnector;
import org.neo4j.dbms.api.DatabaseManagementService;
import org.neo4j.dbms.api.DatabaseManagementServiceBuilder;
import org.neo4j.graphdb.GraphDatabaseService;

import java.io.File;

public class Main {
	public static void main(String[] args) {
		        DatabaseManagementService managementService = new DatabaseManagementServiceBuilder( new File("c:\\temp" ))
                .setConfig( BoltConnector.enabled, true )
                .build();
        GraphDatabaseService graphDb = managementService.database( GraphDatabaseSettings.DEFAULT_DATABASE_NAME );
		System.out.println("test");
	}
}

```

if I only have neo4j 4.0.0 in my dependencies, I get no errors. But, when I add

```auto
        <dependency>
            <groupId>org.neo4j.procedure</groupId>
            <artifactId>apoc</artifactId>
            <version>4.0.0.0</version>
        </dependency>

```

to my dependencies, I get:

> java.lang.RuntimeException: Error starting database server at ...  
> ...  
> Caused by: java.lang.NoClassDefFoundError: org/apache/commons/text/lookup/StringLookup

Here is my pom.xml: [POM for my question · GitHub](https://gist.github.com/shayantabrizi/8473df3aebb62077016a2d55203578c5)

There seems to be a version conflict at commons-text (Its version is 1.2 in apoc, but the version used in neo4j-common seems to be 1.7).

I tried it in both Windows and Linux under Java 11.

---

<div class="post-metadata">

**Author:** ![intouch\_vivek](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/intouch_vivek/32/4097_2.png) [@intouch\_vivek](https://community.neo4j.com/u/intouch_vivek)\
**Post date:** [January 27, 2020, 12:29pm UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073/2 "2020-01-27T12:29:44Z")

</div>

Hi,  
try to run call apoc.help('apoc') in Neo4j. If it does not gives list of apoc function then it mean your APOC installation is not good.  
[https://neo4j.com/docs/labs/apoc/current/introduction/#installation](https://neo4j.com/docs/labs/apoc/current/introduction/#installation)

Regards  
Vivek

---

<div class="post-metadata">

**Author:** ![shayantest2](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shayantest2/32/5901_2.png) [@shayantest2](https://community.neo4j.com/u/shayantest2)\
**Post date:** [January 27, 2020, 12:31pm UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073/3 "2020-01-27T12:31:48Z")

</div>

This is not about Neo4j desktop. I want to use APOCs in Java. It used to work before upgrading Neo4j. Unfortunately, your answer does not seem to apply to my case.

---

<div class="post-metadata">

**Author:** ![thomas\_stuempfi](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/thomas_stuempfi/32/289_2.png) [@thomas\_stuempfi](https://community.neo4j.com/u/thomas_stuempfi)\
**Post date:** [November 1, 2020, 4:05pm UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073/4 "2020-11-01T16:05:35Z")

</div>

Hi shayan,  
did you solve the problem? I ran into an other problem with the apoc dependency does not even appear in the dependencies in eclipse.

regards  
Thomas

---

<div class="post-metadata">

**Author:** ![shayantest2](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/shayantest2/32/5901_2.png) [@shayantest2](https://community.neo4j.com/u/shayantest2)\
**Post date:** [November 22, 2020, 5:48am UTC](https://community.neo4j.com/t/neo4j-4-0-problem-with-apoc/14073/5 "2020-11-22T05:48:41Z")

</div>

Unfortunately, no! I stopped upgrading.
