Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-342

If a .class file is missing, an exception is generated when the project is opened

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.0.5
    • Component/s: Compiler

      Description

      If a class is no longer there, an exception is generated when the project is opened. Below is the exception generated.

      Opening project: C:\Users\Edwin Cho\Desktop\project3 Exception in thread "AWT-EventQueue-0" java.lang.TypeNotPresentException: Type RandomOccupant not present
      	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
      	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
      	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      	at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50)
      	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:120)
      	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      	at sun.reflect.generics.repository.FieldRepository.getGenericType(FieldRepository.java:67)
      	at java.lang.reflect.Field.getGenericType(Field.java:223)
      	at bluej.utility.JavaUtils15.getFieldType(JavaUtils15.java:186)
      	at bluej.utility.JavaReflective.getDeclaredFields(JavaReflective.java:235)
      	at bluej.parser.entity.TypeEntity.getSubentity(TypeEntity.java:98)
      	at bluej.parser.InfoParser.resolveComments(InfoParser.java:263)
      	at bluej.parser.InfoParser.parse(InfoParser.java:187)
      	at bluej.parser.InfoParser.parse(InfoParser.java:165)
      	at bluej.pkgmgr.SourceInfo.getInfo(SourceInfo.java:64)
      	at bluej.pkgmgr.target.ClassTarget.analyseSource(ClassTarget.java:1127)
      	at bluej.pkgmgr.Package.refreshPackage(Package.java:739)
      	at bluej.pkgmgr.Project.<init>(Project.java:233)
      	at bluej.pkgmgr.Project.openProject(Project.java:357)
      	at bluej.Main.processArgs(Main.java:113)
      	at bluej.Main.access$000(Main.java:46)
      	at bluej.Main$1.run(Main.java:68)
      	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
      	at java.awt.EventQueue.access$000(EventQueue.java:85)
      	at java.awt.EventQueue$1.run(EventQueue.java:603)
      	at java.awt.EventQueue$1.run(EventQueue.java:601)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
      	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      Caused by: java.lang.ClassNotFoundException: RandomOccupant
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:247)
      	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
      

        Attachments

          Activity

            People

            • Assignee:
              davmac Davin McCall
              Reporter:
              external External via trac
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: