如何在netbeans

时间:2016-01-25 12:24:19

标签: hibernate

我正在使用hibernate创建java se应用程序。应用程序在netbeans中运行良好,但如果我想清理构建应用程序,我会得到错误.Below是我得到的错误消息的副本。 拜托我需要你的帮忙。提前致谢

--------------错误讯息----------------------------

注释处理器抛出了未捕获的异常。 有关详细信息,请参阅以下堆栈跟踪 java.lang.RuntimeException:com.sun.tools.javac.code.Symbol $ CompletionFailure:找不到oracle.ons.Notification的类文件     在org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor.process(CanonicalModelProcessor.java:407)     在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)     在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)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在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)     at or or or or or or or or or or or or or or or or     在org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)     at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     at 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)     at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     at 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)     at sun.reflect.GeneratedMethodAccessor419.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     在java.lang.reflect.Method.invoke(Method.java:497)     在org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)     at 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)     at 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) 引起:com.sun.tools.javac.code.Symbol $ CompletionFailure:未找到oracle.ons.Notification的类文件

1 个答案:

答案 0 :(得分:0)

阅读并实施Runtime.exec()不会的所有建议。这可能会解决问题。

如果没有,它应该提供有关失败原因的更多信息。

然后忽略该文章引用exec并使用ProcessBuilder构建Process。同时将String arg分解为String [] args以解释自身包含空格的参数。

Clean Solution 将从bin / obj目录中删除所有已编译的文件(即EXE和DLL)。