lundi 26 janvier 2015
JavaFX Datenbankverbindung über JPA und MySQL Error
Posted on 10:13 by verona
Heyho,
folgendes Problem:
Ich habe mir einen MySQL Server mit XAMPP aufgesetzt, dann erstelle ich mir ein neues Netbeansprojekt mit: "JavaFx Application", welches mit JPA auf die Datenbank zugreifen soll.
Danach habe ich mir die MySQL JDBC Treiber in die Libaries hinzugefügt und wenn ich mir nun mit "New" -> "Entity Classes from Database..." die Persistence.xml und die entsprechenden Javaklassen erzeugen lasse, kommt beim Start des Programms folgende Fehlermeldung:
warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.8'
Note: Creating non-static metadata factory ...
error: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.RuntimeException: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1159)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:935)
at org.netbeans.modules.java.source.ant.JavacTask.execute(JavacTask.java:145)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
C:\Users\Nils\Documents\NetBeansProjects\TestDB\nbproject\build-impl.xml:924: The following error occurred while executing this line:
C:\Users\Nils\Documents\NetBeansProjects\TestDB\nbproject\build-impl.xml:264: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
Unter Swing funktioniert es allerdings perfekt, beim erstellen Verbindung ist alles auf Standard geblieben. Die Datenbankverbindung wurde von Netbeans auch getested(ansonsten hätte ich nicht die Daten erzeugen können).
Einzige Änderung die ich vorgenommen habe sind diese:
- Fully Qualified Database Table Names
- Attributes for Regenerating Tables
Doch daran wird es nicht liegen, bin mit meinem Latein am Ende :( Weiß einer wie ich die Fehlermeldung beheben kann und endlich mal eine Tableview erstellen kann?
Jedes anderes FX Projekt was ich mir erstelle funktioniert einwandfrei....
Mfg
Nils
folgendes Problem:
Ich habe mir einen MySQL Server mit XAMPP aufgesetzt, dann erstelle ich mir ein neues Netbeansprojekt mit: "JavaFx Application", welches mit JPA auf die Datenbank zugreifen soll.
Danach habe ich mir die MySQL JDBC Treiber in die Libaries hinzugefügt und wenn ich mir nun mit "New" -> "Entity Classes from Database..." die Persistence.xml und die entsprechenden Javaklassen erzeugen lasse, kommt beim Start des Programms folgende Fehlermeldung:
Zitat:
warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.8'
Note: Creating non-static metadata factory ...
error: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
An annotation processor threw an uncaught exception.
Consult the following stack trace for details.
java.lang.RuntimeException: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
at org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.main.Main.compile(Main.java:381)
at com.sun.tools.javac.main.Main.compile(Main.java:370)
at com.sun.tools.javac.main.Main.compile(Main.java:361)
at com.sun.tools.javac.Main.compile(Main.java:56)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1159)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:935)
at org.netbeans.modules.java.source.ant.JavacTask.execute(JavacTask.java:145)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.GeneratedMethodAccessor161.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Caused by: com.sun.tools.javac.code.Symbol$CompletionFailure: class file for sun.util.logging.PlatformLogger not found
C:\Users\Nils\Documents\NetBeansProjects\TestDB\nbproject\build-impl.xml:924: The following error occurred while executing this line:
C:\Users\Nils\Documents\NetBeansProjects\TestDB\nbproject\build-impl.xml:264: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 0 seconds)
Unter Swing funktioniert es allerdings perfekt, beim erstellen Verbindung ist alles auf Standard geblieben. Die Datenbankverbindung wurde von Netbeans auch getested(ansonsten hätte ich nicht die Daten erzeugen können).
Einzige Änderung die ich vorgenommen habe sind diese:
- Fully Qualified Database Table Names
- Attributes for Regenerating Tables
Doch daran wird es nicht liegen, bin mit meinem Latein am Ende :( Weiß einer wie ich die Fehlermeldung beheben kann und endlich mal eine Tableview erstellen kann?
Jedes anderes FX Projekt was ich mir erstelle funktioniert einwandfrei....
Mfg
Nils
JavaFX Datenbankverbindung über JPA und MySQL Error
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire