cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Upgrade from 3.5.14 to 4.10

andy_hegedus
Graph Voyager

Hi,

With the latest Desktop upgrade came the addition of 4.10. Previously I have been using 3.5.14.

4.10 appears to be installed correctly and I have a created a database using it and all appears fine. I have the correct version of Java installed since this database works.

I am running on Mac with Mojave. I have an existing 3.5.14 database I would like to upgrade some all my work is on similar releases. I am trying to follow the guidance in the video provided. and the steps I have taken are:

  1. Created a new 4.10 local database
  2. Make sure neo4j is stopped
  3. Copy the databases from the 3.5.14 folder (data/databases) into the 4.10 folder of newly created database.
  4. Rename graph.db to neo4j making sure the hidden .db is removed.
  5. In the config file within the 4.10 folderI uncomment the allow upgrade and uncomment the default database lines. I confirm that the settings pane is showing them as active.
  6. I start the database from the Neo4j desktop.

The log includes:
Starting Neo4j.
2020-07-10 22:34:50.717+0000 INFO Starting...
2020-07-10 22:34:54.702+0000 INFO ======== Neo4j 4.1.0 ========
2020-07-10 22:34:57.226+0000 INFO [neo4j] Starting upgrade of database
2020-07-10 22:34:58.625+0000 INFO Sending metrics to CSV file at /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-b53ab341-2433-467b-8d16-0ddf4605c443/installation-4.1.0/metrics
2020-07-10 22:34:58.670+0000 INFO Bolt enabled on localhost:7687.
2020-07-10 22:35:00.311+0000 INFO Remote interface available at http://localhost:7474/
2020-07-10 22:35:00.315+0000 INFO Started.

I get a warning:
Database 'neo4j' is unavailable. Run :sysinfo for more info.
There are no nodes listed.

Where should I go from here?
Andy

5 REPLIES 5

koji
Ninja
Ninja

How about this one.
You can select 'Upgrade Tab' and click 'Upgrade to this version'.
Neo4j Desktop will copy your data and create a new 4.x directory.

Hi,

Tried upgrading to 4.10 and also 4.06 neither worked
Side Note: the time stamp is wrong. The local time is 16:33 on 2020-07-10 so it is more than a simple time zone shift.

Log file.

2020-07-10 22:48:36.881+0000 INFO ======== Neo4j 3.5.14 ========
2020-07-10 22:48:36.908+0000 INFO Starting...
2020-07-10 22:48:38.693+0000 INFO Initiating metrics...
2020-07-10 22:48:54.449+0000 INFO Sending metrics to CSV file at /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-3.5.14/metrics
2020-07-10 22:48:55.058+0000 INFO Bolt enabled on 127.0.0.1:7687.
2020-07-10 22:48:57.477+0000 WARN Server thread metrics not available (missing neo4j.server.threads.jetty.all)
2020-07-10 22:48:57.477+0000 WARN Server thread metrics not available (missing neo4j.server.threads.jetty.idle)
2020-07-10 22:48:57.967+0000 INFO Started.
2020-07-10 22:48:58.436+0000 INFO Mounted REST API at: /db/manage
2020-07-10 22:48:58.574+0000 INFO Server thread metrics have been registered successfully
2020-07-10 22:48:59.934+0000 INFO Remote interface available at http://localhost:7474/
2020-07-10 22:49:17.459+0000 INFO Neo4j Server shutdown initiated by request
2020-07-10 22:49:17.500+0000 INFO Stopping...
Directories in use:
home: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0
config: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/conf
logs: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/logs
plugins: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/plugins
import: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/import
data: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/data
certificates: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/certificates
run: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.1.0/run
Starting Neo4j.
Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/kernel/extension/KernelExtensionFactory
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1209)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at org.neo4j.service.Services.loadAllSafely(Services.java:145)
at org.neo4j.service.Services.loadAll(Services.java:66)
at org.neo4j.graphdb.facade.GraphDatabaseDependencies.newDependencies(GraphDatabaseDependencies.java:53)
at org.neo4j.server.NeoBootstrapper.(NeoBootstrapper.java:67)
at org.neo4j.server.CommunityBootstrapper.(CommunityBootstrapper.java:30)
at com.neo4j.server.enterprise.EnterpriseBootstrapper.(EnterpriseBootstrapper.java:15)
at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.extension.KernelExtensionFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 23 more
Directories in use:
home: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6
config: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/conf
logs: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/logs
plugins: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/plugins
import: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/import
data: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/data
certificates: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/certificates
run: /Users/andreashegedus/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-718d1beb-54c2-4c6f-a246-b0e533653156/installation-4.0.6/run
Starting Neo4j.
Exception in thread "main" java.lang.NoClassDefFoundError: org/neo4j/kernel/extension/KernelExtensionFactory
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1209)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at org.neo4j.service.Services.loadAllSafely(Services.java:145)
at org.neo4j.service.Services.loadAll(Services.java:66)
at org.neo4j.graphdb.facade.GraphDatabaseDependencies.newDependencies(GraphDatabaseDependencies.java:53)
at org.neo4j.server.ServerBootstrapper.(ServerBootstrapper.java:69)
at org.neo4j.server.CommunityBootstrapper.(CommunityBootstrapper.java:27)
at com.neo4j.server.enterprise.EnterpriseBootstrapper.(EnterpriseBootstrapper.java:21)
at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: java.lang.ClassNotFoundException: org.neo4j.kernel.extension.KernelExtensionFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 23 more

I used Upgrade Tab as you suggested to upgrade from V3.5.18 to 4.1.0 but got the same error message as andy.hegedus. Database 'neo4j' is unavailable. Run :sysinfo for more info. The upgrade finished successfully and I could see 30,199 nodes (6 labels) 166,564 relationships (8 types). The error message appeared when I tried to open with Neo4j browser. Any suggestion?

This is how I converted old databases to 4.1.0:

1: Start the server, login and select System database.
2: Run this statement: CREATE DATABASE dbname (say graphdb)
3: Run SHOW DATABASES and this will show all the databases created with status 'online'. If there is an error for any database the status will be 'offline' and shows the error
4. Stop the server
5: Copy the files only (do not copy profiles and schema folders) from your old graph.db to the newly created database in step 2.
5. Open Neo4j.conf file and make sure to uncheck this line: dbms.allow_upgrade=true
6. Start the server and select the database created in step 2. If everything goes well
you should see all the data from old db.
7. If the update is successful then comment out this line: dbms.allow_upgrade=true
in neo4j.conf file.

andy_hegedus
Graph Voyager

I am actually holding off upgrading the database. I have done a rebuild into a 4.1.0 and now am seeing issues with 4.1.0 specifically around search. So I am keeping both for troubleshooting purposes at the moment.
Andy

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.