[Opensource] Problems with 5.04 transitions

Michael Rimov rimovm at centercomp.com
Sat May 24 00:52:59 PDT 2003


At 02:08 PM 5/23/2003 -0400, you wrote:

>I'm migrating a (working) 4.02 application to 5.04 and wouldn't mind some
>guidance with respect to the way transition behaviour has changed.

Vincent,

The code you're doing looks correct.

However, looking at the ConfigManager code:

                 com.jcorporate.expresso.core.controller.Controller c
                         = 
ConfigManager.getControllerFactory().getController(controllerName);

                 stateName = c.getInitialState();

Tells me that 'c' is null.  Somehow the controller is throwing an exception 
upon construction??  Check the logs, I believe controllerFactory should be 
logging any issues while loading the controller.

                                         -Mike




>My application has a generic controller which transitions to other
>controllers as necessary. In 4.02, the request was passed through unaltered
>and everything worked just fine. Now it looks like the request is discarded.
>This isn't so good for me.
>
>The part I really don't yet understand is the exception I get when my code
>does the following:
>
>- From the dispatcher controller, I create a transition
>
>Transition t = new Transition();
>t.setController("...NewController");
>t.setState("stateInNewController");
>t.addParam("newParam", "newValue");
>.
>.
>t.transition(request, response);
>
>The exception I get starts like this:
>
>java.lang.NullPointerException at
>com.jcorporate.expresso.core.misc.ConfigManager.getMapping(ConfigManager.jav
>a:1643) at
>com.jcorporate.expresso.core.controller.Transition.newStateDispatch(Transiti
>on.java:504) at
>com.jcorporate.expresso.core.controller.Transition.transition(Transition.jav
>a:1071) at
>.
>.
>
>I don't understand this exception . The code (in ConfigManager) seems to do
>enough tests to prevent  a null Controller object being returned from the
>factory.
>
>Any comments/suggestions would be appreciated.
>
>Thanks,
>
>Vincent
>
>_______________________________________________
>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