[Opensource] IllegalArgumentException calling ConfigManager.getMapping

Michael Rimov rimovm at centercomp.com
Thu Feb 13 11:18:40 PST 2003


Javier,

Because people were not specifying the initial states in their controllers, 
I was sometimes coming up with REALLY weird bugs when I didn't specify a 
'state' parameter.  So now if you specify

this.setInitialState(<whatever state name>);

in your controller's constructor, you'll be ok.

HTH!
                                         -Mike



At 01:26 PM 2/12/2003 +0100, you wrote:
>Hello,
>
>I'm trying to upgrade from Expresso 4.0 to Expresso 5.0.3. I'm getting
>now an exception each time I try to access a controller.
>
>
>I have found that the findControllerForm method in the Controller class,
>calls the ConfigManager getMapping method with a null state, throwing
>then the IllegalArgumentException if the Controller doesn't have an
>initial state.
>
>Is this correct? Should I define an inital state in every Controller? If
>that is true, the Expresso Changelog should be changed because I didn't
>find anything related.
>
>
>
>// The call to ConfigManager.getMapping
>         protected ActionForm findControllerForm(ControllerRequest
>request)
>                         throws ControllerException {
>                 ActionMapping mapping =
>ConfigManager.getMapping(getClass().getName(),
>                                 null);
>                 if (mapping == null) {
>                         return null;
>                 }
>
>
>// The exception
>java.lang.IllegalArgumentException: ConfigManager.getMapping():
>stateName was null and there is no defined initial state for:
>com.lapize.telcomunity.controller.GestionUsuarios
>         at
>com.jcorporate.expresso.core.misc.ConfigManager.getMapping(ConfigManager
>.java:1626)
>         at
>com.jcorporate.expresso.core.controller.Controller.findControllerForm(Co
>ntroller.java:333)
>         at
>com.jcorporate.expresso.core.controller.Controller.newState(Controller.j
>ava:1046)
>
>
>
>
>
>Best regards,
>
>Javier Campoamor
>
>
>Pº de Reina Cristina 6 1º 1
>28014- Madrid ( España )
>Tel: +34-91-501-90-41
>Fax: +34-91.501-92-44
>jcampoamor at lapize.com
>http://www.lapize.com
>
>
>_______________________________________________
>Opensource mailing list
>Opensource at jcorporate.com
>http://mail.jcorporate.com/mailman/listinfo/opensource
>Archives: http://mail.jcorporate.com/pipermail/opensource/





More information about the Opensource mailing list