NoClassDefFoundError: Could not initialize class

doktordoom

Mitglied
Hi,
ich habe mein Bastelprojekt von dem einen PC auf den anderen kopiert. Dieses Projekt ist ein Maven multi module Projekt.
Auf dem einen PC funktioniert es ohne Probleme, auf dem ich das Projekt kopiert habe, leider nicht.
Der Fehler tritt, auf wen ich in dem Child maven Projekt die DB schließe. Ich habe keine Probleme beim Öffnen und Suchen, nur das Schließen der DB mach Probleme.
Die Exception löst die folgende Funktion aus. managementService.shutdown(). Folgend die Funktion. Diese sucht in der DB nach Termen.
Ich hoffe jemand kann mir bei der Suche des Fehlers weiterhelfen.

Function​

Java:
public String is_Node_in_DB(String node) {
        boolean nodeexists = true;
        int retcnt = 0;
        
        Node n1 = null;

        String db_path = System.getProperty("user.dir") + "./DB_Neo4j/DB_Neo4j/cooccsdatabase";
        java.nio.file.Path path = Paths.get(db_path);
        if(Files.exists(path))
        {
            File database = new File(db_path);

            managementService = new DatabaseManagementServiceBuilder(database).build();
            graphDB = managementService.database(DEFAULT_DATABASE_NAME);

            System.out.println("database opened for querying");

            try (Transaction tx2 = graphDB.beginTx()) {     
            
                do {
                    n1 = tx2.findNode(Labels.SINGLE_NODE, "name", node);
                    if(n1 != null)
                    {// if node found break bevor improvements starts
                        break;
                    }
                    else if(retcnt ==2)
                    {
                        node = node.toUpperCase();
                    }
                    else if((retcnt == 2)&&(n1 == null))
                    {
                        break;
                    }
                    else if(Character.isUpperCase(node.charAt(0)))
                    { // check of typo lower letter improvements
                        node = node.substring(0,1).toLowerCase() + node.substring(1);
                        retcnt = retcnt+1;

                    }
                    else if(Character.isLowerCase(node.charAt(0))) 
                    { // check of typo upper letter improvements
                        node = node.substring(0,1).toUpperCase() + node.substring(1);
                        retcnt = retcnt+1;
                    }
                }while(n1 == null);
            
                tx2.commit(); // success();
            }
            managementService.shutdown();
        }
        else
        {
            node = "";
        }
        return node;
    }

Log (with exception)​


Code:
JRE Eclipse Adoptium/17.0.5 is not supported, advanced source lookup disabled.
 Eclipse debugger will use less precise source lookup implementation for this debug session, but everything else will continue to work otherwise.
