Announcement Announcement Module
Collapse
No announcement yet.
new controller (automatic and manual) has stopped working Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • new controller (automatic and manual) has stopped working

    When trying to create a new controller I am now getting "application context does not exist" errors.

    roo> new controller manual -name ~.web.SecurityBrowser
    Created SRC_MAIN_JAVA\org\stjude\ri\bwfp\web\SecurityBrows er.java
    Undo create SRC_MAIN_JAVA\org\stjude\ri\bwfp\web\SecurityBrows er.java
    Application context does not exist
    java.lang.IllegalArgumentException: Application context does not exist
    at org.springframework.roo.support.util.Assert.isTrue (Assert.java:65)
    at org.springframework.roo.addon.web.mvc.controller.W ebMvcOperations.createWebApplicationContext(WebMvc Operations.java:216)
    at org.springframework.roo.addon.web.mvc.controller.W ebMvcOperations.install
    MvcArtefacts(WebMvcOperations.java:58)
    at org.springframework.roo.addon.web.mvc.controller.C ontrollerOperations.cre
    ateManualController(ControllerOperations.java:201)
    at org.springframework.roo.addon.web.mvc.controller.C ontrollerCommands.newController(ControllerCommands .java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknow n Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.springframework.roo.support.util.ReflectionUti ls.invokeMethod(ReflectionUtils.java:191)
    at org.springframework.roo.bootstrap.ProcessManagerHo stedExecutionStrategy$1.callback(ProcessManagerHos tedExecutionStrategy.java:33)
    at org.springframework.roo.process.manager.internal.D efaultProcessManager.doTransactionally(DefaultProc essManager.java:127)
    at org.springframework.roo.process.manager.internal.D efaultProcessManager.execute(DefaultProcessManager .java:90)
    at org.springframework.roo.bootstrap.ProcessManagerHo stedExecutionStrategy.e
    xecute(ProcessManagerHostedExecutionStrategy.java: 31)
    at org.springframework.roo.shell.internal.AbstractShe ll.executeCommand(Abstr
    actShell.java:120)
    at org.springframework.roo.shell.jline.JLineShell.pro mptLoop(JLineShell.java
    :80)
    at org.springframework.roo.bootstrap.Bootstrap.run(Bo otstrap.java:109)
    at org.springframework.roo.bootstrap.Bootstrap.main(B ootstrap.java:49)

    I still have an applicationcontext xml file and my mvn tomcat:run still works and brings up the application. New persistance class also works.

    I remember that something strange did happen when I moved the list operation from the aspect into the controller to customize it. It deleted the whole aspect, so I had to use eclipse undo to copy all of the aspect methods into the class.

    I have attached my application context.

    Regards,
    Dan Alford

  • #2
    I found the solution in Jira.

    The project structure changed between m2 and rc1. I moved my application context from $ROO_PROJECT\src\main\resources to $ROO_PROJECT\src\main\resources\META-INF\spring and that fixed the issue.

    Dan

    Comment

    Working...
    X