On Mar 7, 2007, at 9:17 AM, Fred Shurtleff wrote:

Hello,
I have ported an PBProj/Xcode application over to Eclipse. This application has been coded to use Direct Actions; however when I run this application it fails because it cannot resolve a default 'action class'.

No, you're wrong.  You are mis-reading the error message.  See below.


Following are the details.

Application.java sets direct actions as default:
WORequestHandler directActionRequestHandler = requestHandlerForKey("wa");
   setDefaultRequestHandler(directActionRequestHandler);

DirectAction.java specifies the default action:
   public WOActionResults defaultAction() {
   return pageWithName("Main");

When I run the app, an ErrorPage is displayed(NOT Main page), and the Console displays the following error:

<com.webobjects.appserver._private.WODirectActionRequestHandler>: Exception while handling action named "default" on action class "null"

That means it found and ran the requested action.

:com.webobjects.foundation.NSForwardException [com.webobjects.appserver._private.WODynamicElementCreationException] null

The real problem is a WODynamicElementCreationException


[2007-03-06 10:11:03 EST] <WorkerThread0> com.webobjects.foundation.NSForwardException for com.webobjects.appserver._private.WODynamicElementCreationException: <com.webobjects.appserver._private.WOImageButton> 'Either a component action or a direct action must be specified.'

Somewhere in Main.wod you have a WOImageButton. It has neither the action or directAction binding set on it.


This error completely puzzles me because my understanding is that the 'defaultAction' method of 'DirectAction' class is called by the WebObjects framework when you first connect to the application. And this class is definitely present in the application, so I cannot understand why it is reporting an "action class "null", or in other words, is not recognizing the (bootstrap)DirectAction class.

It is important to actually read the _entire_ error message and not jump to conclusions based on a few words in the first line. If read (and thought about), the error messages are usually quite informative.


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to