Upgrading Eclipse to the latest version will likely make this warning go away.java.io.FileNotFoundException: \Users\+user+\eclipse-workspace-2\DB-Suche\Dokto.json (Das System kann den angegebenen Pfad nicht finden)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Dokto/.m2/repository/ch/qos/logback/logback-classic/1.2.10/logback-classic-1.2.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Dokto/eclipse-workspace-2/DB-Suche/Neo4jDB/Neo4jDB/lib/tika-app-1.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Dokto/eclipse-workspace-2/DB-Suche/Neo4jDB/Neo4jDB/Neo4jLibs/slf4j-nop-1.7.30.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Dokto/eclipse-workspace-2/DB-Suche/Neo4jDB/Neo4jDB/JUNGLibs/slf4j.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
Processing took 0 seconds.
16:08:07.640 [AWT-EventQueue-0] DEBUG reactor.util.Loggers - Using Slf4j logging framework
16:08:07.646 [AWT-EventQueue-0] DEBUG reactor.core.publisher.Hooks - Hooking new default : onErrorDropped
16:08:08.944 [AWT-EventQueue-0] DEBUG i.n.u.i.l.InternalLoggerFactory - Using SLF4J as the default logging framework
16:08:08.946 [AWT-EventQueue-0] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.level: simple
16:08:08.946 [AWT-EventQueue-0] DEBUG io.netty.util.ResourceLeakDetector - -Dio.netty.leakDetection.targetRecords: 4
16:08:08.965 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false
16:08:08.965 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - Java version: 17
16:08:08.966 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe: available
16:08:08.967 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.copyMemory: available
16:08:08.967 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - sun.misc.Unsafe.storeFence: available
16:08:08.968 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Buffer.address: available
16:08:08.968 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - direct buffer constructor: unavailable: Reflective setAccessible(true) disabled
16:08:08.969 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.Bits.unaligned: available, true
16:08:08.970 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @660fd534
16:08:08.970 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent0 - java.nio.DirectByteBuffer.<init>(long, int): unavailable
16:08:08.970 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - sun.misc.Unsafe: available
16:08:08.971 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - maxDirectMemory: 2097152000 bytes (maybe)
16:08:08.971 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.tmpdir: C:\Users\Dokto\AppData\Local\Temp (java.io.tmpdir)
16:08:08.971 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.bitMode: 64 (sun.arch.data.model)
16:08:08.971 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - Platform: Windows
16:08:08.972 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.maxDirectMemory: -1 bytes
16:08:08.972 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.uninitializedArrayAllocationThreshold: -1
16:08:08.973 [AWT-EventQueue-0] DEBUG io.netty.util.internal.CleanerJava9 - java.nio.ByteBuffer.cleaner(): available
16:08:08.973 [AWT-EventQueue-0] DEBUG i.n.util.internal.PlatformDependent - -Dio.netty.noPreferDirect: false
16:08:08.973 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numHeapArenas: 16
16:08:08.973 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.numDirectArenas: 16
16:08:08.973 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.pageSize: 8192
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxOrder: 9
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.chunkSize: 4194304
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.smallCacheSize: 256
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.normalCacheSize: 64
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedBufferCapacity: 32768
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimInterval: 8192
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.cacheTrimIntervalMillis: 0
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.useCacheForAllThreads: false
16:08:08.974 [AWT-EventQueue-0] DEBUG i.n.buffer.PooledByteBufAllocator - -Dio.netty.allocator.maxCachedByteBuffersPerChunk: 1023
16:08:08.979 [AWT-EventQueue-0] DEBUG i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024
16:08:08.979 [AWT-EventQueue-0] DEBUG i.n.u.i.InternalThreadLocalMap - -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096
database opened for querying
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class org.neo4j.internal.helpers.Exceptions
    at org.neo4j.kernel.lifecycle.LifeSupport.shutdown(LifeSupport.java:188)
    at org.neo4j.dbms.database.DatabaseManagementServiceImpl.shutdown(DatabaseManagementServiceImpl.java:131)
    at core.Cooccs.is_Node_in_DB(Cooccs.java:2949)
    at main.DBPlot.check_User_Input(DBPlot.java:1554)
    at main.DBPlot.add_Cluster_to_Graph(DBPlot.java:1752)
    at main.DBPlot.actionPerformed(DBPlot.java:274)
    at java.desktop/javax.swing.JTextField.fireActionPerformed(JTextField.java:525)
    at java.desktop/javax.swing.JTextField.postActionEvent(JTextField.java:740)
    at java.desktop/javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:856)
    at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1810)
    at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2947)
    at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2995)
    at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2909)
    at java.desktop/java.awt.Component.processEvent(Component.java:6403)
    at java.desktop/java.awt.Container.processEvent(Container.java:2266)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5001)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
    at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1952)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:883)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1150)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1020)
    at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:848)
    at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4882)
    at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324)
    at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2780)
    at java.desktop/java.awt.Component.dispatchEvent(Component.java:4833)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:716)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:746)
    at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:744)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:743)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
