Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-6080

NoSuchMethodError thrown while applying CreateClassFix

    XMLWordPrintableJSON

Details

    Description

      Open the following class in editor:

      public class Main {
        public static void main(String... args) {
          T t = new T();
        }
      }
      

      Place cursor on 'T' in 'new T()' and apply 'Create class 'T" with constructor...' hint. The following exception is thrown:

      java.lang.NoSuchMethodError: com.sun.tools.javac.code.Type$ErrorType.<init>(Lcom/sun/tools/javac/util/Name;Lcom/sun/tools/javac/code/Symbol$TypeSymbol;Lcom/sun/tools/javac/code/Type;)V
      	at org.netbeans.api.java.source.TypeMirrorHandle.resolve(TypeMirrorHandle.java:347)
      	at org.netbeans.api.java.source.TypeMirrorHandle.resolve(TypeMirrorHandle.java:227)
      	at org.netbeans.modules.java.hints.errors.CreateClassFix.createConstructor(CreateClassFix.java:160)
      	at org.netbeans.modules.java.hints.errors.CreateClassFix$CreateOuterClassFix$2.run(CreateClassFix.java:408)
      	at org.netbeans.modules.java.hints.errors.CreateClassFix$CreateOuterClassFix$2.run(CreateClassFix.java:393)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
      	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
      	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
      	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
      	at org.netbeans.modules.java.hints.errors.CreateClassFix$CreateOuterClassFix.implement(CreateClassFix.java:393)
      	at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:810)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      

      Attachments

        Issue Links

          Activity

            People

              dbalek Dusan Balek
              dbalek Dusan Balek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h