## Details

• Type: Bug
• Status: Resolved
• Priority: Major
• Resolution: Cannot Reproduce
• Affects Version/s: 1.1.0.M3
• Fix Version/s:
• Component/s:
• Labels:
None
• Environment:
Windows 7 x64, Roo console 1.1.0.M3

## Description

When using the 'controller' command it fails to complete because of the error "Properties file not found". It will undo everything it generates, except with "controller class", that failed to undo as well. I don't know what properties file it is referring to. It seems it should be generating it or ignoring its lack of existence.

There is not exception stack trace or other information provided to the console.

~.server.web roo> controller scaffold --entity ~.server.entity.Thing --class ~.server.web.ThingController
Created SRC_MAIN_JAVA\com\sample\site\server\web\ThingController.java
Created SRC_MAIN_WEBAPP\WEB-INF\web.xml
Created SRC_MAIN_JAVA\com\sample\site\server\web\ThingController_Roo_Controller.aj
Created SRC_MAIN_WEBAPP\WEB-INF\views\things
Created SRC_MAIN_WEBAPP\WEB-INF\views\things\list.jspx
Created SRC_MAIN_WEBAPP\WEB-INF\views\things\views.xml
Created SRC_MAIN_WEBAPP\WEB-INF\views\things\show.jspx
Managed SRC_MAIN_WEBAPP\WEB-INF\views\things\views.xml
Created SRC_MAIN_WEBAPP\WEB-INF\views\things\create.jspx
Undo create SRC_MAIN_WEBAPP\WEB-INF\views\things\create.jspx
Undo manage SRC_MAIN_WEBAPP\WEB-INF\views\things\views.xml
Undo create SRC_MAIN_WEBAPP\WEB-INF\views\things\show.jspx
Undo create SRC_MAIN_WEBAPP\WEB-INF\views\things\views.xml
Undo create SRC_MAIN_WEBAPP\WEB-INF\views\things\list.jspx
Undo create SRC_MAIN_WEBAPP\WEB-INF\views\things
Undo create SRC_MAIN_JAVA\com\sample\site\server\web\ThingController_Roo_Controller.aj
Undo create SRC_MAIN_WEBAPP\WEB-INF\web.xml
Undo create SRC_MAIN_JAVA\com\sample\site\server\web\ThingController.java

~.server.entity.Thing roo> controller class --class ~.server.web.ThingController --preferredMapping /thing/
Created SRC_MAIN_JAVA\com\sample\site\server\web\ThingController.java
Created SRC_MAIN_WEBAPP\WEB-INF\views\thing
Created SRC_MAIN_WEBAPP\WEB-INF\views\thing\index.jspx
Undo failed SRC_MAIN_WEBAPP\WEB-INF\views\thing\index.jspx

## Activity

Hide
Stefan Schmidt added a comment -

Eli, can you please provide the complete script (or steps to follow) which allows us to reproduce this issue?

Show
Stefan Schmidt added a comment - Eli, can you please provide the complete script (or steps to follow) which allows us to reproduce this issue?
Hide
Stefan Schmidt added a comment -

Eli,

I have tried to replicate this issue rather unsuccessfully. Without a script or instructions I am inclined to close this as 'cannot reproduce'. Here is what worked without issues for me with Roo 1.1.0.M3 and the current master:

 pro com.foo persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity --class ~.server.entity.Thing field string name controller scaffold --entity ~.server.entity.Thing --class ~.server.web.ThingController

If you delete properties files from your project which Roo expects to be in place, the scaffolding will fail. This is expected behaviour.

Show
Stefan Schmidt added a comment - Eli, I have tried to replicate this issue rather unsuccessfully. Without a script or instructions I am inclined to close this as 'cannot reproduce'. Here is what worked without issues for me with Roo 1.1.0.M3 and the current master: pro com.foo persistence setup --provider HIBERNATE --database HYPERSONIC_IN_MEMORY entity --class ~.server.entity.Thing field string name controller scaffold --entity ~.server.entity.Thing --class ~.server.web.ThingController If you delete properties files from your project which Roo expects to be in place, the scaffolding will fail. This is expected behaviour.
Hide
Stefan Schmidt added a comment -

I am closing this issue as 'cannot reproduce' as per my previous comment.

Show
Stefan Schmidt added a comment - I am closing this issue as 'cannot reproduce' as per my previous comment.
Hide
Thomas Pasch added a comment -

I've step upon this problem as well. It seems to be related to not having some property files (see below). It happened when I tried 'controller all --package' on a roo project that had been set up as GWT project before (I don't know if this is the way to use Roo, however, I guess that some people will play around with it, trying both GWT and controllers and voilà.

Perhaps 'roo controller' should just check if everything is sane and display an appropriate warning (not 'Properties file not found').

src/main/webapp/WEB-INF/

• classes/alt.properties
• classes/standard.properties
• i18n/application.properties
• i18n/messages.properties
Show
Thomas Pasch added a comment - I've step upon this problem as well. It seems to be related to not having some property files (see below). It happened when I tried 'controller all --package' on a roo project that had been set up as GWT project before (I don't know if this is the way to use Roo, however, I guess that some people will play around with it, trying both GWT and controllers and voilà. Perhaps 'roo controller' should just check if everything is sane and display an appropriate warning ( not 'Properties file not found'). src/main/webapp/WEB-INF/ classes/alt.properties classes/standard.properties i18n/application.properties i18n/messages.properties

## People

• Assignee:
Stefan Schmidt
Reporter:
Eli Doran