emphasized text
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
G java.lang.NoClassDefFoundError: org/aspectj/lang/Signature Allgemeine Java-Themen 2
volcanos JavaFX-Programme nur in NetBeans selber ausführbar ! command_line: NoClassDefFoundError Allgemeine Java-Themen 39
S Compiler-Fehler NoClassDefFoundError Allgemeine Java-Themen 4
M NoClassDefFoundError Allgemeine Java-Themen 6
F Fehlermeldung: java.lang.NoClassDefFoundError: org/apache/commons/net/ntp/NTPUDPClient Allgemeine Java-Themen 6
T Compiler-Fehler NoClassDefFoundError beim Laden einer Class Allgemeine Java-Themen 11
E HILFE !! Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils Allgemeine Java-Themen 4
C Hilfe bei NoClassDefFoundError Allgemeine Java-Themen 14
J Exception in thread "main" java.lang.NoClassDefFoundError Allgemeine Java-Themen 4
H Java Mail Fehlermeldung: java.lang.NoClassDefFoundError: javax/mail/internet/AddressException Allgemeine Java-Themen 5
Crooda Compiler-Fehler java.lang.NoClassDefFoundError bitcoinj Allgemeine Java-Themen 1
L Eigenener ClassLoader wirft java.lang.NoClassDefFoundError Allgemeine Java-Themen 0
A Classpath LWJGL+NiftyGui und der NoClassDefFoundError Allgemeine Java-Themen 1
S java.lang.NoClassDefFoundError Allgemeine Java-Themen 5
T NoClassDefFoundError... Allgemeine Java-Themen 5
G Json-Lib NoClassDefFoundError Allgemeine Java-Themen 3
T ProcessBuilder (java.lang.NoClassDefFoundError) Allgemeine Java-Themen 2
E NoClassDefFoundError: javax/microedition/io/Connection Allgemeine Java-Themen 2
P NoClassDefFoundError sigar Allgemeine Java-Themen 5
B NoClassDefFoundError Allgemeine Java-Themen 5
O NoClassDefFoundError Allgemeine Java-Themen 5
reibi NoClassDefFoundError abfangen Allgemeine Java-Themen 6
N NoClassDefFoundError bei JasperReports Allgemeine Java-Themen 2
G NoClassDefFoundError: java/lang/Object Allgemeine Java-Themen 4
S JOGL NoClassDefFoundError und Maven Allgemeine Java-Themen 4
G NoClassDefFoundError Allgemeine Java-Themen 3
M NoClassDefFoundError Allgemeine Java-Themen 9
E Java Fehlermeldung java.lang.NoClassDefFoundError Allgemeine Java-Themen 3
F NoClassDefFoundError Allgemeine Java-Themen 5
F An Profis: NoClassDefFoundError bei 1 von 20 Usern Allgemeine Java-Themen 16
T NoClassDefFoundError, warum? Allgemeine Java-Themen 6
Jens Hibbeler Klasse Laden, aber wie? NoClassDefFoundError? Allgemeine Java-Themen 3
J Class to link Java Allgemeine Java-Themen 4
C Was passt hier nicht bei der Calendar-Class Allgemeine Java-Themen 2
E Class.getResourceAsStream() gibt null zurück Allgemeine Java-Themen 2
Erwin82a Object cannot be converted to Custom Class in Lampda Expression Allgemeine Java-Themen 2
T Java Robot Class - Bot Allgemeine Java-Themen 3
S Class File Editor -> Source not found Allgemeine Java-Themen 4
G javafx "class path" exception Allgemeine Java-Themen 5
S Java class direved from inner class Allgemeine Java-Themen 6
S Inner Class Allgemeine Java-Themen 11
K Wildcard und class type Allgemeine Java-Themen 9
M Java model class ? Allgemeine Java-Themen 9
Thallius Ist meine static Helper Class Thread save? Allgemeine Java-Themen 9
S class path resource [config.properties}] cannot be opened because it does not exist Allgemeine Java-Themen 4
J Reflection Aufruf: .class durch .dll ersetzen Allgemeine Java-Themen 4
J Class Decompile als String (Procyon) Allgemeine Java-Themen 2
H Class 'java.io.BuferedReader' is not present in JRE Emulation Libary | GWT Fehler?! Allgemeine Java-Themen 0
I Datentypen String in class sicher verwahren Allgemeine Java-Themen 17
R Dynimc Class Loading Allgemeine Java-Themen 5
J Inner class + Leer-Konstruktor Allgemeine Java-Themen 1
Neumi5694 Methoden Generic: Rückgabetyp als Class-Parameter übergeben Allgemeine Java-Themen 3
D Collections.sort funktioniert nicht in exportierten .class Dateien Allgemeine Java-Themen 10
V Eclipse .class Dateien Allgemeine Java-Themen 9
KeexZDeveoper Von .class zu .java Allgemeine Java-Themen 7
N Wo ist Object.class ? Allgemeine Java-Themen 0
K Nicht alle class-Dateien im JRE? Allgemeine Java-Themen 2
M *.class Files ausführen Allgemeine Java-Themen 2
L Klassen Nested Class In Nested Class Allgemeine Java-Themen 3
perlenfischer1984 Dialect class not found exception Allgemeine Java-Themen 15
Tort-E Manifest Main-Class Allgemeine Java-Themen 8
I JSoup Class auslesen Allgemeine Java-Themen 1
K Generic class und Reflection Allgemeine Java-Themen 2
R .class Datei in .jar austauschen Allgemeine Java-Themen 2
R Java .class-File-Konstrunkt mit Programm visualisieren Allgemeine Java-Themen 18
A main-class Not found Allgemeine Java-Themen 3
T Java Class Intrumentation mit Annotations in Laufzeit Allgemeine Java-Themen 1
N Per Reflection auf (method) local inner class zugreifen? Allgemeine Java-Themen 3
P JDK installieren Error: Could not find or load main class HelloWorld.java Allgemeine Java-Themen 3
B public class JarFilter extends FileFilter « Falsch? Allgemeine Java-Themen 4
D Object nach Vererbung mit Class Object überprüfen Allgemeine Java-Themen 4
T Hash von *.class-Datein überprüfen Allgemeine Java-Themen 1
F java.lang.ClassNotFoundException: .class Allgemeine Java-Themen 5
T InvalidClassException - Read null attempting to read class descriptor for object Allgemeine Java-Themen 8
Phash Can't find Main Class Allgemeine Java-Themen 4
B Erste Schritte Plugin erkennen und Class Dateien anzeigen lassen Allgemeine Java-Themen 3
B json zu java class Allgemeine Java-Themen 2
antonbracke Aus Jar eine Class laden und damit arbeiten! Allgemeine Java-Themen 5
D Class<CAP#1> statt Class<...> Allgemeine Java-Themen 5
T Class-Objekt mit URLClassloader Allgemeine Java-Themen 7
A Class Datei aus Verzeichnis über URLClassLoader laden Allgemeine Java-Themen 2
L Class Files , Methode .delete() Allgemeine Java-Themen 13
E NetBeans warning: [options] bootstrap class path not set in conjunction with -source 1.6 Allgemeine Java-Themen 4
X Could not find the main class programm will exit (textdokument) Allgemeine Java-Themen 3
S Could not find the main class Allgemeine Java-Themen 7
B Mal wieder "Could not find the main class" Allgemeine Java-Themen 3
B Variable class in java.lang.Object Allgemeine Java-Themen 11
C Could not find the main class. Allgemeine Java-Themen 15
S Klassen .jar - eine .class datei ändern? Allgemeine Java-Themen 23
A Could not find main class: start Allgemeine Java-Themen 5
S main() class finden Allgemeine Java-Themen 7
hdi Could not find main class? Allgemeine Java-Themen 8
R Warum Class.forName(); Allgemeine Java-Themen 7
C class.class angefordert ? Allgemeine Java-Themen 2
S Methoden Class.forName() >> Methoden - Reihenfolge Allgemeine Java-Themen 5
B Test$1.class mit dem javac compiler Allgemeine Java-Themen 7
G jar Datei findet Main Class nicht... Allgemeine Java-Themen 2
P Java Editor Could not find the main class GUI. Programm will exit. Allgemeine Java-Themen 3
D class Datei einlesen Allgemeine Java-Themen 4
T Interface > Abstract > Class Allgemeine Java-Themen 11

Ähnliche Java Themen

Neue Themen


Oben