java.lang.IllegalAccessError:试图从com / sun / tools / javac / parser / Keywords访问类com / sun / tools / javac / parser / Keywords $ 1

时间:2016-01-29 12:15:57

标签: java ant

我正在将应用程序从struts1.x迁移到struts2.x。在使用ant脚本构建应用程序时,我收到以下错误:

java.compile:
    [mkdir] Created dir: C:\Users\R20D29TSG1\Documents\workspace\RTM\working.dir\web-common\compile\java
    [javac] Compiling 1235 source files to C:\Users\R20D29TSG1\Documents\workspace\RTM\working.dir\web-common\compile\java
    [javac] An exception has occurred in the compiler (1.6.0_29). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport)  after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report.  Thank you.
    [javac] java.lang.IllegalAccessError: tried to access class com/sun/tools/javac/parser/Keywords$1 from class com/sun/tools/javac/parser/Keywords
    [javac]     at com.sun.tools.javac.parser.Keywords.token2string(Keywords.java:82)
    [javac]     at com.sun.tools.javac.parser.Parser.classOrInterfaceOrEnumDeclaration(Parser.java:2206)
    [javac]     at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2180)
    [javac]     at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2126)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:509)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:804)
    [javac]     at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:353)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:279)
    [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:270)
    [javac]     at com.sun.tools.javac.Main.compile(Main.java:69)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
    [javac]     at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065)
    [javac]     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [javac]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [javac]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [javac]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [javac]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    [javac]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [javac]     at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [javac]     at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
    [javac]     at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac]     at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    [javac]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac]     at java.lang.reflect.Method.invoke(Method.java:597)
    [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac]     at org.apache.tools.ant.Target.execute(Target.java:357)
    [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:385)
    [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
    [javac]     at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
    [javac]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
    [javac]     at org.apache.tools.ant.Main.runBuild(Main.java:758)
    [javac]     at org.apache.tools.ant.Main.startAnt(Main.java:217)
    [javac]     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
    [javac]     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

0 个答案:

没有答案