japa.parser.ParseException: Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ...

Spring JIRA | Frédéric Camblor | 7 years ago
  1. 0

    When executing "ten minutes tutorial" (http://static.springsource.org/spring-roo/reference/html/intro.html#intro-installation), creation of Timer entity fails, apparently because of the "ten-minutes" suggested packageName : roo.test1.tenminutes.Timer2 roo> entity --class roo.test1.ten-minutes.Timer3 Created SRC_MAIN_JAVA\roo\test1\ten-minutes\Timer3.java japa.parser.ParseException: Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ... at japa.parser.ASTParser.generateParseException(ASTParser.java:7697) at japa.parser.ASTParser.jj_consume_token(ASTParser.java:7570) at japa.parser.ASTParser.CompilationUnit(ASTParser.java:190) at japa.parser.JavaParser.parse(JavaParser.java:81) at japa.parser.JavaParser.parse(JavaParser.java:94) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:56) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:153) at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106) at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:175) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:100) at org.springframework.roo.metadata.internal.DefaultMetadataService.notify(DefaultMetadataService.java:148) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:255) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:324) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:210) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:137) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:94) at org.springframework.roo.bootstrap.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:31) at org.springframework.roo.shell.internal.AbstractShell.executeCommand(AbstractShell.java:128) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:158) at org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:113) at org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:53) If I try to create the same class in the tenminutes package, it works fine : ~.Timer3 roo> entity --class roo.test1.tenminutes.Timer3 Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3.java Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_Entity.aj Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_ToString.aj Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_Configurable.aj

    Spring JIRA | 7 years ago | Frédéric Camblor
    japa.parser.ParseException: Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ...
  2. 0

    When executing "ten minutes tutorial" (http://static.springsource.org/spring-roo/reference/html/intro.html#intro-installation), creation of Timer entity fails, apparently because of the "ten-minutes" suggested packageName : roo.test1.tenminutes.Timer2 roo> entity --class roo.test1.ten-minutes.Timer3 Created SRC_MAIN_JAVA\roo\test1\ten-minutes\Timer3.java japa.parser.ParseException: Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ... at japa.parser.ASTParser.generateParseException(ASTParser.java:7697) at japa.parser.ASTParser.jj_consume_token(ASTParser.java:7570) at japa.parser.ASTParser.CompilationUnit(ASTParser.java:190) at japa.parser.JavaParser.parse(JavaParser.java:81) at japa.parser.JavaParser.parse(JavaParser.java:94) at org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:56) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:153) at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106) at org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:175) at org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:100) at org.springframework.roo.metadata.internal.DefaultMetadataService.notify(DefaultMetadataService.java:148) at org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:255) at org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:324) at org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:210) at org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:137) at org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:94) at org.springframework.roo.bootstrap.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:31) at org.springframework.roo.shell.internal.AbstractShell.executeCommand(AbstractShell.java:128) at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:158) at org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:113) at org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:53) If I try to create the same class in the tenminutes package, it works fine : ~.Timer3 roo> entity --class roo.test1.tenminutes.Timer3 Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3.java Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_Entity.aj Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_ToString.aj Created SRC_MAIN_JAVA\roo\test1\tenminutes\Timer3_Roo_Configurable.aj

    Spring JIRA | 7 years ago | Frédéric Camblor
    japa.parser.ParseException: Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ...
  3. 0

    No completion inside for-each parens

    GitHub | 2 years ago | dgutov
    japa.parser.ParseException: Encountered " <IDENTIFIER> "out "" at line 114, column 13. Was expecting one of: "catch" ... "finally" ...
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    JavaParser - ArrayList Doesn't Recognized Properly

    Stack Overflow | 2 years ago
    japa.parser.ParseException: Encountered " "<" "< "" at line 2, column 69. Was expecting: "(" ... at japa.parser.ASTParser.generateParseException(ASTParser.java:10074)

    Root Cause Analysis

    1. japa.parser.ParseException

      Encountered " "package" "package "" at line 1, column 1. Was expecting one of: <EOF> "abstract" ... "class" ... "enum" ... "final" ... "import" ... "interface" ... "native" ... "private" ... "protected" ... "public" ... "static" ... "strictfp" ... "synchronized" ... "transient" ... "volatile" ... ";" ... "@" ... "\u001a" ... "@" ... "@" ... "@" ...

      at japa.parser.ASTParser.generateParseException()
    2. javaparser
      JavaParser.parse
      1. japa.parser.ASTParser.generateParseException(ASTParser.java:7697)
      2. japa.parser.ASTParser.jj_consume_token(ASTParser.java:7570)
      3. japa.parser.ASTParser.CompilationUnit(ASTParser.java:190)
      4. japa.parser.JavaParser.parse(JavaParser.java:81)
      5. japa.parser.JavaParser.parse(JavaParser.java:94)
      5 frames
    3. org.springframework.roo
      Bootstrap.main
      1. org.springframework.roo.classpath.javaparser.JavaParserClassMetadata.<init>(JavaParserClassMetadata.java:56)
      2. org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.get(JavaParserMetadataProvider.java:153)
      3. org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:106)
      4. org.springframework.roo.metadata.internal.DefaultMetadataService.get(DefaultMetadataService.java:124)
      5. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.get(AbstractItdMetadataProvider.java:175)
      6. org.springframework.roo.classpath.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:100)
      7. org.springframework.roo.metadata.internal.DefaultMetadataService.notify(DefaultMetadataService.java:148)
      8. org.springframework.roo.metadata.internal.DefaultMetadataDependencyRegistry.notifyDownstream(DefaultMetadataDependencyRegistry.java:255)
      9. org.springframework.roo.classpath.javaparser.JavaParserMetadataProvider.onFileEvent(JavaParserMetadataProvider.java:131)
      10. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.publish(PollingFileMonitorService.java:324)
      11. org.springframework.roo.file.monitor.polling.PollingFileMonitorService.scanNotified(PollingFileMonitorService.java:210)
      12. org.springframework.roo.process.manager.internal.DefaultProcessManager.doTransactionally(DefaultProcessManager.java:137)
      13. org.springframework.roo.process.manager.internal.DefaultProcessManager.execute(DefaultProcessManager.java:94)
      14. org.springframework.roo.bootstrap.ProcessManagerHostedExecutionStrategy.execute(ProcessManagerHostedExecutionStrategy.java:31)
      15. org.springframework.roo.shell.internal.AbstractShell.executeCommand(AbstractShell.java:128)
      16. org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:158)
      17. org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:113)
      18. org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:53)
      18 frames