Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1900

Parsing failure for random java files due to static import resolution failure

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 1.1.1.RELEASE
    • Fix Version/s: 1.1.1.RELEASE
    • Component/s: @ CORE
    • Labels:
      None
    • Environment:
      1.1.1.RELEASE [rev 43c185c] on windows, jdk1.6.0_18

      Description

      Several of my "non-roo" utility files now get parsing errors (since upgrading to rev 43c185c)

      .../javaparser/CompilationUnitServices.java | 3 +
      .../javaparser/JavaParserClassMetadata.java | 14 +-
      .../javaparser/JavaParserMetadataProvider.java | 6 +-
      ...vaParserMutableClassOrInterfaceTypeDetails.java | 459 +++++++++--
      .../roo/classpath/javaparser/JavaParserUtils.java | 210 +++---
      .../details/JavaParserConstructorMetadata.java | 8 +-
      .../details/JavaParserFieldMetadata.java | 15 +-
      .../details/JavaParserInnerTypeMetadata.java | 609 +++++++++++++
      .../details/JavaParserMethodMetadata.java | 43 +-
      .../roo/classpath/MetadataCommands.java | 18 +-

      Each file fails to parse twice:

      :myProject>roo-dev
      ____ ____ ____
      / __ \/ __ \/ __ \
      / /_/ / / / / / / /
      / , _/ // / /_/ /
      // ||___/___/ 1.1.1.RELEASE [rev 43c185c]

      Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
      [FelixDispatchQueue]
      Parsing failure for 'C:\Data\Programs\java\myProject\src\main\java\com\myproj\mypkg\util\EmailSender.java' (development mode diagnostics)
      java.lang.NullPointerException
      at org.springframework.roo.classpath.javaparser.details.JavaParserInnerTypeMetadata.<init>(JavaParserInnerTypeMetadata.java:201)
      at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:269)
      at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:69)
      at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:160)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179)
      at org.springframework.roo.classpath.TypeLocationServiceImpl.getClassOrInterfaceTypeDetails(TypeLocationServiceImpl.java:137)
      at org.springframework.roo.classpath.TypeLocationServiceImpl.processTypesWithAnnotation(TypeLocationServiceImpl.java:88)
      at org.springframework.roo.classpath.TypeLocationServiceImpl.findClassesOrInterfaceDetailsWithAnnotation(TypeLocationServiceImpl.java:128)
      at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.reverseEngineer(DbreDatabaseListenerImpl.java:98)
      at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.processDatabase(DbreDatabaseListenerImpl.java:90)
      at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.notifyDatabaseRefreshed(DbreDatabaseListenerImpl.java:73)
      at org.springframework.roo.addon.dbre.DbreModelServiceImpl.publishToListeners(DbreModelServiceImpl.java:247)
      at org.springframework.roo.addon.dbre.DbreModelServiceImpl.getDatabase(DbreModelServiceImpl.java:206)
      at org.springframework.roo.addon.dbre.DbreModelServiceImpl.getDatabase(DbreModelServiceImpl.java:185)
      at org.springframework.roo.addon.dbre.DbreModelServiceImpl.getDatabase(DbreModelServiceImpl.java:150)
      at org.springframework.roo.addon.dbre.DbreDatabaseListenerImpl.getIdentifiers(DbreDatabaseListenerImpl.java:306)
      at org.springframework.roo.addon.entity.AbstractIdentifierServiceAwareMetadataProvider.getIdentifiersForType(AbstractIdentifierServiceAwareMetadataProvider.java:53)
      at org.springframework.roo.addon.entity.EntityMetadataProviderImpl.getMetadata(EntityMetadataProviderImpl.java:83)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:235)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179)
      at org.springframework.roo.addon.dbre.DbreMetadataProviderImpl.getMetadata(DbreMetadataProviderImpl.java:52)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:235)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179)
      at org.springframework.roo.classpath.scanner.MemberDetailsScannerImpl.getMemberDetails(MemberDetailsScannerImpl.java:135)
      at org.springframework.roo.addon.beaninfo.BeanInfoMetadataProviderImpl.getMetadata(BeanInfoMetadataProviderImpl.java:34)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:235)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179)
      at org.springframework.roo.addon.web.mvc.controller.WebScaffoldMetadataProviderImpl.getMetadata(WebScaffoldMetadataProviderImpl.java:64)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:235)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:112)
      at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:199)
      at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262)
      at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:138)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318)
      at org.springframework.roo.process.manager.internal.DefaultFileManager.notify(DefaultFileManager.java:199)
      at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:276)
      at org.springframework.roo.addon.maven.MavenProjectMetadataProvider.onFileEvent(MavenProjectMetadataProvider.java:778)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318)
      at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:36)
      at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:15)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.completeStartup(DefaultProcessManager.java:99)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager$1.frameworkEvent(DefaultProcessManager.java:62)
      at org.apache.felix.framework.util.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:767)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:724)
      at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:942)
      at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
      at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
      at java.lang.Thread.run(Thread.java:619)
      [FelixDispatchQueue]
      Parsing failure for 'C:\Data\Programs\java\myProject\src\main\java\com\myproj\mypkg\util\EmailSender.java' (development mode diagnostics)
      java.lang.NullPointerException
      at org.springframework.roo.classpath.javaparser.details.JavaParserInnerTypeMetadata.<init>(JavaParserInnerTypeMetadata.java:201)
      at org.springframework.roo.classpath.javaparser.JavaParserMutableClassOrInterfaceTypeDetails.<init>(JavaParserMutableClassOrInterfaceTypeDetails.java:269)
      at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:69)
      at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:160)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:179)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:183)
      at org.springframework.roo.metadata.DefaultMetadataService.getInternal(DefaultMetadataService.java:136)
      at org.springframework.roo.metadata.DefaultMetadataService.get(DefaultMetadataService.java:81)
      at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:112)
      at org.springframework.roo.metadata.DefaultMetadataService.notify(DefaultMetadataService.java:199)
      at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:262)
      at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:138)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318)
      at org.springframework.roo.process.manager.internal.DefaultFileManager.notify(DefaultFileManager.java:199)
      at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:276)
      at org.springframework.roo.addon.maven.MavenProjectMetadataProvider.onFileEvent(MavenProjectMetadataProvider.java:778)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:344)
      at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanAll(PollingFileMonitorService.java:318)
      at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:36)
      at org.springframework.roo.process.manager.internal.MonitoringRequestCommand.callback(MonitoringRequestCommand.java:15)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:177)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager.completeStartup(DefaultProcessManager.java:99)
      at org.springframework.roo.process.manager.internal.DefaultProcessManager$1.frameworkEvent(DefaultProcessManager.java:62)
      at org.apache.felix.framework.util.EventDispatcher.invokeFrameworkListenerCallback(EventDispatcher.java:767)
      at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:724)
      at org.apache.felix.framework.util.EventDispatcher.run(EventDispatcher.java:942)
      at org.apache.felix.framework.util.EventDispatcher.access$000(EventDispatcher.java:54)
      at org.apache.felix.framework.util.EventDispatcher$1.run(EventDispatcher.java:106)
      at java.lang.Thread.run(Thread.java:619)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              balex Ben Alex
              Reporter:
              jpunt Jack Punt
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: