Results 1 to 5 of 5

Thread: java.lang.IllegalStateException: Properties file not found

  1. #1
    Join Date
    Oct 2005
    Location
    Mobile, AL
    Posts
    345

    Default java.lang.IllegalStateException: Properties file not found

    I am getting the following exception when I try to create a controller using scaffolding:

    Code:
    roo> controller scaffold --name com.modelsoftware.emanage.controllers.ProjectController --entity com.modelsoftware.emanage.domain.Project
    Created SRC_MAIN_JAVA\com\modelsoftware\emanage\controllers\ProjectController.java
    Managed SRC_MAIN_WEBAPP\WEB-INF\web.xml
    Managed ROOT\pom.xml
    Created SRC_MAIN_JAVA\com\modelsoftware\emanage\controllers\ProjectController_Roo_Controller.aj
    Created SRC_MAIN_WEBAPP\WEB-INF\views\project
    Created SRC_MAIN_WEBAPP\WEB-INF\views\project\list.jspx
    Created SRC_MAIN_WEBAPP\WEB-INF\views\project\show.jspx
    Created SRC_MAIN_WEBAPP\WEB-INF\views\project\create.jspx
    Managed SRC_MAIN_WEBAPP\WEB-INF\i18n\messages.properties
    Managed SRC_MAIN_WEBAPP\WEB-INF\i18n\messages_de.properties
    Undo manage SRC_MAIN_WEBAPP\WEB-INF\i18n\messages_de.properties
    Undo manage SRC_MAIN_WEBAPP\WEB-INF\i18n\messages.properties
    Undo create SRC_MAIN_WEBAPP\WEB-INF\views\project\create.jspx
    Undo create SRC_MAIN_WEBAPP\WEB-INF\views\project\show.jspx
    Undo create SRC_MAIN_WEBAPP\WEB-INF\views\project\list.jspx
    Undo create SRC_MAIN_WEBAPP\WEB-INF\views\project
    Undo create SRC_MAIN_JAVA\com\modelsoftware\emanage\controllers\ProjectController_Roo_Controller.aj
    Undo manage ROOT\pom.xml
    Undo manage SRC_MAIN_WEBAPP\WEB-INF\web.xml
    Undo create SRC_MAIN_JAVA\com\modelsoftware\emanage\controllers\ProjectController.java
    Properties file not found
    java.lang.IllegalStateException: Properties file not found
        at org.springframework.roo.addon.web.menu.MenuOperations.setProperty(MenuOperations.java:328)
        at org.springframework.roo.addon.web.menu.MenuOperations.addMenuItem(MenuOperations.java:106)
        at org.springframework.roo.addon.mvc.jsp.JspMetadataListener.get(JspMetadataListener.java:177)
        at org.springframework.roo.addon.mvc.jsp.JspMetadataListener.notify(JspMetadataListener.java:324)
        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.itd.AbstractItdMetadataProvider.notify(AbstractItdMetadataProvider.java:101)
        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:124)
        at org.springframework.roo.shell.jline.JLineShell.promptLoop(JLineShell.java:136)
        at org.springframework.roo.bootstrap.Bootstrap.run(Bootstrap.java:113)
        at org.springframework.roo.bootstrap.Bootstrap.main(Bootstrap.java:53)

    FYI: I am running RC4 from trunc.

  2. #2
    Join Date
    Oct 2005
    Location
    Mobile, AL
    Posts
    345

    Default Fixed

    I took and built the application again and I noticed this time that the message.properties files were generated and the process completed so I guess something hosed up when generating the message.properties files.

  3. #3
    Join Date
    Aug 2008
    Location
    Coffs Harbour, Australia
    Posts
    11

    Default

    I had a same problem after creating my project with Roo1.0.0.RC2 and open it with Roo1.0.0.RC4 , what I have done for solving this was copying new properties (messages_[es,it,sv].properties) in i18n folder of project.

    Another thing is properties files will get different line order after generation. (it looks like random line order)
    It would be nice if we could expect some format like below:
    Code:
    #errors 
    error.dataaccessfailure.title=Data access failure
    error.uncaughtexception.title=Internal Error
    ....
    
    #lables 
    label.employee=Employee
    ...
    
    #customs by developers (Please don't modify this part!;) )
    label.user.email=Email
    ...
    
    #others or new, after here 
    ...
    Cheers, Sid

  4. #4
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    I'm not sure if this is a requirement of writing back the property files, but if you could log an enhancement request at http://jira.springframework.org/browse/ROO we can have a look.

    Cheers
    Ben
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

  5. #5
    Join Date
    Aug 2008
    Location
    Coffs Harbour, Australia
    Posts
    11

    Default

    I've created a new Improvement in Jira http://jira.springframework.org/browse/ROO-412
    Thanks, Sid

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •