java - JavaFX and JPA2 don't compile -
i'm trying use jpa2 persistence of classes , write gui javafx. @ compile time error (with eclipselink library):
annotation processor threw uncaught exception. consult following stack trace details. java.lang.runtimeexception: com.sun.tools.javac.code.symbol$completionfailure: class file sun.util.logging.platformlogger not found @ org.eclipse.persistence.internal.jpa.modelgen.canonicalmodelprocessor.process(canonicalmodelprocessor.java:407) @ com.sun.tools.javac.processing.javacprocessingenvironment.callprocessor(javacprocessingenvironment.java:794) @ com.sun.tools.javac.processing.javacprocessingenvironment.discoverandrunprocs(javacprocessingenvironment.java:705) @ com.sun.tools.javac.processing.javacprocessingenvironment.access$1800(javacprocessingenvironment.java:91) @ com.sun.tools.javac.processing.javacprocessingenvironment$round.run(javacprocessingenvironment.java:1035) @ com.sun.tools.javac.processing.javacprocessingenvironment.doprocessing(javacprocessingenvironment.java:1176) @ com.sun.tools.javac.main.javacompiler.processannotations(javacompiler.java:1170) @ com.sun.tools.javac.main.javacompiler.compile(javacompiler.java:856) @ com.sun.tools.javac.main.main.compile(main.java:523) @ com.sun.tools.javac.main.main.compile(main.java:381) @ com.sun.tools.javac.main.main.compile(main.java:370) @ com.sun.tools.javac.main.main.compile(main.java:361) @ com.sun.tools.javac.main.compile(main.java:56) @ sun.reflect.generatedmethodaccessor487.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ org.apache.tools.ant.taskdefs.compilers.javac13.execute(javac13.java:56) @ org.apache.tools.ant.taskdefs.javac.compile(javac.java:1159) @ org.apache.tools.ant.taskdefs.javac.execute(javac.java:935) @ org.netbeans.modules.java.source.ant.javactask.execute(javactask.java:145) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor368.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.taskdefs.sequential.execute(sequential.java:68) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor368.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.taskdefs.macroinstance.execute(macroinstance.java:396) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor368.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.target.execute(target.java:435) @ org.apache.tools.ant.target.performtasks(target.java:456) @ org.apache.tools.ant.project.executesortedtargets(project.java:1393) @ org.apache.tools.ant.helper.singlecheckexecutor.executetargets(singlecheckexecutor.java:38) @ org.apache.tools.ant.project.executetargets(project.java:1248) @ org.apache.tools.ant.taskdefs.ant.execute(ant.java:441) @ org.apache.tools.ant.taskdefs.calltarget.execute(calltarget.java:105) @ org.apache.tools.ant.unknownelement.execute(unknownelement.java:292) @ sun.reflect.generatedmethodaccessor368.invoke(unknown source) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:483) @ org.apache.tools.ant.dispatch.dispatchutils.execute(dispatchutils.java:106) @ org.apache.tools.ant.task.perform(task.java:348) @ org.apache.tools.ant.target.execute(target.java:435) @ org.apache.tools.ant.target.performtasks(target.java:456) @ org.apache.tools.ant.project.executesortedtargets(project.java:1393) @ org.apache.tools.ant.project.executetarget(project.java:1364) @ org.apache.tools.ant.helper.defaultexecutor.executetargets(defaultexecutor.java:41) @ org.apache.tools.ant.project.executetargets(project.java:1248) @ org.apache.tools.ant.module.bridge.impl.bridgeimpl.run(bridgeimpl.java:286) @ org.apache.tools.ant.module.run.targetexecutor.run(targetexecutor.java:555) @ org.netbeans.core.execution.runclassthread.run(runclassthread.java:153) caused by: com.sun.tools.javac.code.symbol$completionfailure: class file sun.util.logging.platformlogger not found /home/bolet/cole/m02.bdd/jpa_practicafxml/nbproject/jfx-impl.xml:3438: following error occurred while executing line: /home/bolet/cole/m02.bdd/jpa_practicafxml/nbproject/build-impl.xml:924: following error occurred while executing line: /home/bolet/cole/m02.bdd/jpa_practicafxml/nbproject/build-impl.xml:264: compile failed; see compiler error output details. build failed (total time: 0 seconds)
i tried diferent persistence libraries, hibernate one:
error: bad service configuration file, or exception thrown while constructing processor object: javax.annotation.processing.processor: provider org.eclipse.persistence.internal.jpa.modelgen.canonicalmodelprocessor not instantiated: java.lang.noclassdeffounderror: org/eclipse/persistence/internal/sessions/abstractsession
i re-write persistence.xml file when change library... maybe aren't compatible? don't think so...
here persistence class:
@entity @inheritance(strategy=inheritancetype.joined) public abstract class sensor { @id @column(name="codi") //@generatedvalue(strategy=generationtype.sequence, generator="seq") private string codi; @column(name="preu") private double preu; public sensor() { } public sensor(string codi, double preu) { this.codi = codi; this.preu = preu; } } }
ty in advance!
i found solution here: https://netbeans.org/bugzilla/show_bug.cgi?id=241616 , here: http://tutoriales.stock-zero.com/2014/05/javafx-y-jpa-problemas.html
you must go , open <>/nbproject/project.properties. must find following line:
javac.processorpath=\ ${javac.classpath}:\ ${libs.eclipselinkmodelgen.classpath}
and subtitute other:
javac.processorpath=\ ${javac.classpath}
then must re-add jdbc , eclipse link driver on libraries of project done!
Comments
Post a Comment